Voice interaction method, device, equipment, medium and program product

By applying regular expression recognition and parallel retrieval of multiple knowledge bases to the voice interaction methods of large-screen devices, the problems of long response latency and low accuracy in existing technologies are solved, and fast and accurate voice command processing is achieved.

CN121583250APending Publication Date: 2026-02-27CHINA UNITED NETWORK COMM GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511621033.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-06
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

The voice interaction function of existing large-screen devices suffers from long response delays and low response accuracy due to the use of multiple serial artificial intelligence models.

Method used

By performing regular expression recognition on the text to be recognized by the user's voice command, the target keywords are obtained, and candidate commands are searched in parallel in a preset number of knowledge bases to determine the target command to be executed. Based on the target command, the large screen device is controlled to perform business actions.

Benefits of technology

It reduces response processing latency and improves response accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121583250A_ABST
    Figure CN121583250A_ABST
Patent Text Reader

Abstract

The invention provides a voice interaction method and device, equipment, a medium and a program product, relates to the technical field of man-machine interaction, and is used for reducing response delay time and improving response accuracy when large-screen equipment performs voice interaction. The method comprises the following steps: obtaining a target keyword about the control intention of the large-screen equipment by regularly recognizing a to-be-recognized text indicating the voice instruction content of a user; according to the target keyword, performing parallel retrieval in a preset number of knowledge bases; according to the technical scheme, after the target instruction to be executed is determined in the at least one candidate instruction obtained through retrieval, the large-screen equipment is controlled to execute the corresponding service action based on the target instruction, so that the delay time of response processing of the large-screen equipment is shortened, and the response accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of human-computer interaction technology, and in particular to a voice interaction method, device, equipment, medium and program product. Background Technology

[0002] Large-screen devices can display various types of data information, and are therefore used in fields such as industrial control. Existing large-screen devices usually have voice interaction functions, which are typically based on multiple artificial intelligence models.

[0003] However, the relevant solutions use multiple serial AI models to achieve voice interaction on large-screen devices, resulting in long response delays and low response accuracy on the large-screen devices. Summary of the Invention

[0004] This application provides a voice interaction method, apparatus, device, medium, and program product, which reduces response latency and improves response accuracy during voice interaction on large-screen devices.

[0005] In a first aspect, this application provides a voice interaction method applied to a large-screen device, comprising: Acquire the text to be recognized, which is used to indicate the content of the user's voice command; The text to be recognized is regularized to obtain target keywords, which are used to indicate the user's voice command control intent on the large screen device. Based on the target keywords, a parallel search is performed in a preset number of knowledge bases to obtain at least one candidate instruction, which is used to indicate an instruction that matches the target keywords. Based on at least one candidate instruction, determine the target instruction to be executed; Based on the target instruction, execute the corresponding business action.

[0006] The technical solution provided in this application brings at least the following beneficial effects: by performing regular expression recognition on the text to be recognized that indicates the user's voice command content, target keywords about the control intent of the large-screen device are obtained. Based on the target keywords, parallel searches are performed in a preset number of knowledge bases. After determining the target command to be executed from at least one candidate command obtained from the search, the large-screen device is controlled to perform the corresponding business action based on the target command. In this way, the control intent of the user's voice command is quickly recognized by regular expression matching, reducing the response processing latency. Furthermore, the parallel retrieval of the corresponding target command based on multiple knowledge bases improves the response accuracy.

[0007] In one possible implementation, regular expression recognition of the text to be recognized to obtain target keywords includes: performing regular expression matching on the text to be recognized using a preset regular expression to obtain target keywords; The preset regular expressions include a first regular expression for global commands, a second regular expression for navigation commands, a third regular expression for explanation commands, and a fourth regular expression for questions and answers.

[0008] In one possible implementation, the target keywords are obtained by performing regular expression matching on the text to be identified using a preset regular expression, including: matching the text to be identified using a first regular expression, and if a keyword related to a global command is matched, the matched keyword related to the global command is used as the target keyword; If no keywords related to global commands are matched, the text to be identified is matched using the second regular expression. If keywords related to navigation commands are matched, the matched keywords related to navigation commands are used as target keywords. If no keywords related to navigation commands are matched, the text to be identified is matched using a third regular expression. If keywords related to explanation commands are matched, the matched keywords related to explanation commands are used as target keywords. If no keywords related to the explanation command are matched, the fourth regular expression is used to match the text to be recognized. If keywords related to questions and answers are matched, the matched keywords related to questions and answers are used as the target keywords.

[0009] In one possible implementation, a preset number of knowledge bases include a main path knowledge base for the large screen, a functional module knowledge base, and a pop-up page knowledge base. Based on the target keywords, parallel searches are performed in the preset number of knowledge bases to obtain at least one candidate instruction, including: Based on the target keywords, search simultaneously in the main path knowledge base, functional module knowledge base and pop-up page knowledge base of the large screen to obtain at least one candidate instruction; The main path knowledge base of the large screen stores multiple instructions on the path of returning to the main page from each pop-up page, the functional module knowledge base stores instructions for implementing different functions, and the pop-up page knowledge base stores multiple path instructions for pop-up pages that implement corresponding functions.

