This is the multi-page printable view of this section.
Click here to print.
Return to the regular view of this page.
TV content get info use case
TV content get info use case
Global use case developed by Aura Platform Team that allows users to get content info specific TV channels in Aura
Introduction
The TV content get info use case is a global experience designed and developed by Aura Global Team that allows Telefónica customers to ask Aura for a TV channel information using a vocal interface.
Find additional information in following the documents:
Specifications
Kernel API
In order to resolve the user’s request, Aura uses Video Contents normalized Kernel API.
Request-response model
TV content get info use case is adapted to the new request-response normalized model v3.
Available channels
Once TV content get info v3 use case is fully normalized, it will be available for any channel that implements normalized v3 request-response model including TV related data.
Currently, STB channels in ES are already available.
Display features
Currently, the normalized TV content get info use case includes basic get content information features for channels:
- Content get info by channel
Therefore, the answer could be of this type:
“This is what they are broadcasting now on that channel”
Use case development
The TV content get info use case development includes these components:
Understanding features
| Entity |
Example |
ent.audiovisual_channel |
“What’s on in channel 1?” |
⚠️ Other entities in the user’s request are not taken into account in the get content info process.
In order to understand users’ requests (utterances), Aura is trained with:
- NLP expression to recognize the user’s utterance and detect her intention.
- TV catalog in order to understand TV content (channels) in the user’s utterance and detect them as Aura entities.
Use case logic
Once Aura has recognized the user’s utterance based on NLP components, the use case should be resolved based on:
1 - Dialog configuration
Configuration of the generic dialog for TV content get info use case
How the generic dialog must be configured for this use case
Specific configuration
The TV content get info use case is triggered by the generic dialog v3.
For this use case, the required specific configuration is set below:
{
"id": "generic-dialog-v3",
"channelDataVersion": "v3",
"triggerConditions": [
{
"intent": "intent.tv.content_get_info",
"settings": {
"locales": {
"error": [
"core:flc.answer.error"
]
},
"needTvResolution": true
}
}
],
"onlyIn": [
"movistar-plus",
"set-top-box"
]
}
Specific values
| Key |
Value |
Description |
| triggerConditions[?].settings.needTvResolution |
true |
Get resolution from resolution API |
2 - TV content get info plugin
TV content get info plugin
Complex Logic Framework plugin for the TV content get info use case
Introduction
The TV content get info plugin resolves the request from a user getting information about channel.
It includes some key steps described in the following sections.
This step validates that the input request fulfills all the requirements from the input schema.
If the input data has an error, the resource returned is:
tv:video.model-validation.request.error.
Get content info about a channel
The content get info about a channel is based in the received entities.
The content get info stage follows the steps set below:
Build the search_query param
The content get info builds a search_query param using label values of first entity ent.audiovisual_channel to prioritize channels searching. If the label value is null for an entity, then the canon value is used.
Entity used to search is: ent.audiovisual_channel
The entity will be used as follows:
- If there are channel entities and other entities, then the
search_query parameter is built only using the first channel entity.
- For instance:
channel_name: "La 1"
- If there are not entities allowed, then a query param to content get info is not built.
With this prioritization, the system builds a search_query param that will be used to call the video query API for searching purposes.
Video query API
After preparing the search_query parameter, we will make a query to Video Contents normalized Kernel API by searching through all the possible fields with the remaining words.
To make this API call, several parameters are needed, which are described below:
user_id: Input data[aura_user][user_id]
administrative_number: Input data[app_context][user][account_number]
access_token: Input data[aura_user][access_token]
scopes: Input data[aura_user][scopes]
purposes: Input data[aura_user][purposes]
device_type: Input data[app_context][device][type]
catalog_types: LIVE.
search_query: String with a custom search query based in the received entities.
show_series: series.
commercialization_types: List made by SVOD.
max_quality: Input data[app_context][device][max_quality]
order: personal
commercial_offer: Input data[app_context][user][profile] if exists. Otherwise, do not use this param.
live_at: UTC current time at which the request is made.
profile: Input data[app_context][user][video_profile_name] if exists. Otherwise, do not use this param.
current_region: Input data[app_context][location][currentRegion] if exists. Otherwise, do not use this param.
The fields current_region and profile may not be implemented in certain cases and this could give the error 501 Not Implemented in the video API according to the documentation.
To prevent this problem, we should send these fields only when input data has this value.
Content get info response
When a user requests for getting content information about a channel, the following possible scenarios can occur for the response:
a. No content with channel info is received. The returned resource is tv:video.content-get-info.by-channel.no-results
b. Receive content with channel info. The returned resource is tv:video.content-get-info.by-channel.single-result
c. More than one type of content is received. The returned resource is tv:video.content-get-info.by-channel.multiple-results
d. The request does not contain any ent.audiovisual_channel entity. The returned resource is tv:video.content-get-info.by-channel.no-results
e. Receive an API error. The returned resource is tv:video.api.answer.error
Response
The response follows this response schema.
Where:
-
intent: input intent.
-
entities: input entities.
-
result_intent: This field is always MEDIA.SEARCH.
-
resources: List of response resources that includes three main parameters:
-
payload: Information provided by the Kernel API, when we make the content get info request.
If we receive a response, this field includes the following parameters:
type: The value of this field depends on the type of data included in the field data (info returned by the API):
- If it is a value:
details
- If it is a list:
content_list
data: It returns the information provided by the Kernel API.
-
status: Final status request. This field includes the following parameters:
code: Status code.
message: Status message, which describes the status code.
params: Parameter that sends details of status. This field does not appear if it is empty.
-
actions: Actions to follow with the result of request. This plugin could include the following actions:
MAKE_SOUND: The target for this action is channel and its unique parameter is sound (with negative value assigned). This action is returned when we have the resource tv:video.content-get-info.by-channel.no-results
-
conditions: Condition for the actions to be applied.
3 - TV content get info resources
TV content get info use case resources
Resources used by the TV content get info use case
The TV content get info use case will use three different types of resources:
Specific resources for the use case: tv.content_get_info
The resources associated to the TV content get info plugin are defined below:
| Specific resources for tv.content_get_info use case |
Definition |
Example |
Managed by |
Scope |
tv:video.content-get-info.by-channel.no-results |
Resource returned when the search does not find any result with channel info |
Lo siento, no encuentro lo que dices |
tv.content_get_info plugin |
Use case-specific |
tv:video.content-get-info.by-channel.single-result |
Resource returned when the search finds one channel |
Esto es lo que están emitiendo ahora en ese canal |
tv.content_get_info plugin |
Use case-specific |
tv:video.content-get-info.by-channel.multiple-results |
Resource returned when the search finds more than one channel |
He encontrado estos contenidos que se estan emitiendo |
tv.content_get_info plugin |
Use case-specific |
4 - NLP configuration by OB
NLP configuration by OB
NLP configuration by OB for the TV content get info use case
Introduction
The current document includes the configuration of the NLP model for the TV content get info use case in the OBs where it is available.
Brazil
The aura-nlpdata repository structure in Brazil is organized by channel: aura-nlpdata-br-[channel]. Each repository will contain the files for the available use cases in this channel.
The following configuration corresponds to the STB channel, which is included in the repository: https://github.com/Telefonica/aura-nlpdata-br-stb
Intent
intent.tv.content_get_info
Entities
ent.audiovisual_actor
ent.audiovisual_actor
ent.audiovisual_best
ent.audiovisual_channel
ent.audiovisual_director
ent.audiovisual_documental_title
ent.audiovisual_film_title
ent.audiovisual_genre
ent.audiovisual_most_watched
ent.audiovisual_releases
ent.audiovisual_sports
ent.audiovisual_sports_circuit
ent.audiovisual_sports_player_driver
ent.audiovisual_sports_player_rider
ent.audiovisual_sports_season
ent.audiovisual_sports_season_motor
ent.audiovisual_sports_team
ent.audiovisual_sports_unit
ent.audiovisual_subgenre
ent.audiovisual_tv_episode_number
ent.audiovisual_tv_season_number
ent.audiovisual_tvseries_title
ent.audiovisual_tvshow_title
ent.device_mobile
ent.device_tv
ent.time_instant
ent.time_interval
ent.time_interval_future
ent.time_interval_past
Pipeline stages
The following stages of STB’s pipeline have been used to develop this UC:
PygrapeGrammarWrapper
EntityTaggerAdapterWrapper
The whole pipeline.jsonfile is available at: https://github.com/Telefonica/aura-nlpdata-br-stb/blob/master/data/pt-br/stb/pipeline.json