A voice interaction method, system, device and electronic equipment
By introducing custom wake words and function mapping tables into smart devices, combined with a multi-turn dialogue mode, the problem of low interaction efficiency caused by fixed wake words in existing technologies is solved, achieving an efficient and natural voice interaction experience.
Patent Information
- Application Number
- CN202610459488.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-08
- Publication Date
- 2026-07-07
AI Technical Summary
The existing voice interaction paradigm for smart devices uses a fixed and singular wake word, which leads to the reliance on semantic parsing for function triggering, resulting in low interaction efficiency, inability to meet refined and contextualized needs, and poor user experience.
A custom wake word mechanism is introduced, which binds user-defined wake words to smart device functions through a function mapping table. It adopts a multi-turn dialogue mode and a session termination condition to optimize natural language dialogue.
It improves the efficiency of voice interaction, meets users' refined and contextualized needs, and enhances the user experience.
Smart Images

Figure CN122347952A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart devices, and more specifically, to a voice interaction method, system, apparatus, and electronic device. Background Technology
[0002] Existing smart devices typically have a voice wake-up function, allowing users to interact with and control the smart device by sending voice commands, thus improving the ease of use of smart devices.
[0003] However, the current mainstream voice interaction paradigm for smart devices still follows the design logic of the smartphone era—namely, "unified wake-up and continued interaction triggering function." The wake word is fixed and singular, and is only used to wake up the smart device. After waking up the smart device with the wake word, it is still necessary to continue the dialogue system to understand the user's needs. In other words, the function triggering of the smart device depends on the semantic parsing of the user's voice, resulting in low interaction efficiency of smart devices and an inability to support refined and contextualized needs, leading to a poor user experience. Summary of the Invention
[0004] In view of this, the present invention aims to provide a voice interaction method, system, device, and electronic device that can quickly trigger corresponding functions using user-defined wake words, optimize the voice interaction of smart devices, improve interaction efficiency, and enhance user experience.
[0005] In a first aspect, embodiments of the present invention aim to provide a voice interaction method, the method comprising: Receive audio signals; The audio signal is identified to obtain the wake word; In response to the wake word being a custom wake word, a function mapping table is queried to determine the target function corresponding to the custom wake word. The function mapping table includes at least one custom wake word and the function bound to each custom wake word. Initiate the natural language dialogue corresponding to the target function.
[0006] Furthermore, the natural language dialogue adopts a multi-turn dialogue mode, and the method further includes: In response to the session termination condition, exit the natural language dialogue corresponding to the target function.
[0007] Furthermore, the session termination condition includes at least one of a timeout exit condition, a function switching condition, and a general wake-up condition. The timeout exit condition is when the session interruption duration reaches a preset time threshold. The function switching condition is when a new custom wake-up word is detected. The general wake-up condition is when a general wake-up word is detected.
[0008] Furthermore, the step of exiting the natural language dialogue corresponding to the target function in response to the session termination condition includes: In response to the timeout exit condition, exit the context state corresponding to the target function and return to the waiting-to-wake state.
[0009] Furthermore, the step of exiting the natural language dialogue corresponding to the target function in response to the session termination condition includes: In response to the function switching condition, exit the context state corresponding to the target function and switch to the function context state corresponding to the new custom wake word.
[0010] Furthermore, the step of exiting the natural language dialogue corresponding to the target function in response to the session termination condition includes: In response to the general wake-up condition, exit the context state corresponding to the target function and start the general natural language processing flow.
[0011] Furthermore, the method also includes: Receive user-uploaded custom information, including custom wake words, corresponding audio samples, and target functions; The audio samples are trained with wake words to generate configuration information, which includes the mapping relationship between the custom wake words corresponding to the audio samples and the target functions.
[0012] Furthermore, the method also includes: Send a wake word update command, which is used to trigger the update of the smart device's wake word list based on the custom wake word in the configuration information.
[0013] Secondly, embodiments of the present invention aim to provide a voice interaction system, the system comprising: A smart device is configured to receive an audio signal; identify the audio signal and obtain a wake word; and, in response to the wake word being a custom wake word, send the custom wake word. In the cloud, a query function mapping table is configured to determine the target function corresponding to the custom wake word. The function mapping table includes at least one custom wake word and the function bound to each custom wake word; and a natural language dialogue corresponding to the target function is initiated.
[0014] Furthermore, the system also includes: The terminal device is configured to upload custom information, which includes a custom wake word, a corresponding audio sample, and a target function. The cloud is also configured to receive the audio samples and the target function; train wake words on the audio samples and generate configuration information, the configuration information including the mapping relationship between the custom wake words corresponding to the audio samples and the target function.
[0015] Furthermore, the cloud is also configured to send wake word update commands; The smart device is also configured to receive a wake word update instruction and update the wake word list of the smart device according to the custom wake word in the configuration information.
[0016] Thirdly, embodiments of the present invention aim to provide a voice interaction device, the device comprising: The acquisition unit is used to receive audio signals; identify the audio signals, and acquire a wake-up word; A query unit is configured to query a function mapping table to determine the target function corresponding to the custom wake word in response to the wake word being a custom wake word. The function mapping table includes at least one custom wake word and the function bound to each custom wake word. The processing unit is used to initiate a natural language dialogue corresponding to the target function.
[0017] Fourthly, embodiments of the present invention aim to provide a computer program product, the computer program product including a computer program / instruction, which, when executed by a processor, implements the method described in any of the preceding claims.
[0018] Fifthly, embodiments of the present invention aim to provide an electronic device, including a memory and a processor, the memory being used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method as described in any of the preceding claims.
[0019] Sixthly, embodiments of the present invention aim to provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in any of the preceding claims.
[0020] The technical solution of this invention establishes a mapping relationship between custom wake words and functions. It stores at least one custom wake word and the functions bound to each custom wake word in a function mapping table. After receiving an audio signal, it identifies the audio signal, obtains the wake word, and when the wake word is a custom wake word, it queries the function mapping table to determine the target function corresponding to the custom wake word and starts the natural language dialogue corresponding to the target function. This allows users to quickly trigger corresponding functions using user-defined wake words, optimizes the voice interaction of smart devices, and improves the user experience. Attached Figure Description
[0021] The above and other objects, features and advantages of the present invention will become clearer from the following description of embodiments of the invention with reference to the accompanying drawings, in which: Figure 1 This is a schematic diagram of the voice interaction system according to an embodiment of the present invention; Figure 2 This is a flowchart of the method for setting a custom wake word according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the wake word setting page according to an embodiment of the present invention; Figure 4 This is a flowchart of the voice interaction method according to an embodiment of the present invention; Figure 5 This is a schematic diagram of the function mapping table according to an embodiment of the present invention; Figure 6 This is a schematic diagram of the voice interaction process according to an embodiment of the present invention; Figure 7 This is a schematic diagram of a voice interaction device according to an embodiment of the present invention; Figure 8 This is a schematic diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0022] The present application is described below based on embodiments, but it is not limited to these embodiments. In the detailed description of the present application below, certain specific details are described in detail. Those skilled in the art can fully understand the present application without these details. To avoid obscuring the substance of the present application, well-known methods, processes, flows, elements, and circuits are not described in detail.
[0023] Furthermore, those skilled in the art should understand that the accompanying drawings provided herein are for illustrative purposes only and are not necessarily drawn to scale.
[0024] Unless the context explicitly requires it, words such as "including" or "contains" throughout the application should be interpreted as including rather than exclusive or exhaustive; that is, meaning "including but not limited to".
[0025] In the description of this application, it should be understood that the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this application, unless otherwise stated, "a plurality of" means two or more.
[0026] The solutions described in this specification and embodiments, if involving the processing of personal information, will be processed only on the premise of having a legal basis (such as obtaining the consent of the personal information subject, or being necessary for the performance of a contract), and will only be processed within the scope stipulated or agreed upon. A user's refusal to process personal information beyond what is necessary for basic functions will not affect the user's use of basic functions.
[0027] Because the current mainstream voice interaction paradigm for smart devices still follows the design logic of the smartphone era—namely, "unified wake-up and continued interaction triggering function"—it uses a fixed wake word to wake up the smart device, and function triggering relies on semantic parsing of the user's voice. This results in frequent function jumps and poor interaction continuity, leading to low voice interaction efficiency and an inability to support refined and contextualized needs, resulting in a poor user experience. In view of this, this invention provides a voice interaction system and method that can use a user-defined wake word to quickly trigger corresponding functions, optimizing the voice interaction of smart devices, improving interaction efficiency, meeting users' refined and contextualized needs, and enhancing the user interaction experience.
[0028] Figure 1 This is a schematic diagram of a voice interaction system according to an embodiment of the present invention. Figure 1 As shown, the voice interaction system in this embodiment includes a terminal device 10, a smart device 20, and a cloud platform 30. The terminal device 10 can be an electronic device such as a smartphone or computer. The smart device 20 can be a wearable device such as smart glasses or a smartwatch. The cloud platform 30 is a single server or a server cluster composed of multiple servers. The terminal device 10, the smart device 20, and the cloud platform 30 communicate with each other to transmit data and exchange information, jointly realizing voice interaction and functional linkage with the smart device.
[0029] Furthermore, to optimize voice interaction of smart devices and overcome the shortcomings of existing technologies caused by fixed wake words, frequent function jumps, and poor interaction continuity, the voice interaction system in this embodiment provides a custom wake word function. This allows users to independently select a wake word as the custom wake word for their smart device and bind it to the functions of the smart device. This upgrades the original single "global wake-up" behavior to "targeted wake-up," giving each wake word a clear functional meaning. Essentially, it creates a "voice shortcut system" for the smart device, achieving a fundamental innovation in the traditional voice interaction model. Simultaneously, it enables users to wake up the smart device based on a custom wake word while simultaneously triggering the corresponding function, realizing a "wake word as shortcut" voice interaction paradigm. This improves voice interaction efficiency, meets users' refined and contextualized needs, and enhances the user experience.
[0030] Figure 2This is a flowchart illustrating the method for setting a custom wake word according to an embodiment of the present invention. For example... Figure 2 As shown, in this embodiment, the custom wake word of the smart device is set using the following method.
[0031] In step S210, custom information uploaded by the user is received. The custom information includes a custom wake word, the corresponding audio sample, and the target function.
[0032] In this embodiment, the user uploads custom information to the cloud via a terminal device. This custom information includes a custom wake-up word, its corresponding audio sample, and a target function. The custom wake-up word is a user-defined wake-up word, different from the wake-up word pre-installed on the smart device (i.e., the generic wake-up word). The corresponding audio sample is an audio version of the custom wake-up word, providing the smart device with unique acoustic feature samples so that it can recognize the custom wake-up word in the audio signal during use. The target function is a function of the smart device that needs to be bound to the custom wake-up word. Therefore, this embodiment allows for setting a custom wake-up word and its mapped function options for the smart device based on the aforementioned custom information, providing a foundation for voice interaction on the smart device.
[0033] Optionally, the custom wake-up word in this embodiment may include a device part and a function part. The device part corresponds to the smart device and is used to wake up the smart device. It can be represented by keywords, aliases, or other fields from the device name. The function part corresponds to the function of the smart device and is used to wake up the smart device to perform the corresponding function. It can be represented by function keywords, aliases, or other fields, such as "translator," "problem solver," or "price indicator." For example, in the custom wake-up word "xx translator," "xx" is the device part, using the abbreviation of the smart device, used to wake up the smart device; "translator" is the function part, used to wake up the translation function of the smart device. Thus, by using the device part and function part as the custom wake-up word for the smart device in this embodiment, the smart device can be triggered to perform the corresponding function while being woken up, thereby achieving quick triggering of smart device functions and improving voice interaction efficiency.
[0034] Optionally, the terminal device in this embodiment is equipped with an application software (APP) for use with smart devices and provides a wake-up word customization function. When the user opens the application software and enters the wake-up word settings page, they can set a custom wake-up word and the target function bound to the custom wake-up word through the wake-up word input control, audio recording control and function selection control displayed on the wake-up word settings page.
[0035] Figure 3 This is a schematic diagram of the wake-up word setting page according to an embodiment of the present invention. Figure 3As shown, the wake-up word setting page 3 in this embodiment includes a text input area, a voice input area, and a mapping function selection area. The text input area displays a wake-up word input control 31, used to input the text content corresponding to a custom wake-up word, such as "xx translator". The voice input area displays an audio recording control 32, used to record an audio sample corresponding to the custom wake-up word, i.e., the audio of the custom wake-up word. The mapping function selection area displays a function selection control 33, used to trigger the selection of the function mapped to the custom wake-up word, i.e., the target function. By clicking or using other available triggering methods to activate the wake-up word input control 31, audio recording control 32, and function selection control 33, and completing the text input, audio sample recording, and mapping function selection of the custom wake-up word, the binding of the custom wake-up word to the mapping function is completed.
[0036] Optionally, to improve the accuracy of subsequent audio recognition and the efficiency of audio interaction, in this embodiment, when recording audio samples corresponding to custom wake words, it is necessary to record audio samples a preset number of times. This is to complete the training of wake words and the setting of custom wake words based on audio samples containing more complete audio features, which is beneficial to improving the ASR (speech recognition) recognition capability of smart devices. It can also adapt to dialects and special pronunciations, and reduce the training and recognition cost of the algorithm ASR.
[0037] Optionally, when the user triggers the mapping function selection through the function selection control 33, this embodiment can display the available mapping function options of the smart device by displaying a pop-up window or jumping to a function display page, such as "Music Radar", "Photo Problem Solving", "Photo Price Recognition", "Translator", "Photo Memory", etc. It should be understood that the function options given in this embodiment are only examples, and the specific settings can be made according to the functions of the smart device.
[0038] Furthermore, in this embodiment, a pop-up window displays the mapping function options available on the smart device. When the user triggers the mapping function control 33, the terminal device automatically displays the function option pop-up window 34. The function option pop-up window 34 displays at least one function option, a selection button (“O” in the figure) for each function option, and a confirmation control 341. The user selects the corresponding function option as the function to be bound to the current custom wake word by selecting the selection button, and completes the binding of the custom wake word and function after triggering the confirmation control 341.
[0039] Optionally, the wake-up word setting page 3 in this embodiment also includes a multi-turn dialogue switch 35, used to control the opening and closing of the multi-turn dialogue mode of the smart device. Further, the multi-turn dialogue mode is enabled by default in this embodiment. When the multi-turn dialogue mode is enabled, the smart device will automatically launch the function corresponding to the current custom wake-up word and start the natural language dialogue of that function after detecting the custom wake-up word, and then maintain the activation state of the natural language dialogue for a certain period of time (i.e., a preset effective time). The preset effective time can be set through the effective time displayed on the wake-up word setting page 3. Within the preset effective time, subsequent voice commands from the user do not need to carry a wake-up word and are directly handled by the current function context, thereby achieving a smooth experience of "one wake-up, multiple rounds of interaction".
[0040] Furthermore, the smart device in this embodiment has a built-in lightweight Natural Language Understanding (NLU) module corresponding to each function option, supporting context-aware open dialogue. Users can interact using natural language similar to everyday conversation, not just preset commands. Simultaneously, if the user uses another custom wake word, the system immediately switches to the new skill context; if a generic wake word is used (which may be the same as or similar to the device portion of a custom wake word), the system enters the general natural language processing flow. Therefore, by setting up a multi-turn dialogue mode, this embodiment enables the smart device to implement a multi-turn wake-free interaction mechanism based on wake word context, significantly reducing the interaction burden and improving voice interaction efficiency.
[0041] Therefore, this embodiment, by displaying the wake word setting page and allowing users to customize wake words and bind functions through interactive operations on the wake word setting page, can build a lightweight custom wake-up architecture with end-to-cloud collaboration, significantly reducing the cost of algorithmic speech recognition. At the same time, it also implements a mobile graphical voice skill binding mechanism, enabling users to complete complex voice automation configurations through application software without writing any code or commands, greatly reducing the threshold for using AI capabilities and improving the user's interactive experience.
[0042] In step S220, wake-up words are trained on the audio samples and configuration information is generated. The configuration information includes the mapping relationship between the custom wake-up words corresponding to the audio samples and the target functions.
[0043] In this embodiment, after receiving the custom information uploaded by the terminal device, the cloud will train the wake word on the audio sample in the custom information, so as to generate configuration information based on the trained custom wake word and the bound function, so that the smart device can recognize the custom wake word and trigger the function bound to the custom wake word.
[0044] Furthermore, in this embodiment, the process of training the wake word on the audio sample is a systematic engineering process of transforming the user's original voice into an intelligent model. The purpose is to enable the intelligent device to learn to recognize the wake word from the received audio signal as a device start command, thereby triggering the intelligent device to perform functions through voice interaction while freeing up the user's hands.
[0045] Optionally, when training the wake word on the audio samples, this embodiment first preprocesses the audio samples uploaded by the user. For example, it extracts audio segments containing the same custom wake word from multiple audio samples, performs data augmentation on the audio segments containing the custom wake word—for example, adding noise with different signal-to-noise ratios (SNR) to simulate different usage environments, adjusting the audio playback speed or pitch to simulate different user speaking habits, etc. Then, it extracts features from the preprocessed audio samples, transforming the audio signals corresponding to the audio samples into a form that better represents their acoustic characteristics, such as Mel-spectral features, etc. Finally, it inputs the feature-extracted audio signals into an audio recognition model that is consistent with the audio recognition model deployed in the smart device for training, and iterates and optimizes based on each training result until the performance indicators output by the model (such as wake-up success rate and wake-up accuracy) meet the preset evaluation conditions (such as the wake-up success rate reaching a preset success rate threshold and the wake-up accuracy reaching a preset accuracy threshold). The audio recognition model deployed in the smart device can be selected according to the computing power of the smart device. When computing power resources are limited, lightweight models such as Convolutional Recurrent Neural Network (CRNN) and Deep Separable Convolutional Neural Network (DS-CNN) can be used to ensure that the smart device can be successfully woken up. When computing power resources are sufficient, more complex CNN or DNN models can be used to obtain higher accuracy.
[0046] Optionally, in this embodiment, a function mapping table stores at least one custom wake word of the smart device and the functions bound to each custom wake word. After the cloud performs wake word training on the audio samples uploaded by the user and generates corresponding configuration information, it adds the custom wake words and the functions mapped to those custom wake words to the function mapping table according to the configuration information, and updates the function mapping table.
[0047] In step S230, a wake word update instruction is sent. The wake word update instruction is used to trigger the update of the smart device's wake word list based on the custom wake word in the configuration information.
[0048] Optionally, the wake word list in this embodiment includes at least one wake word, which can be a custom wake word or a general wake word, and each wake word has a corresponding binding function. After generating the configuration information of the smart device, the cloud will send the custom wake word in the configuration information to the smart device through a wake word update command. Alternatively, the wake word list in this embodiment includes at least one wake word and the function corresponding to each wake word. Correspondingly, after generating the configuration information of the smart device, the cloud will send the custom wake word in the configuration information and the function corresponding to the custom wake word to the smart device through a wake word update command.
[0049] Furthermore, considering the need for lightweight development of smart devices and their computational power constraints, the wake-up word list in this embodiment adopts the first form, where the smart device only stores the wake-up words and not the functions bound to them. Simultaneously, after generating the configuration information for the smart device, the cloud only sends the custom wake-up words from the configuration information to the smart device.
[0050] Optionally, in this embodiment, the cloud can directly send the custom wake word to the smart device via a network connection; alternatively, it can first send the custom wake word to the terminal device via a network connection, and then the terminal device can send it to the smart device via a near-field communication connection (such as Bluetooth or WiFi). Therefore, by providing different methods for sending custom wake words, this embodiment can select a suitable method for transmitting the custom wake word according to the specific usage scenario, ensuring that the smart device effectively receives the custom wake word and completes the relevant settings.
[0051] In step S240, the wake word list is updated.
[0052] In this embodiment, after receiving a custom wake word, the smart device automatically updates the wake word list and adds the newly added custom wake word to the wake word list, thereby completing the setting and updating of the custom wake word.
[0053] Furthermore, after completing the custom wake word setting for the smart device, the custom wake word can be used to implement the corresponding voice interaction process in this embodiment.
[0054] Figure 4 This is a flowchart of a voice interaction method according to an embodiment of the present invention. Figure 4 As shown, the voice interaction method in this embodiment includes the following steps.
[0055] In step S410, an audio signal is received.
[0056] In this embodiment, when a user uses a smart device function, they will speak a voice message, i.e., an audio signal, to the smart device containing a custom wake-up word bound to that function.
[0057] In step S420, the audio signal is identified to obtain the wake word.
[0058] In this embodiment, after receiving the audio signal output by the user, the smart device identifies the audio signal based on its built-in audio recognition model and obtains the wake word in the audio signal.
[0059] In step S430, in response to the wake word being a custom wake word, the function mapping table is queried to determine the target function corresponding to the custom wake word. The function mapping table includes at least one custom wake word and the function bound to each custom wake word.
[0060] In this embodiment, when the smart device recognizes a custom wake word in the voice signal, it sends the custom wake word to the cloud. The cloud then uses the received custom wake word query function to determine the target function corresponding to the current custom wake word.
[0061] Figure 5 This is a schematic diagram of the function mapping table according to an embodiment of the present invention. For example... Figure 5 As shown, the function mapping table in this embodiment includes at least one custom wake word and the corresponding function for each custom wake word. Each custom wake word covers a functional scenario, and the function corresponding to each custom wake word includes at least one sub-function within that scenario. For example, the custom wake word "xx Music Radar" corresponds to the music scenario, and its functions include music recommendation, music playback, song switching, and song collection. The custom keyword "xx Translator" corresponds to the translation scenario, and its functions include translation and language switching.
[0062] It should be understood that the custom wake words and corresponding functional scenarios and functions given in the function mapping table in this embodiment are only examples. They can be set according to the functions of the smart device and the actual interaction scenario requirements. There are no restrictions on this.
[0063] In step S440, the natural language dialogue corresponding to the target function is initiated.
[0064] In this embodiment, after determining the user-inputted custom wake word and the corresponding target function, the natural language dialogue corresponding to the target function is initiated.
[0065] Optionally, the natural language dialogue in this embodiment adopts a multi-turn dialogue mode by default. After the natural language dialogue corresponding to the target function is started, the natural language dialogue will remain active for a preset effective time. At the same time, during the conversation period (i.e., the preset effective time), the user's subsequent voice commands do not need to carry a wake word and are directly handled by the current function context, thereby achieving a smooth experience of "one wake-up, multiple rounds of interaction".
[0066] For example, after recognizing the custom wake word "xx Music Radar," the system determines through a function mapping table that the function corresponding to "xx Music Radar" is music-related. It then initiates a natural language dialogue for the music function and begins music recommendations. During this dialogue session, the user does not need to repeatedly say "xx Music Radar"; they can simply speak sub-function commands to access other music-related functions. For instance, saying "Next song" will switch to the next song, saying "Add to favorites" will add the song to their favorites, saying "More of this style" will play more songs of that style, and saying "I don't like this style" will skip to another song and recommend other styles, etc.
[0067] Furthermore, when the natural language dialogue adopts a multi-turn dialogue mode, the voice interaction method in this embodiment also includes: exiting the natural language dialogue corresponding to the target function in response to the session termination condition.
[0068] Optionally, the session termination conditions in this embodiment include at least one of a timeout exit condition, a function switching condition, and a general wake-up condition. The timeout exit condition is when the detected session interruption duration reaches a preset time threshold, which is consistent with the preset effective time of the multi-turn dialogue mode. The function switching condition is when a new custom wake-up word is detected. The general wake-up condition is when a general wake-up word is detected. Further, when exiting the natural language dialogue mode corresponding to the target function, in this embodiment, in response to the timeout exit condition, the context state corresponding to the target function is exited and returned to the waiting-to-wake state; or, in response to the function switching condition, the context state corresponding to the target function is exited and switched to the function context state corresponding to the new custom wake-up word; or, in response to the general wake-up condition, the context state corresponding to the target function is exited and the general natural language processing flow is initiated. Therefore, by providing multiple session termination conditions and corresponding natural language dialogue exit and switching strategies, this embodiment can effectively meet the switching needs between different functions, further improving the user interaction experience.
[0069] The technical solution of this embodiment introduces custom wake words, uploads audio samples, and selects mapping functions, allowing users to freely define wake words and bind them to specific functions of smart devices. A function mapping table stores custom wake words and their corresponding functions. When a custom wake word is detected, the function mapping table is queried to determine the target function, enabling dynamic voice routing and direct access to functions with a single sentence, achieving a "wake-up-and-execute" effect. This reduces the natural language understanding process and significantly improves voice interaction efficiency. Furthermore, by adopting a multi-turn dialogue mode, voice interaction can be achieved based on an advanced mechanism of contextual intent inheritance and multi-turn wake-free continuous dialogue. After a custom wake-up triggers a corresponding function, it automatically enters a wake-free continuous natural dialogue. Subsequent received dialogue statements are automatically associated with the previous dialogue topic for processing, eliminating the need to repeat key information in each turn, further reducing communication costs and making voice interaction more efficient and the interactive experience more natural and fluid.
[0070] Figure 6 This is a schematic diagram of the voice interaction process according to an embodiment of the present invention. Figure 6 As shown, the voice interaction process in this embodiment provides a complete process from the custom wake-up word setting stage to the smart device wake-up interaction stage, specifically including the following steps: In step S610, the wake word setting page is displayed.
[0071] In this embodiment, the user can access the wake word settings page by opening the APP that comes with the smart device on the terminal device. The wake word settings page can be referred to the above description and will not be repeated here.
[0072] In step S620, a custom wake word is obtained.
[0073] In this embodiment, the user inputs the text content corresponding to the custom wake word by triggering the wake word input control on the wake word settings page, and records the audio sample corresponding to the custom wake word by using the audio recording control.
[0074] In step S630, the audio sample is uploaded.
[0075] In this embodiment, after the terminal device obtains the user's input of a custom wake word and the recorded audio sample, it uploads the audio sample to the cloud.
[0076] In step S640, after the cloud receives the audio sample, it automatically triggers the training of the wake word model.
[0077] In step S650, the function is bound.
[0078] In this embodiment, the user selects the function mapped to the custom wake word by triggering the function selection control on the wake word settings page, thus completing the binding of the custom wake word to the function.
[0079] In step S660, a custom wake word-function mapping relationship is sent.
[0080] In this embodiment, the terminal sends the mapping relationship between the user's bound wake word and function to the cloud.
[0081] In step S670, configuration information is generated.
[0082] In this embodiment, the cloud configures the smart device according to the bound wake word and function, and generates corresponding configuration information. The configuration information includes the mapping relationship between the custom wake word corresponding to the audio sample and the target function.
[0083] In step S680, a custom wake word is sent.
[0084] In this embodiment, after the cloud generates the configuration information, the custom wake word in the configuration information is pushed to the smart device so that the binding relationship between the wake word and the function takes effect on the smart device.
[0085] In step S690, the wake word list is updated.
[0086] In this embodiment, the smart device updates its wake word recognition list based on the received custom wake word. The wake word list includes at least one wake word, which can be a custom wake word or a general wake word, and each wake word has a corresponding binding function.
[0087] In step S6100, an audio signal is received.
[0088] In this embodiment, the user speaks a custom wake word, and the microphone array on the smart device collects the audio signal.
[0089] In step S6110, the audio signal is identified and the wake word is obtained.
[0090] In this embodiment, the smart device identifies the received audio signal and obtains the wake word from the audio signal. Optionally, when the wake word is a general wake word, a general natural language processing flow is initiated. When the wake word is a custom wake word, step S6120 continues to be executed.
[0091] In step S6120, a custom wake word is sent.
[0092] In this embodiment, after the smart device recognizes the custom wake word, it sends the custom wake word to the cloud.
[0093] In step S6130, the route is configured to use the custom wake word binding function, and then enters the natural language dialogue function.
[0094] In this embodiment, after receiving a custom wake-up word from a smart device, the cloud queries a function mapping table to determine the target function corresponding to the custom wake-up word and initiates a natural language dialogue corresponding to the target function. Optionally, the natural language dialogue corresponding to the custom wake-up word adopts a multi-turn dialogue mode by default. After the system automatically enters the natural language dialogue corresponding to the target function, the user can start a multi-turn dialogue within the same session without an additional wake-up word or manual setting. The system automatically understands and executes the corresponding sub-function instructions in the current function context until a session termination condition is detected—no new dialogue or a new wake-up occurs within a predetermined time—then it automatically exits the natural language dialogue of the current function.
[0095] Figure 7 This is a schematic diagram of a voice interaction device according to an embodiment of the present invention. Figure 7 As shown, the voice interaction device in this embodiment includes an acquisition unit 71, a query unit 72, and a processing unit 73. The acquisition unit 71 receives audio signals and identifies the audio signals to acquire a wake-up word. The query unit 72, in response to a custom wake-up word, queries a function mapping table to determine the target function corresponding to the custom wake-up word. The function mapping table includes at least one custom wake-up word and the functions bound to each custom wake-up word. The processing unit 73 initiates a natural language dialogue corresponding to the target function.
[0096] Optionally, the natural language dialogue in this embodiment adopts a multi-turn dialogue mode, and the processing unit 73 is also used to exit the natural language dialogue corresponding to the target function in response to the session termination condition.
[0097] Optionally, the session termination condition in this embodiment includes at least one of a timeout exit condition, a function switching condition, and a general wake-up condition. The timeout exit condition is when the session interruption duration reaches a preset time threshold; the function switching condition is when a new custom wake-up word is detected; and the general wake-up condition is when a general wake-up word is detected. The processing unit 73 is further configured to, in response to the timeout exit condition, exit the context state corresponding to the target function and return to the wake-up state; in response to the function switching condition, exit the context state corresponding to the target function and switch to the function context state corresponding to the new custom wake-up word; and in response to the general wake-up condition, exit the context state corresponding to the target function and start the general natural language processing flow.
[0098] Furthermore, the voice interaction device in this embodiment is also used to receive user-uploaded custom information, including a custom wake word, a corresponding audio sample, and a target function; to train the wake word on the audio sample and generate configuration information, including a mapping relationship between the custom wake word and the target function corresponding to the audio sample; and to send a wake word update command, which is used to trigger an update of the smart device's wake word list based on the custom wake word in the configuration information.
[0099] Figure 8 This is a schematic diagram of an electronic device according to an embodiment of the present invention. In this embodiment, the electronic device 8 includes a server, a terminal, etc. Figure 8 As shown, the electronic device 8 includes at least one processor 81; a memory 82 communicatively connected to at least one processor 81; and a communication component 83 communicatively connected to a scanning device, the communication component 83 receiving and transmitting data under the control of the processor 81; wherein the memory 82 stores instructions executable by at least one processor 81, the instructions being executed by at least one processor 81 to implement the above-mentioned voice interaction method.
[0100] Specifically, the electronic device includes: one or more processors 81 and a memory 82. Figure 8 Taking a processor 81 as an example, the processor 81 and the memory 82 can be connected via a bus or other means. Figure 8 Taking a bus connection as an example, memory 82, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Processor 81 executes various functional applications and data processing of the device by running the non-volatile software programs, instructions, and modules stored in memory 82, thereby realizing the voice interaction method.
[0101] The memory 82 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store an option list, etc. Furthermore, the memory 82 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 82 may optionally include memory remotely located relative to the processor 81, and these remote memories can be connected to external devices via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0102] One or more modules are stored in memory 82 and, when executed by one or more processors 81, execute the voice interaction method in any of the above method embodiments.
[0103] The above-mentioned products can perform the methods provided in the embodiments of this application, and have the corresponding functional modules and beneficial effects of performing the methods. For technical details not described in detail in this embodiment, please refer to the methods provided in the embodiments of this application.
[0104] The technical solution of this invention establishes a mapping relationship between custom wake words and functions. A function mapping table stores at least one custom wake word and the functions bound to each custom wake word. After receiving an audio signal, the system identifies the audio signal, obtains the wake word, and when the wake word is a custom wake word, queries the function mapping table to determine the target function corresponding to the custom wake word. This initiates the natural language dialogue corresponding to the target function, enabling users to quickly trigger corresponding functions using user-defined wake words. This optimizes the voice interaction of smart devices, improves interaction efficiency, and enhances the user experience.
[0105] Another embodiment of the present invention relates to a non-volatile storage medium for storing a computer-readable program for use by a computer to execute some or all of the above-described method embodiments.
[0106] That is, those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. This program is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0107] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A voice interaction method, characterized in that, The method includes: Receive audio signals; The audio signal is identified to obtain the wake word; In response to the wake word being a custom wake word, a function mapping table is queried to determine the target function corresponding to the custom wake word. The function mapping table includes at least one custom wake word and the function bound to each custom wake word. Initiate the natural language dialogue corresponding to the target function.
2. The method according to claim 1, characterized in that, The natural language dialogue adopts a multi-turn dialogue mode, and the method further includes: In response to the session termination condition, exit the natural language dialogue corresponding to the target function.
3. The method according to claim 2, characterized in that, The session termination conditions include at least one of the following: timeout exit condition, function switching condition, and general wake-up condition. The timeout exit condition is when the session interruption duration reaches a preset time threshold. The function switching condition is when a new custom wake-up word is detected. The general wake-up condition is when a general wake-up word is detected.
4. The method according to claim 3, characterized in that, The step of exiting the natural language dialogue corresponding to the target function in response to a session termination condition includes: In response to the timeout exit condition, exit the context state corresponding to the target function and return to the waiting-to-wake state.
5. The method according to claim 3, characterized in that, The step of exiting the natural language dialogue corresponding to the target function in response to a session termination condition includes: In response to the function switching condition, exit the context state corresponding to the target function and switch to the function context state corresponding to the new custom wake word.
6. The method according to claim 3, characterized in that, The step of exiting the natural language dialogue corresponding to the target function in response to a session termination condition includes: In response to the general wake-up condition, exit the context state corresponding to the target function and start the general natural language processing flow.
7. The method according to claim 1, characterized in that, The method further includes: Receive user-uploaded custom information, including custom wake words, corresponding audio samples, and target functions; The audio samples are trained with wake words to generate configuration information, which includes the mapping relationship between the custom wake words corresponding to the audio samples and the target functions.
8. The method according to claim 7, characterized in that, The method further includes: Send a wake word update command, which is used to trigger the update of the smart device's wake word list based on the custom wake word in the configuration information.
9. A voice interaction system, characterized in that, The system includes: A smart device is configured to receive an audio signal; identify the audio signal and obtain a wake word; and, in response to the wake word being a custom wake word, send the custom wake word. In the cloud, a query function mapping table is configured to determine the target function corresponding to the custom wake word. The function mapping table includes at least one custom wake word and the function bound to each custom wake word; and a natural language dialogue corresponding to the target function is initiated.
10. The system according to claim 9, characterized in that, The system also includes: The terminal device is configured to upload custom information, which includes a custom wake word, a corresponding audio sample, and a target function. The cloud is also configured to receive the audio samples and the target function; train wake words on the audio samples and generate configuration information, the configuration information including the mapping relationship between the custom wake words corresponding to the audio samples and the target function.
11. The system according to claim 10, characterized in that, The cloud is also configured to send wake word update commands; The smart device is also configured to receive a wake word update instruction and update the wake word list of the smart device according to the custom wake word in the configuration information.
12. A voice interaction device, characterized in that, The device includes: An acquisition unit is used to receive audio signals; identify the audio signals, and acquire a wake-up word; A query unit is configured to query a function mapping table to determine the target function corresponding to the custom wake word in response to the wake word being a custom wake word. The function mapping table includes at least one custom wake word and the function bound to each custom wake word. The processing unit is used to initiate a natural language dialogue corresponding to the target function.
13. An electronic device comprising a memory and a processor, characterized in that, The memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method of any one of claims 1-8.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method of any one of claims 1-8.