Voice instruction processing method and device, electronic equipment and storage medium
By using multi-path recognition and pre-defined conflict resolution, as well as the fusion arbitration of offline command sets, the problems of low recognition accuracy and slow response speed of voice commands in voice interaction devices are solved, achieving more efficient voice command processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- APOLLO INTELLIGENT CONNECTIVITY (BEIJING) TECH CO LTD
- Filing Date
- 2023-05-31
- Publication Date
- 2026-05-29
AI Technical Summary
In existing technologies, voice commands have problems with low recognition accuracy and slow response speed when controlling graphical interface elements of voice interaction devices. In particular, when the status of graphical interface elements cannot be obtained in real time, it is easy to cause voice commands to fail to execute or the execution result to be inconsistent with the intention.
By performing multi-path recognition on the voice commands to be processed, including recognizing the first operation intent to perform operations on the graphical interface elements of the voice interaction device and recognizing the second operation intent to perform operations on the device, and by fusing arbitration recognition results through a predetermined set of conflicting commands and a predetermined set of offline commands, the recognition accuracy and response speed are improved.
It effectively avoids conflicts between voice commands and the states of graphical interface elements, improving the recognition accuracy and response speed of voice commands, especially the response speed of voice commands unrelated to graphical interface elements.
Smart Images

Figure CN116631395B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of artificial intelligence technology, and more particularly to the field of voice interaction technology, specifically to methods, devices, electronic devices, and storage media for processing voice commands. Background Technology
[0002] With the continuous development of artificial intelligence technology, voice interaction is widely used in various fields, such as smart speakers, smart homes, and in-vehicle voice assistants. During voice interaction, the accuracy of voice command recognition and the response speed are key factors affecting the quality of the interaction. Summary of the Invention
[0003] This disclosure provides a method, apparatus, electronic device, and storage medium for processing voice commands.
[0004] According to one aspect of this disclosure, a method for processing voice commands is provided, comprising: performing multiple path recognition on the voice command to be processed to obtain multiple recognition results, wherein the multiple path recognition includes a first operation intention recognition of performing an operation on a graphical interface element of a voice interaction device and a second operation intention recognition of performing an operation on the voice interaction device; obtaining a target recognition result from the multiple recognition results; and executing the voice command to be processed according to the target recognition result.
[0005] According to another aspect of this disclosure, a voice command processing apparatus is provided, comprising: a recognition module, a selection module, and a first execution module. The recognition module is configured to perform multiple path recognitions on the voice command to be processed, obtaining multiple recognition results, wherein the path recognition includes a first operation intent recognition of performing an operation on a graphical interface element of a voice interaction device and a second operation intent recognition of performing an operation on the voice interaction device. The selection module is configured to obtain a target recognition result from the multiple recognition results. The first execution module is configured to execute the voice command to be processed according to the target recognition result.
[0006] According to another aspect of this disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method described above.
[0007] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are used to cause the computer to perform the methods described above.
[0008] According to another aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the method described above.
[0009] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0010] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:
[0011] Figure 1 The illustration schematically shows an exemplary system architecture of a processing method and apparatus for applying voice commands according to embodiments of the present disclosure;
[0012] Figure 2 A flowchart illustrating a voice command processing method according to an embodiment of the present disclosure is shown schematically.
[0013] Figure 3 A schematic diagram illustrating a voice command processing method according to an embodiment of the present disclosure is shown.
[0014] Figure 4 A schematic diagram illustrating the recognition of a voice command to be processed according to an embodiment of the present disclosure is shown.
[0015] Figure 5 The illustration shows a schematic diagram of obtaining a target identification result from multiple identification results according to an embodiment of the present disclosure;
[0016] Figure 6 The illustration shows a schematic diagram of obtaining a target identification result from multiple identification results according to another embodiment of the present disclosure;
[0017] Figure 7 A block diagram schematically illustrates a voice command processing apparatus according to embodiments of the present disclosure; and
[0018] Figure 8 A block diagram of an electronic device suitable for implementing a voice command processing method according to an embodiment of the present disclosure is shown schematically. Detailed Implementation
[0019] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0020] In in-vehicle voice interaction scenarios, the "what you see is what you speak" function is a crucial feature. This function primarily involves controlling the graphical interface elements of the voice interaction device. For example, buttons, menus, and text input boxes can be controlled via voice commands without manual operation or the use of external devices such as a mouse or keyboard.
[0021] According to embodiments of this disclosure, the technical principle of the "what you see is what you speak" function can include three steps: voice recognition, command parsing, and graphical interface element control. First, voice recognition technology converts the sound waveform of the voice command into a digital signal. Then, machine learning algorithms convert the digital signal into text information corresponding to the voice command. Next, the text information is parsed to obtain the corresponding command or operation, such as "click the XX button" or "select the drop-down menu." Finally, graphical interface control technology applies the parsed command or operation to graphical interface elements, such as performing button clicks or menu selections.
[0022] However, the "What You See Is What You Speak" function has certain limitations when controlling function button switches. For example, when the voice command is "Turn on XX button", because the real-time status of the function button cannot be obtained, the switch of "XX button" may be in the "on" state. Therefore, the voice command may not be executed, or the execution result may be inconsistent with the intention of the voice command.
[0023] Therefore, related technologies typically employ a blocking voice command processing method, which prioritizes voice commands related to graphical interface elements and then recognizes voice commands unrelated to graphical interface elements. This approach reduces the terminal's response speed to voice commands unrelated to graphical interface elements.
[0024] In view of this, embodiments of this disclosure provide a voice command processing method, including: performing multiple path recognition on the voice command to be processed to obtain multiple recognition results, wherein the multiple path recognition includes a first operation intent recognition of performing an operation on a graphical interface element of a voice interaction device and a second operation intent recognition of performing an operation on the voice interaction device; obtaining a target recognition result from the multiple recognition results; and executing the voice command to be processed according to the target recognition result. Voice commands related to graphical interface elements and voice commands unrelated to graphical interface elements are recognized simultaneously, and all recognition results are fused and arbitrated to effectively avoid conflicts between the real-time state of the voice command and the graphical interface element, improve the recognition accuracy of the voice command, and also improve the response speed of voice commands unrelated to graphical interface elements.
[0025] Figure 1The illustration schematically shows an exemplary system architecture of a processing method and apparatus for applying voice commands according to embodiments of the present disclosure.
[0026] It is important to note that Figure 1 The examples shown are merely examples of system architectures that can be applied to the embodiments of this disclosure, to help those skilled in the art understand the technical content of this disclosure, but do not mean that the embodiments of this disclosure cannot be used in other devices, systems, environments, or scenarios. For example, in another embodiment, an exemplary system architecture for applying the voice command processing method and apparatus may include a terminal device, but the terminal device may implement the voice command processing method and apparatus provided in the embodiments of this disclosure without interacting with a server.
[0027] like Figure 1 As shown, the system architecture 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.
[0028] Users can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 via the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as knowledge reading applications, web browser applications, search applications, instant messaging tools, email clients, and / or social platform software, etc. (for example only).
[0029] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0030] Server 105 can be a server that provides various services, such as a backend management server that supports the content browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (this is just an example). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.
[0031] It should be noted that the voice command processing method provided in this embodiment can generally be executed by the first terminal device 101, the second terminal device 102, and the third terminal device 103. Correspondingly, the voice command processing device provided in this embodiment can also be disposed in the first terminal device 101, the second terminal device 102, and the third terminal device 103.
[0032] For example, a user can input a voice command into a first terminal device 101. The first terminal device 101 can perform speech recognition and semantic recognition on the voice command to obtain a recognition result Ra. Alternatively, it can perform speech recognition on the voice command, send the speech recognition result to a server 105, and use the server 105 to perform semantic recognition on the speech recognition result to obtain a recognition result Rb. The first terminal device 101 then receives the recognition result Rb returned by the server 105. Finally, the first terminal device 101 obtains the target recognition result from the recognition results Ra and Rb, and executes the voice command to be processed according to the target recognition result.
[0033] Alternatively, the voice command processing method provided in this embodiment can also generally be executed by server 105. Correspondingly, the voice command processing device provided in this embodiment can generally be located in server 105. The voice command processing method provided in this embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105. Correspondingly, the voice command processing device provided in this embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105.
[0034] For example, a user can input a voice command into a first terminal device 102 and send the voice command to a server 105. The server 105 can perform speech recognition and semantic recognition on the voice command to obtain a recognition result Rc. Alternatively, the first terminal device 102 can perform speech recognition on the voice command and then send the speech recognition result to the server 105. The server 105 can then perform semantic recognition on the speech recognition result to obtain a recognition result Rd. The server 105 can obtain the target recognition result from the recognition results Rc and Rd, and execute the voice command to be processed according to the target recognition result.
[0035] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0036] In the technical solution disclosed herein, the collection, storage, use, processing, transmission, provision, disclosure, and application of user personal information comply with the provisions of relevant laws and regulations, necessary confidentiality measures have been taken, and there is no violation of public order and good morals.
[0037] In the technical solution disclosed herein, the user's authorization or consent is obtained before acquiring or collecting the user's personal information.
[0038] Figure 2 A flowchart illustrating a voice command processing method according to an embodiment of the present disclosure is shown schematically.
[0039] like Figure 2 As shown, the method includes operations S210 to S230.
[0040] During operation of S210, multiple paths are recognized for the voice command to be processed, resulting in multiple recognition results.
[0041] In operation S220, the target recognition result is obtained from multiple recognition results.
[0042] When operating the S230, execute the voice commands to be processed according to the target recognition results.
[0043] According to embodiments of this disclosure, multiple path recognition includes first operation intent recognition of performing an operation on a graphical interface element of a voice interaction device and second operation intent recognition of performing an operation on the voice interaction device. The recognition path indicates the path for recognizing the operation intent of the voice command to be processed. For example, the recognition path may include online recognition of the voice command to be processed, offline recognition of the voice command to be processed, or a combination of online and offline methods for recognizing the voice command to be processed.
[0044] According to embodiments of this disclosure, the operation intent may include a first operation intent to perform an operation on the graphical interface elements of the voice interaction device and a second operation intent to perform an operation on the voice interaction device.
[0045] According to embodiments of this disclosure, the graphical interface elements of a voice interaction device can be buttons, menus, or text input boxes on the visual interface of the voice interaction device. The first operation intent can be a click operation on a button, or a selection operation on a menu, etc.
[0046] According to embodiments of this disclosure, the second operational intent may be to perform an operation on the voice interaction device, such as playing a song by XX. Alternatively, it may be to control other devices associated with the voice interaction device by performing an operation on the voice interaction device, such as opening a car window.
[0047] According to embodiments of this disclosure, multiple recognition results may include: recognition results obtained by online recognition of the voice command to be processed, recognition results obtained by offline recognition of the voice command to be processed, and recognition results obtained by a combination of online and offline recognition of the voice command to be processed.
[0048] For example, the voice command to be processed could be "add to favorites" or "add to favorites song XX". The music playback interface of the voice interaction device could include a "favorite" button. By recognizing the voice command, the recognition result can be "favorite" or "favorite song XX".
[0049] It should be noted that, since the identifier field of the graphical interface element is relatively short, when recognizing the voice command to be processed, if the identifier field of the graphical interface element is recognized in the "voice command to be processed", it can be determined that the voice command to be processed includes the intention to perform an operation on the graphical interface element of the voice interaction device, such as "click to favorite".
[0050] According to embodiments of this disclosure, obtaining a target recognition result from multiple recognition results can be achieved by determining the target recognition result from "Favorites" or "Favorite Song XX". When the target recognition result is "Favorites", the "Click Favorites Button" operation can be performed on the interface playing Song XX. When the target recognition result is "Favorite Song XX", the song caching function module in the voice interaction device can be used to favorite Song XX.
[0051] According to embodiments of this disclosure, simultaneously recognizing voice commands related to graphical interface elements and voice commands unrelated to graphical interface elements can improve the response speed of voice commands unrelated to graphical interface elements.
[0052] According to embodiments of this disclosure, the above operation S210 may include the following operations: performing speech recognition on the voice command to be processed to obtain text information; and performing semantic recognition on the text information to obtain a semantic recognition result.
[0053] According to embodiments of this disclosure, speech recognition includes any one of the following: online speech recognition and offline speech recognition; semantic recognition includes any one of the following: online semantic recognition and offline semantic recognition.
[0054] Figure 3 A schematic diagram illustrating a voice command processing method according to an embodiment of the present disclosure is shown.
[0055] like Figure 3 As shown, in embodiment 300, the voice command to be processed 301 can be simultaneously input into the online speech recognition module 302 and the offline speech recognition module 303 to obtain the online speech recognition result and the offline speech recognition result.
[0056] According to embodiments of this disclosure, the online speech recognition module 302 and the offline speech recognition module 303 process voice commands in the same way. For example, the sound waveform of the voice command can be converted into a digital signal first, and then a machine learning algorithm can be used to convert the digital signal into text information corresponding to the voice command. Since speech recognition technology is a relatively mature technology, it will not be described in detail here.
[0057] According to embodiments of this disclosure, the online speech recognition results are input into the online semantic recognition module a1304 and the offline semantic recognition module b1305, respectively, to obtain recognition results R1308 and R2309. The offline speech recognition results are input into the online semantic recognition module a2306 and the offline semantic recognition module b2307, respectively, to obtain recognition results R3310 and R4311. Then, the selection module 312 uses the selection module 312 to obtain the target recognition result from the recognition results R1308, R2309, R3310, and R4311. The target recognition result is then input into the execution module 313 to execute the voice command.
[0058] According to embodiments of this disclosure, semantic recognition may include semantic recognition of a first operational intent and semantic recognition of a second operational intent. Performing semantic recognition on text information to obtain a semantic recognition result may include the following operations: semantically matching the text information with a first text resource to obtain a semantic recognition result corresponding to the first operational intent; and semantically matching the text information with a second text resource to obtain a semantic recognition result corresponding to the second operational intent.
[0059] According to embodiments of this disclosure, the first text resource represents a text resource corresponding to a first operational intent. The first text resource may include text corresponding to operational intents related to graphical interface elements of a voice interaction device, such as: text corresponding to interface elements of a language settings interface: "Chinese", "English"; text corresponding to interface elements of a music playback interface: "Next", "Previous", etc.
[0060] According to embodiments of this disclosure, the second text resource represents a text resource corresponding to a second operational intent. The second text resource may include text corresponding to an operational intent related to a voice interaction device, such as "open the car window" or "play music".
[0061] Figure 4 A schematic diagram illustrating the recognition of a voice command to be processed according to an embodiment of the present disclosure is shown.
[0062] like Figure 4As shown, in embodiment 400, the voice command to be processed can be the voice command "collect XX song" 411. Through voice recognition, the text information "collect XX song" 412 is obtained. The first text resource 413 is semantically matched with the text information "collect XX song" 412 to obtain the recognition result "collect / song" 415. The second text resource 414 is semantically matched with the text information "collect XX song" to obtain the recognition result "collect / XX / song" 416.
[0063] According to embodiments of this disclosure, by simultaneously recognizing the voice command to be processed along multiple paths, the recognition efficiency of the voice command to be processed can be effectively improved.
[0064] When a user issues a voice command related to a graphical interface element to a voice interaction device, the current on / off state of the graphical interface element corresponding to the voice command cannot be obtained in real time. Therefore, there may be a conflict between the voice command related to the graphical interface element and the current on / off state of the graphical interface element, which may cause the voice command to fail to execute.
[0065] Therefore, embodiments of this disclosure provide a predetermined set of conflicting instructions for a voice interaction device. This predetermined set of conflicting instructions may include multiple conflicting instructions, each representing a set of instructions unavailable on the voice interaction device for performing operations on graphical interface elements.
[0066] For example, the predefined conflict instruction set may include instructions that require changing the on or off state of graphical interface elements, such as instructions to turn "full-duplex mode" on or off.
[0067] According to embodiments of this disclosure, operation S220 may include the following operations: acquiring a predetermined set of conflicting instructions from the voice interaction device; and obtaining a target recognition result from multiple recognition results based on the predetermined set of conflicting instructions.
[0068] For example, obtaining a target recognition result from multiple recognition results could involve determining the target recognition result from "Favorites" or "Favorite Song XX". When the target recognition result is "Favorites", the "Click Favorite Button" operation can be performed on the interface playing Song XX.
[0069] However, when the voice interaction device does not support clicking the "favorite" button on the music playback page, "favorite" can be included in the predefined set of conflicting instructions, indicating that "favorite" is a conflicting instruction.
[0070] According to embodiments of this disclosure, a predetermined set of conflicting instructions includes multiple unavailable instructions that perform operations on graphical interface elements of a voice interaction device. Unavailable instructions may refer to conflicting instructions. The conflicting instructions in the predetermined set of conflicting instructions can be configured according to the graphical interface elements of the voice interaction device. Embodiments of this disclosure aim to resolve conflicts between voice commands related to graphical interface elements and the operations that the voice interaction device can respond to on the graphical interface elements by configuring a predetermined set of conflicting instructions. The implementation of the predetermined set of conflicting instructions is not specifically limited; for example, the predetermined set of conflicting instructions may be a whitelist including multiple conflicting instructions.
[0071] According to embodiments of this disclosure, obtaining a target identification result from multiple identification results based on a predetermined set of conflicting instructions may include the following operations: if a first identification result is determined to be a conflicting instruction, a second identification result corresponding to a second operational intent is determined as the target identification result; and if a first identification result is determined to be a conflicting instruction, the first identification result is determined as the target identification result.
[0072] According to embodiments of this disclosure, by querying a predetermined set of conflicting instructions, if the predetermined set of conflicting instructions includes a first identification result, the first identification result can be determined to be a conflicting instruction. If the predetermined set of conflicting instructions does not include the first identification result, the first identification result can be determined to be a non-conflicting instruction.
[0073] For example, the instruction to be processed could be "turn on full-duplex mode," and the graphical interface element of the voice interaction device could be a "full-duplex mode" button. By recognizing the instruction to be processed, it can be determined that the instruction corresponds to the graphical interface element of the voice interaction device. By querying a predefined set of conflicting instructions, it can be determined that the "full-duplex mode" on / off instruction is a conflicting instruction. Therefore, "turn on full-duplex mode" can be executed as the instruction for the second operational intent of the voice interaction device. When executing the instruction according to the second operational intent, the real-time status of the current full-duplex mode of the voice interaction device can be obtained first, and then the voice instruction can be executed. This allows for quick and efficient completion of the operation of the voice interaction device according to the user's operational intent.
[0074] According to embodiments of this disclosure, when it is determined that the first identification result is not a conflicting instruction, the first identification result can be identified as the target identification result.
[0075] For example, the instruction to be processed could be "Add XX song to favorites," and the graphical interface element of the voice interaction device could be the "Favorite" button on the music playback interface. By recognizing the instruction to be processed, it can be determined that the instruction corresponds to the graphical interface element of the voice interaction device. By querying a predefined set of conflicting instructions, it is determined that the "Favorite" click instruction is not a conflicting instruction. Therefore, clicking the "Favorite" button can be executed as an operation instruction on the XX song music playback interface. When XX song is played, the click operation of the "Favorite" button on the XX song music playback interface is triggered, realizing the addition of XX song to favorites.
[0076] According to embodiments of this disclosure, by configuring a predetermined set of conflicting instructions, when processing the recognition results of voice instructions related to graphical interface elements, conflicts between voice instructions and the real-time state of graphical interface elements can be effectively avoided, thereby improving the recognition accuracy of voice instructions.
[0077] Since online voice command recognition depends on network conditions, poor network conditions may affect the recognition and response speed. Therefore, a combination of online and offline methods can be used to recognize voice commands to meet the voice interaction needs under different network environments.
[0078] In related technologies, when a user inputs a voice command into a terminal, the voice command is typically sent simultaneously to a local server and a cloud server. The local server performs speech and semantic recognition to obtain offline recognition results. The cloud server performs speech and semantic recognition to obtain online recognition results. Then, based on the chronological order in which the terminal receives the offline and online recognition results from the local and cloud servers, the content of the voice command to be executed is determined.
[0079] However, due to the difference in recognition performance between offline and online recognition engines, the offline recognition results may not be consistent with the online recognition results. Selecting voice commands according to the order in which the terminal receives the recognition results will affect the accuracy of voice command recognition.
[0080] Therefore, this embodiment of the disclosure configures a predetermined set of offline commands to select the voice command recognition result that better matches the user's operation intention from the online recognition result and the offline recognition result, thereby improving the recognition accuracy of the voice command.
[0081] According to embodiments of this disclosure, offline recognition results can be obtained by performing offline speech recognition and offline semantic recognition on the voice command to be processed. Online recognition results can be obtained by performing online speech recognition and online semantic recognition on the voice command to be processed.
[0082] According to embodiments of this disclosure, determining the second identification result corresponding to the second operational intent as the target identification result may include the following operations: if it is determined that the offline identification result is within a predetermined set of offline instructions, the offline identification result is determined as the target identification result; and if it is determined that the offline identification result is not within the predetermined set of offline instructions, the online identification result is determined as the target identification result.
[0083] According to embodiments of this disclosure, the predetermined offline command set includes predetermined categories of predetermined offline commands and predetermined operation intentions. The predetermined category can be a category of predetermined operation intentions. For example, for the voice command "open the car window," the operation intention can be determined to be opening the car window, and the category of the operation intention can be a vehicle control category. Similarly, for the voice command "play XX song," the operation intention can be determined to be playing a song, and the category of the operation intention can be a media control category.
[0084] According to embodiments of this disclosure, when it is determined that the offline recognition result is within a predetermined set of offline instructions, determining the offline recognition result as the target recognition result may include the following operations: when it is determined that the category of the offline recognition result belongs to a predetermined category and the operation intention of the offline recognition result is a predetermined operation intention, determining that the offline recognition result is within a predetermined set of offline instructions; and determining the offline recognition result as the target recognition result.
[0085] According to embodiments of this disclosure, the predetermined categories may include: vehicle control category, navigation category, in-vehicle system control category, media control category, etc. The predetermined operation intent in the vehicle control category may be opening or closing windows, or heating the seats. The predetermined operation intent in the navigation category may be opening a map, or navigating to a specific location. The predetermined operation intent in the in-vehicle system control category may be setting the interior temperature. The predetermined operation intent in the media control category may be playing music, or saving music to favorites.
[0086] According to embodiments of this disclosure, offline recognition results belonging to a predetermined category and with a predetermined operational intent can indicate that the offline recognition engine outperforms the online recognition engine for that type of voice command. For example, the accuracy of the offline recognition result is higher than that of the online recognition result, or the recognition speed of the offline recognition result is higher than that of the online recognition result.
[0087] For example, the offline recognition result could be "open the car window," and the operation intent of this offline recognition result belongs to the vehicle control category. Since the vehicle control category belongs to a predetermined category in the predetermined offline command set, and the operation intent of "open the car window" belongs to a predetermined operation intent in the predetermined offline command set, the offline recognition result of the voice command "open the car window" can be used as the target recognition result.
[0088] For example, the offline recognition result could be "find songs by Jia Yi". The operation intent of this offline recognition result belongs to the media control category. However, in the predetermined offline instruction set, the predetermined operation intent in the media control category does not include music retrieval. Therefore, the online recognition result of this voice instruction can be used as the target recognition result.
[0089] Figure 5 The illustration shows a schematic diagram of obtaining a target identification result from multiple identification results according to an embodiment of the present disclosure.
[0090] like Figure 5 As shown, in embodiment 500, operations S521 to S526 may be included.
[0091] In operation S521, a predetermined set of conflicting commands and multiple recognition results of the voice interaction device are obtained.
[0092] In operation S522, determine whether the first identification result is a conflicting instruction. If yes, then execute operation S524; otherwise, execute operation S523.
[0093] In operation S523, the first recognition result is determined as the target recognition result.
[0094] In operation S524, determine whether the offline recognition result is within the predetermined offline instruction set. If yes, proceed to operation S525; otherwise, proceed to operation S526.
[0095] In operation S524, the offline recognition result is determined as the target recognition result.
[0096] When operating S526, the online recognition result is determined as the target recognition result.
[0097] According to embodiments of this disclosure, by configuring a predetermined set of offline commands, offline and online recognition results are selected according to predetermined categories and predetermined operational intentions to obtain a target recognition result. This allows for the selection of the more accurate recognition result when there are differences in recognition performance between the offline and online recognition engines, thereby improving the accuracy of voice command recognition.
[0098] According to an embodiment of this disclosure, the above operation S230 may include the following operations: determining the execution object of the voice command to be processed based on the target recognition result; and sending the target recognition result to the execution object to execute the voice command to be processed.
[0099] According to embodiments of this disclosure, when the target recognition result is a first recognition result, the execution target of the voice command to be processed can be determined to be a functional module that performs operations on graphical interface elements. When the target recognition result is a second recognition result, the execution target of the voice command to be processed can be determined to be a control module corresponding to the category of the target recognition result, based on the category of the target recognition result.
[0100] For example, the target recognition result could be "open the car window," which identifies the vehicle control module as the target. The target recognition result could also be "play music," which identifies the media control module as the target.
[0101] According to embodiments of this disclosure, the execution target of the voice command to be processed is determined by the target recognition result. Since conflicting commands related to graphical interface elements have been excluded when selecting the target recognition result, the response efficiency of the voice interaction device to voice commands can be improved.
[0102] In the process of recognizing voice commands, recognition is usually based on pre-defined text resources. Since these pre-defined text resources are limited, if the terminal device does not receive the target recognition result within a predetermined time, it can play the pre-defined voice command to prompt the user to switch to other voice commands to interact with the voice interaction device.
[0103] According to embodiments of this disclosure, the predetermined duration can be 2.5 seconds. The predetermined voice command can be "This function is not currently supported" or "Sorry, I'm still learning," etc. The predetermined duration and predetermined voice command can be set according to actual needs, and this disclosure does not specifically limit the predetermined duration and predetermined voice command.
[0104] According to embodiments of this disclosure, since there are multiple identification results, when selecting from multiple identification results, the priority of the identification results can also be based on a pre-set priority.
[0105] For example, if the first recognition result is a conflicting instruction and the offline recognition result is not in the predetermined offline instruction set, the online recognition result can be determined as the target recognition result. The online recognition result can include the recognition result R1308 obtained by online speech recognition + online semantic recognition, and the recognition result R2309 obtained by online speech recognition + offline semantic recognition.
[0106] Figure 6 A schematic diagram illustrating the process of obtaining a target identification result from multiple identification results according to another embodiment of the present disclosure is shown.
[0107] like Figure 6 As shown, this embodiment 600 may include operations S621 to S623.
[0108] In operation S621, determine that the priority of recognition result R1 is greater than the priority of recognition result R2. If so, proceed to operation S622; otherwise, proceed to operation S623.
[0109] In operation S622, the recognition result R1 is determined as the target recognition result.
[0110] In operation S623, the recognition result R2 is determined as the target recognition result.
[0111] Figure 7 A block diagram of a voice command processing apparatus according to an embodiment of the present disclosure is shown schematically.
[0112] like Figure 7 As shown, the voice command processing device 700 may include a recognition module 710, a selection module 720, and a first execution module 730.
[0113] The recognition module 710 is used to perform multiple path recognition on the voice command to be processed and obtain multiple recognition results. The multiple path recognition includes a first operation intention recognition of performing an operation on the graphical interface elements of the voice interaction device and a second operation intention recognition of performing an operation on the voice interaction device.
[0114] Selection module 720 is used to obtain the target recognition result from multiple recognition results; and
[0115] The first execution module 730 is used to execute the voice command to be processed according to the target recognition result.
[0116] According to embodiments of this disclosure, the selection module may include an acquisition submodule and a selection submodule. The acquisition submodule is used to acquire a predetermined set of conflicting instructions from the voice interaction device, wherein the predetermined set of conflicting instructions includes multiple unavailable instructions for performing operations on graphical interface elements of the voice interaction device. The selection submodule is used to obtain a target recognition result from multiple recognition results based on the predetermined set of conflicting instructions.
[0117] According to embodiments of this disclosure, the selection submodule may include: a first determining unit and a second determining unit. The first determining unit is configured to determine a second determining result corresponding to a second operational intent as the target determining result if the first identification result is determined to be a conflicting instruction. The second determining unit is configured to determine the first identification result as the target identifying result if the first identification result is determined to be a conflicting instruction.
[0118] According to embodiments of this disclosure, the first determining unit may include a first determining subunit and a second determining subunit. The first determining subunit is configured to determine the offline identification result as the target identification result if it is determined that the offline identification result is within a predetermined set of offline instructions. The second determining subunit is configured to determine the online identification result as the target identification result if it is determined that the offline identification result is not within the predetermined set of offline instructions.
[0119] According to embodiments of this disclosure, the predetermined offline instruction set includes predetermined categories and predetermined operation intentions for the predetermined offline instructions. The first determining subunit is used for:
[0120] If it is determined that the category of the offline recognition result belongs to a predetermined category and the operation intention of the offline recognition result is a predetermined operation intention, then the offline recognition result is determined to be within a predetermined set of offline instructions; and the offline recognition result is determined to be the target recognition result.
[0121] According to embodiments of this disclosure, the recognition module may include a speech recognition submodule and a semantic recognition submodule. The speech recognition submodule is used to perform speech recognition on the speech command to be processed to obtain text information. The semantic recognition submodule is used to perform semantic recognition on the text information to obtain a semantic recognition result. The speech recognition includes any one of the following: online speech recognition and offline speech recognition; the semantic recognition includes any one of the following: online semantic recognition and offline semantic recognition.
[0122] According to embodiments of this disclosure, semantic recognition may include: semantic recognition of a first operational intent and semantic recognition of a second operational intent. The semantic recognition submodule may include: a first matching unit and a second matching unit. The first matching unit is used to perform semantic matching between text information and a first text resource to obtain a semantic recognition result corresponding to the first operational intent, wherein the first text resource represents the text resource corresponding to the first operational intent. The second matching unit is used to perform semantic matching between text information and a second text resource to obtain a semantic recognition result corresponding to the second operational intent, wherein the second text resource represents the text resource corresponding to the second operational intent.
[0123] According to embodiments of this disclosure, the first execution module may include a determining submodule and an execution submodule. The determining submodule is used to determine the execution object of the voice command to be processed based on the target recognition result. The execution submodule is used to send the target recognition result to the execution object to execute the voice command to be processed.
[0124] According to embodiments of this disclosure, the above-described apparatus may further include a second execution module for executing a predetermined voice command in response to determining that no target recognition result has been received within a predetermined time period.
[0125] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0126] According to an embodiment of the present disclosure, an electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method described above.
[0127] According to embodiments of the present disclosure, a non-transitory computer-readable storage medium stores computer instructions, wherein the computer instructions are used to cause a computer to perform the method described above.
[0128] According to an embodiment of this disclosure, a computer program product includes a computer program that, when executed by a processor, implements the method described above.
[0129] Figure 8 A schematic block diagram of an example electronic device 800 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0130] like Figure 8 As shown, device 800 includes a computing unit 801, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 802 or a computer program loaded from storage unit 808 into random access memory (RAM) 803. RAM 803 may also store various programs and data required for the operation of device 800. The computing unit 801, ROM 802, and RAM 803 are interconnected via bus 804. Input / output (I / O) interface 805 is also connected to bus 804.
[0131] Multiple components in device 800 are connected to I / O interface 805, including: input unit 806, such as keyboard, mouse, etc.; output unit 807, such as various types of monitors, speakers, etc.; storage unit 808, such as disk, optical disk, etc.; and communication unit 809, such as network card, modem, wireless transceiver, etc. Communication unit 809 allows device 800 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0132] The computing unit 801 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs the various methods and processes described above, such as voice instruction processing methods. For example, in some embodiments, the voice instruction processing methods may be implemented as computer software programs tangibly contained in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of the voice instruction processing methods described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform voice instruction processing methods by any other suitable means (e.g., by means of firmware).
[0133] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0134] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0135] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0136] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0137] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0138] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, distributed system servers, or servers incorporating blockchain technology.
[0139] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0140] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A method for processing voice commands, comprising: Multiple path recognitions are performed on the voice command to be processed to obtain multiple recognition results. The multiple path recognitions include a first operation intent recognition of performing an operation on the graphical interface elements of the voice interaction device and a second operation intent recognition of performing an operation on the voice interaction device. Obtain a predetermined set of conflicting instructions for the voice interaction device. The predetermined set of conflicting instructions includes multiple unavailable instructions that would perform operations on the graphical interface elements of the voice interaction device. The predetermined set of conflicting instructions includes instructions that require changing the on or off state of the graphical interface elements. According to the predetermined set of conflicting instructions, a target identification result is obtained from the plurality of identification results: if the first identification result is determined to be a conflicting instruction, the second identification result corresponding to the second operation intention is determined as the target identification result; and if the first identification result is determined not to be a conflicting instruction, the first identification result is determined as the target identification result; and Execute the voice command to be processed according to the target recognition result.
2. The method according to claim 1, wherein, The second identification result includes offline identification results and online identification results; determining the second identification result corresponding to the second operation intention as the target identification result includes: If it is determined that the offline recognition result is within a predetermined set of offline instructions, the offline recognition result is identified as the target recognition result; and If it is determined that the offline recognition result is not within the predetermined offline instruction set, the online recognition result is determined as the target recognition result.
3. The method according to claim 2, wherein, The pre-defined offline instruction set includes pre-defined categories and pre-defined operation intentions for the pre-defined offline instructions; The step of determining the offline recognition result as the target recognition result when it is determined that the offline recognition result is within a predetermined set of offline instructions includes: If it is determined that the category of the offline recognition result belongs to a predetermined category and the operation intention of the offline recognition result is a predetermined operation intention, then the offline recognition result is determined to be within a predetermined offline instruction set. as well as The offline recognition result is determined as the target recognition result.
4. The method according to claim 1, wherein, The process involves recognizing the voice command to be processed according to multiple recognition paths, resulting in multiple recognition results, including: The voice command to be processed is subjected to speech recognition to obtain text information; The text information is subjected to semantic recognition to obtain a semantic recognition result, wherein the speech recognition includes any one of the following: online speech recognition and offline speech recognition; the semantic recognition includes any one of the following: online semantic recognition and offline semantic recognition.
5. The method according to claim 4, wherein, The semantic recognition includes: semantic recognition of a first operational intent and semantic recognition of a second operational intent; the semantic recognition of the text information to obtain a semantic recognition result includes: The text information is semantically matched with the first text resource to obtain a semantic recognition result corresponding to the first operation intent, wherein the first text resource represents the text resource corresponding to the first operation intent; and The text information is semantically matched with the second text resource to obtain a semantic recognition result corresponding to the second operation intention, wherein the second text resource represents the text resource corresponding to the second operation intention.
6. The method according to claim 1, wherein, The step of executing the voice command to be processed according to the target recognition result includes: Based on the target recognition result, the execution target of the voice command to be processed is determined; and The target recognition result is sent to the execution object to execute the voice command to be processed.
7. The method according to claim 6, further comprising: In response to determining that no target recognition result is received within a predetermined time period, a predetermined voice command is executed.
8. A voice command processing device, comprising: The recognition module is used to perform multiple path recognition on the voice command to be processed and obtain multiple recognition results. The multiple path recognition includes a first operation intention recognition of performing an operation on the graphical interface elements of the voice interaction device and a second operation intention recognition of performing an operation on the voice interaction device. Select modules, including: The acquisition submodule is used to acquire a predetermined set of conflicting instructions of the voice interaction device, wherein the predetermined set of conflicting instructions includes multiple unavailable instructions that perform operations on the graphical interface elements of the voice interaction device; the predetermined set of conflicting instructions includes instructions that need to change the on or off state of the graphical interface elements. A selection submodule is configured to obtain a target identification result from the plurality of identification results according to the predetermined set of conflicting instructions. The selection submodule includes: a first determining unit, configured to determine a second identification result corresponding to the second operation intent as the target identification result if the first identification result is determined to be a conflicting instruction; and a second determining unit, configured to determine the first identification result as the target identification result if the first identification result is determined to be a conflicting instruction. The first execution module is used to execute the voice command to be processed according to the target recognition result.
9. The apparatus according to claim 8, wherein, The second identification result includes offline identification results and online identification results, and the first determining unit includes: The first determining subunit is configured to determine the offline recognition result as the target recognition result when it is determined that the offline recognition result is within a predetermined set of offline instructions; and The second determining subunit is used to determine the online recognition result as the target recognition result when it is determined that the offline recognition result is not within a predetermined offline instruction set.
10. The apparatus according to claim 9, wherein, The predetermined offline instruction set includes predetermined categories and predetermined operation intentions for the predetermined offline instructions; the first determining subunit is used for: If it is determined that the category of the offline recognition result belongs to a predetermined category and the operation intention of the offline recognition result is a predetermined operation intention, then the offline recognition result is determined to be within a predetermined offline instruction set. as well as The offline recognition result is determined as the target recognition result.
11. The apparatus according to claim 8, wherein, The identification module includes: The speech recognition submodule is used to perform speech recognition on the speech command to be processed to obtain text information; The semantic recognition submodule is used to perform semantic recognition on the text information to obtain a semantic recognition result. The speech recognition includes any one of the following: online speech recognition and offline speech recognition; the semantic recognition includes any one of the following: online semantic recognition and offline semantic recognition.
12. The apparatus according to claim 11, wherein, The semantic recognition includes: semantic recognition of a first operational intent and semantic recognition of a second operational intent; the semantic recognition submodule includes: A first matching unit is configured to semantically match the text information with a first text resource to obtain a semantic recognition result corresponding to the first operation intent, wherein the first text resource represents a text resource corresponding to the first operation intent; and The second matching unit is used to perform semantic matching between the text information and the second text resource to obtain a semantic recognition result corresponding to the second operation intention, wherein the second text resource represents the text resource corresponding to the second operation intention.
13. The apparatus according to claim 8, wherein, The first execution module includes: The determination submodule is used to determine the execution target of the voice command to be processed based on the target recognition result; and The execution submodule is used to send the target recognition result to the execution object in order to execute the voice command to be processed.
14. The apparatus of claim 13, further comprising: The second execution module is used to execute a predetermined voice command in response to determining that no target recognition result is received within a predetermined time period.
15. An electronic device comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
16. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-7.
17. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-7.