Context information updating method and device, storage medium and computer program product
By introducing a contextual information update method into the voice assistant system, real-time synchronization and sharing across modules are achieved, solving the problem of the voice assistant system's lack of high-quality success in multi-round conversations and cross-scenario processing, and improving the system's collaborative capabilities and user experience.
Patent Information
- Application Number
- CN202510843380.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-23
- Publication Date
- 2025-09-19
AI Technical Summary
Existing voice assistant systems lack high-quality capabilities in multi-round conversations and cross-scenario processing, and each module works independently, resulting in the inability to effectively share and collaborate information.
By introducing a context information update method in the voice assistant system, real-time synchronization and sharing across modules are achieved. Context update information in a preset format is used, including user information, session status, task information, and environment information. Version numbers are also introduced to ensure system stability and consistency.
The module collaboration capability of the voice assistant system has been enhanced, the coherence and user experience of multiple rounds of conversations have been improved, the reliability and stability of the system have been ensured, and information conflicts and task failures have been avoided.
Smart Images

Figure CN120671847A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information processing technology, and in particular to a context information updating method, device, storage medium, and computer program product. Background Art
[0002] Voice assistant systems have become an integral part of modern daily life, widely used in speech recognition, natural language processing, task management, personalized recommendations, and other fields. Existing voice assistant systems typically consist of multiple modules, each operating independently. Current voice assistant conversations face the following technical bottlenecks: The voice assistant system only processes local information in each round of conversation, resulting in the inability to achieve high-quality transitions between multiple rounds of conversations and poor cross-scenario processing capabilities. Summary of the Invention
[0003] The purpose of the embodiments of the present application is to provide a context information updating method, device, storage medium and computer program product to enhance the internal collaboration of the voice assistant system and improve the system flexibility.
[0004] In a first aspect, the present application provides a context information updating method, which is applied to a first working module in a voice assistant system, and the voice assistant system also includes multiple second working modules; the method includes: obtaining context update information generated by the second working module, the context update information is generated by the second working module after parsing the user question, and the context update information includes a context to be updated and a context identifier; determining a target context based on the context identifier; and updating the target context using the context to be updated.
[0005] In the above solution, the voice assistant system can synchronize and share the generated context update information in real time across working modules, so that each working module can coordinate work in the same context environment, enhancing the collaborative ability between multiple working modules.
[0006] As an optional manner, obtaining the context update information generated by the second working module includes: receiving the context update information, where the context update information is generated and broadcast by the second working module that generates the context update.
[0007] In the above solution, the second working module actively broadcasts the context update information, so that the first working module can synchronize the latest context update information in a timely manner.
[0008] As an optional manner, obtaining the context update information generated by the second working module includes: detecting whether the second working module generates the context update information at preset time intervals; and if the context update information is generated, obtaining the context update information.
[0009] In the above solution, the first working module actively detects whether an update has occurred externally and obtains context update information. It can actively synchronize updates when an error occurs in the second working module, thereby ensuring the consistency of the context and enhancing the reliability of the voice assistant system.
[0010] As an optional manner, the context to be updated includes user information, session state, task information, and environment information, and the context to be updated is generated according to a preset format.
[0011] In the above solution, the use of a preset format can standardize the format of the context to be updated, facilitate the establishment of a unified context management mechanism, ensure that each module has a consistent understanding of the context, and thus improve the efficiency of information sharing and updating.
[0012] As an optional manner, the first working module and the second working module include a speech recognition module, a natural language understanding module, a dialogue management module and a task execution module.
[0013] In the above solution, context update information can be shared and transmitted between the speech recognition module, natural language understanding module, dialogue management module and task execution module, enhancing the collaboration between modules.
[0014] As an optional manner, the context update information includes a version number, and the method further includes: if an error occurs in the working module, locating and restoring the historical context corresponding to the correct version according to the version number.
[0015] In the above solution, by introducing version numbers in context update information, a standardized version control and rollback mechanism is established to avoid conversation interruptions or task failures caused by information conflicts or processing anomalies, effectively improving the system's fault tolerance and stability, and ensuring the continuity of multi-round conversations and complex task processing.
[0016] As an optional manner, the method further includes: after the current session of the voice assistant ends, saving the context information of the current session, so as to load the context information when starting the next session.
[0017] In the above solution, by saving context information after the end of the session, users are prevented from repeatedly entering information or resetting parameters, which significantly improves the consistency and convenience of interaction. At the same time, the personalized service capabilities based on historical context are enhanced, and the voice assistant system can provide more demand-oriented responses based on user historical behavior, effectively improving user experience and system intelligence.
[0018] In a second aspect, the present application provides an electronic device comprising: a processor, a memory and a bus, wherein the processor and the memory communicate with each other through the bus; the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the method described in the first aspect above.
[0019] In a third aspect, the present application provides a computer-readable storage medium, comprising: the computer-readable storage medium stores computer instructions, and the computer instructions enable the computer to execute the method described in the first aspect above.
[0020] In a fourth aspect, the present application provides a computer program product, comprising computer program instructions, which, when read and executed by a processor, execute the method described in the first aspect.
[0021] In a fifth aspect, the present application provides a context information updating device, which is applied to a first working module in a voice assistant system, and the voice assistant system also includes multiple second working modules; the device includes: an acquisition module, which is used to obtain context update information generated by the second working module, and the context update information is generated by the second working module after parsing the user question, and the context update information includes a context to be updated and a context identifier; a determination module, which is used to determine a target context based on the context identifier; and an update module, which is used to update the target context using the context to be updated.
[0022] Other features and advantages of the present application will be described in the subsequent description, and in part will become apparent from the description, or will be understood by practicing the embodiments of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.
[0024] Figure 1 A flowchart of a context information updating method provided in an embodiment of the present application; Figure 2 A schematic diagram of a question-and-answer process of a voice assistant system provided in an embodiment of the present application; Figure 3 A schematic diagram of the electronic device structure provided in an embodiment of the present application; Figure 4 A schematic diagram of the structure of a context information updating device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0025] The following embodiments of the technical solution of the present application will be described in detail with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present application and are therefore only examples and are not intended to limit the scope of protection of the present application.
[0026] It should be noted that all technical and scientific terms used herein have the same meanings as those commonly understood by technicians in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" in the specification and claims of this application and the above-mentioned figure descriptions and any variations thereof are intended to cover non-exclusive inclusions.
[0027] In the description of the embodiments of this application, the technical terms "first" and "second" are used only to distinguish different objects and should not be understood to indicate or imply relative importance or implicitly specify the quantity, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, the meaning of "plurality" is more than two, unless otherwise clearly and specifically defined.
[0028] In the description of the embodiments of this application, the term "and / or" is simply a description of the association relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent the following three situations: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this document generally indicates that the associated objects are in an "or" relationship.
[0029] In multi-round conversations and complex task processing with voice assistants, disjointed and inconsistent conversations are common. For example, a user might say to the voice assistant, "Navigate to Hongqiao Airport, avoiding congested roads." The assistant responds, "The route has been planned, and it's estimated to take 1 hour and 20 minutes." The user then asks, "Play Jay Chou's songs on the way." In the existing technology, the task execution module first calls the navigation module and then the music playback module. Because each module in the voice assistant operates independently, the natural language understanding module and the dialogue management module do not receive the context update information ("It takes 1 hour and 20 minutes") generated by the navigation module. As a result, when parsing the subsequent conversation, the connection between "on the way" and "It takes 1 hour and 20 minutes" is not associated. The music playback module may randomly select only 5 songs and stop playing after the songs are played. The user will have no music to play for the rest of the trip.
[0030] The context information updating method provided in this application can solve the above problems.
[0031] Reference Figure 1 , Figure 1 A flowchart of a context information updating method provided in an embodiment of the present application is provided. The method is applied to a first working module in a voice assistant system. The voice assistant system also includes multiple second working modules. The method includes the following steps: Step S10: Obtain context update information generated by the second working module. The context update information is generated by the second working module after parsing the user question. The context update information includes the context to be updated and the context identifier.
[0032] The voice assistant system adopts a modular architecture, with different functional modules, such as the UI module, speech recognition module, natural language understanding module, dialogue management module, task execution module, natural language generation module, and user interface module. In one possible implementation, the system uses a one-way information flow from input to output. When a user makes a voice command, the UI module transmits raw audio data to the speech recognition module, triggering speech parsing. The speech recognition module transmits the recognized text to the natural language understanding module, triggering semantic parsing. The natural language understanding module transmits intent-entity data to the dialogue management module, triggering task scheduling. The dialogue management module transmits task parameters to the task execution module, triggering service invocation. The task execution module transmits task results to the natural language generation module, triggering response generation. The first working module is a working module that needs to update context information. It can be any module in the voice assistant system's modular architecture, such as the natural language understanding module or the task execution module, and there can be one or more of them. The second working module includes working modules that can generate context updates, such as the dialogue management module or the task execution module, and there can also be one or more of them. The first and second working modules exchange context information via a standardized interface.
[0033] If the second working module generates a context update after parsing the user's question—for example, when the speech recognition module successfully converts the user's speech to text, when the user enters explicit instructions via text, when the task execution module completes the task and obtains valid results, or when the task status changes during execution—then it immediately generates a context to be updated and a context identifier. If the input is invalid, the parsing fails, or the task execution fails, the second working module is not triggered to generate a context update. The second working module can detect context updates in various ways, such as by periodically comparing the current state with the historical state and generating a context only when a change is detected, or by using a status code to identify the processing result and generating a context only when the status is successful and the data is valid. The context to be updated carries the actual updated content, while the context identifier serves as a prompt for the update and a unique tag to identify the context to be updated. The second working module then broadcasts the context update information through a unified interface. The interface protocol can be defined as a RESTful API or a message queue (such as Kafka) to ensure reliable and real-time information transmission. For example, the second working module pushes the context update information to the first working module via a POST request, with the request body containing the context to be updated and the context identifier. As another implementation method, the second working module stores the context to be updated into the message middleware (such as Kafka) through a unified interface and broadcasts the context identifier. After receiving the context identifier, the first working module can obtain the context to be updated from the message middleware according to the context identifier to achieve dynamic update.
[0034] Step S20: Determine the target context based on the context identifier.
[0035] The context identifier contains the session ID to which the context to be updated belongs. The context data of the current session can be retrieved through the context identifier, for example, the currently stored session state can be obtained: {"Current Task":"None","User Preference":","Temperature Unit":"°C"}. Optionally, the validity of the identifier can be verified, such as checking whether the session exists or has expired, to ensure that the update operation targets the correct target context.
[0036] For example, if a user initiates multiple rounds of conversation, such as first asking "Today's weather" and then "What about tomorrow?", the second working module will generate the same session ID (e.g., "session_id_12345*****," where 12345 represents the same session) when parsing the second question. The first working module uses this identifier to locate the target context (e.g., "City = Beijing," "Current Task = Weather Query" has already been recorded), avoiding repeated parsing of the same information and ensuring efficient conversation continuity.
[0037] Step S30: Update the target context using the context to be updated.
[0038] The first working module incrementally updates or fully replaces the target context based on the content of the context to be updated. For example, if the target context already includes "intent = query weather, entity = time = tomorrow" but does not specify the location for the weather query, it may be judged as invalid input. However, if the context to be updated is generated as "city = Beijing" based on environmental information provided by the device positioning module (e.g., obtained through GPS), or as "city = Beijing" based on commonly used addresses stored in the user preference module, other modules such as the task execution module or the dialogue management module can simultaneously obtain this context to generate a new context: {"intent": "Query weather", "entity": {"city": "Beijing", "time": "tomorrow"}, "current task": "Weather query", "user preference": {"temperature unit": "°C"}}. The context to be updated is then synchronously shared across multiple modules, facilitating the smooth execution of subsequent actions.
[0039] In the above solution, the voice assistant system can synchronize and share the generated context update information in real time across working modules, so that each working module can coordinate work in the same context environment, enhancing the collaborative ability between multiple working modules.
[0040] In some embodiments, obtaining the context update information generated by the second working module includes: receiving the context update information, where the context update information is generated and broadcast by the second working module that generates the context update.
[0041] In the embodiment of the present application, the context update information adopts a transmission mechanism in which the second working module actively sends and the first working module passively receives. The second working module does not need to know which modules need the context information it generates, but only needs to broadcast according to the agreed rules, which reduces the dependency between modules, helps decouple modules, and reduces information transmission delay.
[0042] In the above solution, the second working module actively broadcasts the context update information, so that the first working module can synchronize the latest context update information in a timely manner.
[0043] In some embodiments, obtaining the context update information generated by the second working module includes: detecting whether the second working module generates context update information at predetermined intervals; and obtaining the context update information if the second working module generates context update information.
[0044] In the embodiment of the present application, context update information is obtained by a periodic polling mechanism of the first working module. The preset time can be reasonably configured based on the experience of those skilled in the art and is not specifically limited in this application. For example, it can be 100 milliseconds, 0.5 seconds, 3 seconds, etc. Once a context update is detected in the second working module, the context acquisition interface is called to retrieve the context update information. If no update is detected, the process continues to wait for the next detection cycle.
[0045] Optionally, different preset times can be set as detection periods based on the service characteristics of the second working module. For example, the detection period can be set shorter for high-frequency update modules to ensure real-time capture of user input, while the detection period can be set longer for low-frequency update modules to reduce ineffective polling of device status. As another implementation, the preset time as the detection period can be adaptively adjusted based on system load. For example, when CPU utilization exceeds 80%, the detection period can be automatically extended to twice the default value to avoid resource contention. For another example, when no updates are detected for N consecutive times (e.g., 20 times), the detection period can be gradually extended (e.g., from 5s to 10s to 30s) to reduce energy consumption in idle state.
[0046] It should be noted that the context update method provided in this application can adopt a transmission mechanism in which the second working module actively sends and the first working module passively receives, a mechanism in which the first working module periodically polls, or a hybrid mechanism of the first two methods.
[0047] In the above solution, the first working module actively detects whether an update has occurred externally and obtains context update information. It can actively synchronize updates when an error occurs in the second working module, thereby ensuring the consistency of the context and enhancing the reliability of the voice assistant system.
[0048] In some embodiments, the context to be updated includes user information, session state, task information, and environment information, and the context to be updated is generated according to a preset format.
[0049] The embodiment of the present application performs a structured definition of the context to be updated through user information, session status, task information, and environment information.
[0050] User information includes user identity, preferences, and historical behavior. This information facilitates personalized services and task customization. For example, basic user information is generated when a user first registers. During user interactions, user preferences are updated by interpreting user commands (such as "I like to receive morning notifications").
[0051] The session state includes the status of the current conversation, completed tasks, pending operations, etc., to ensure the continuity of the conversation.
[0052] Task Information records relevant information about the current task, such as task objectives, execution status, task priority, etc.
[0053] Environmental information includes device status (temperature, humidity, etc.) and changes in the external environment (such as traffic and weather information).
[0054] Those skilled in the art can adjust the preset format according to actual needs, and this application does not make any specific limitations.
[0055] In the above solution, the use of a preset format can standardize the format of the context to be updated, facilitate the establishment of a unified context management mechanism, ensure that each module has a consistent understanding of the context, and thus improve the efficiency of information sharing and updating.
[0056] In some embodiments, the first working module and the second working module include a speech recognition module, a natural language understanding module, a dialogue management module, and a task execution module.
[0057] The first working module can be any module among the speech recognition module, natural language understanding module, dialogue management module and task execution module, and the second working module can also be any module among the speech recognition module, natural language understanding module, dialogue management module and task execution module.
[0058] The speech recognition module converts speech signals into text, generating contextual updates that reflect the original input. For example, a user's voice command, "Book me a conference room for Friday afternoon," is converted into the text string "Book me a conference room for Friday afternoon" by the speech recognition algorithm. This text is then sent to the natural language understanding module via an interface.
[0059] The natural language understanding module parses text semantics and generates structured context updates related to intents, entities, and tasks. For example, the speech recognition module receives the text "Book me a conference room for Friday afternoon" after speech recognition. After semantic analysis, it extracts the recognized intent as "conference room reservation" and the entities "time = Friday afternoon" and "type = conference room." It then generates structured context updates and feeds these updates back to the dialogue management module.
[0060] The dialogue management module is responsible for global context management, inter-module coordination, dialogue flow control, and response generation logic. For example, the dialogue management module combines updates from the speech recognition and natural language understanding modules to form a global context. Based on the intent "book a meeting room," the dialogue management module triggers the task execution module to call the meeting room reservation API. It also controls the dialogue interaction with the user, determining whether to ask the user a follow-up question (such as "What is the specific meeting room location?"). If not, the process continues.
[0061] The task execution module calls external services (such as APIs) to complete specific tasks and generates contextual updates about the task results. For example, after receiving a task from the dialogue management module, it calls the API of the company's internal conference room reservation system, returning a list of available conference rooms to the dialogue management module. The dialogue management module then generates a user response based on the task execution results.
[0062] In the above system process, after any module generates context update information, each module can achieve synchronous update and information sharing.
[0063] In the above solution, context update information can be shared and transmitted between the speech recognition module, natural language understanding module, dialogue management module and task execution module, enhancing the collaboration between modules.
[0064] In some embodiments, the context update information includes a version number, and the method further includes: if an error occurs in the working module, locating and restoring the historical context corresponding to the correct version according to the version number.
[0065] The voice assistant system automatically assigns a unique version number to each context update and stores all historical versions in the form of "version number-context" key-value pairs. When it detects an error in the operating status of a working module (such as data verification failure or task execution timeout), it identifies abnormal scenarios that require triggering a rollback.
[0066] For example, if the task execution module returns invalid data when a user queries flights, the normal process is as follows: the speech recognition module generates a version V1 context (user command "Check flights from Beijing to Shanghai") → the natural language understanding module generates a version V2 context (intent "flight query", entity "Beijing-Shanghai") → the task execution module calls the flight API, which returns invalid data (such as an incorrect flight date format), and a version V3 context containing the incorrect result. When the dialogue management module verifies the task result, it discovers an anomaly in the date field, triggering the error handling logic. The system searches the historical version and rolls back to version V2 (a state where semantic parsing is correct but the task is not executed). The task execution module is then re-invoked to obtain the correct flight data and generate a version V4 context (a valid result).
[0067] In the above solution, by introducing version numbers in context update information, a standardized version control and rollback mechanism is established to avoid conversation interruptions or task failures caused by information conflicts or processing anomalies, effectively improving the system's fault tolerance and stability, and ensuring the continuity of multi-round conversations and complex task processing.
[0068] In some embodiments, the method further includes: after the current session of the voice assistant ends, saving the context information of the current session so as to load the context information when starting the next session.
[0069] In the embodiment of the present application, persistent management is adopted for historical context. After a new session is started, the user does not need to repeatedly enter historical information (such as address, preferences) in the new session, and high-quality conversation can be continued.
[0070] Reference Figure 2 , Figure 2 A question-and-answer process diagram of a voice assistant system provided in an embodiment of the present application includes: Receive user query: The system receives the user's input question.
[0071] Initialize context: Initialize context information based on the current session and load historical context information, including user information, session status, task information, and environment information.
[0072] Analyze user questions: Analyze user questions and extract key information.
[0073] Whether context needs to be updated: Determine whether context information needs to be updated after resolving the user question.
[0074] Update context information: If an update is required, generate context update information based on the parsing results.
[0075] Inter-module communication: Modules share and synchronize context update information through communication protocols.
[0076] Generate Response: Generate a response to the user based on contextual information.
[0077] End the conversation: Determine whether the current conversation is ended.
[0078] Context persistence: If the conversation ends, the current context information is persisted and saved.
[0079] Reply to user questions (answer): Send the generated answer to the user.
[0080] In the above solution, by saving context information after the end of the session, users are prevented from repeatedly entering information or resetting parameters, which significantly improves the consistency and convenience of interaction. At the same time, the personalized service capabilities based on historical context are enhanced, and the voice assistant system can provide more demand-oriented responses based on user historical behavior, effectively improving user experience and system intelligence.
[0081] The present application provides a voice assistant system, which adopts the methods provided in the above-mentioned method embodiments.
[0082] The present application provides a computer-readable storage medium, including: a computer-readable storage medium storing computer instructions, wherein the computer instructions enable a computer to execute the methods provided by the above-mentioned method embodiments.
[0083] The present application provides a computer program product, including computer program instructions. When the computer program instructions are read and executed by a processor, the methods provided by the above-mentioned method embodiments are executed.
[0084] Figure 3 This is a schematic diagram of the electronic device structure provided in the embodiment of the present application, such as Figure 3 As shown, the electronic device includes: a processor 301, a memory 302 and a bus 303; wherein, the processor 301 and the memory 302 communicate with each other through the bus 303; the memory 302 stores program instructions that can be executed by the processor 301, and the processor 301 calls the program instructions to execute the methods provided by the above-mentioned method embodiments.
[0085] The processor 301 includes one or more (only one is shown in the figure), which can be an integrated circuit chip with signal processing capabilities. The above-mentioned processor 301 can be a general-purpose processor, including a central processing unit (CPU), a microcontroller unit (MCU), a network processor (NP), or other conventional processors; it can also be a special-purpose processor, including a neural network processing unit (NPU), a graphics processing unit (GPU), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. Furthermore, when there are multiple processors 301, some of them can be general-purpose processors, and others can be special-purpose processors.
[0086] Memory 302 includes one or more (only one is shown in the figure), which may be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), and electrically erasable programmable read-only memory (EEPROM). Processor 301 and other possible components can access memory 302 and read and / or write data therein.
[0087] In particular, one or more computer program instructions may be stored in the memory 302 , and the processor 301 may read and execute these computer program instructions to implement the weak password scanning behavior identification method provided in the embodiment of the present application.
[0088] Bus 303 includes one or more (only one is shown in the figure) devices that can be used to communicate directly or indirectly with other devices to exchange data. Bus 303 may include devices for wired or wireless communication, such as optical fibers, Serial Peripheral Interface (SPI) modules, and Inter-Integrated Circuit (I2C) buses. It may also include devices for wireless communication, such as Bluetooth modules, Wi-Fi modules, and mobile communication modules (e.g., 4G and 3G modules).
[0089] Understandably, Figure 3 The structure shown is only for illustration, and the electronic device may also include Figure 3 More or fewer components than shown, or with Figure 3 Different structures are shown. Figure 3 Each component shown in the figure can be implemented using hardware, software, or a combination thereof. The electronic device may be a physical device, such as a switch, router, server, or PC, or a virtual device, such as a virtual machine or virtualized container. Furthermore, the electronic device is not limited to a single device but may also be a combination of multiple devices or an integrated environment consisting of a large number of devices.
[0090] Reference Figure 4 , Figure 4 This is a schematic diagram of the structure of a context information updating device provided in an embodiment of the present application, which is applied to a first working module in a voice assistant system, and the voice assistant system also includes multiple second working modules; the device includes: The acquisition module 410 is configured to obtain context update information generated by the second working module. The context update information is generated by the second working module after parsing the user question. The context update information includes the context to be updated and the context identifier.
[0091] The determination module 420 is configured to determine a target context based on the context identifier.
[0092] The updating module 430 is configured to update the target context using the context to be updated.
[0093] In the embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interface, the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.
[0094] In addition, 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 units may be selected according to actual needs to achieve the purpose of the embodiments of the present application.
[0095] Furthermore, the functional modules in each embodiment of the present application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0096] The above are merely examples of the present application and are not intended to limit the scope of protection of the present application. Those skilled in the art will appreciate that various modifications and variations are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present application shall be included within the scope of protection of the present application.
Claims
1. A context information updating method, characterized in that: A first working module applied to a voice assistant system, wherein the voice assistant system further comprises a plurality of second working modules; The method comprises: Obtaining context update information generated by the second working module, wherein the context update information is generated by the second working module after parsing the user question, and the context update information includes a context to be updated and a context identifier; determining a target context based on the context identifier; The target context is updated using the context to be updated.
2. The method according to claim 1, characterized in that The obtaining of the context update information generated by the second working module includes: The context update information is received, where the context update information is generated by the second working module that generates the context update and is broadcasted.
3. The method according to claim 1, characterized in that The obtaining of the context update information generated by the second working module includes: detecting, at predetermined intervals, whether the second working module generates the context update information; If the context update information is generated, the context update information is acquired.
4. The method according to claim 1, wherein The context to be updated includes user information, session state, task information, and environment information, and the context to be updated is generated according to a preset format.
5. The method according to claim 1, wherein The first working module and the second working module include a speech recognition module, a natural language understanding module, a dialogue management module and a task execution module.
6. The method according to claim 1, characterized in that The context update information includes a version number, and the method further includes: If an error occurs in the working module, the historical context corresponding to the correct version is located and restored according to the version number.
7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: After the current session of the voice assistant ends, the context information of the current session is saved so that the context information can be loaded when the next session is started.
8. An electronic device, characterized in that: include: A processor, a memory, and a bus, wherein the processor and the memory communicate with each other via the bus; The memory stores program instructions that can be executed by the processor, and the processor can execute the method according to any one of claims 1 to 7 by calling the program instructions.
9. A computer-readable storage medium, characterized in that include: The computer-readable storage medium stores computer instructions, and the computer instructions enable the computer to execute the method according to any one of claims 1 to 7.
10. A computer program product, characterized in that The method comprises computer program instructions, and when the computer program instructions are read and executed by a processor, the method according to any one of claims 1 to 7 is executed.
Citation Information
Patent Citations
Information processing method and device, equipment and storage medium
CN119011514A
Communicating Context Across Different Components of Multi-Modal Dialog Applications
US20140257793A1