[0010] In one possible implementation, the target instruction to be executed is determined based on at least one candidate instruction, including: Based on the matching scores corresponding to multiple candidate instructions, a confidence threshold is determined. The confidence threshold is used to indicate whether the candidate instructions are valid. In at least one candidate instruction, the candidate instruction with a matching score greater than the confidence threshold is considered a valid instruction; The target instruction is determined based on the screen-level priority of the valid instruction, where the screen-level priority indicates the degree of priority for the execution of the valid instruction.

[0011] In one possible implementation, a confidence threshold is determined based on the matching scores corresponding to multiple candidate instructions. The confidence threshold satisfies the following formula: ; Where T is the confidence threshold, max(scores) is the maximum value among multiple matching scores, median(scores) is the median among multiple matching scores, mean(scores) is the average among multiple matching scores, A is the first preset weight, B is the second preset weight, C is the third preset weight, the first preset weight is less than the second preset weight, and the third preset weight is less than the first preset weight and the second preset weight.

[0012] In one possible implementation, if the valid instruction is a global instruction, the screen-level priority is the first priority; If the valid instruction is about the current screen, the screen priority is the second priority, which is lower than the first priority; If the valid instruction is about the pop-up page, the screen priority is the third priority, which is lower than the second priority; Based on the screen-level priority of valid instructions, the target instructions are determined, including: Among multiple valid instructions, the first priority valid instruction is taken as the target instruction; If no valid instruction of the first priority exists, a valid instruction of the second priority will be used as the target instruction. If no valid instructions of the first or second priority exist, a valid instruction of the third priority will be used as the target instruction.

[0013] Secondly, this application provides a voice interaction device, comprising: The acquisition module is used to acquire the text to be recognized, which indicates the content of the user's voice command. The processing module is used for regular expression recognition of the text to be recognized to obtain target keywords. The target keywords are used to indicate the user's voice command control intention on the large screen device. The processing module is also used to perform parallel searches in a preset number of knowledge bases based on the target keywords to obtain at least one candidate instruction, which is used to indicate an instruction that matches the target keywords. The processing module is also used to determine the target instruction to be executed based on at least one candidate instruction; The processing module is also used to execute corresponding business actions based on the target instructions.

[0014] Thirdly, this application provides an electronic device comprising: a processor and a memory; the memory storing processor-executable instructions; when the processor is configured to execute the instructions, causing the electronic device to implement the method of the first aspect described above.

[0015] Fourthly, this application provides a computer-readable storage medium comprising: computer software instructions; which, when executed in an electronic device, cause the electronic device to implement the method described in the first aspect.

[0016] Fifthly, this application provides a computer program product comprising a computer program; when the computer program is run in an electronic device, the electronic device performs the method described in the first aspect.

[0017] The beneficial effects of the second to fifth aspects mentioned above are described in the corresponding description of the first aspect and will not be repeated here. Attached Figure Description

[0018] Figure 1 A flowchart illustrating a voice interaction method provided in this application embodiment. Figure 1 ; Figure 2 Code illustrations provided for embodiments of this application Figure 1 ; Figure 3 A flowchart illustrating a voice interaction method provided in this application embodiment. Figure 2 ; Figure 4 Code illustrations provided for embodiments of this application Figure 2 ; Figure 5 Code illustrations provided for embodiments of this application Figure 3 ; Figure 6 A flowchart illustrating a voice interaction method provided in this application embodiment. Figure 3 ; Figure 7 Code illustrations provided for embodiments of this application Figure 4 ; Figure 8 Code illustrations provided for embodiments of this application Figure 5 ; Figure 9 This is a schematic diagram illustrating the composition of a voice interaction device provided in an embodiment of this application; Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0019] The following is a detailed description of a call detail record (CDR) data recording method provided in this application, with reference to the accompanying drawings.

[0020] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.

[0021] To facilitate a clear description of the technical solutions of the embodiments of this application, the terms "first" and "second" are used in the embodiments of this application to distinguish the same or similar items with essentially the same function and effect. Those skilled in the art can understand that the terms "first" and "second" are not intended to limit the quantity or execution order.

[0022] Furthermore, the terms "comprising" and "having," and any variations thereof, used in the description of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the steps or units listed, but may optionally include other steps or units not listed, or may optionally include other steps or units inherent to such process, method, product, or apparatus.

[0023] In the description of this application, unless otherwise stated, "a plurality of" means two or more.

[0024] Large-screen devices typically refer to display devices with a diagonal size exceeding a certain standard. They can display multiple types of data information simultaneously, reducing the frequency of scrolling and window switching, and facilitating simultaneous viewing by multiple users. Therefore, they are widely used in smart cities, industrial control, and digital twin scenarios.

