Detailed Description
The invention provides a voice assistant control method, a device, a storage medium and an intelligent television, and in order to make the purposes, the technical scheme and the effects of the invention clearer and more definite, the invention is further described in detail below by referring to the accompanying drawings and the embodiments. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless expressly stated otherwise, as understood by those skilled in the art. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. The term "and/or" as used herein includes all or any element and all combination of one or more of the associated listed items.
It will be understood by those skilled in the art that all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs unless defined otherwise. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
The invention will be further described by the description of embodiments with reference to the accompanying drawings.
The embodiment provides a voice assistant control method applied to an intelligent television comprising a bottom resident service and an upper service distribution module, as shown in fig. 1 and fig. 2, the method comprises the following steps:
and S100, when the intelligent television receives a voice instruction of the voice assistant, acquiring a target characteristic value corresponding to the voice assistant through the bottom resident service.
In this embodiment, the voice assistant finger is an amazon voice assistant, a google household assistant, and the like, and the smart televisions on the market at present are generally integrated with various voice assistants, and the different voice assistants process respective logics respectively, so that the logic is not affected. However, for different voice assistant products, different essentials are focused on the logic of voice recognition, semantic parsing, cloud interaction, intention packaging and the like; after these links are completed, the intelligent device is ultimately required to handle the specific behavior, and this part of logic is consistent for different voice assistants. Therefore, in the embodiment of the invention, through a unified voice interface layer, all voice assistants automatically recognize according to the keywords, and send actual intentions (namely actual operation instructions such as channel switching, information source switching, video playing and the like) to the voice unified interface layer separately, and the voice unified interface layer processes subsequent behaviors so as to achieve the purposes of saving resources and being easy to expand.
In this embodiment, after the smart tv is turned on, the underlying resident service is automatically started, so before receiving the voice command of the voice assistant, the method further includes the following steps:
when receiving the start-up broadcast, automatically starting the bottom resident service; or alternatively
The underlying resident services are registered as system core services.
Specifically, a mode that the voice assistant application starts the service after receiving the startup broadcast can be adopted, when the television is started, the voice application can receive the startup broadcast, and after receiving the startup broadcast, the bottom layer service can be started; or, the service is registered as the system core service, so that after the service is registered as the system core service, the ServiceManager module automatically starts the bottom resident service as the necessary service of the system together in the system starting process.
Further, in this embodiment, before receiving the voice command of the voice assistant, the method further includes:
s10, presetting corresponding characteristic values for different voice assistants;
s20, establishing a mapping relation between the voice assistant and the characteristic values according to the characteristic values corresponding to different voice assistants.
Specifically, in the embodiment of the present invention, the feature values of different voice assistants are first defined, for example, amazon is 1, google is 2, in practical application, the feature value of one voice assistant may be a string of encrypted long character strings, when the amazon server receives a voice command, the voice command carries the feature value corresponding to amazon, and it can be understood that when the server of other software assistants such as Google receives the voice command, the voice command also carries the feature value corresponding to Google. It should be noted that, in the embodiment of the present invention, the predefined feature values of different voice assistants are defined in the bottom layer service in a certain interval, because the same voice assistant may correspond to a plurality of feature values, so that when the feature values of the voice assistants are in the interval, it is indicated that the voice assistants belong to the same type.
Therefore, when receiving the voice command of the voice assistant, the obtaining, through the underlying resident service, the target feature value corresponding to the voice assistant specifically includes: when a voice command of the voice assistant is received, a target characteristic value corresponding to the voice assistant is obtained through the bottom resident service according to the mapping relation. That is, whether the voice assistant is the corresponding voice assistant type can be identified according to whether the feature value of the voice assistant is in the predefined interval, that is, it is possible to distinguish which voice assistant the voice command is coming from, for example, the voice command from amazon needs to be identified as the amazon assistant, but cannot be identified as the google assistant. Since the subsequent processing flows of different voice assistants may be different, in order to avoid instruction processing errors, the corresponding feature values need to be accurately identified.
And S200, the intelligent television sends the voice command to the corresponding voice server according to the target characteristic value, so that the voice server analyzes the operation command corresponding to the voice command.
In this embodiment, according to the working modes of different voice assistants, different sub-threads are respectively started to connect with respective voice servers, and the voice servers, i.e. cloud servers, are used for semantic recognition, i.e. resolving the words spoken by the user into actual instructions and maintaining long connection; the long connection is kept because the user has a possibility of voice demand at any time, and when the user speaks, the server is required to analyze the speech of the user into instructions and feed the instructions back to the intelligent television; if a short connection is made, it may occur that there is no way to immediately parse the user's language when the user speaks. It should be noted that, in the embodiment of the present invention, for the voice assistant that needs to discover the devices in the lan, a sub-thread is further required to be started, and devices in the lan are continuously detected and discovered and connected, for example, for the HomeKit (which is an intelligent home platform published in 2014 by apple), the intelligent television needs to be connected with the mobile phone, the user speaks into the mobile phone, and the final instruction is sent to the television end for processing.
S300, the intelligent television receives the operation instruction and sends the operation instruction to the shared response module through the upper service distribution module.
In this embodiment, receiving the operation instruction, and sending the operation instruction to the shared response module through the upper layer service distribution module includes:
s301, receiving an operation instruction, calling a message forwarding interface, and forwarding the operation instruction to an upper layer service distribution module;
s302, the operation instruction and the target characteristic value are sent to the shared response module through the upper layer service distribution module.
Specifically, when the bottom resident service receives the message from each voice server, according to which voice assistant the command comes from, for example, from amazon, the bottom resident service will call the amazon operation command analysis method to analyze the key word of the operation command, if the key action is to switch channels, the channel name is CCTV1; if the analysis fails, the user is prompted for non response. And finally, calling a message forwarding interface of the bottom layer resident service, forwarding to an upper layer service distribution module, and when the upper layer service distribution module receives an operation instruction from the bottom layer resident service, carrying out actual forwarding or processing on the instruction, such as channel switching, and processing real channel switching.
Correspondingly, the operation instruction and the target characteristic value are sent to the shared response module through the upper layer service distribution module, and the method comprises the following steps:
determining a corresponding sub-module in the operation instruction and response module;
and forwarding the operation instruction and the target characteristic value to the sub-module through the upper service distribution module so that the sub-module responds to the operation instruction according to the target characteristic value.
Specifically, as shown in fig. 2, the submodules include one of a live application, a source application, a setting application, a media application and a search application, wherein the definition of each submodule is as follows:
LiveTV (live broadcast application), which refers to a specific program watched on a television, such as CCTV1, shenzhen satellite, and the like, is played by the application;
input (source application), sources on television, such as HDMI1, HDMI2, TV, etc., are all provided by the application;
settings (Settings application), setting menus on the television, such as adjusting backlight, adjusting brightness, etc., are all provided by the application;
media (Media application), local Media play on television, such as playing MP4 files on U disc, provided by the application;
search (Search application), search on television, such as searching for a certain video name, is provided with Search function and presented by the application.
Therefore, for different voice assistant products, the response modules configured by the intelligent television are consistent, namely, the logic in the response modules is consistent for different voice assistants, so that the different voice assistants can share the response modules, the purpose of saving system resources is achieved when the response modules process control instructions of the different voice assistants, further expansion of television functions is facilitated, and labor cost is reduced. For example, taking an operation instruction as a channel switching example, when receiving the channel switching instruction, the upper layer service distribution module sends the channel switching instruction to the live broadcast application submodule, and then the live broadcast application submodule realizes channel switching. However, since different specific processing flows of different voice assistants may exist, when receiving a specific operation instruction, the submodule needs to determine a target feature value, and also needs to know the specific voice assistant, so that the submodule can execute the control instruction more accurately.
In summary, compared with the prior art, the embodiment of the invention has the following advantages:
the invention discloses a voice assistant control method, which is applied to an intelligent television, wherein the intelligent television comprises a bottom layer resident service and an upper layer service distribution module, and the method comprises the following steps: when a voice command of the voice assistant is received, acquiring a target characteristic value corresponding to the voice assistant through the bottom resident service; sending the voice command to a corresponding voice server according to the target characteristic value, so that the voice server analyzes an operation command corresponding to the voice command; and receiving the operation instruction, and sending the operation instruction and the target characteristic value to a shared response module through an upper service distribution module. The television can share the logic resources of the response module when integrating various voice assistants, so that the problem of large resource occupation is solved, and the labor cost is reduced.
Based on the above voice assistant control method, the invention also provides a voice assistant control device, as shown in fig. 3, the device comprises:
the obtaining module 41 is configured to obtain, when receiving a voice command of the voice assistant, a target feature value corresponding to the voice assistant through a bottom resident service;
the parsing module 42 is configured to send the voice command to a corresponding voice server according to the target feature value, so that the voice server parses an operation command corresponding to the voice command;
and the sending module 43 is configured to receive the operation instruction, and send the operation instruction to the shared response module through the upper layer service distribution module.
Further, the apparatus further comprises:
the preset module is used for presetting corresponding characteristic values for different voice assistants;
and the mapping module is used for establishing a mapping relation between the voice assistant and the characteristic values according to the characteristic values corresponding to different voice assistants.
Further, the acquisition module 41 includes:
and the acquisition unit is used for acquiring the target characteristic value corresponding to the voice assistant according to the mapping relation through the bottom resident service.
Further, the apparatus further comprises:
the starting unit is used for automatically starting the bottom resident service after receiving the startup broadcast;
and the registration unit is used for registering the bottom resident service as a system core service.
Further, the transmitting module 43 includes:
the forwarding unit is used for receiving the operation instruction, calling the message forwarding interface and forwarding the operation instruction to the upper layer service distribution module;
and the sending unit is used for sending the operation instruction and the target characteristic value to the shared response module through the upper-layer service distribution module.
Further, the transmitting unit includes:
the submodule determining unit is used for determining the corresponding submodule in the operation instruction and response module;
and the response module unit is used for forwarding the operation instruction and the target characteristic value to the submodule through the upper-layer service distribution module so that the submodule responds to the operation instruction according to the target characteristic value.
It should be noted that, as those skilled in the art can clearly understand, the specific implementation process of the voice assistant control device and each module/unit may refer to the corresponding description in the foregoing voice assistant control embodiment, and for convenience and brevity of description, the description is omitted here.
The above-described voice assistant control apparatus may be implemented in the form of a computer program that can be run on a smart television as shown in fig. 4.
Based on the above voice assistant control method, the present invention further provides a computer readable storage medium, where a voice assistant control program is stored, and the voice assistant control program is executed by a processor, so as to implement the steps in the voice assistant control method of the above embodiment.
Based on the above voice assistant control method, the present invention also provides a smart television, as shown in fig. 4, which includes at least one processor (processor) 20; a display screen 21; and a memory (memory) 22, which may also include a communication interface (Communications Interface) 23 and a bus 24. Wherein the processor 20, the display 21, the memory 22 and the communication interface 23 may communicate with each other via a bus 24. The display screen 21 is configured to display a user guidance interface preset in the initial setting mode. The communication interface 23 may transmit information. The processor 20 may invoke logic instructions in the memory 22 to perform the methods of the embodiments described above.
Further, the logic instructions in the memory 22 described above may be implemented in the form of software functional units and stored in a computer readable storage medium when sold or used as a stand alone product.
The memory 22, as a computer readable storage medium, may be configured to store a software program, a computer executable program, such as program instructions or modules corresponding to the methods in the embodiments of the present disclosure. The processor 20 performs functional applications and data processing, i.e. implements the methods of the embodiments described above, by running software programs, instructions or modules stored in the memory 22.
The memory 22 may include a storage program area that may store an operating system, at least one application program required for functions, and a storage data area; the storage data area may store data created according to the use of the terminal device, etc. In addition, the memory 22 may include high-speed random access memory, and may also include nonvolatile memory. For example, a plurality of media capable of storing program codes such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or a transitory storage medium may be used.
In addition, the specific processes that the storage medium and the plurality of instruction processors in the smart television load and execute are described in detail in the above method, and are not stated here.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.