A hotword expansion method and vehicle
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GREAT WALL MOTOR CO LTD
- Filing Date
- 2026-07-01
- Publication Date
- 2026-08-07
AI Technical Summary
然而,这种基于固定词库的静态热词注册机制由于预设热词的数量和种类极为有限,无法覆盖用户在实际对话中可能使用的多样化口语表达,导致语音识别系统对用户非标准化回复的命中率极低
[0048] By employing the aforementioned technical solutions, the hot word expansion method and vehicle provided in this application dynamically generate expanded hot words by acquiring contextual information of the current interaction scenario and calling a generative language model. This changes the configuration mode that relies on human experience or static high-frequency word libraries, significantly improving the recognition coverage of users' natural spoken expressions by leveraging the semantic generalization capabilities of large models, and further enhancing the hit rate of the speech recognition system for users' non-standardized responses. Simultaneously, through a dynamic registration and cleanup mechanism based on the interaction state, the lifecycle of expanded hot words is strictly limited to the current interaction session, avoiding recognition conflicts and wasted computing resources caused by the unlimited expansion of the global word library. This application effectively controls system overhead while significantly improving the intelligence level of voice interaction, balancing system operating efficiency and stability.
Smart Images

Figure CN122531380A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent cockpit technology, and in particular to a hot word expansion method and a vehicle. Background Technology
[0002] In in-vehicle voice interaction systems, to achieve rapid response to user commands, mainstream solutions typically employ speech recognition architectures based on statistical language models or end-to-end deep learning models, optimized in conjunction with domain-specific grammatical rules. In these systems, hotword technology is widely used. This involves predefining high-frequency command words (such as "turn on the air conditioner," "confirm," and "cancel") and loading them into the weighted vocabulary of the speech recognition decoder to improve keyword recall and recognition accuracy in specific scenarios.
[0003] Existing in-vehicle voice hotword registration solutions mainly rely on human experience or high-frequency word databases based on big data statistics for configuration. However, this static hotword registration mechanism based on a fixed word database has an extremely limited number and variety of preset hotwords, which cannot cover the diverse spoken expressions that users may use in actual conversations, resulting in a very low hit rate for non-standardized responses from the voice recognition system. Summary of the Invention
[0004] In view of the above problems, this application provides a hot word expansion method and vehicle to achieve the goal of improvement. The specific solution is as follows: By using a large language model to intelligently expand preset hot words at the semantic level, it covers the diverse spoken expressions of users, significantly improves the recognition hit rate of non-standardized responses, effectively avoids interaction interruption, and enhances the naturalness and fluency of voice interaction.
[0005] The first aspect of this application provides a method for expanding hot words, including:
[0006] Obtain the context information of the current interaction scenario and the corresponding original hot words;
[0007] Based on contextual information and original hot words, a generation instruction is constructed, and a generative language model is called to process the generation instruction to obtain an extended set of hot words that are semantically related to the original hot words;
[0008] If the current interaction state meets the preset activation conditions, the expanded hot word set will be dynamically registered to the speech recognition engine;
[0009] If the current interaction state meets the preset release conditions, clean up the extended hot word set from the speech recognition engine.
[0010] In one possible implementation, generation instructions are constructed based on contextual information and the original hot words. A generative language model is then invoked to process these instructions, resulting in an extended set of hot words semantically associated with the original hot words, including:
[0011] Fill the preset instruction template with context information and original hot words to generate generation instructions. The generation instructions are used to instruct the generative language model to generate colloquial expressions that conform to the current interaction scenario.
[0012] Input the generation instructions into the generative language model to obtain the candidate hot word list output by the generative language model;
[0013] The expanded hot word set is determined based on the candidate hot word list.
[0014] In one possible implementation, an expanded set of hot words is determined based on a list of candidate hot words, including:
[0015] The candidate hot words list is subjected to text similarity calculation. Candidate hot words with text similarity greater than the preset similarity threshold are merged and deduplicated to obtain the deduplicated candidate hot words.
[0016] Based on a pre-set colloquialism rule base, the deduplicated candidate hot words are filtered for quality. The colloquialism rule base includes a written language feature word list and a rare character feature word list. Candidate hot words that match the written language feature word list or the rare character feature word list are removed.
[0017] The filtered candidate hot words are input into the pre-trained semantic evaluation model, and the confidence index output by the semantic evaluation model is obtained to characterize the degree of fit between the candidate hot words and the current interaction scenario.
[0018] Candidate hot words with a confidence index greater than or equal to a preset confidence threshold are identified as extended hot words in the extended hot word set, and corresponding semantic category labels are assigned to the identified extended hot words. The semantic category labels are used to indicate the intent category of the extended hot words in the current interaction scenario.
[0019] In one possible implementation, if the current interaction state meets preset activation conditions, the extended hot word set is dynamically registered to the speech recognition engine, including:
[0020] In response to the detection of a voice inquiry trigger event for the current interaction scenario, the expanded hot word set is written in batches into the temporary word library of the speech recognition engine.
[0021] In one possible implementation, the expanded hot word set is written in batches into the temporary lexicon of the speech recognition engine, including:
[0022] Iterate through the extended hot word set, call the hot word registration interface of the speech recognition engine one by one through the asynchronous concurrency mechanism, write each extended hot word in the extended hot word set into the temporary word library, set the corresponding recognition confidence threshold for the written extended hot words, and record the identification information of the successfully written extended hot words in the registration log.
[0023] In one possible implementation, if the current interaction state meets a preset release condition, the extended hot word set is cleaned up from the speech recognition engine, including:
[0024] In response to the detection of an interaction end event in the current interaction scenario, the extended hot word set is removed from the temporary word library.
[0025] In one possible implementation, the extended hot word set is removed from the temporary lexicon, including:
[0026] Based on the identification information in the registration log, the hot word cancellation interface of the speech recognition engine is called to remove each extended hot word from the extended hot word set in the temporary word library.
[0027] After removal is complete, the speech recognition engine's garbage collection mechanism is triggered to release the memory resources associated with the extended hot word set in the temporary word library and clear the registration log.
[0028] One possible implementation also includes:
[0029] Receive voice input data from the target user;
[0030] The voice input data is matched with an expanded set of hot words using a speech recognition engine to obtain hot word matching results.
[0031] Based on the category to which the hot word matching result belongs, execute the business operation branch corresponding to the category.
[0032] One possible implementation also includes:
[0033] If a timeout or call exception event is detected during the process of calling the generative language model to process the generation instructions, the call to the generative language model will be terminated.
[0034] The original hot words are used as an expanded hot word set, and the expanded hot word set is dynamically registered to the speech recognition engine.
[0035] A second aspect of this application provides a vehicle including at least one processor and a memory connected to the processor, wherein:
[0036] Memory is used to store computer programs;
[0037] The processor is used to execute computer programs to enable the vehicle to implement the hot word expansion method of the first aspect or any implementation thereof.
[0038] A third aspect of this application provides a hot word expansion device, comprising:
[0039] The context acquisition module is used to obtain the context information of the current interaction scenario and the corresponding original hot words;
[0040] The hot word generation module is used to construct generation instructions based on context information and original hot words, call the generative language model to process the generation instructions, and obtain an extended hot word set that is semantically related to the original hot words;
[0041] The hot word registration module is used to dynamically register an expanded set of hot words to the speech recognition engine when the current interaction state meets the preset activation conditions;
[0042] The hot word cleanup module is used to clean up the extended hot word set from the speech recognition engine when the current interaction state meets the preset release conditions.
[0043] A fourth aspect of this application provides a hot word expansion device, comprising at least one processor and a memory connected to the processor, wherein:
[0044] Memory is used to store computer programs;
[0045] The processor is used to execute computer programs to enable the hot word expansion device to implement the hot word expansion method of the first aspect or any implementation thereof.
[0046] The fifth aspect of this application provides a computer program product, including computer-readable instructions that, when executed on an electronic device, cause the electronic device to implement the hot word expansion method described in the first aspect or any implementation thereof.
[0047] The sixth aspect of this application provides a computer storage medium carrying one or more computer programs, which, when executed by an electronic device, enable the electronic device to implement the hot word expansion method described in the first aspect or any implementation thereof.
[0048] By employing the aforementioned technical solutions, the hot word expansion method and vehicle provided in this application dynamically generate expanded hot words by acquiring contextual information of the current interaction scenario and calling a generative language model. This changes the configuration mode that relies on human experience or static high-frequency word libraries, significantly improving the recognition coverage of users' natural spoken expressions by leveraging the semantic generalization capabilities of large models, and further enhancing the hit rate of the speech recognition system for users' non-standardized responses. Simultaneously, through a dynamic registration and cleanup mechanism based on the interaction state, the lifecycle of expanded hot words is strictly limited to the current interaction session, avoiding recognition conflicts and wasted computing resources caused by the unlimited expansion of the global word library. This application effectively controls system overhead while significantly improving the intelligence level of voice interaction, balancing system operating efficiency and stability. Attached Figure Description
[0049] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.
[0050] Figure 1 A flowchart illustrating the hot word expansion method provided in this application;
[0051] Figure 2 Example diagram of a structured instruction template for semantic expansion of in-vehicle voice hot words provided in this application;
[0052] Figure 3 A flowchart illustrating the hot word expansion method provided in this application;
[0053] Figure 4 Example diagram of vehicle layered architecture provided for this application;
[0054] Figure 5 This is a schematic diagram of the structure of a hot word expansion device provided in an embodiment of this application;
[0055] Figure 6 A schematic diagram of the hot word expansion device provided in this application. Detailed Implementation
[0056] The embodiments of this application are described below with reference to the accompanying drawings. The terminology used in the implementation section of this application is for explaining specific embodiments only and is not intended to limit the scope of this application.
[0057] The embodiments of this application will now be described with reference to the accompanying drawings. Those skilled in the art will recognize that, with technological advancements and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.
[0058] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements, but may include other elements not explicitly listed or inherent to those processes, methods, products, or apparatuses.
[0059] Currently, in the field of in-vehicle voice interaction, voice recognition systems typically use preset fixed hot words to achieve accurate matching of user commands. However, this static hot word registration scheme has obvious limitations: on the one hand, the number of manually preset hot words is limited, making it difficult to cover the diverse spoken expressions of users in natural conversations. This results in the system being unable to recognize when users use non-preset words (such as using "da ba" instead of "confirm"), causing the interaction to be interrupted; on the other hand, blindly expanding the global hot word library in order to improve coverage can easily lead to hot word conflicts in different scenarios and increase the computational load and memory consumption of the voice recognition engine.
[0060] In summary, existing hot word registration schemes cannot cover the diverse spoken expressions that users may use in actual conversations, resulting in a very low hit rate for non-standardized user responses by speech recognition systems.
[0061] This embodiment provides a hot word expansion method. This method achieves adaptive management of hot word resources in in-vehicle voice interaction scenarios through a combination of online dynamic generation and on-demand dynamic scheduling. It is understood that although this embodiment uses in-vehicle voice interaction as an example, this method is also applicable to other electronic devices with voice interaction capabilities, such as smart homes and mobile terminals. The method in this embodiment can be implemented by a processor executing a computer program stored in memory. The corresponding functional modules can be divided into a context acquisition module, a hot word generation module, a hot word registration module, and a hot word cleanup module.
[0062] See Figure 1 This application provides a flowchart illustrating a hot word expansion method.
[0063] like Figure 1 As shown, this hot word expansion method includes the following steps:
[0064] Step 101: Obtain the context information of the current interaction scenario and the corresponding original hot words.
[0065] It should be noted that the acquisition of contextual information has a strict real-time characteristic. It is not a static configuration that is pre-fixed in the system, but dynamic data that is collected in real time each time a voice interaction request is initiated.
[0066] There are two specific trigger scenarios for initiating a voice interaction request. One is UI (User Interface) - driven trigger in the "visible - speakable" scenario, that is, the interface - change - driven trigger scenario. The system continuously monitors the life - cycle changes of the front - end display interface. When detecting UI change events such as interface jump, pop - up window generation, or list refresh, the system immediately triggers the context collection instruction. At this time, the system captures all interactive elements within the visible area of the current screen, such as button captions, icon labels, list - item keywords, etc., as the original hot - word candidate set. Subsequently, the model is used to perform semantic generalization and expansion on these candidate words. For example, expand "确定" (OK in Chinese) to "确认 / 是的 / OK", and inject the processed dynamic hot words into the vocabulary of the speech recognition engine in real - time.
[0067] This mechanism ensures that users can directly say the content visible on the screen to complete operations in any interface, achieving true "what you see is what you say".
[0068] Another trigger scenario can be the expected - response scenario trigger after voice broadcast, that is, the state - machine - driven trigger scenario.
[0069] When the system executes the preset activation condition in step 103, such as TTS voice broadcast: "Do you confirm to execute this order?", and the interaction state machine enters the suspended state of "waiting for user confirmation", a high - priority context lock will be triggered. At this time, the system will forcibly obtain the context information strongly related to this confirmation task, such as order number, operation object name, etc., and the corresponding original confirmation hot words, such as "确认" (confirm in Chinese), "取消" (cancel in Chinese), "返回" (return in Chinese).
[0070] This trigger method limits the semantic space of subsequent speech recognition, effectively avoiding misrecognition caused by users' random responses in multi - turn conversations or noisy environments, and improving the fault tolerance rate of key operations.
[0071] Specifically, the context information can include one or more of the current conversation history, the display state of the in - vehicle interface, the vehicle driving state, the user's geographical location, and the currently executing business type, etc. Exemplarily, when the in - vehicle system asks the user "Do you want to call Zhang San?", the context information includes real - time elements such as "phone service", "contact Zhang San", and "confirmation intention".
[0072] The original hot words refer to the preset basic response vocabulary in this specific interaction scenario, such as "是的" (yes in Chinese), "好的" (ok in Chinese), "取消" (cancel in Chinese), etc.
[0073] In summary, this embodiment captures the above information in real time at the moment of interaction triggering, ensuring that the subsequent hot word expansion process can accurately anchor the current actual interaction needs. This is fundamentally different from the static solution in traditional technology that relies solely on offline corpora for batch expansion without specific context, laying a data foundation for improving the scenario adaptability of hot words.
[0074] Step 102: Construct generation instructions based on contextual information and original hot words, call the generative language model to process the generation instructions, and obtain an extended set of hot words that are semantically related to the original hot words.
[0075] This step leverages the powerful semantic understanding and generalization capabilities of generative language models to transform a limited set of original hot words into an expanded set of hot words that covers diverse spoken expressions.
[0076] It should be noted that semantic association here refers not only to literal synonymy or near-synonymity, but also emphasizes pragmatic equivalence under specific contextual constraints.
[0077] For example, in a phone confirmation scenario, the model can understand that "call" and "dial" have the same confirmation intent as the original hot word "yes" in the current context, and thus include them in the expanded hot word set.
[0078] It is important to emphasize that this generation process is performed dynamically online, meaning that each interaction may produce different extended results due to subtle differences in the context, rather than simply querying a pre-stored mapping table.
[0079] In summary, this dynamic generation mechanism enables the system to flexibly adapt to users' changing natural language expression habits, significantly improving the recall rate of speech recognition, while avoiding the problem of the global lexicon expanding infinitely in order to cover all possible expressions.
[0080] Step 103: If the current interaction state meets the preset activation conditions, dynamically register the extended hot word set to the speech recognition engine.
[0081] It should be noted that the preset activation condition usually refers to the time window when the system is about to receive a user's voice response, such as the period after the vehicle's infotainment system completes the voice prompt and before the microphone starts picking up sound. Only when this condition is met will the expanded hot word set be written into the speech recognition engine's temporary vocabulary.
[0082] This "on-demand activation" design reflects the temporary and state-triggered nature of hot word management. In other words, expanded hot words do not reside permanently in the recognition engine, but only take effect within a short time window when they need to be recognized.
[0083] For example, in a navigation confirmation scenario, extended hot words such as "Let's go" and "Let's go" are only registered when the system asks "Do you want to start navigation?" and waits for the user's reply; once the interaction ends or the system switches to a music playback scenario, these navigation-related extended hot words no longer occupy recognition resources.
[0084] This mechanism effectively prevents interference between hot words in different scenarios, ensuring the focus and accuracy of the speech recognition engine when processing the current task.
[0085] Step 104: If the current interaction state meets the preset release conditions, clean up the extended hot word set from the speech recognition engine.
[0086] It should be noted that the preset release conditions are used to define the end of the hot word's lifecycle, which may include events such as detecting that the user has completed a valid reply, no reply being received after the interaction timeout, the user actively canceling the interaction, or the system switching to a new business scenario.
[0087] When the release condition is triggered, the system immediately removes the previously registered extended hotword set from the speech recognition engine and releases the associated memory resources. This step completes the closed loop of hotword management, ensuring that temporary hotwords do not remain in subsequent irrelevant interactions.
[0088] For example, if a user initiates an air conditioning adjustment command immediately after confirming the call, the system will completely remove hot words such as "call" and "dial" at the end of the call interaction to prevent them from being misidentified in the air conditioning adjustment scenario.
[0089] In summary, through this real-time cleanup mechanism, this embodiment ensures high recognition coverage while keeping system resource consumption to a minimum, achieving a dynamic balance between performance and efficiency.
[0090] In summary, this embodiment constructs a complete dynamic lifecycle management system for hot words. The core of this system lies in tightly binding the generation and scheduling of hot words to the real-time interaction state. It leverages the semantic generalization capability of generative language models to solve the "understanding" problem, and utilizes dynamic registration and cleanup mechanisms to address the "no resource consumption, no misidentification" problem. This combination of online dynamic generation and on-demand dynamic scheduling constitutes the fundamental technical feature that distinguishes this application from existing offline static dictionary expansion technologies, providing flexible, natural, efficient, and stable technical support for in-vehicle voice interaction.
[0091] In summary, the hot word expansion method provided in this application dynamically generates expanded hot words by acquiring contextual information from the current interaction scenario and calling a generative language model. This changes the configuration mode that relies on human experience or static high-frequency word libraries. By leveraging the semantic generalization ability of a large model, it significantly improves the recognition coverage of users' natural spoken expressions and further enhances the hit rate of the speech recognition system for users' non-standardized responses. Simultaneously, through a dynamic registration and cleanup mechanism based on the interaction state, the lifecycle of expanded hot words is strictly limited to the current interaction session, avoiding recognition conflicts and wasted computational resources caused by the unlimited expansion of the global word library. This application effectively controls system overhead while significantly improving the intelligence level of voice interaction, balancing system operating efficiency and stability.
[0092] Based on the first embodiment described above, this embodiment further details the structured construction process of the generated instructions and the multi-dimensional quality filtering mechanism for the expanded hot word set.
[0093] As one implementation method, contextual information and original hot words are filled into a preset instruction template to generate a generation instruction. This generation instruction is used to instruct the generative language model to generate a colloquial expression that conforms to the current interaction scenario. The generation instruction is input into the generative language model to obtain a candidate hot word list output by the generative language model. An expanded hot word set is determined based on the candidate hot word list.
[0094] It should be noted that, in order to overcome the style drift or non-standard format problems that may exist in the direct generation results of generative language models, this embodiment uses a structured instruction template to constrain the generation behavior of the model.
[0095] For example, see Figure 2 Example diagram of the structured instruction template for semantic expansion of in-vehicle voice hot words provided in this application.
[0096] like Figure 2 As shown, this instruction template typically includes three core parts: role definition, input parameters, and output requirements.
[0097] The role definition is used to set the model as an expert in a specific field, such as "in-vehicle voice assistant hot word generation expert", thereby activating the model's knowledge reserves in the vertical field; the input parameter field includes the original hot words and usage scenarios. The system will dynamically fill the usage scenario field with the context information obtained in real time (such as "phone confirmation" and "navigation start"), so that the model can perceive the current interaction context; the output requirements clearly define the range of the number of generated contents, the preference for colloquial style, and the structured data format (such as JSON array).
[0098] Through this structured filling method, the system can transform abstract context information into prompt signals that can be accurately understood by the model, guiding the model to output colloquial expressions that are both semantically relevant and in line with in-vehicle interaction habits, avoiding the risk of written or obscure expressions caused by the excessive freedom of the model, thus improving the usability of extended hotwords in practical applications.
[0099] Furthermore, in order to ensure that the hotwords finally registered in the speech recognition engine have both accuracy and naturalness, this embodiment also introduces a multi-level filtering mechanism.
[0100] As an implementation manner, the process of determining the extended hotword set based on the candidate hotword list specifically includes:
[0101] Calculate the text similarity of the candidate hotword list, merge and remove duplicates of the candidate hotwords with text similarity greater than the preset similarity threshold to obtain the candidate hotwords after duplicate removal; perform quality filtering on the candidate hotwords after duplicate removal based on a preset colloquial rule library, which includes a written language feature word list and a rare Chinese character feature word list, and remove the candidate hotwords that match the written language feature word list or the rare Chinese character feature word list; input the filtered candidate hotwords into a pre-trained semantic evaluation model to obtain a confidence index output by the semantic evaluation model for characterizing the adaptation degree of the candidate hotwords to the current interaction scenario; determine the candidate hotwords with a confidence index greater than or equal to the preset confidence threshold as the extended hotwords in the extended hotword set, and assign corresponding semantic category labels to the determined extended hotwords, where the semantic category label is used to indicate the intention category of the extended hotword in the current interaction scenario.
[0102] Specifically, the above multi-level filtering mechanism constitutes a hierarchical screening link from form to semantics.
[0103] First of all, the text similarity duplicate removal step aims to eliminate redundant variants in the model generation results. For example, when the model generates "OK", "Alright", and "Sure" at the same time, the system will identify the high similarity of these words through the edit distance or vector similarity algorithm and only retain the most representative one to avoid invalidly occupying the temporary word library resources of the speech recognition engine.
[0104] Secondly, the colloquial rule library filtering step is a key link designed for the particularity of in-vehicle voice interaction. Since the training corpus of the generative language model covers a large amount of written text, the candidate words generated by it may include expressions that do not conform to modern in-vehicle colloquial habits, such as "very good", "approve", and "as you wish".
[0105] In this embodiment, by maintaining a dynamically updated list of written language feature words and a list of rare Chinese character feature words, candidate words that match these features are excluded, while high-frequency spoken language words such as "行 (OK)", "没问题 (no problem)", and "打吧 (go ahead)" are retained, thus ensuring that the extended hot words are highly consistent with the user's expression habits in terms of naturalness. Additionally, in the confidence scoring step of the semantic evaluation model, a discriminant mechanism independent of the generation model is introduced. This model focuses on evaluating the semantic compatibility between the candidate words and the current context, and only words with a confidence level reaching the preset threshold can enter the final extended hot word set, effectively preventing semantic deviation caused by the generation model's hallucination. Finally, semantic category labels (such as "confirmation category", "cancellation category", "inquiry category") are assigned to each selected extended hot word. This process not only completes the screening of hot words but also provides a structured basis for the accurate routing of subsequent business logic. Through this complete set of filtering links, this embodiment transforms the generation process of the generative language model into a technical implementation that is controllable, interpretable, and adapted to the in-vehicle scenario, significantly enhancing the robustness and practicality of the system.
[0106] Based on the principle of dynamic hot word registration in the first embodiment, this embodiment further refines the specific execution mechanism of the registration action.
[0107] As an implementation, in response to detecting a voice inquiry trigger event for the current interaction scenario, the extended hot word set is batch-written into the temporary word library of the speech recognition engine.
[0108] It should be noted that the voice inquiry trigger event is a key signal for defining the activation timing of hot words, which usually corresponds to the time node when the in-vehicle system finishes voice broadcasting an inquiry and is about to start microphone pickup.
[0109] Exemplarily, when the in-vehicle voice assistant finishes broadcasting the last syllable of the inquiry sentence "是否打电话给张三 (Should I call Zhang San)", or receives a callback signal indicating the completion of TTS (Text-To-Speech) playback, it is determined that the trigger event has occurred. Anchoring the activation condition precisely at this time ensures that, on the one hand, all extended hot words have been loaded and are in a waiting-to-be-recognized state before the user starts speaking, avoiding "first-word swallowing" or recognition failure caused by hot word registration delay; on the other hand, compared with pre-loading hot words for all possible scenarios at the beginning of the conversation, this on-demand activation mechanism based on the trigger event minimizes the residence time of hot words in memory and reduces interference from irrelevant hot words to the current interaction.
[0110] Batch write operation refers to submitting the expanded hot word set, filtered by the filtering mechanism in the second embodiment above, as a whole task to the speech recognition engine, rather than processing them one by one. This helps to reduce the number of inter-process communication (IPC) calls and improve system throughput efficiency.
[0111] Furthermore, in order to ensure the efficiency and traceability of the batch writing process, this embodiment also provides specific execution strategies.
[0112] As one implementation method, the extended hot word set is traversed, and the hot word registration interface of the speech recognition engine is called one by one through an asynchronous concurrency mechanism. Each extended hot word in the extended hot word set is written into a temporary word library, and a corresponding recognition confidence threshold is set for the written extended hot words. At the same time, the identification information of the successfully written extended hot words is recorded in the registration log.
[0113] It should be noted that using an asynchronous concurrency mechanism is a key technical means to solve the problem of interactive lag that may occur during batch registration in an in-vehicle environment. Since the registration interface of the voice recognition engine usually involves underlying memory allocation and decoding graph updates, if a synchronous serial method is used to register one by one, the main thread may be blocked for a long time when the number of extended hot words is large, resulting in sluggish response of the vehicle interface or interruption of voice playback.
[0114] This embodiment encapsulates the registration task of each hot word into an independent asynchronous coroutine or thread, and utilizes the parallel computing power of multi-core processors to execute multiple registration requests simultaneously. This transforms the registration time from linear accumulation to a process that depends on the time of the slowest single task, thereby significantly reducing the impact of the registration operation on the user's perception.
[0115] For example, for a set containing 10 extended hot words, the asynchronous concurrency mechanism can compress the original serial registration time, which would have taken hundreds of milliseconds, to the tens of milliseconds level, ensuring a smooth interactive experience.
[0116] In setting a recognition confidence threshold for each extended hot word, this threshold acts as an adjustment knob for recognition sensitivity. Unlike a globally uniform default threshold, this embodiment allows for the assignment of personalized recognition thresholds based on the semantic category of the hot word or the confidence index at the time of generation.
[0117] For example, for high-frequency core command-type keywords such as "confirm" and "cancel," a relatively low threshold can be set to improve recall and prevent missed recognition; while for some semantically ambiguous or easily confused edge keywords, a higher threshold can be set to suppress false recognition. This refined threshold management strategy enables the speech recognition engine to maximize the acceptance of users' natural spoken expressions while maintaining high accuracy.
[0118] Furthermore, recording successfully written extended hot keyword identification information to the registration log is the data foundation for building a closed loop for the full lifecycle management of hot keywords. This identification information can be the unique ID of the hot keyword, the hash value of the text content, or a handle returned during registration.
[0119] The registration log is not only used to confirm the registration result, but more importantly, it serves as a precise index for the subsequent cleanup phase.
[0120] In the cleanup step mentioned in the first embodiment, the system does not need to blindly clear the entire temporary thesaurus or re-query the list of currently registered hot words. Instead, it can directly read the registration log and call the deregistration interface based on the identification information recorded therein. This approach avoids the risk of accidentally deleting other resident hot words due to a full clear, and also prevents memory leaks caused by individual hot word registration failures or abnormal residues.
[0121] Understandably, the existence of registration logs transforms the management of dynamic hot words from a "black box operation" to a "white box controllable" one, greatly improving the stability and robustness of the system under long-term operation. Although this embodiment uses asynchronous concurrency and registration logs as the preferred implementation, in scenarios with limited computing resources or low real-time requirements, simplified solutions such as synchronous registration or no logging can also be adopted. As long as the core function of dynamically loading extended hot words into the temporary thesaurus can be achieved, it falls within the protection scope of this application.
[0122] After completing the dynamic registration of extended hot words in the third embodiment, this embodiment further describes in detail the final stage of the hot word lifecycle, namely, the targeted cleanup and memory release mechanism based on the end of the interaction.
[0123] As one implementation method, in response to detecting an interaction end event in the current interaction scenario, the extended hot word set is removed from the temporary word library.
[0124] It should be noted that the interaction end event is the only legitimate signal to trigger the cleanup process. Its definition covers all possible states of the current interaction session termination, and is not limited to the case where the user has given a valid response.
[0125] Specifically, interaction termination events can include: a normal termination state after the system successfully recognizes the user's voice and executes the corresponding business operation; a timeout termination state when the system does not detect valid voice input within a preset time; an active cancellation state when the user actively issues a cancellation command or clicks the cancel button on the interface; and an abnormal interruption state when the system forcibly terminates the current dialogue due to receiving a higher priority interruption request (such as an emergency call or a reversing radar alarm).
[0126] Regardless of the reason for the interaction ending, once the event is detected, the system determines that the current set of extended hot words has fulfilled its purpose and should immediately initiate a cleanup process. This design ensures that the dwell time of hot words is strictly limited to the necessary interaction window, fundamentally eliminating the risk of cross-scenario misidentification that may be caused by hot words from the previous round of dialogue remaining in the next round of irrelevant dialogue. For example, it avoids accidentally triggering extended hot words such as phone confirmation in a subsequent music playback scenario.
[0127] Furthermore, in order to ensure the accuracy of the cleanup operation and the thoroughness of resource recovery, this embodiment provides specific execution strategies.
[0128] As one implementation method, based on the identification information in the registration log, the hot word cancellation interface of the speech recognition engine is called to remove each extended hot word from the extended hot word set in the temporary word library. After the removal is completed, the garbage collection mechanism of the speech recognition engine is triggered to release the memory resources associated with the extended hot word set in the temporary word library and clear the registration log.
[0129] Specifically, this process comprises three closely linked sub-steps, which together constitute a reverse operation that is completely symmetrical to the registration mechanism in the third embodiment.
[0130] First, the targeted removal step relies on the registration log recorded in the third embodiment. The system reads the identification information (such as a unique ID or handle) of each successfully written extended hot word stored in the registration log and passes it as a parameter to the hot word deregistration interface provided by the speech recognition engine. This targeted removal method based on identification information differs from the traditional "full clearing of the temporary word library" or "resetting the engine state." Its core advantage lies in its ability to accurately remove temporary hot words that belong only to the current interaction session without affecting other resident hot words or the global basic word library that may exist in the system at the same time, thereby ensuring the continuity and stability of the overall state of the speech recognition engine.
[0131] Secondly, triggering the garbage collection mechanism is a key step in releasing physical memory.
[0132] In the underlying implementation of a speech recognition engine, hot word registration typically involves the dynamic allocation of decoding graph nodes and the request for memory blocks. However, the deregistration interface often only logically disconnects the reference to these resources or marks them as unavailable, without immediately returning the occupied heap memory to the operating system. If garbage collection (GC) is not triggered in a timely manner, these unreleased memory fragments will gradually accumulate as the vehicle runs for extended periods and frequent hot word registration / deregistration cycles occur, eventually leading to memory leaks or even engine crashes. This embodiment explicitly calls the engine's GC interface or sends memory compaction commands after targeted removal is completed, forcing the engine to compress and reclaim the temporary word library area. This ensures that the memory resources associated with the expanded hot word set are released promptly and thoroughly, maintaining the performance baseline of the in-vehicle system under long-term operation.
[0133] Finally, clearing the registry log is a necessary cleanup operation to prevent the accumulation of dirty data.
[0134] After removing hot keywords and releasing memory, the current registry log has lost its indexing value. If it is not cleared, the remaining old identifier information may be misread in the subsequent cleanup process, causing the system to attempt to cancel a hot keyword that no longer exists, which may lead to engine errors or unnecessary system call overhead.
[0135] Therefore, after confirming successful resource release, this embodiment immediately performs log file truncation or deletion to reserve clean recording space for hot word registration in the next interaction. Through the above-mentioned triple operation loop of "targeted removal - memory reclamation - log clearing", this embodiment not only realizes the logical offline status of hot words, but also completes the full return of physical resources. It forms a perfect spatiotemporal symmetry with the asynchronous concurrent registration mechanism in the third embodiment, jointly ensuring the robustness and resource efficiency of the in-vehicle voice interaction system in high-dynamic, high-frequency hot word scheduling scenarios.
[0136] It is understood that although this embodiment uses explicit GC triggering as the preferred solution, in some speech recognition engines with automatic memory management capabilities, the explicit GC call step can be omitted, and memory release can be achieved solely by the engine's internal automatic recycling strategy. As long as the technical effect of preventing memory leaks can be achieved, it falls within the protection scope of this application.
[0137] Based on the dynamic generation, registration, and cleanup mechanisms for hot words in the above embodiments, this embodiment further explains the recognition, matching, and business response process of extended hot words in actual voice interaction.
[0138] As one implementation method, the system receives voice input data from the target user; matches the voice input data with an expanded set of hot words using a voice recognition engine to obtain hot word matching results; and executes the business operation branch corresponding to the category to which the hot word matching results belong.
[0139] Specifically, after the vehicle microphone collects the target user's voice input data, the voice recognition engine will prioritize or in parallel search the temporary word library to see if there are any words that match the acoustic features of the voice signal.
[0140] Since the extended hot word set has been dynamically written into a temporary lexicon and a corresponding recognition confidence threshold has been set in the aforementioned embodiments, the engine can recognize these words extended from the generative language model just like it recognizes the original hot words.
[0141] For example, if a user replies "call" in a phone confirmation scenario, even though this word is not one of the system's preset original hot words, the speech recognition engine can still accurately decode it and output it as a text-based matching result because it has been registered in the temporary word library in the third embodiment. This process demonstrates that extended hot words have the same processing priority and recognition ability as original hot words at the recognition level, achieving seamless adaptation of users to natural spoken language.
[0142] Furthermore, the hot word matching results not only include the identified text content, but also carry semantic category labels generated in the second embodiment. These labels serve as a crucial bridge connecting the speech recognition results with the backend business logic.
[0143] Specifically, after obtaining the hot word matching results, the system does not directly pass the text string to the business layer for tedious string comparison. Instead, it directly reads the accompanying semantic category tags (such as "confirmation", "cancellation", "inquiry" etc.). Based on these tags, the system can quickly route to the preset business operation branch.
[0144] For example, when the matching result is "call" and its tag is "confirmation", the system will automatically trigger the logic to make a phone call; if the matching result is "never mind" and its tag is "cancel", the logic to exit the current conversation will be triggered. This tag-based routing mechanism ensures that regardless of whether the user uses the original hotword "yes" or the extended hotwords "okay", "no problem", or "call", as long as their semantic category tags are the same, the system will execute completely consistent business operations. This not only guarantees the uniformity and stability of business logic but also greatly simplifies the maintenance complexity of the backend code, because the business layer does not need to be aware of the specific textual changes of the hotwords, but only needs to focus on the abstract intent category.
[0145] In addition, to verify the transparency and effectiveness of the expansion process, the execution logic for hitting expanded hot words can be compared with the execution logic for hitting original hot words.
[0146] In this embodiment, the two maintain strict consistency in the entry parameters, execution sequence, and feedback results of the business branch. In other words, the business execution module cannot distinguish or care whether the current confirmation instruction comes from a pre-built dictionary or from a real-time expansion of a large model. This "black box" encapsulation ensures that the introduction of a generative language model will not cause intrusive modifications to the existing in-vehicle voice interaction architecture.
[0147] In summary, through the collaborative work of identification, matching, and business branch execution described above, this embodiment completes the entire technical chain from hot word generation to value realization, effectively solving the interaction interruption problem caused by insufficient vocabulary coverage in traditional solutions. Simultaneously, the semantic tagging mechanism ensures the accuracy and robustness of business responses under complex spoken language expressions. It should be understood that although this embodiment uses a telephone confirmation scenario as an example, this matching and execution mechanism is also applicable to other in-vehicle interaction scenarios such as navigation settings, media control, and window adjustment. As long as there are original hot words in the scenario and corresponding extended hot word sets are generated through the aforementioned embodiments, the identification and business routing logic described in this embodiment can be applied.
[0148] As one implementation method, if a timeout or abnormal event is detected during the process of calling the generative language model to process the generation instructions, the call to the generative language model is terminated; the original hot words are used as an extended hot word set, and the step of dynamically registering the extended hot word set to the speech recognition engine is executed.
[0149] Specifically, this embodiment constitutes a parallel fault-tolerant branch of the normal processing flow of the aforementioned embodiments, aiming to solve the problem of hot word expansion failure caused by network signal fluctuations, excessive cloud service load, or model malfunctions in the in-vehicle environment. Since the invocation of generative language models is highly dependent on the status of external services, and the network environment is often unstable during vehicle operation, if the system lacks an effective degradation mechanism, once the model invocation fails, the entire voice interaction process may be stuck in a long wait or directly interrupted by an error, seriously affecting user experience and driving safety. Therefore, this embodiment provides a safety net for system availability by establishing a real-time anomaly monitoring and automatic degradation mechanism.
[0150] In terms of anomaly monitoring, the detection of call timeouts or call exception events covers a variety of specific fault patterns. Among them, call timeouts not only include request-response timeouts at the network level, such as not receiving any packet feedback within a preset time window (e.g., 500 milliseconds or 1 second), but also include inference timeouts at the application level, that is, although the model has received the request, it fails to complete generation and return the result within the specified time. Call exception events further include error status codes returned by the server (such as HTTP 500 Internal Server Error, 429 Too Many Requests, etc.), parsing failures caused by the returned data format not conforming to the predefined specifications, and being intercepted due to triggering the content security policy. The system sets up listeners or wrappers at the call interface to capture these various types of abnormal signals in real time, ensuring that any state deviating from the normal expectation can be immediately perceived.
[0151] When any of the above abnormal situations is detected, the system first terminates the operation of calling the generative language model. The significance of this step is to release the occupied network connections, thread resources, and memory buffers in a timely manner, avoiding resource leakage or main thread blockage caused by ineffective waiting. Immediately afterwards, the system automatically triggers the degradation logic and directly uses the original hot words obtained in step 101 as the extended hot word set. In this degraded mode, the system skips the instruction construction and model generation described in the second embodiment, as well as the multi-dimensional quality filtering and semantic tagging links described in the third embodiment. Instead, it directly adapts the data structure of the original hot words to the input format acceptable to the speech recognition engine. Subsequently, the system reuses the dynamic registration process described in the third embodiment to write these original hot words into the temporary word library. This means that even in the extreme case where the model is completely unavailable, users can still use basic preset words such as "Yes", "Okay", "Cancel" to complete the interaction, ensuring the continuity of the core business functions.
[0152] It should be emphasized that this degradation process is completely imperceptible to the target users.
[0153] From the user's perspective, regardless of whether the generative language model is successfully called in the background, the in-vehicle computer can normally initiate inquiries and respond to the user's replies without any stuttering, pop-up error messages, or silent waiting. The only difference between the two is the width of the recognition range: in the normal mode, the system can understand rich spoken expressions such as "Play it" and "Let's go"; while in the degraded mode, the system reverts to the state of only being able to recognize standard preset words.
[0154] This processing method not only makes full use of the semantic enhancement ability of the large model under ideal conditions but also avoids the systematic risks brought by single reliance on the large model, significantly enhancing the robustness and implementation feasibility of this application in actual in-vehicle products.
[0155] It is understandable that although this embodiment uses timeout and error as the main abnormal triggering conditions, in other embodiments, a soft degradation strategy based on confidence level can also be introduced according to actual needs. For example, when the confidence level of the model's returned results is generally lower than a certain threshold, the generated results can be actively discarded and the original hot words can be reverted. As long as the technical effect of ensuring the continuity of basic interaction can be achieved, it falls within the protection scope of this application.
[0156] Based on the above technical solution, this application applies it to specific business scenarios of in-vehicle voice interaction to further illustrate the workflow and technical effects of this application in practical applications. It should be understood that the telephone confirmation scenario and navigation confirmation scenario listed below are merely illustrative examples and are not intended to limit the scope of protection of this application. The dynamic hotword expansion mechanism described in this embodiment can be applied to any in-vehicle interaction scenario involving voice inquiry and response confirmation.
[0157] For example, see Figure 3 The following is a flowchart illustrating a hot word expansion method provided in this application.
[0158] This flowchart example corresponds to the first specific application scenario, namely the telephone confirmation scenario.
[0159] Step 1: When the in-vehicle voice interaction system detects that the user intends to make a phone call or that the system recommends it, the vehicle will ask the user a voice message: "Hello, would you like to call Zhang San?"
[0160] Step 2: The system loads the context information of the current interaction scenario and the corresponding original hot words in real time. Specifically, the context information at this time includes dynamic elements such as the business type being "calling a phone," the operation target being "contact person Zhang San," and the current interface state being a "dialing confirmation pop-up." The original hot words are the system's preset list of basic confirmation words, such as the confirmation-type original hot words ["Yes," "Okay"] and the cancellation-type original hot words ["Cancel," "Never mind"] shown in the figure. This real-time capture of information ensures that the subsequent expansion process closely follows the current telephone business context.
[0161] Step 3: Call the LLM semantic extension engine to process the generation instruction and obtain an extended set of hot words that are semantically associated with the original hot words.
[0162] Specifically, the system fills the "confirm phone call" scenario information and original hot words into a preset extended prompt word template, instructing the model to generate conversational expressions that conform to in-vehicle calling habits. The candidate hot word list output by the model may contain words such as "confirm," "okay," "yes," "agree," "no problem," "okay," "call," "dial," and "call."
[0163] Step 4: Batch register extended hot words to the voice SDK. This includes the hot word registration process, which involves traversing the extended hot word list, calling the voice SDK registration interface for each hot word, and setting an appropriate confidence threshold during this process to ensure recognition accuracy.
[0164] Step 5: Receive the user's voice response, such as "Help me make the call," "Okay," or "Make the call."
[0165] Step 6: Hot word matching is performed by the voice SDK. When the user replies "Help me dial," the system executes the recognition, matching, and business response process. The voice recognition engine successfully matches the extended hot word "line" in the temporary word library and returns a matching result carrying the semantic category label "confirmation."
[0166] Step 7: The business execution module directly routes to the phone call branch based on the tag, controlling the vehicle communication module to perform the operation of calling Zhang San. Compared to the interaction failure caused by the inability to recognize "call," this embodiment significantly improves the user's natural interaction experience.
[0167] In the second specific application scenario, namely the navigation confirmation scenario, the system's workflow is similar to that of the telephone confirmation scenario, but it demonstrates the adaptability of dynamically generated scenarios.
[0168] When the vehicle's infotainment system asks "Start navigation to Beijing?", the context information obtained in step 101 changes to "navigation service" and "destination Beijing," with the original hot words being [start, cancel]. In step 102, the extended hot word set generated by the generative language model based on the navigation context becomes {let's go, let's go, okay start}, instead of "call" or "dial" in a telephone scenario. When the user replies "let's go," the system also completes navigation startup and resource release through asynchronous registration, tag matching, and targeted cleanup mechanisms. This comparison fully demonstrates that the hot word expansion in this application is not a static mapping, but a dynamic process that changes in real time with the interaction context, ensuring high coverage of spoken language recognition in various scenarios while avoiding the risk of conflicts caused by global lexicon expansion.
[0169] The complete demonstration of the two typical scenarios above shows that this embodiment translates the abstract hot word expansion method into concrete in-vehicle interaction capabilities. Compared with traditional fixed hot word solutions, this application solves the problem of incomprehensibility by utilizing the semantic generalization ability of generative language models without increasing manual maintenance costs. At the same time, through a dynamic registration and cleanup mechanism based on interaction state, it solves the problems of random recognition and resource consumption, maintaining the system's lightweightness and stability while ensuring interaction flexibility.
[0170] This embodiment also provides a vehicle, at least one processor and a memory connected to the processor, wherein: the memory is used to store a computer program; the processor is used to execute the computer program so that the vehicle can implement any of the hot word expansion methods provided in this application embodiment.
[0171] Specifically, the vehicle may include an in-vehicle voice interaction system and a hot word expansion device.
[0172] It should be noted that the vehicle in this embodiment should not be narrowly interpreted as referring only to passenger cars; it can also include commercial trucks, buses, engineering vehicles, and any motor vehicle equipped with voice interaction capabilities, such as mobile chassis with autonomous driving capabilities. The in-vehicle voice interaction system is the infrastructure on the vehicle responsible for processing human-machine voice dialogue. It typically includes audio acquisition devices (such as microphone arrays), audio playback devices (such as speakers), a speech recognition engine, a speech synthesis engine, and an upper-layer business logic control module. In this application, the system also undertakes the functions of receiving user voice input, performing hotword matching, and triggering corresponding vehicle control actions based on the matching results.
[0173] The hot word expansion device is communicatively connected to the in-vehicle voice interaction system to implement the hot word expansion method as described in any of the aforementioned embodiments.
[0174] Specifically, the hot word expansion device has multiple implementation methods in terms of physical form to adapt to the electronic and electrical architecture requirements of different vehicle models.
[0175] In one implementation, the device can be an electronic control unit (ECU) independently located inside the vehicle, specifically designed to run large language model inference and related hot word management logic, and to interact with the in-vehicle voice interaction system via the vehicle bus.
[0176] As another implementation, the device can also be a software module or virtual machine integrated into the vehicle's cockpit domain controller, intelligent driving domain controller, or central computing platform, sharing hardware computing resources with other in-vehicle applications. As yet another implementation, the device can be a server cluster deployed in the cloud, with the vehicle connecting to it via a wireless communication network (such as 4G / 5G). In this case, the computational load for hot word expansion is handled by the cloud, reducing the computational requirements on the vehicle.
[0177] For example, see Figure 4 The following is an example diagram of the vehicle layered architecture provided in this application.
[0178] This diagram illustrates the logical relationships between the modules in the form of a hierarchical architecture diagram. Its core logic lies in using LLM to enhance the accuracy of traditional speech recognition.
[0179] The entire system is divided into three layers from top to bottom:
[0180] The first layer from top to bottom is the application layer, specifically the vehicle's voice system, which serves as the interaction entry point. It includes a voice inquiry module, a hot word management module, and a response execution module. The voice inquiry module is responsible for initiating voice inquiries to the user and carrying the original hot word information that needs to be expanded. The hot word management module is used to manage the lifecycle of hot words, including registration, updating, and deletion. The response execution module is used to execute corresponding business operations based on the semantic matching results of the user's reply.
[0181] The second layer is the LLM semantic extension layer, which serves as the intelligent hub. It uses a semantic generator to expand hot words in combination with context.
[0182] The third layer is the voice SDK layer, which integrates a voice recognition engine. This engine includes hotword registration and voice recognition interfaces. Hotword registration involves batch writing expanded hotwords into the voice SDK's hotword library. The main function of this layer is to traverse the expanded hotword list, call the voice SDK registration interface for each word, and set an appropriate confidence threshold during this process to ensure recognition accuracy. In actual products, the physical deployment location of the above modules can be flexibly adjusted according to cost, performance, and network conditions, as long as the corresponding data processing functions can be achieved.
[0183] Regarding communication connectivity, the data transmission channel between the hotword expansion device and the in-vehicle voice interaction system depends on their physical deployment. When both are located in the vehicle, communication can be achieved through in-vehicle bus protocols such as Controller Area Network (CAN), CANFD, Automotive Ethernet, or FlexRay to ensure low latency and high reliability. When the hotword expansion device is located in the cloud, communication is achieved through the in-vehicle telematics unit (T-Box) and mobile communication networks, using application layer protocols such as HTTP / HTTPS, MQTT, or WebSocket for data exchange. Regardless of the connection method, the data exchanged between the two includes at least: the current interaction scenario context information and the original hotword list sent by the in-vehicle voice interaction system, and the expanded hotword set, registration instructions, and cleanup instructions returned by the hotword expansion device. This clear interface definition allows the hotword expansion capability to be integrated into existing in-vehicle voice systems in a plug-in form without requiring intrusive modifications to the underlying code of the original speech recognition engine.
[0184] Through the aforementioned vehicle architecture design, this application decouples the intelligent extension function of hot words from the traditional voice recognition engine, forming an independent hardware or logical entity. This architecture, on the one hand, clarifies the product-level protection boundaries, ensuring that any vehicle manufacturer or cloud service provider that adopts an architecture including the two components and their interconnections in its products falls within the protection scope of this application. On the other hand, it also facilitates subsequent system upgrades and maintenance. For example, without replacing the in-vehicle voice interaction system hardware, the naturalness and coverage of voice interaction can be improved by separately upgrading the model algorithm or firmware version of the hot word extension device, thereby effectively extending the lifecycle of the vehicle's intelligent functions.
[0185] The above describes a hot word expansion method provided by the embodiments of this application. The following will describe the apparatus for performing the above hot word expansion method.
[0186] Please see Figure 5 , Figure 5 This is a schematic diagram of a hot word expansion device provided in an embodiment of this application. Figure 5 As shown, the device includes:
[0187] The context acquisition module 10 is used to acquire the context information of the current interaction scenario and the corresponding original hot words;
[0188] The hot word generation module 20 is used to construct generation instructions based on context information and original hot words, call the generative language model to process the generation instructions, and obtain an extended hot word set that is semantically related to the original hot words;
[0189] The hot word registration module 30 is used to dynamically register the extended hot word set to the speech recognition engine when the current interaction state meets the preset activation conditions;
[0190] The hot word cleaning module 40 is used to clean up the extended hot word set from the speech recognition engine when the current interaction state meets the preset release conditions.
[0191] In one embodiment, the hot word generation module 20 is specifically used for:
[0192] Fill the preset instruction template with context information and original hot words to generate generation instructions. The generation instructions are used to instruct the generative language model to generate colloquial expressions that conform to the current interaction scenario.
[0193] Input the generation instructions into the generative language model to obtain the candidate hot word list output by the generative language model;
[0194] The expanded hot word set is determined based on the candidate hot word list.
[0195] In one embodiment, the hot word generation module 20 is specifically used for:
[0196] The candidate hot words list is subjected to text similarity calculation. Candidate hot words with text similarity greater than the preset similarity threshold are merged and deduplicated to obtain the deduplicated candidate hot words.
[0197] Based on a pre-set colloquialism rule base, the deduplicated candidate hot words are filtered for quality. The colloquialism rule base includes a written language feature word list and a rare character feature word list. Candidate hot words that match the written language feature word list or the rare character feature word list are removed.
[0198] The filtered candidate hot words are input into the pre-trained semantic evaluation model, and the confidence index output by the semantic evaluation model is obtained to characterize the degree of fit between the candidate hot words and the current interaction scenario.
[0199] Candidate hot words with a confidence index greater than or equal to a preset confidence threshold are identified as extended hot words in the extended hot word set, and corresponding semantic category labels are assigned to the identified extended hot words. The semantic category labels are used to indicate the intent category of the extended hot words in the current interaction scenario.
[0200] In one embodiment, the hot word registration module 30 is specifically used for:
[0201] In response to the detection of a voice inquiry trigger event for the current interaction scenario, the expanded hot word set is written in batches into the temporary word library of the speech recognition engine.
[0202] In one embodiment, the hot word registration module 30 is specifically used for:
[0203] Iterate through the extended hot word set, call the hot word registration interface of the speech recognition engine one by one through the asynchronous concurrency mechanism, write each extended hot word in the extended hot word set into the temporary word library, set the corresponding recognition confidence threshold for the written extended hot words, and record the identification information of the successfully written extended hot words in the registration log.
[0204] In one embodiment, the hot word cleaning module 40 is specifically used for:
[0205] In response to the detection of an interaction end event in the current interaction scenario, the extended hot word set is removed from the temporary word library.
[0206] In one embodiment, the hot word cleaning module 40 is specifically used for:
[0207] Based on the identification information in the registration log, the hot word cancellation interface of the speech recognition engine is called to remove each extended hot word from the extended hot word set in the temporary word library.
[0208] After removal is complete, the speech recognition engine's garbage collection mechanism is triggered to release the memory resources associated with the extended hot word set in the temporary word library and clear the registration log.
[0209] In one embodiment, the hot word expansion device further includes a hot word matching module;
[0210] This hot word matching unit is specifically used for:
[0211] Receive voice input data from the target user;
[0212] The voice input data is matched with an expanded set of hot words using a speech recognition engine to obtain hot word matching results.
[0213] Based on the category to which the hot word matching result belongs, execute the business operation branch corresponding to the category.
[0214] In one embodiment, the hot word expansion device further includes an exception handling module;
[0215] This exception handling module is specifically used for:
[0216] If a timeout or call exception event is detected during the process of calling the generative language model to process the generation instructions, the call to the generative language model will be terminated.
[0217] The original hot words are used as an expanded hot word set, and the expanded hot word set is dynamically registered to the speech recognition engine.
[0218] This application also provides a hot word expansion device in its embodiments. (See reference) Figure 6 The diagram illustrates a structure suitable for implementing the hot word expansion device provided in this application. The hot word expansion device in this application may include, but is not limited to, fixed terminals such as mobile phones, laptops, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Figure 6 The hot word expansion device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0219] like Figure 6 As shown, the hot word expansion device may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. When the hot word expansion device is powered on, the RAM 603 also stores various programs and data required for the operation of the hot word expansion device. The processing unit 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0220] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, memory cards, hard drives, etc.; and communication devices 609. Communication device 609 allows the hotspot extension device to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6 The hot word extension device is shown with various means, but it should be understood that it is not required to implement or have all the means shown. More or fewer means may be implemented or have instead.
[0221] This application also provides a computer program product including computer-readable instructions, which, when executed on an electronic device, cause the electronic device to implement any of the hot word expansion methods provided in this application.
[0222] This application also provides a computer storage medium that carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any of the hot word expansion methods provided in this application.
[0223] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.
[0224] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0225] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.
[0226] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).
Claims
1. A method for expanding hot words, characterized in that, include: Obtain the context information of the current interaction scenario and the corresponding original hot words; Based on the context information and the original hot words, a generation instruction is constructed, and a generative language model is called to process the generation instruction to obtain an extended set of hot words that are semantically associated with the original hot words; When the current interaction state meets the preset activation conditions, the extended hot word set is dynamically registered to the speech recognition engine; If the current interaction state meets the preset release conditions, the extended hot word set is cleared from the speech recognition engine.
2. The hot word expansion method according to claim 1, characterized in that, The process involves constructing generation instructions based on the context information and the original hot words, then invoking a generative language model to process the generation instructions, resulting in an extended set of hot words semantically associated with the original hot words, including: The context information and the original hot words are filled into a preset instruction template to generate the generation instruction, which is used to instruct the generative language model to generate a colloquial expression that conforms to the current interaction scenario. Input the generation instruction into the generative language model to obtain the candidate hot word list output by the generative language model; The expanded hot word set is determined based on the candidate hot word list.
3. The hot word expansion method according to claim 2, characterized in that, Determining the expanded hot word set based on the candidate hot word list includes: The candidate hot words list is subjected to text similarity calculation. Candidate hot words with text similarity greater than a preset similarity threshold are merged and deduplicated to obtain deduplicated candidate hot words. Based on a pre-set colloquialism rule base, the deduplicated candidate hot words are subjected to quality filtering. The colloquialism rule base includes a written language feature word list and a rare character feature word list. Candidate hot words that match the written language feature word list or the rare character feature word list are removed. The filtered candidate hot words are input into a pre-trained semantic evaluation model, and the confidence index output by the semantic evaluation model is obtained to characterize the degree of fit between the candidate hot words and the current interaction scenario. Candidate hot words whose confidence index is greater than or equal to a preset confidence threshold are identified as extended hot words in the extended hot word set, and corresponding semantic category labels are assigned to the identified extended hot words. The semantic category labels are used to indicate the intent category of the extended hot words in the current interaction scenario.
4. The hot word expansion method according to claim 1, characterized in that, The step of dynamically registering the expanded hot word set to the speech recognition engine when the current interaction state meets the preset activation conditions includes: In response to the detection of a voice inquiry trigger event for the current interaction scenario, the extended hot word set is written in batches into the temporary word library of the speech recognition engine.
5. The hot word expansion method according to claim 4, characterized in that, The step of batch writing the expanded hot word set into the temporary lexicon of the speech recognition engine includes: The extended hot word set is traversed, and the hot word registration interface of the speech recognition engine is called one by one through an asynchronous concurrency mechanism. Each extended hot word in the extended hot word set is written into the temporary word library, and a corresponding recognition confidence threshold is set for the written extended hot words. At the same time, the identification information of the successfully written extended hot words is recorded in the registration log.
6. The hot word expansion method according to claim 1, characterized in that, The step of cleaning up the extended hot word set from the speech recognition engine when the current interaction state meets the preset release conditions includes: In response to the detection of an interaction end event in the current interaction scenario, the extended hot word set is deleted from the temporary word library.
7. The hot word expansion method according to claim 6, characterized in that, The step of deleting the expanded hot word set from the temporary thesaurus includes: Based on the identification information in the registration log, the hot word cancellation interface of the speech recognition engine is called to remove each extended hot word from the extended hot word set from the temporary word library; After removal is completed, the garbage collection mechanism of the speech recognition engine is triggered to release the memory resources associated with the extended hot word set in the temporary word library and clear the registration log.
8. The hot word expansion method according to claim 1, characterized in that, Also includes: Receive voice input data from the target user; The voice input data is matched with an expanded set of hot words using a speech recognition engine to obtain hot word matching results. Based on the category to which the hot word matching result belongs, execute the business operation branch corresponding to the category.
9. The hot word expansion method according to claim 1, characterized in that, Also includes: If a timeout or call exception event is detected during the process of calling the generative language model to process the generation instruction, the call to the generative language model will be terminated. The original hot words are used as the expanded hot word set, and the step of dynamically registering the expanded hot word set to the speech recognition engine is performed.
10. A vehicle, characterized in that, It includes at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program to enable the vehicle to implement the hot word expansion method as described in any one of claims 1 to 9.