[0025] Existing large-screen devices typically have voice interaction capabilities. The existing voice interaction implementation schemes for large-screen devices usually adopt a multi-layered artificial intelligence model chain architecture. For example, the user's voice commands are sequentially input into the ASR (Automatic Speech Recognition) model, the NLU (Natural Language Understanding) model, and the TTS (Text to Speech) model for processing, in order to control the large-screen device to respond to the user's voice commands.

[0026] However, existing solutions based on multi-layered AI model concatenation require each model to perform inference and data transmission, which means each model needs time to process. As a result, the processing time of each model is accumulated, leading to a long processing delay on computing devices.

[0027] Existing voice interaction solutions still use a flat knowledge base structure, which is prone to recall failure when processing commands related to pop-ups or secondary menus. That is, after the user issues a voice command to the large screen device, the large screen device does not respond to the user's voice command for a period of time, resulting in a low recall rate. Furthermore, in multi-screen linkage scenarios, existing voice interaction solutions may mismatch user commands to non-target devices or interfaces due to ambiguous command semantics or environmental interference, resulting in false triggers and a decrease in response accuracy.

[0028] Therefore, existing improvement schemes reduce latency and improve recall by compressing the model and expanding the search scope. However, while using a compressed smaller model can reduce processing latency, the response accuracy of the compressed smaller model decreases. Expanding the search scope can improve recall, but it leads to a longer processing latency. Therefore, existing improvement schemes have the drawbacks of long processing latency and low response accuracy.

[0029] To address the aforementioned technical problems, this application provides a voice interaction method, apparatus, device, medium, and program product. By performing regular expression recognition on the text to be recognized, which indicates the user's voice command content, target keywords related to the user's control intent on a large-screen device are obtained. Based on the target keywords, a search is performed in a preset number of knowledge bases. From at least one candidate command retrieved, the target command to be executed is determined, and the large-screen device is controlled to perform the corresponding business action based on the target command. Thus, recognizing the user's voice command control intent through regular expression matching reduces response processing latency, and determining the corresponding target command through parallel retrieval from multiple knowledge bases improves response accuracy.

[0030] The implementation environment for the above-described voice interaction method can be the voice interaction system provided in the embodiments of this application.

[0031] The voice interaction method provided in the embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0032] The voice interaction method provided in this application is applied to both the local end and the cloud of a large-screen device. The local end transmits the user's voice command to the corresponding cloud, and after the user's voice command is converted into the corresponding preliminary recognized text by the voice recognition model, the preliminary recognized text is returned to the local end for processing to determine and execute the target command.

[0033] Figure 1 A flowchart illustrating a voice interaction method provided in this application embodiment. Figure 1 . Figure 2 Code illustrations provided for embodiments of this application Figure 1 Combining Figure 1 and Figure 2 The following describes the voice interaction method provided in the embodiments of this application: S201. Obtain the text to be recognized, which is used to indicate the content of the user's voice command.

[0034] In some embodiments, a voice input device, such as a microphone, is used to collect voice commands issued by the user to the large-screen device. The user's voice commands are then converted into corresponding preliminary recognized text using a voice recognition model. Front-end modal particles and preset back-end verbs are removed from the preliminary recognized text. The text after removing these modal particles and preset back-end verbs is used as the text to be recognized.

[0035] Specifically, when acquiring voice commands, audio data in PCM (Pulse Code Modulation) format with a frequency of 16kHz and a depth of 16 bits is acquired as the user's voice commands.

[0036] In some embodiments, when converting user voice commands into corresponding text to be recognized, a voice enhancement algorithm is also used to suppress or eliminate environmental noise in the user voice commands, thereby improving the clarity of the voice in the user voice commands.

[0037] In some embodiments, such as Figure 3 The code shown filters and removes front-end interjections and preset verbs from the initially identified text. The code `text = frontend_filter(input, ["Hello", "Hmm"])` filters out front-end interjections such as "Hello" and "Hmm" from the initially identified text. The code `text = remove_verbs(text, ["Open", "Jump"])` removes preset back-end verbs such as "Open" and "Jump" from the text after filtering out the front-end interjections, thus obtaining the text to be identified after removing the front-end interjections and preset back-end verbs.

[0038] S202. Perform regular expression recognition on the text to be recognized to obtain the target keywords.

[0039] Among them, target keywords are used to indicate the user's intention to control the large-screen device using voice commands.

[0040] In some embodiments, after obtaining the text to be recognized, the content in the text to be recognized is matched sequentially using multiple different preset regular expressions, and the specific text obtained by the regular expression matching is used as the target keyword. Here, different preset regular expressions correspond to keywords with different instruction content.

[0041] S203. Based on the target keywords, perform parallel searches in a preset number of knowledge bases to obtain at least one candidate instruction. The candidate instruction is used to indicate an instruction that matches the target keywords.

