Disclosure of Invention
The embodiment of the invention provides a channel switching method and device, which reduce unnecessary video switching and further improve the watching experience of a user.
In a first aspect, an embodiment of the present invention provides a channel switching method, including:
receiving a channel switching instruction, wherein the channel switching instruction is used for instructing to switch a television from the first channel to a second channel;
if the first channel is determined to play the first video-on-demand VOD video of the target hybrid broadcast broadband television HBBTV application, acquiring a target HBBTV application identifier;
acquiring AIT data of an application information table of the second channel from a preset database; analyzing the AIT data and determining all HBBTV application identifications corresponding to the second channel;
and determining the video played by the television according to all HBBTV application identifications corresponding to the second channel and the target HBBTV application identification.
In a possible implementation manner, the determining, according to all HBBTV application identifiers corresponding to the second channel and the first target HBBTV application identifier, a video played by the television includes:
if all the HBBTV application identifications corresponding to the second channel comprise the target HBBTV application identification and the HBBTV switch corresponding to the second channel is in an open state, determining that the video played by the television is the first VOD video;
and if the target HBBTV application identification is not included in all the HBBTV application identifications corresponding to the second channel, or the HBBTV switch corresponding to the second channel is in a closed state, determining that the video played by the television is the live video of the second channel.
In a possible implementation manner, after determining that the video played by the television is the first VOD video, the method further includes:
generating channel switching information corresponding to the channel switching instruction, wherein the channel switching information is used for indicating that a channel to be switched is the second channel;
continuing to play the first VOD video under the first channel.
In a possible implementation manner, after determining that the video played by the television is the live video of the second channel, the method further includes:
pausing the playing of the first VOD video and releasing the resources occupied by the playing of the first VOD video;
and allocating the resources to the live video of the second channel, and switching the channel of the television to the second channel so that the television plays the live video of the second channel.
In a possible implementation manner, after the channel of the television is switched to the second channel, the method further includes:
acquiring the latest AIT data of the second channel;
judging whether the latest AIT data is the same as the AIT data of the second channel stored in the preset database or not;
and if not, updating the AIT data of the second channel stored in the preset database into the latest AIT data.
In a second aspect, an embodiment of the present invention provides a channel switching apparatus, including a receiving module, a first obtaining module, a second obtaining module, a first determining module, and a second determining module, where,
the receiving module is used for receiving a channel switching instruction, wherein the channel switching instruction is used for indicating that a television is switched from the first channel to the second channel;
the first obtaining module is used for obtaining a target HBBTV application identifier if the first channel is determined to play a first video-on-demand VOD video of the target hybrid broadcast broadband television HBBTV application;
the second obtaining module is used for obtaining the AIT data of the application information table of the second channel from a preset database;
the first determining module is configured to parse the AIT data and determine all HBBTV application identifiers corresponding to the second channel;
the second determining module is configured to determine the video played by the television according to all HBBTV application identifiers corresponding to the second channel and the target HBBTV application identifier.
In a possible implementation manner, the second determining module is specifically configured to:
if all the HBBTV application identifications corresponding to the second channel comprise the target HBBTV application identification and the HBBTV switch corresponding to the second channel is in an open state, determining that the video played by the television is the first VOD video;
and if the target HBBTV application identification is not included in all the HBBTV application identifications corresponding to the second channel, or the HBBTV switch corresponding to the second channel is in a closed state, determining that the video played by the television is the live video of the second channel.
In a possible implementation, the apparatus further comprises a generation module and a playing module, wherein,
the generating module is configured to generate channel switching information corresponding to the channel switching instruction after the second determining module determines that the video played by the television is the first VOD video, where the channel switching information is used to indicate that a channel to be switched is the second channel;
the playing module is used for continuously playing the first VOD video under the first channel.
In a possible implementation manner, after the second determining module determines that the video played by the television is the live video of the second channel, the playing module is further configured to:
pausing the playing of the first VOD video and releasing the resources occupied by the playing of the first VOD video;
and allocating the resources to the live video of the second channel, and switching the channel of the television to the second channel so that the television plays the live video of the second channel.
In a possible implementation manner, the apparatus further includes a third obtaining module, a determining module and an updating module, wherein,
the third obtaining module is configured to obtain the latest AIT data of the second channel after the playing module switches the channel of the television to the second channel;
the judging module is used for judging whether the latest AIT data is the same as the AIT data of the second channel stored in the preset database;
the updating module is configured to update the AIT data of the second channel stored in the preset database to the latest AIT data when the judging module judges that the latest AIT data is different from the AIT data of the second channel stored in the preset database.
In a third aspect, an embodiment of the present invention provides a television, including: a processor coupled with a memory;
the memory is used for storing a computer program;
the processor is configured to execute the computer program stored in the memory to enable the terminal device to perform the method of any of the first aspect.
In a fourth aspect, an embodiment of the present invention provides a readable storage medium, which includes a program or instructions, and when the program or instructions are run on a computer, the method according to any one of the first aspect is performed.
According to the channel switching method and device provided by the embodiment of the invention, after the television receives a channel switching instruction for indicating to switch the television from the first channel to the second channel; if the first channel is determined to play the first video-on-demand VOD video of the target hybrid broadcast broadband television HBBTV application, acquiring a target HBBTV application identifier; acquiring AIT data of an application information table of a second channel from a preset database; analyzing the AIT data and determining all HBBTV application identifications corresponding to the second channel; and determining the video played by the television according to all the HBBTV application identifications corresponding to the second channel and the target HBBTV application identification. In the process, unnecessary video switching can be reduced, and the watching experience of a user is improved. Further, the video switching process also meets the standard requirements of HBBTV.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic view of an application scenario of a channel switching method according to an embodiment of the present invention. Referring to fig. 1, when the live video of channel 1 is televised, assuming that channel 1 is associated with the HBBTV application, the HBBTV application identifier is included in thelive interface 101 of channel 1, and the HBBTV application identifier may be a link of the HBBTV application. The user can click on the HBBTV application identifier to enable the television to display the HBBTV application associated with the channel 1 in the channel 1, wherein the HBBTV application comprises a plurality of VOD videos, and the user can view the VOD videos in the HBBTV application according to actual needs.
In the application, when a user switches channels, if the television currently plays a VOD video in a target HBBTV application, the television judges whether the HBBTV application corresponding to a channel to be switched includes the target HBBTV application, if so, the television continues to play the VOD video currently being played, and if not, the television suspends playing the VOD video, switches the channels, and plays a live video of the switched channel, so that switching of the videos can be reduced, and watching experience of the user is improved. Further, the video switching process also meets the standard requirements of HBBTV.
The technical means shown in the present application will be described in detail below with reference to specific examples. It should be noted that the following embodiments may be combined with each other, and the description of the same or similar contents in different embodiments is not repeated.
Fig. 2 is a flowchart illustrating a channel switching method according to an embodiment of the present invention. Referring to fig. 2, the method may include:
s201, receiving a channel switching instruction, wherein the channel switching instruction is used for instructing to switch the television from a first channel to a second channel.
The execution main body of the embodiment of the invention can be a television and also can be a channel switching device arranged in the television. Alternatively, the channel switching device may be implemented by software, or may be implemented by a combination of software and hardware.
Alternatively, the electric field shown in the embodiment of the present invention is a single decoder (decoder) mode.
The current channel of the television is a first channel, and the first channel may be any one of the channels in the television.
For example, the channels of the television may include Beijing satellite television, Shanghai satellite television, CCTV1, and the like.
Alternatively, the user may perform a pressing operation on a preset key in the control device (e.g., a remote controller) to enable the control device to transmit a channel switching instruction to the television.
Optionally, the channel switching instruction may include a relationship between the second channel to be switched to and the first channel.
For example, if the user presses a down key in the control device, the second channel may be a channel next to the first channel in the channel list. If the user presses an up key in the control device, the second channel may be a channel previous to the first channel in the channel list.
Optionally, the channel switching instruction includes an identifier of a channel to be switched to.
S202, if the first VOD video played by the first channel is the first VOD video of the target HBBTV application, the target HBBTV application identification is obtained.
When the current channel of the television is the first channel, the television may be playing a live video of the first channel, and the television may also be playing a VOD video in the HBBTV application corresponding to the first channel.
Optionally, the live video of the channel is a video transmitted to the television by the broadcast television network server in real time, so that the television plays the video in real time.
The target HBBTV application is the HBBTV application corresponding to the first channel.
Alternatively, a plurality of VOD videos may be included in one HBBTV application. The first VOD video is any one of the videos in the target HBBTV application.
S203, AIT data of the second channel is obtained from the preset database, the AIT data is analyzed, and all HBBTV application identifications corresponding to the second channel are determined.
Optionally, the preset database may be a preset storage module.
Optionally, the HBBTV application identifier may include: original network identification (original network ID), transport stream identification (transport stream ID), and service identification (service ID).
It should be noted that the second channel may not correspond to the HBBTV application identifier, that is, the HBBTV application identifier corresponding to the second channel is empty. In this case, the AIT data of the second channel acquired in the preset database is also empty.
Next, a process of acquiring all HBBTV application identifiers corresponding to the second channel is described in detail with reference to fig. 3.
Fig. 3 is a schematic process diagram for acquiring all HBBTV application identifiers corresponding to a second channel according to an embodiment of the present invention. Referring to fig. 3, the preset database is an AIT storage module, and AIT data corresponding to each channel is stored in the AIT storage module, where the AIT data is used to indicate an HBBTV application identifier corresponding to each channel.
The channel switching device can acquire AIT data corresponding to the second channel from the AIT storage module, and send the AIT data corresponding to the second channel to the AIT analysis module, the AIT analysis module analyzes the AIT data corresponding to the second channel to obtain an HBBTV application list corresponding to the second channel, the HBBTV application list comprises all HBBTV application identifications corresponding to the second channel, and the AIT analysis module sends the acquired HBBTV application list to the channel switching device so that the channel switching device acquires all HBBTV application identifications corresponding to the second channel.
And S204, determining the video to be played in the second channel according to all the HBBTV application identifications corresponding to the second channel and the target HBBTV application identification.
Optionally, if all the HBBTV application identifiers corresponding to the second channel include the target HBBTV application identifier and the HBBTV switch corresponding to the second channel is in the open state, it is determined that the video to be played on the second channel is the first VOD video.
Optionally, the television may be provided with an HBBTV master switch, each channel may also be provided with an HBBTV switch, and in an actual application process, the HBBTV master switch may be turned on or off according to actual needs, and the HBBTV switch of each channel may be turned on or off.
When the HBBTV master switch of the television is closed, then the state of the HBBTV switch of each channel is closed. When the HBBTV main switch of the television is opened, if the HBBTV switch of one channel is opened, the HBBTV switch of the channel is in an open state, and if the HBBTV switch of one channel is closed, the HBBTV switch of the channel is in a closed state.
Optionally, after determining that the video to be played in the second channel is the first VOD video, generating channel switching information corresponding to the channel switching instruction, where the channel switching information is used to indicate that the channel to be switched is the second channel; continuing to play the first VOD video on the first channel.
It should be noted that, if the user closes the HBBTV switch of the second channel during the process of continuing to play the first VOD video, the television switches the channel to the second channel according to the channel switching information, and plays the live video of the second channel.
Optionally, if all the HBBTV application identifiers corresponding to the second channel do not include the target HBBTV application identifier, or the HBBTV switch corresponding to the second channel is in the closed state, it is determined that the video to be played in the second channel is the live video of the second channel.
Optionally, the playing of the first VOD video may be paused, the resource occupied by the playing of the first VOD video is released, the resource is allocated to the live video of the second channel, and the channel of the television is switched to the second channel, so that the television plays the live video of the second channel.
Alternatively, the resources occupied by playing the first VOD video may be hardware resources of the television, for example, the hardware resources may include decoder (decoder) resources and the like.
Optionally, after the channel of the television is switched to the second channel, the latest AIT data of the second channel may be further acquired, whether the latest AIT data is the same as the AIT data of the second channel stored in the preset database is determined, and if not, the AIT data of the second channel stored in the preset database is updated to the latest AIT data. In this way, it is possible to ensure that the AIT data of the second channel is the latest AIT data.
In the channel switching method provided by the embodiment of the invention, after the television receives a channel switching instruction for instructing to switch the television from the first channel to the second channel; if the first channel is determined to play the first video-on-demand VOD video of the target hybrid broadcast broadband television HBBTV application, acquiring a target HBBTV application identifier; acquiring AIT data of an application information table of a second channel from a preset database; analyzing the AIT data and determining all HBBTV application identifications corresponding to the second channel; and determining the video played by the television according to all the HBBTV application identifications corresponding to the second channel and the target HBBTV application identification. In the process, unnecessary video switching can be reduced, and the watching experience of a user is improved. Further, the video switching process also meets the standard requirements of HBBTV.
Based on any of the above embodiments, the following describes the channel switching method in further detail with reference to fig. 4.
Fig. 4 is a flowchart illustrating another channel switching method according to an embodiment of the present invention. Referring to fig. 4, the method may include:
s401, receiving a channel switching instruction, wherein the channel switching instruction is used for instructing to switch the television from a first channel to a second channel.
S402, judging whether the television plays the first VOD video.
If so, S403-S411 are executed.
If not, S411 is executed.
It should be noted that the execution processes of S401 to S402 may refer to the execution processes of S201 to S202, and are not described herein again.
S403, determine whether the HBBTV switch of the second channel is in an open state.
If so, S404-S410 are performed.
If not, go to S410.
S404, acquiring the target HBBTV application identification of the running television.
S405, AIT data of the second channel is obtained.
Alternatively, referring to fig. 3, AIT data may be acquired in the AIT data storage module.
Optionally, before the AIT data of the second channel is acquired, the AIT data and the HBBTV application list currently cached may be deleted.
Optionally, the AIT data currently cached by the television is AIT data of the first channel.
Optionally, the currently cached HBBTV application list of the television is the HBBTV application list corresponding to the first channel.
S406, the AIT data of the second channel is analyzed to obtain an HBBTV application list corresponding to the second channel.
The HBBTV application list corresponding to the second channel includes all HBBTV application identifiers corresponding to the second channel.
Optionally, referring to fig. 3, the AIT data parsing module may be requested to parse the AIT data to obtain the HBBTV application list corresponding to the second channel.
Optionally, if the HBBTV master switch of the television is turned on and the HBBTV switch of the second channel is turned on, it is determined that the HBBTV switch of the second channel is in an on state.
Optionally, if the HBBTV master switch of the television is turned off, or the HBBTV switch of the second channel is turned off, it is determined that the state of the HBBTV switch of the second channel is an off state.
And S407, judging whether the HBBTV application list corresponding to the second channel comprises a target HBBTV application identifier.
If so, S408-S409 are performed.
If not, go to S410.
S408, continue playing the first VOD video in the first channel.
The first VOD video is a video in a target HBBTV application corresponding to a first channel currently played by the television.
And S409, generating channel switching information according to the channel switching instruction.
It should be noted that the execution process of S408-S409 may refer to the execution process of S205, and is not described herein again.
And S410, playing the live video of the second channel.
It should be noted that the execution process of S410 may refer to the execution process of S206, and is not described herein again.
In the embodiment shown in fig. 4, unnecessary video switching can be reduced, thereby improving the user viewing experience. Further, the video switching process also meets the standard requirements of HBBTV.
On the basis of any of the above embodiments, the following describes in detail the technical solutions shown in the above method embodiments with reference to fig. 5.
Fig. 5 is a schematic diagram of a channel switching process according to an embodiment of the present invention. Please refer to fig. 5, which includes a tv interface 501-atv interface 506.
Referring to thetv interface 501, assume that the current channel of the tv is channel 1, and the tv is currently playing a live video of channel 1, and the live interface includes an identifier of the HBBTV application 1 corresponding to channel 1. When the user needs to watch the video in the HBBTV application 1 corresponding to the channel 1, the user can move the cursor of the television to the identifier of the HBBTV application 1 through the remote controller, and perform a click operation, so that the television displays the detail page of the HBBTV application 1, specifically, please refer to thetelevision interface 502.
Referring to thetelevision interface 502, a plurality of VOD videos are included in the HBBTV application 1 corresponding to the channel 1, and the user can select a VOD video to be viewed. Assuming that the user needs to watch movie 1 in the HBBTV application 1, the user can move the cursor of the tv to the identifier of movie 1 through the remote controller, and perform a click operation, so that the tv plays movie 1, specifically, please refer to thetv interface 503.
Referring to thetelevision interface 503, the television plays a VOD video (movie 1). In the process of playing the VOD video by the television, it is assumed that a user clicks a down button in the remote controller to enable the remote controller to send a channel switching instruction 1 to the television to request the television to switch a channel to channel 2, the television determines that the HBBTV application corresponding to channel 2 includes the HBBTV application 1, and the HBBTV switch corresponding to channel 2 is in an open state, and then the television continues to play movie 1 in channel 1, specifically, please refer to thetelevision interface 504.
Please refer to thetv interface 504, the tv continues to play the VOD video (movie 1), and the tv further generates the channel switching information 1 according to the video switching instruction 1, where the channel switching information 1 is used to indicate that the channel to be switched to is the channel 2, and at this time, if the user quits playing the VOD video, the tv may play the live video of the channel 2 according to the channel switching information 1. In the process that the television continues to play the VOD video, assuming that the user clicks a down button in the remote controller to enable the remote controller to send a channel switching instruction 2 to the television to request the television to switch the channel to channel 3, the television determines that the HBBTV application corresponding to channel 3 includes the HBBTV application 1, and the state of the HBBTV switch corresponding to channel 3 is an open state, and then the television continues to play the movie 1 in channel 1, specifically, please refer to thetelevision interface 505.
Please refer to thetv interface 505, the tv continues to play the VOD video (movie 1), and the tv further generates the channel switching information 2 according to the video switching instruction 2, where the channel switching information 2 is used to indicate that the channel to be switched to is the channel 3, and at this time, if the user quits playing the VOD video, the tv may play the live video of the channel 3 according to the channel switching information 2. In the process of continuously playing the VOD video by the television, it is assumed that the user clicks a down button in the remote controller, so that the remote controller sends a channel switching instruction 3 to the television to request the television to switch the channel to channel 4, and the television determines that the HBBTV application corresponding to channel 4 does not include HBBTV application 1, and then the television plays the live video of channel 4, specifically, please refer totelevision interface 506.
Referring totelevision interface 506, the television plays the live video of channel 4.
In the channel switching process, unnecessary video switching can be reduced, and the watching experience of a user is improved. Further, the video switching process also meets the standard requirements of HBBTV.
Fig. 6 is a schematic structural diagram of a channel switching apparatus according to an embodiment of the present invention. Referring to fig. 6, the apparatus may include a receivingmodule 11, a first obtainingmodule 12, a second obtainingmodule 13, a first determiningmodule 14, and a second determiningmodule 15, wherein,
the receivingmodule 11 is configured to receive a channel switching instruction, where the channel switching instruction is used to instruct to switch a television from the first channel to a second channel;
the first obtainingmodule 12 is configured to obtain a target HBBTV application identifier if it is determined that a first video on demand VOD video of the target HBBTV application is played on a first channel;
the second obtainingmodule 13 is configured to obtain, in a preset database, AIT data in an application information table of the second channel;
the first determiningmodule 14 is configured to parse the AIT data and determine all HBBTV application identifiers corresponding to the second channel;
the second determiningmodule 15 is configured to determine the video played by the television according to all HBBTV application identifiers corresponding to the second channel and the target HBBTV application identifier.
The channel switching device provided in the embodiment of the present invention may implement the technical solutions shown in the above method embodiments, and the implementation principles and beneficial effects thereof are similar, and are not described herein again.
In a possible implementation manner, the second determiningmodule 15 is specifically configured to:
if all the HBBTV application identifications corresponding to the second channel comprise the target HBBTV application identification and the HBBTV switch corresponding to the second channel is in an open state, determining that the video played by the television is the first VOD video;
and if the target HBBTV application identification is not included in all the HBBTV application identifications corresponding to the second channel, or the HBBTV switch corresponding to the second channel is in a closed state, determining that the video played by the television is the live video of the second channel.
Fig. 7 is a schematic structural diagram of another channel switching apparatus according to an embodiment of the present invention. On the basis of the embodiment shown in fig. 6, please refer to fig. 7, the apparatus further includes a generatingmodule 16 and aplaying module 17, wherein,
the generatingmodule 16 is configured to generate channel switching information corresponding to the channel switching instruction after the second determining module determines that the video played by the television is the first VOD video, where the channel switching information is used to indicate that a channel to be switched is the second channel;
theplaying module 17 is configured to continue playing the first VOD video on the first channel.
In a possible implementation manner, after the second determiningmodule 15 determines that the video played by the television is the live video of the second channel, the playingmodule 17 is further configured to:
pausing the playing of the first VOD video and releasing the resources occupied by the playing of the first VOD video;
and allocating the resources to the live video of the second channel, and switching the channel of the television to the second channel so that the television plays the live video of the second channel.
In a possible implementation, the apparatus further comprises a third obtainingmodule 18, a determiningmodule 19 and anupdating module 110, wherein,
the third obtainingmodule 18 is configured to obtain the latest AIT data of the second channel after the playing module switches the channel of the television to the second channel;
the judgingmodule 19 is configured to judge whether the latest AIT data is the same as the AIT data of the second channel stored in the preset database;
the updatingmodule 110 is configured to update the AIT data of the second channel stored in the preset database to the latest AIT data when the determiningmodule 19 determines that the latest AIT data is different from the AIT data of the second channel stored in the preset database.
The channel switching device provided in the embodiment of the present invention may implement the technical solutions shown in the above method embodiments, and the implementation principles and beneficial effects thereof are similar, and are not described herein again.
An embodiment of the present invention provides a terminal device, including: a processor coupled with a memory;
the memory is used for storing a computer program;
the processor is configured to execute the computer program stored in the memory to enable the terminal device to perform the method according to any of the method embodiments described above.
Embodiments of the invention provide a readable storage medium comprising a program or instructions for performing a method as described in any of the method embodiments above when the program or instructions are run on a computer.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the embodiments of the present invention, and are not limited thereto; although embodiments of the present invention have been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the embodiments of the present invention.