Disclosure of Invention
The invention provides a key distribution processing method of an intelligent television and the intelligent television, which are used for solving the problem of overlong key response time caused by sequentially distributing key information in sequence in the prior art.
The invention provides a key allocation processing method of an intelligent television, which comprises the following steps:
receiving key information;
inquiring an application corresponding to the key information in a key and application mapping table;
distributing the key information to an application corresponding to the key information according to the query result;
the key and application mapping table is used for recording the corresponding relation between key information and the application supporting the key information.
Further, still include:
and updating the corresponding relation between the application and the key information contained in the updated key indication in the key and application mapping table according to the key information supported by the application and/or the key information not supported by the application.
Further, the allocating the key information to the application corresponding to the key information according to the query result includes:
if the application corresponding to the inquired key information is multiple, distributing the key information according to the priority of the application corresponding to the key information;
and the priority of the application is determined according to the times of the application responding to the key information.
Further, the allocating the key information according to the priority of the application corresponding to the key information includes:
distributing the key information to a first application;
if a response sent by the server corresponding to the first application is received, the priority of the first application is adjusted from the current priority to the highest priority;
and if the response sent by the server corresponding to the first application is not received, distributing the key information to a second application, wherein the priority of the second application is lower than that of the first application.
Further, still include:
determining a new application;
and adding the corresponding relation between the newly added application and the key information in the key and application mapping table, wherein the newly added application and each key in the key and application mapping table have a corresponding relation, or the newly added application and the key in the key and application mapping table have a preset corresponding relation.
The second aspect of the present invention provides a smart television, including:
the first receiving module is used for receiving key information;
the query module is used for querying the application corresponding to the key information in the key and application mapping table;
the distribution module is used for distributing the key information to the application corresponding to the key information according to the query result;
the key and application mapping table is used for recording the corresponding relation between key information and the application supporting the key information.
Further, still include:
and the updating module is used for updating the corresponding relation between the key and the key information contained in the application and the updated key indication in the application mapping table according to the key information supported by the application and/or the key information not supported by the application.
Further, the allocation module is specifically configured to:
when a plurality of applications corresponding to the inquired key information are available, distributing the key information according to the priority of the application corresponding to the key information;
and the priority of the application is determined according to the times of the application responding to the key information.
Further, the allocation module includes:
the first allocation unit is used for allocating the key information to the first application;
the adjusting unit is used for adjusting the priority of the first application from the current priority to the highest priority when a response sent by the server corresponding to the first application is received;
and the second allocating unit is used for allocating the key information to a second application when the response sent by the server corresponding to the first application is not received, and the priority of the second application is lower than that of the first application.
Further, still include:
a determining module for determining a newly added application;
and the adding module is used for adding the corresponding relation between the newly added application and the key information in the key and application mapping table, wherein the newly added application has a corresponding relation with each key in the key and application mapping table, or the newly added application has a preset corresponding relation with the key in the key and application mapping table.
According to the key distribution processing method of the intelligent television and the intelligent television, the key and the application mapping table are arranged in the APM of the intelligent television, after the APM receives the key information, the key is directly distributed to the application capable of responding to the key according to the key and the application mapping table, the key information does not need to be distributed to the application one by one in sequence like the prior art, so that the key response time is reduced, especially when the number of applications installed in the intelligent television is large, the key response time can be greatly reduced, and the user experience is greatly improved.
Detailed Description
In order to make the objects, technical solutions and advantages 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 accompanying 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 diagram of key allocation performed by an APM in the prior art, and as shown in fig. 1, assuming that there are 4 applications, namely application 1, application 2, application 3, and application 4, in an intelligent television, when the APM allocates key information, whatever key information is received, the key information is sequentially allocated according to the order of application 1, application 2, application 3, and application 4. That is, the APM first assigns key information to the application 1, waits for the completion of the processing of the application 1, stops the assignment if the application 1 responds to the key information, continues the assignment to the key 2 if the application 1 does not respond to the key information, and so on. If the application 4 does not respond to the key information until then, the application 4 needs to wait for the previous 3 applications to have processed the key information before receiving and responding, which results in a key response time procedure. Moreover, as the number of applications installed in the smart television is increasing, the key response time is longer, which results in poor user experience.
The invention provides a key allocation processing method of an intelligent television based on the above problems, which determines an application capable of supporting a specific key by establishing a key and application mapping table in an APM, and allocates the specific key to the application supporting the specific key, thereby shortening the key response time.
It should be noted that, in the following, the technical solution of the present invention is described by taking the APM as an example for performing key assignment, but this is not a limitation of the present invention, and in some other scenarios, the processing procedure of the present invention may also be executed by other functional modules in the smart television.
Fig. 2 is a schematic flowchart of a first embodiment of a key allocation processing method of a smart television, as shown in fig. 2, the method includes:
s201, receiving key information.
After the smart television is started, when a user presses a certain key on a remote controller of the smart television, the remote controller sends a remote control signal to the smart television, and after the smart television receives the remote control signal, key information, such as key information of 'volume increase', 'volume decrease', 'next channel', 'previous channel', and the like, is analyzed from the remote control signal.
S202, inquiring the application corresponding to the key information in the key and application mapping table.
And S203, distributing the key information to the application corresponding to the key information according to the query result.
The key and application mapping table is used for recording the corresponding relation between the key information and the application supporting the key information.
Table 1 is an example of a key to application mapping table.
TABLE 1
Push-button
|
Applications 1
|
Application 2
|
Application 3
|
Application 4
|
Applications 5
|
red
|
|
|
Support for
|
|
|
blue
|
Support for
|
|
Support for
|
|
Support for
|
orange
|
|
Support for
|
|
Support for
|
Support for
|
green
|
Support for
|
Support for
|
|
|
|
ok
|
|
|
Support for
|
Support for
|
Support for |
As shown in table 1, there are 5 applications in the smart tv, wherein there are application 3 supporting the "red" key, application 1, application 3, and application 5 supporting the "blue" key, application 2, application 4, and application 5 supporting the "orange" key, application 1 and application 2 supporting the "green" key, and application 3, application 4, and application 5 supporting the "ok" key.
For example, if the user presses the "red" key on the remote controller, the APM queries the table 1 after receiving the key information, and the query result is that only the application 3 supports the "red" key, that is, only the application 3 can respond to the "red" key, and then the APM directly allocates the "red" key information to the application 3 after obtaining the query result without reallocation to other applications, so that the key information can be quickly allocated to the corresponding application, and the key response time is saved.
Optionally, the application related to the present invention may be a basic function in the smart television, and meanwhile, may also be a third-party application installed on the smart television by the user, and the like.
The key and application mapping table records the corresponding relationship between all keys in the smart television remote controller and all applications installed on the smart television, that is, no matter which key is pressed on the remote controller by the user, the APM can allocate the key to the application capable of responding to the key by inquiring the key and application mapping table.
When the mapping table of the key and the application is stored in the APM, different flags may be used to distinguish whether a certain application supports a certain key, for example, "1" is used to indicate support, and "0" is used to indicate non-support, and the APM may determine whether the application supports the key according to whether the flag of the cross position of the key and the application in the mapping table of the key and the application is 1.
In the embodiment, the key and the application mapping table are arranged in the APM of the smart television, after the APM receives the key information, the key is directly allocated to the application capable of responding to the key according to the key and the application mapping table, the key information does not need to be sequentially allocated to the application one by one like the prior art, so that the key response time is reduced, especially when the number of applications installed in the smart television is large, the key response time can be greatly reduced, and the user experience is greatly improved.
On the basis of the foregoing embodiment, the present embodiment relates to a specific method for adding a new application to a key and application mapping table, that is, fig. 3 is a flowchart illustrating a second embodiment of a key allocation processing method for a smart television according to the present invention, and as shown in fig. 3, the specific method for adding the new application to the key and application mapping table includes:
s301, determining the newly added application in the smart television.
Optionally, when an application is newly added to the smart television, for example, after the application is newly installed, the application may report a notification message to the APM, where the message may include information such as an identifier of the application, or a processing module of the smart television may notify the APM. The APM can determine the newly added application according to the received notification message.
S302, adding the corresponding relation between the newly added application and the key information in the key and application mapping table.
The newly added application and the key have a corresponding relation with each key in the application mapping table, or the newly added application and the key have a preset corresponding relation with the key in the application mapping table.
After the APM determines that an application is newly added to the smart television, a corresponding relationship may be added to the mapping table of the key and the application, and specifically, the corresponding relationship may be added according to two strategies. Firstly, the newly added application supports all keys by default, and then the corresponding relation is updated according to the indication of the application. Under the strategy, the APM establishes a corresponding relation for the application and each key in the key and application mapping table, namely, each key in the newly added application and key and application mapping table has a corresponding relation. Secondly, the APM sets up default supported keys for the newly added application according to a certain principle, for example, if a certain newly added application is installed on the smart tv and then uninstalled, the APM may record the keys supported by the application when the application is uninstalled, and after the application is installed again to become a newly added application, the APM sets up default supported keys for the newly added application according to the history.
For the basic functions of the smart television, the corresponding relations between the basic functions and the keys may be generated in advance in the key and application mapping table when the smart television is shipped.
In another embodiment, after an application originally stored in the key and application mapping table is uninstalled or deleted, the processing module of the smart tv also needs to notify the APM that the application is deleted, and the APM deletes mapping information of the application from the key and application mapping table, so as to ensure that no invalid content exists in the key and application mapping table.
On the basis of the above embodiments, the present embodiment relates to a specific method for updating a key and application mapping table, that is, according to key information supported by an application and/or key information not supported by an application, a corresponding relationship between the application and the key information in the key and application mapping table is updated. Specifically, fig. 4 is a schematic flowchart of a third embodiment of a key allocation processing method for a smart television, as shown in fig. 4, a process of updating a key and an application mapping table by an APM includes:
s401, the APM receives an update key instruction sent by an application, wherein the update key instruction comprises key information which is not supported by the application and/or key information which is supported by the application.
As described above, after the application is newly added, the APM defaults to establish a corresponding relationship between the application and all the keys, or defaults to establish a preset corresponding relationship between the application and the keys, and the application dynamically updates the corresponding relationship in the running process.
Specifically, during the operation process, the application determines the keys which can be responded by the application and/or the keys which can not be responded, and sends the keys to the APM through the key updating indication. For example, assuming that an app a establishes correspondence between the app a and all keys when it is newly added, and the app a has a function of prohibiting changing a channel, and the app a determines that it cannot respond to two keys, namely, a "previous channel" and a "next channel" when it is running, the app a may send an update key indication to the app, where the update key indication carries indication information of "previous channel key is not supported" and "next channel key is not supported".
The application may carry unsupported key information, supported key information, or both supported key information and unsupported key information in the update key indication.
S402, the APM updates the corresponding relation between the application and the key information in the key and application mapping table according to the update key indication sent by the application.
For example, assuming that the update key indication sent by the application a to the APM carries indication information of "previous channel key is not supported" and "next channel key is not supported", after receiving the update indication, the APM only determines whether the application a has a correspondence with the "previous channel" key and the "previous channel" key in the key and application mapping table, if no correspondence exists, the APM does not perform processing, and if a correspondence exists, the APM deletes the correspondence between the application a and the "previous channel" key in the key and application mapping table, i.e., the application a does not support the two keys.
In this embodiment, the APM determines and updates only the key information included in the update key indication in the key and application mapping table according to the update key indication of the application, but does not determine and process all keys, that is, only dynamically updates the key and application mapping table, thereby ensuring efficiency when updating the key and application mapping table.
On the basis of the above embodiments, the present embodiment relates to a specific method for the APM to assign the key information to the application.
Specifically, if the APM queries that only one application supports the key to be allocated in the key and application mapping table, the APM directly allocates the received key information to the application.
And if the APM inquires in the key and application mapping table that the number of the applications corresponding to the key information is multiple, the APM allocates the key information according to the priority of the applications corresponding to the key information.
Wherein the priority of the application is determined according to the number of times the application responds to the key information.
That is, if the number of times that an application responds to certain key information is greater than that of other applications, which indicates that the application has a greater probability of responding to the key, the priority of the application is set to be high, and when the APM receives the key information and determines that there are multiple applications supporting the key, the key information is preferentially allocated to the application with the high priority, that is, the key information is preferentially allocated to the application with the highest probability of responding to the key information, thereby further reducing the time for key response.
It should be noted that the priority of the application described in this embodiment is the priority of the application for a specific key, that is, the application has a priority for each key, and the priorities applied to different keys may be different.
Specifically, fig. 5 is a schematic flowchart of a fourth embodiment of the method for processing key allocation of a smart television according to the present invention, and as shown in fig. 5, a specific process of the APM allocating the key information according to the priority of the application corresponding to the key information includes:
s501, key information is distributed to the first application.
S502, judging whether the first application responds to the key information, if so, executing S503, otherwise, executing S504.
S503, the priority of the first application is adjusted from the current priority to the highest priority.
Specifically, if the first application is a basic function in the smart television, the processing module of the smart television may determine a result of the first application responding to the key information, and notify the result to the APM, and if the first application is a third-party application, the APM may determine whether the first application responds to the key information according to whether the server corresponding to the first application sends a key response message.
Furthermore, if the first application responds to the key information, it indicates that the probability of the first application responding to the key information is further increased compared with other applications not responding to the key, so that after the APM determines that the first application responds to the key information, the priority of the first application can be updated from the current priority to the highest priority.
For example, the APM may set the priority of the application to the initial lowest priority, e.g., priority 0, when initially adding the application to the key-to-application mapping table, and if the application responds to the key information, adjust the priority of the application to 5, assuming that the highest priority of the application is 5, and when key information allocation is performed again, the APM may allocate the key information to the application first.
S504, the key information is distributed to a second application, and the priority of the second application is lower than that of the first application.
If the first application does not respond to the key information, the APM continues to distribute the key information to a second application with the next priority, and then determines to promote the priority of the second application or continue to distribute the key information to the next application according to the key information response condition of the second application.
It should be noted that the first application and the second application may be regarded as any two applications having adjacent priorities among the multiple applications supporting a specific key, and the APM may sequentially execute the above steps S501 to S503 in order of the priorities of the applications as a whole.
Fig. 6 is a block diagram of a first embodiment of an intelligent television, as shown in fig. 6, the intelligent television includes:
the first receiving module 601 is configured to receive key information.
The query module 602 is configured to query an application corresponding to the key information in the key and application mapping table.
The allocating module 603 is configured to allocate the key information to an application corresponding to the key information according to the query result.
The key and application mapping table is used for recording the corresponding relation between the key information and the application supporting the key information.
The smart television is used for implementing the method embodiments, the implementation principle and the technical effect are similar, and details are not repeated here.
Fig. 7 is a block diagram of a second embodiment of the smart television, as shown in fig. 7, the smart television further includes:
an updating module 604, configured to update a corresponding relationship between the key and the key information included in the application and the updated key indication in the application mapping table according to the key information supported by the application and/or the key information not supported by the application.
In another embodiment, the allocating module 603 is specifically configured to:
and when a plurality of applications corresponding to the inquired key information exist, distributing the key information according to the priority of the application corresponding to the key information.
Wherein the priority of the application is determined according to the number of times the application responds to the key information.
Fig. 8 is a block diagram of a third embodiment of the smart television, where as shown in fig. 8, the allocating module 603 includes:
a first assigning unit 6031 for assigning key information to the first application.
An adjusting unit 6032, configured to, when receiving the response sent by the server corresponding to the first application, adjust the priority of the first application from the current priority to the highest priority.
A second allocating unit 6033, configured to allocate the key information to a second application when the response sent by the server corresponding to the first application is not received, where a priority of the second application is lower than a priority of the first application.
Fig. 9 is a block diagram of a fourth embodiment of the smart television, as shown in fig. 9, the smart television further includes:
a determining module 605 for determining the newly added application.
An adding module 606, configured to add, in the key and application mapping table, the correspondence between the newly added application and the key information, where the newly added application has a correspondence with each key in the key and application mapping table, or the newly added application has a preset correspondence with the key in the key and application mapping table.
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 to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art 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 the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.