[0042] In some embodiments, after matching the corresponding target keywords in the text to be identified, the system searches in the main path knowledge base, functional module knowledge base, and pop-up page knowledge base to obtain at least one candidate instruction. Each knowledge base is stored in an independent physical storage unit. Alternatively, all the knowledge bases mentioned above can be stored in a single physical storage unit.

[0043] As an example, during retrieval, searches can be performed simultaneously in various knowledge bases based on the target keywords to shorten retrieval time.

[0044] S204. Based on at least one candidate instruction, determine the target instruction to be executed.

[0045] In some embodiments, after retrieving at least one candidate instruction and its corresponding matching score from each knowledge base based on the target keyword, a confidence threshold is calculated based on the matching score corresponding to each candidate instruction, and the target instruction to be executed is determined from at least one candidate instruction according to the confidence threshold.

[0046] S205. Based on the target instruction, execute the corresponding business action.

[0047] As an example, after obtaining the target instruction to be executed, the instruction is searched for in the instruction mapping table for JSON (JavaScript Object Notation) format instructions with the same label, based on the label of the target instruction. The instruction mapping table pre-stores JSON format instructions and their corresponding labels. The obtained JSON format instructions with the same label are sent to the corresponding execution unit for execution, so as to realize the display feedback on the interface of the large screen device.

[0048] In this embodiment, target keywords related to the control intent of the large-screen device are obtained by regular expression recognition of the text to be recognized, which indicates the content of the user's voice command. Based on the target keywords, the device is searched in a preset number of knowledge bases. After determining the target command to be executed from at least one candidate command obtained from the search, the large-screen device is controlled to perform the corresponding business action based on the target command. In this way, the control intent of the user's voice command is recognized by regular expression matching, which reduces the response processing delay time. Furthermore, the determination of the corresponding target command by parallel retrieval of multiple knowledge bases improves the response accuracy.

[0049] Figure 3 A flowchart illustrating a voice interaction method provided in this application embodiment. Figure 2 . Figure 4 Code illustrations provided for embodiments of this application Figure 2 Combining Figure 3 and Figure 4As shown, in step S202, the regular expression recognition of the text to be recognized to obtain the target keywords can be implemented as follows: S2021. The text to be identified is matched using the first regular expression. If a keyword related to the global command is matched, the matched keyword related to the global command is used as the target keyword.

[0050] As an example, after obtaining the text to be recognized, regular expression matching is performed on the text to be recognized using the first regular expression related to global commands in the preset regular expression.

[0051] The preset regular expressions include a first regular expression for global commands, a second regular expression for navigation commands, a third regular expression for explanation commands, and a fourth regular expression for questions and answers.

[0052] As an example, such as Figure 4 The code shown, for example, if contains_global_cmd(text), is used to instruct the text to be identified to be matched using a regular expression based on the first regular expression of the global command. For example, return execute_shortcut(text), is used to instruct that if a keyword related to the global command is matched, the matched keyword is directly returned to the execute_shortcut tuple, and the keyword in the execute_shortcut tuple is used as the target keyword.

[0053] S2022. If no keyword related to global commands is matched, the text to be identified is matched using the second regular expression. If a keyword related to navigation commands is matched, the matched keyword related to navigation commands is used as the target keyword.

[0054] As an example, such as Figure 4 The code shown, after failing to match the corresponding keyword in the first regular expression, uses the code elif is_navigation_cmd(text) to indicate that if the first regular expression fails to match the corresponding keyword, the second regular expression related to navigation commands in the preset regular expression will be used to perform regular expression matching on the text to be identified.

[0055] As an example, the code `return "NAVIGATION", text` indicates that if a keyword related to navigation commands is matched, the matched keyword will be returned to the `NAVIGATION` tuple, and the keyword in the `NAVIGATION` tuple will be used as the target keyword.

[0056] S2023. If no keywords related to navigation commands are matched, the text to be identified is matched using a third regular expression. If keywords related to explanation commands are matched, the matched keywords related to explanation commands are used as target keywords.

[0057] As an example, such as Figure 4 The code shown, specifically the code elif is_explain_cmd(text), instructs that after the second regular expression fails to match the corresponding keyword, the third regular expression related to the explanation command in the preset regular expression should be used to perform regular expression matching on the text to be identified.

[0058] As an example, the code `return "EXPLAIN", text` instructs the third regular expression to return the matched keyword to the `EXPLAIN` tuple, and use the keyword in the `EXPLAIN` tuple as the target keyword.

[0059] S2024. If no keywords related to the explanation command are matched, the text to be identified is matched using the fourth regular expression. If keywords related to questions and answers are matched, the matched keywords related to questions and answers are used as target keywords.

[0060] As an example, such as Figure 4 The code shown, for the code else is_qa_cmd(text), is used to instruct that after the third regular expression does not match the corresponding keyword, the text to be identified is matched using the fourth regular expression in the preset regular expression related to questions and answers.

[0061] As an example, the code `return "QA", text` instructs the fourth regular expression to return the matched keywords to the `QA` tuple and use the keywords in the `QA` tuple as the target keywords.

[0062] In this embodiment, target keywords related to the control intent of the large-screen device are obtained by regular expression recognition of the text to be recognized, which indicates the content of the user's voice command. In this way, the control intent of the user's voice command is quickly recognized by regular expression matching, reducing the latency of response processing.

[0063] Figure 5 Code illustrations provided for embodiments of this application Figure 3 In step S203, based on the target keywords, a parallel search is performed in a preset number of knowledge bases to obtain at least one candidate instruction, which is then combined with... Figure 5 As shown, further explanation is provided: As an example, the preset number of knowledge bases includes the main path knowledge base for the large screen, the functional module knowledge base, and the pop-up page knowledge base.

[0064] The main path knowledge base of the large screen stores multiple instructions on the path of returning to the main page from each pop-up page, the functional module knowledge base stores instructions for implementing different functions, and the pop-up page knowledge base stores multiple path instructions for pop-up pages that implement corresponding functions.

[0065] As an example, based on the target keywords, three asynchronous parallel retrieval tasks are submitted through a process pool, that is, the retrieval tasks are executed simultaneously in the main path knowledge base of the large screen, the functional module knowledge base, and the pop-up page knowledge base.

[0066] As an example, such as Figure 5 The code shown, for pool.submit(query_kb, kb_depth1, text), instructs a search to be performed in the main path knowledge base of the large screen based on the target keyword; for pool.submit(query_kb, kb_depth2, text), instructs a search to be performed in the functional module knowledge base based on the target keyword; for pool.submit(query_kb, kb_depth3, text), instructs a search to be performed in the pop-up page knowledge base based on the target keyword; and futures indicates at least one pending instruction obtained from the search.

[0067] As an example, such as Figure 5 The code shown, for the code return sorted(results, key=lambda x: x.score, reverse=True)[:10], is used to instruct the undetermined instructions to be sorted in descending order according to the matching score of each undetermined instruction, and in the sorted undetermined instructions, the undetermined instructions ranked first by a preset number, such as ten, are selected as candidate instructions, where each matching score is obtained based on a dynamic programming algorithm.

[0068] Figure 6 A flowchart illustrating a voice interaction method provided in this application embodiment. Figure 3 . Figure 7 Code illustrations provided for embodiments of this application Figure 4 For step S204, based on at least one candidate instruction, the target instruction to be executed is determined, combined with... Figure 6 and Figure 7 As shown, this can be achieved through the following steps: S2041. Determine the confidence threshold based on the matching scores corresponding to multiple candidate instructions.

[0069] As an example, after obtaining multiple candidate instructions and their corresponding matching scores, a dynamic confidence threshold is calculated, and valid instructions are filtered out using the confidence threshold. The confidence threshold is calculated using the following formula (1): (1); Where T is the confidence threshold, max(scores) is the maximum value among multiple matching scores, median(scores) is the median among multiple matching scores, mean(scores) is the average among multiple matching scores, A is the first preset weight (e.g., 0.3), B is the second preset weight (e.g., 0.5), and C is the third preset weight (e.g., 0.2). Of course, each preset weight can be set to other values, as long as the first preset weight is less than the second preset weight, and the third preset weight is less than the first and second preset weights.

[0070] S2042. Among at least one candidate instruction, the candidate instruction with a matching score greater than the confidence threshold shall be regarded as a valid instruction.

[0071] As an example, such as Figure 7 The code shown, valid_cmds = [r for r in resultsif r.score>T], is used to instruct the traversal of the matching scores corresponding to each candidate instruction, and to take the candidate instructions whose matching scores are greater than the confidence threshold as valid instructions, so as to filter valid instructions from multiple candidate instructions, and generate a new list of valid instructions valid_cmds based on at least one valid instruction.

[0072] S2043. Determine the target instruction based on the screen-level priority of the valid instruction.

[0073] As an example, after identifying at least one valid instruction, the corresponding screen-level priority is determined based on the screen level to which each valid instruction is controlled, and then the target instruction is determined based on the screen-level priority.

[0074] As an example, such as Figure 7 The code shown, for code 3 if x.is_global else, is used to indicate whether there are any valid global commands in the list of valid commands valid_cmds. If there are, the screen-level priority of the valid global commands is determined to be the first priority, as in code 3.

[0075] As an example, such as Figure 7The code shown, for the code else 2 if x.screen_id == current_screen, is used to indicate that if there is no valid instruction for the global screen, then check if there is a valid instruction for the current screen. If there is, determine that the screen-level priority of the valid instruction for the current screen is the second priority, where the second priority is less than the first priority.

[0076] As an example, if there are no valid instructions regarding the global context or the current screen, then the currently valid instruction is determined to be an instruction regarding the pop-up page. The screen-level priority of the valid instruction regarding the pop-up page is the third priority, where the third priority is lower than the second priority.

[0077] As an example, after determining the screen-level priority corresponding to each valid instruction, among multiple valid instructions, the valid instruction with the first priority is taken as the target instruction; if there is no valid instruction with the first priority, the valid instruction with the second priority is taken as the target instruction; if there are no valid instructions with the first priority and the second priority, the valid instruction with the third priority is taken as the target instruction.

[0078] In this embodiment, a confidence threshold is dynamically calculated based on the matching scores of each candidate instruction obtained from the retrieval. Valid instructions are then filtered using the confidence threshold, and the target instruction to be executed is determined according to the screen priority of the valid instructions. In this way, by combining the confidence threshold and the screen priority to determine the target instruction, false triggering is avoided, thereby further improving the response accuracy.

[0079] Figure 8 Code illustrations provided for embodiments of this application Figure 5 In step S205, based on the target instruction, the corresponding business action is executed, combined with... Figure 8 Further explanation is needed.

[0080] As an example, such as Figure 8 The code shown, for `if cmd.type == "GLOBAL":play_audio("confirm")`, is used to indicate that if the target instruction is a command about waking up the global system, the corresponding confirmation response audio is mapped in the local audio library according to the target instruction. The local audio library has pre-recorded response audio for multiple different instructions.

[0081] As an example, such as Figure 8The code shown, for `if cmd.type == "EXPLAIN":play_audio(cmd.audio_file)`, is used to indicate that if the target instruction is a command about explanation, the corresponding pre-recorded response audio about explanation will be mapped from the local audio library according to the target instruction.

[0082] In this embodiment, by associating and binding the target command, such as wake-up or explanation, with the corresponding pre-recorded audio in the local audio library, the text-to-speech synthesis delay is eliminated, thereby further reducing the response processing latency.

[0083] As can be seen, the above mainly describes the solutions provided by the embodiments of this application from a methodological perspective. To achieve the above functions, the embodiments of this application provide corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, in conjunction with the modules and algorithm steps of the various examples described in the embodiments disclosed herein, the embodiments of this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this invention.

[0084] This application embodiment can divide the voice interaction device into functional modules according to the above method example. For example, each function can be divided into its own functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. Optionally, the module division in this application embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.

[0085] In some embodiments, this application also provides a voice interaction device. The voice interaction device may include one or more functional modules for implementing the voice interaction method of the above method embodiments.

[0086] For example, Figure 9 This is a schematic diagram illustrating the composition of a voice interaction device provided in an embodiment of this application. Figure 9 As shown, the voice interaction device includes an acquisition module 121 and a processing module 122.

[0087] The acquisition module 121 is used to acquire the text to be recognized, which is used to indicate the content of the user's voice command.

[0088] The processing module 122 is used for regular expression recognition of the text to be recognized to obtain target keywords. The target keywords are used to indicate the user's voice command control intention on the large screen device.

[0089] The processing module 122 is also used to perform parallel searches in a preset number of knowledge bases based on the target keywords to obtain at least one candidate instruction, which is used to indicate an instruction that matches the target keywords.

[0090] The processing module 122 is also configured to determine the target instruction to be executed based on at least one candidate instruction.

[0091] The processing module 122 is also used to execute corresponding business actions based on the target instruction.

[0092] In some embodiments, the processing module 122 is specifically used to perform regular expression matching on the text to be identified using a preset regular expression to obtain target keywords; The preset regular expressions include a first regular expression for global commands, a second regular expression for navigation commands, a third regular expression for explanation commands, and a fourth regular expression for questions and answers.

[0093] In some embodiments, the processing module 122 is specifically used to match the text to be identified using a first regular expression, and if a keyword about a global command is matched, the matched keyword about a global command is used as the target keyword. If no keywords related to global commands are matched, the text to be identified is matched using the second regular expression. If keywords related to navigation commands are matched, the matched keywords related to navigation commands are used as target keywords. If no keywords related to navigation commands are matched, the text to be identified is matched using a third regular expression. If keywords related to explanation commands are matched, the matched keywords related to explanation commands are used as target keywords. If no keywords related to the explanation command are matched, the fourth regular expression is used to match the text to be recognized. If keywords related to questions and answers are matched, the matched keywords related to questions and answers are used as the target keywords.

[0094] In some embodiments, the preset number of knowledge bases includes a main screen path knowledge base, a functional module knowledge base, and a pop-up page knowledge base. The processing module 122 is specifically used to search in the main screen path knowledge base, the functional module knowledge base, and the pop-up page knowledge base simultaneously based on the target keyword to obtain at least one candidate instruction. The main path knowledge base of the large screen stores multiple instructions on the path of returning to the main page from each pop-up page, the functional module knowledge base stores instructions for implementing different functions, and the pop-up page knowledge base stores multiple path instructions for pop-up pages that implement corresponding functions.

[0095] In some embodiments, the processing module 122 is specifically used to determine a confidence threshold based on the matching scores corresponding to multiple candidate instructions, the confidence threshold being used to indicate whether the candidate instructions are valid; In at least one candidate instruction, the candidate instruction with a matching score greater than the confidence threshold is considered a valid instruction; The target instruction is determined based on the screen-level priority of the valid instruction, where the screen-level priority indicates the degree of priority for the execution of the valid instruction.

[0096] In some embodiments, the processing module 122 is specifically used to determine a confidence threshold, which satisfies the following formula: ; Where T is the confidence threshold, max(scores) is the maximum value among multiple matching scores, median(scores) is the median among multiple matching scores, mean(scores) is the average among multiple matching scores, A is the first preset weight, B is the second preset weight, C is the third preset weight, the first preset weight is less than the second preset weight, and the third preset weight is less than the first preset weight and the second preset weight.

[0097] In some embodiments, the processing module 122 is specifically configured to: if the valid instruction is a global instruction, the screen-level priority is the first priority; if the valid instruction is a current screen instruction, the screen-level priority is the second priority, which is lower than the first priority; if the valid instruction is a pop-up page instruction, the screen-level priority is the third priority, which is lower than the second priority. Among multiple valid instructions, the instruction with the highest priority is selected as the target instruction. If no valid instruction of the first priority exists, a valid instruction of the second priority will be used as the target instruction. If no valid instructions of the first or second priority exist, a valid instruction of the third priority will be used as the target instruction.

[0098] When the functionality of the integrated modules described above is implemented in hardware, Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 10As shown, the electronic device includes: a processor 131, a memory 132, a communication interface 133, and a bus 134. The processor 131, the memory 132, and the communication interface 133 can be connected via the bus 134.

[0099] Processor 131 can be a single processor or a collective term for multiple processing elements. For example, processor 131 can be a general-purpose central processing unit (CPU) or other general-purpose processors. The general-purpose processor can be a microprocessor or any conventional processor.

[0100] As one embodiment, processor 131 may include one or more CPUs, for example Figure 10 CPU0 and CPU1 are shown in the diagram.

[0101] The memory 132 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), disk storage medium or other magnetic storage device, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto.

[0102] In one possible implementation, the memory 132 can exist independently of the processor 131. The memory 132 can be connected to the processor 131 via a bus 134 and is used to store instructions or program code. When the processor 131 calls and executes the instructions or program code stored in the memory 132, it can implement the voice interaction method provided in the following embodiments of this application.

[0103] In another possible implementation, the memory 132 can also be integrated with the processor 131.

[0104] Communication interface 133 is used for connecting the communication device to other devices via a communication network, which may be Ethernet, wireless access network, wireless local area network (WLAN), etc. Communication interface 133 may include a receiving unit for receiving data and a transmitting unit for sending data.

[0105] Bus 134 can be an industry standard architecture (ISA) bus, a peripheral component interconnect (PCI) bus, or an extended industry standard architecture (EISA) bus. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 10 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0106] As one possible implementation, the memory 132 can exist independently of the processor 131. The memory 132 can be connected to the processor 131 via a bus 134 and is used to store instructions or program code. When the processor 131 calls and executes the instructions or program code stored in the memory 132, it can implement the voice interaction method provided in this embodiment of the invention.

[0107] In another possible implementation, the memory 132 can also be integrated with the processor 131.

[0108] Through the above description of the implementation methods, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the service calling device can be divided into different functional modules to complete all or part of the functions described above.

[0109] This application also provides a computer-readable storage medium. All or part of the processes in the above method embodiments can be executed by computer instructions instructing related hardware. The program can be stored in the aforementioned computer-readable storage medium, and when executed, it can include the processes of the above method embodiments. The computer-readable storage medium can be any of the foregoing embodiments or memory. The aforementioned computer-readable storage medium can also be an external storage device of the aforementioned service invocation device, such as a plug-in hard drive, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the aforementioned service invocation device. Further, the aforementioned computer-readable storage medium can include both internal storage units of the aforementioned service invocation device and external storage devices. The aforementioned computer-readable storage medium is used to store the aforementioned computer program and other programs and data required by the aforementioned service invocation device. The aforementioned computer-readable storage medium can also be used to temporarily store data that has been output or will be output.

[0110] This application also provides a computer program product, which includes a computer program that, when run on a computer, causes the computer to execute any of the voice interaction methods provided in the above embodiments.

[0111] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A voice interaction method, characterized in that, Applied to large-screen devices, including: Acquire the text to be recognized, which is used to indicate the content of the user's voice command; The target keywords are obtained by regular expression recognition of the text to be recognized. The target keywords are used to indicate the user's voice command control intention on the large screen device. Based on the target keyword, a parallel search is performed in a preset number of knowledge bases to obtain at least one candidate instruction, which is used to indicate an instruction that matches the target keyword; Based on the at least one candidate instruction, the target instruction to be executed is determined; Based on the target instruction, execute the corresponding business action.

2. The method according to claim 1, characterized in that, The regular expression recognition of the text to be recognized to obtain target keywords includes: The target keywords are obtained by performing regular expression matching on the text to be identified using a preset regular expression; The preset regular expressions include a first regular expression for global commands, a second regular expression for navigation commands, a third regular expression for explanation commands, and a fourth regular expression for questions and answers.

3. The method according to claim 2, characterized in that, The step of performing regular expression matching on the text to be identified to obtain the target keywords includes: The text to be identified is matched using the first regular expression. If a keyword related to a global command is matched, the matched keyword related to a global command is used as the target keyword. If no keyword related to global commands is matched, the text to be identified is matched using the second regular expression. If a keyword related to navigation commands is matched, the matched keyword related to navigation commands is used as the target keyword. If no keyword related to navigation commands is matched, the text to be identified is matched using the third regular expression. If a keyword related to explanation commands is matched, the matched keyword related to explanation commands is used as the target keyword. If no keywords related to the explanation command are matched, the text to be identified is matched using the fourth regular expression. If keywords related to questions and answers are matched, the matched keywords related to questions and answers are used as the target keywords.

4. The method according to claim 1, characterized in that, The preset number of knowledge bases includes the main path knowledge base of the large screen, the functional module knowledge base, and the pop-up page knowledge base. The step of performing a parallel search in a preset number of knowledge bases based on the target keywords to obtain at least one candidate instruction includes: Based on the target keywords, at least one candidate instruction is obtained by simultaneously searching the main path knowledge base of the large screen, the functional module knowledge base, and the pop-up page knowledge base. The main path knowledge base of the large screen stores multiple instructions on the path of returning to the main page from each pop-up page, the functional module knowledge base stores instructions for implementing different functions, and the pop-up page knowledge base stores multiple path instructions for pop-up pages that implement corresponding functions.

5. The method according to claim 1, characterized in that, The step of determining the target instruction to be executed based on the at least one candidate instruction includes: Based on the matching scores corresponding to multiple candidate instructions, a confidence threshold is determined, which is used to indicate whether the candidate instruction is valid; Among the at least one candidate instruction, the candidate instruction with a matching score greater than the confidence threshold is taken as a valid instruction; The target instruction is determined based on the screen-level priority of the valid instruction, wherein the screen-level priority is used to indicate the degree of priority of execution of the valid instruction.

6. The method according to claim 5, characterized in that, The confidence threshold is determined based on the matching scores corresponding to the multiple candidate instructions, and the confidence threshold satisfies the following formula: ; Where T is the confidence threshold, max(scores) is the maximum value among the multiple matching scores, median(scores) is the median among the multiple matching scores, mean(scores) is the average among the multiple matching scores, A is the first preset weight, B is the second preset weight, C is the third preset weight, the first preset weight is less than the second preset weight, and the third preset weight is less than the first preset weight and the second preset weight.

7. The method according to claim 5, characterized in that, If the valid instruction is a global instruction, the screen-level priority is the first priority; If the valid instruction is about the current screen, the screen priority is the second priority, which is lower than the first priority; If the valid instruction is about a pop-up page, the screen priority is the third priority, which is lower than the second priority; Determining the target instruction based on the screen-level priority of the valid instruction includes: Among the multiple valid instructions, the valid instruction with the first priority is taken as the target instruction; If no valid instruction of the first priority exists, the valid instruction of the second priority shall be used as the target instruction; If no valid instructions of the first priority and the second priority exist, the valid instruction of the third priority shall be used as the target instruction.

8. A voice interaction device, characterized in that, include: The acquisition module is used to acquire the text to be recognized, which is used to indicate the content of the user's voice command; The processing module is used to perform regular expression recognition on the text to be recognized to obtain target keywords, which are used to indicate the user's voice command control intention on the large screen device; The processing module is further configured to perform parallel searches in a preset number of knowledge bases based on the target keyword to obtain at least one candidate instruction, wherein the candidate instruction is used to indicate an instruction that matches the target keyword; The processing module is further configured to determine the target instruction to be executed based on the at least one candidate instruction; The processing module is also used to execute corresponding business actions based on the target instruction.

9. An electronic device, characterized in that, It includes a processor and a memory, the processor being coupled to the memory; the memory is used to store computer instructions, which are loaded and executed by the processor to enable the computer device to implement the voice interaction method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes computer-executable instructions that, when executed on a computer, cause the computer to perform the voice interaction method according to any one of claims 1 to 7.

11. A computer program product, characterized in that, The computer program product includes a computer program that, when run on an electronic device, causes the electronic device to perform the voice interaction method as described in any one of claims 1 to 7.