Multi-intention response processing method and device, equipment, medium and program product
By employing concurrent streaming processing and dynamic context injection mechanisms, the problems of low latency and semantic coherence in multi-intent requests are solved, achieving low latency, high throughput, and semantic coherence in streaming output, thereby improving the user experience.
Patent Information
- Application Number
- CN202511814142.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-03
- Publication Date
- 2026-03-24
AI Technical Summary
Existing technologies struggle to balance low latency, streaming, macroscopic ordering, and semantic coherence when handling multi-intent requests, resulting in a poor user experience.
By employing concurrent streaming processing, semantic integrity monitoring, and dynamic context injection mechanisms, the semantic integrity of sub-intent response data is monitored in real time, and the output order is controlled according to dependencies to achieve fine-grained pipeline parallel processing, ensuring the semantic coherence of streaming output.
It reduces first-word latency, improves system throughput and resource utilization, and ensures that the output results are highly coherent at the semantic level, providing a smooth and logically ordered user experience.
Smart Images

Figure CN121724035A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of information technology software systems, and in particular to multi-intent response processing methods, devices, equipment, media, and program products. Background Technology
[0002] In artificial intelligence applications, dialogue systems based on large language models have become the core interaction interface. User query patterns are rapidly evolving from simple single-turn question-and-answer to complex composite requests containing multiple heterogeneous subtasks. To handle such requests, current systems often adopt a modular processing architecture, which breaks down complex tasks and routes them to specialized processing modules or tools for execution, aiming to achieve better performance, accuracy, and efficiency than a single general-purpose large language model (LLM).
[0003] Currently, there are three implementation schemes for handling multi-intent requests. Scheme 1 is the serial processing synchronous return mode, which uses a blocking synchronous call chain. Although it ensures the output order and contextual coherence, it results in extremely high latency for the first character and no streaming experience for the user. Scheme 2 is the parallel processing batch return mode, which improves backend efficiency through parallel execution, but the response still needs to be completed before returning, which also cannot achieve streaming output, and the user-perceived latency is not improved, resulting in weak semantic coherence. Scheme 3 is the unordered streaming aggregation mode. As the closest existing technology, it achieves streaming output within each sub-intent and reduces the latency for the first character. However, because multiple streaming channels are parallel and independent, it leads to global disorder of output results, semantic fragmentation, and context isolation, causing the client to present chaotic content. Subsequent sub-intents cannot utilize the complete context of previous sub-intents, severely damaging semantic coherence and user experience.
[0004] However, existing technologies struggle to balance low latency, streaming, macroscopic ordering, and semantic coherence when responding to multi-intent requests. Therefore, ensuring high semantic coherence in streaming output while maintaining the advantages of low latency and high throughput from modular concurrent execution is a pressing issue. Summary of the Invention
[0005] This application provides a multi-intent response processing method, apparatus, device, medium, and program product, which ensures that the streaming output results are highly coherent at the semantic level while maintaining the advantages of low latency and high throughput brought about by modular concurrent execution.
[0006] In a first aspect, this application provides a multi-intent response processing method, comprising: receiving a user request and parsing the user request to generate at least two sub-intents and dependency information of at least two sub-intents; initiating a streaming processing request to a corresponding dedicated processing module through the streaming processing channel of each sub-intent, and receiving streaming response data from the dedicated processing module; parsing the currently received first streaming response data to determine whether the first streaming response data contains a semantically complete response data block, the first streaming response data corresponding to a first sub-intent among the at least two sub-intents; if the first streaming response data contains a semantically complete response data block, determining a second sub-intent dependent on the first sub-intent from the at least two sub-intents according to the dependency information; regenerating streaming response data through the dedicated processing module corresponding to the second sub-intent based on the semantically complete response data block of the first sub-intent; and controlling the output of semantically complete response data blocks of all sub-intents to the client based on the dependency information.
[0007] The technical solution provided in this application brings at least the following beneficial effects: After receiving a user request, streaming processing requests are initiated concurrently to each dedicated processing module, and semantically complete data blocks in the response stream of each sub-intent are monitored in real time. Upon recognizing that the preceding sub-intent (first sub-intent) has generated a valid semantically complete unit, i.e., based on pre-generated dependency information, the context update and content regeneration of the subsequent sub-intent (second sub-intent) are dynamically triggered. The event-driven fine-grained triggering mechanism replaces the coarse-grained synchronization method in traditional solutions that must wait for the entire task flow to end, thereby reducing the system's first-word latency and overall response time; simultaneously, because the subsequent sub-intent... Intent processing can instantly utilize the deterministic context generated by preceding sub-intents, ensuring a high degree of semantic coherence in the output content of different task modules. Finally, by using dependency information to globally control the output content of all sub-intents, the final result presented to the user strictly follows the logical order in a macroscopic way, despite the high concurrency of internal processing. This avoids the content chaos caused by concurrent streaming output, and as a whole, it achieves low latency, high coherence, and strong order in multi-intent streaming response output. While maintaining the advantages of low latency and high throughput brought by modular concurrent execution, it ensures that its streaming output results are highly coherent at the semantic level.
[0008] One possible implementation involves parsing the currently received first streaming response data to determine whether it contains semantically complete response data blocks. This includes: parsing the first streaming response data to obtain the text structure and syntactic features of each data block; matching the text structure and syntactic features of each data block with semantic integrity rules; and determining that the first data block is a semantically complete response data block in the first streaming response data if its text structure and syntactic features satisfy the semantic integrity rules. The semantic integrity rules include at least one of the following: punctuation rules, used to characterize the detection of sentence termination marks, paired parentheses, or paired quotation marks; data structure rules, used to characterize the detection of list item identifiers, target syntactic structure closures, or table row markers; and keyword triggering rules, used to characterize the detection of predefined summarizing words, transitional words, or task completion declaration words.
[0009] Another possible implementation involves parsing the currently received first streaming response data and determining whether it contains semantically complete response data blocks. This includes: parsing the first streaming response data to obtain data blocks; concatenating each data block with its corresponding historical context information to obtain a sliding window text fragment corresponding to each data block; using a machine learning model to infer the sliding window text fragment corresponding to each data block to obtain a confidence score for each data block, which represents the probability that the data block is a semantic boundary; and if the confidence score of a second data block is greater than a preset threshold, then the second data block is determined to be a semantically complete response data block in the first streaming response data.
[0010] Another possible implementation involves using a machine learning model to infer the sliding window text fragment corresponding to each data block and obtain a confidence score for each data block. This includes: storing the sliding window text fragment corresponding to each data block in a circular buffer within the semantic integrity monitor; sequentially retrieving the sliding window text fragment corresponding to each data block from the circular buffer through each model inference thread in the semantic integrity monitor; calling the machine learning model through each model inference thread to infer the sliding window text fragment corresponding to each data block and obtain a confidence score for each data block; and returning the confidence score of each data block to the main decision logic of the semantic integrity monitor to determine whether the data block is semantically complete.
[0011] Another possible implementation involves regenerating streaming response data from the semantically complete response data block based on the first sub-intention using a dedicated processing module corresponding to the second sub-intention. This includes: storing the semantically complete response data block of the first sub-intention in a distributed context cache; calling a prompt word dynamic assembler to construct new prompt words containing the new context for the second sub-intention based on the historical context in the distributed context cache; and sending the new prompt words to the dedicated processing module corresponding to the second sub-intention through the streaming processing channel of the second sub-intention to update the processing context of the dedicated processing module corresponding to the second sub-intention and regenerate the streaming response data.
[0012] Another possible implementation, based on dependency information, controls the output of semantically complete response data blocks of all sub-intents to the client, including: creating a global output queue in the stream output sequence controller; sending the semantically complete response data block of each sub-intent to the stream output sequence controller; determining, according to the order indicated by the dependency information, whether it is allowed to add the response data block of the subsequent sub-intent to the global output queue through the stream output sequence controller; if the response data blocks of all previous sub-intents that the subsequent sub-intent depends on have been output to the client from the global output queue, then the response data block of the subsequent sub-intent will be added to the global output queue; and outputting the response data blocks in the global output queue to the client according to the order indicated by the dependency information.
[0013] Secondly, this application provides a multi-intent response processing apparatus, comprising: a receiving module, a processing module, a sending module, and a determining module; the receiving module is configured to receive a user request; the processing module is configured to parse the user request and generate at least two sub-intents and dependency information of at least two sub-intents; the sending module is configured to initiate a streaming processing request to a corresponding dedicated processing module through a streaming processing channel of each sub-intent; the receiving module is further configured to receive streaming response data from the dedicated processing module; the determining module is configured to parse the currently received first streaming response data and determine whether the first streaming response data contains a semantically complete response data block, the first streaming response data corresponding to a first sub-intent among at least two sub-intents; the determining module is further configured to, if the first streaming response data contains a semantically complete response data block, determine a second sub-intent dependent on the first sub-intent from the at least two sub-intents based on the dependency information; the processing module is further configured to, based on the semantically complete response data block of the first sub-intent, regenerate streaming response data through the dedicated processing module corresponding to the second sub-intent; the processing module is further configured to, based on the dependency information, control the output of semantically complete response data blocks of all sub-intents to the client.
[0014] One possible implementation is that the aforementioned determining module is specifically used to: parse the first streaming response data to obtain the text structure and syntactic features of each data block in the first streaming response data; match the text structure and syntactic features of each data block with semantic integrity rules; if the text structure and syntactic features of a first data block satisfy the semantic integrity rules, then determine the first data block as a semantically complete response data block in the first streaming response data; wherein the aforementioned semantic integrity rules include at least one of the following: punctuation rules, used to characterize the detection of sentence termination marks, paired parentheses closures, or paired quotation marks closures; data structure rules, used to characterize the detection of list item identifiers, target syntactic structure closures, or table row markers; keyword triggering rules, used to characterize the detection of predefined summarizing words, transitional words, or task completion declaration words.
[0015] Another possible implementation, the aforementioned determining module, is specifically used for: parsing the first streaming response data to obtain data blocks from the first streaming response data; concatenating each data block with its corresponding historical context information to obtain a sliding window text fragment corresponding to each data block; using a machine learning model to infer the sliding window text fragment corresponding to each data block to obtain a confidence score for each data block, which is used to characterize the probability that the data block is a semantic boundary; if the confidence score of a second data block is greater than a preset threshold, then the second data block is determined to be a semantically complete response data block in the first streaming response data.
[0016] Another possible implementation, the aforementioned determining module, is specifically used to: store the sliding window text fragment corresponding to each data block into a circular buffer in the semantic integrity monitor; sequentially retrieve the sliding window text fragment corresponding to each data block from the circular buffer through each model inference thread in the semantic integrity monitor; call the machine learning model through each model inference thread to infer the sliding window text fragment corresponding to each data block to obtain the confidence score of each data block; and return the confidence score of each data block to the main decision logic of the semantic integrity monitor to determine whether the data block is semantically complete.
[0017] Another possible implementation is that the aforementioned processing module is specifically used to: store the semantically complete response data block of the first sub-intention in a distributed context cache; call the prompt word dynamic assembler to construct a new prompt word containing the new context for the second sub-intention based on the historical context in the distributed context cache; and send the new prompt word to the dedicated processing module corresponding to the second sub-intention through the streaming processing channel of the second sub-intention to update the processing context of the dedicated processing module corresponding to the second sub-intention and regenerate the streaming response data.
[0018] Another possible implementation, the aforementioned processing module, is specifically used for: creating a global output queue in the stream output sequence controller; sending the semantically complete response data block of each sub-intent to the stream output sequence controller; determining, through the stream output sequence controller, whether it is permissible to add the response data block of the subsequent sub-intent to the global output queue according to the order indicated by the dependency information; if the response data blocks of all previous sub-intents that the subsequent sub-intent depends on have been output to the client from the global output queue, then the response data block of the subsequent sub-intent will be added to the global output queue; and outputting the response data blocks located in the global output queue to the client according to the order indicated by the dependency information.
[0019] Thirdly, this application provides an electronic device comprising: a processor and a memory; the memory storing processor-executable instructions; when the processor is configured to execute the instructions, causing the electronic device to implement the method of the first aspect described above.
[0020] Fourthly, this application provides a computer-readable storage medium comprising: computer software instructions; which, when executed in an electronic device, cause the electronic device to implement the method described in the first aspect.
[0021] Fifthly, this application provides a computer program product comprising a computer program; when the computer program is run in an electronic device, the electronic device performs the method described in the first aspect.
[0022] The beneficial effects of the second to fifth aspects mentioned above are described in the corresponding description of the first aspect and will not be repeated here. Attached Figure Description
[0023] Figure 1 This is a schematic diagram illustrating the application environment of a multi-intent response processing method provided in an embodiment of this application. Figure 2 A flowchart illustrating a multi-intent response processing method provided in an embodiment of this application; Figure 3 A flowchart illustrating another multi-intent response processing method provided in an embodiment of this application; Figure 4 A flowchart illustrating yet another multi-intent response processing method provided in an embodiment of this application; Figure 5 A schematic diagram illustrating a semantic integrity determination process provided in an embodiment of this application; Figure 6 A schematic diagram illustrating the entire process of multi-intent response processing provided in an embodiment of this application; Figure 7This application provides an architectural diagram of a multi-intent response processing system as an embodiment of the present application. Figure 8 This is a schematic diagram of the composition of a multi-intent response processing device provided in an embodiment of this application; Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0024] The multi-intent response processing method, apparatus, device, medium, and program products provided in this application will now be described in detail with reference to the accompanying drawings.
[0025] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.
[0026] The terms "first" and "second," etc., used in the specification and drawings of this application are used to distinguish different objects or to distinguish different treatments of the same object, rather than to describe a specific order of objects.
[0027] Furthermore, the terms "comprising" and "having," and any variations thereof, used in the description of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the steps or units listed, but may optionally include other steps or units not listed, or may optionally include other steps or units inherent to such process, method, product, or apparatus.
[0028] It should be noted that in the embodiments of this application, the words "exemplary" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of the words "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0029] To facilitate a clear description of the technical solutions of the embodiments of this application, the terms "first" and "second" are used in the embodiments of this application to distinguish the same or similar items with essentially the same function and effect. Those skilled in the art can understand that the terms "first" and "second" are not intended to limit the quantity or execution order.
[0030] In the description of this application, unless otherwise stated, "a plurality of" means two or more.
[0031] This application provides a multi-intent response processing method that can be applied to various intelligent dialogue systems and artificial intelligence platforms that require processing complex user commands and providing a smooth interactive experience. Specific application scenarios include, but are not limited to: intelligent customer service and ticketing systems, enterprise-level data analysis and report generation, interactive content creation platforms, and low-code / no-code development platforms.
[0032] This application effectively solves the contradiction between speed, order, and coherence faced by existing technologies when processing multi-intent requests through concurrent streaming processing, semantic integrity monitoring, and dynamic context injection mechanisms. The technical solution of this application is applicable to all the above-mentioned application scenarios with high requirements for intelligence, real-time performance, and user experience.
[0033] In the current AI application ecosystem, LLM-based dialogue systems have become the core interaction interface. User query patterns are rapidly evolving from simple single-turn question-and-answer to complex composite requests containing multiple heterogeneous subtasks. To handle such requests, current systems often adopt a modular processing architecture, which breaks down complex tasks and routes them to specialized processing modules or tools for execution, aiming to achieve better performance, accuracy, and efficiency than a single general-purpose LLM.
[0034] Through searching and analyzing existing technical literature and open-source implementation schemes, the following three schemes were found to constitute the most relevant prior art background. Among them, the third scheme was identified as the implementation scheme most similar to this invention because it attempts to solve the problem of streaming output, but its inherent defects are precisely the core problem that this invention aims to overcome.
[0035] Option 1: Serial processing synchronous return mode This is the most traditional and direct processing method. Its technical implementation path is as follows: After receiving user input, the Natural Language Understanding (NLU) module first performs intent parsing, identifying the N implicit sub-intents (I1, I2, ..., I...). n Subsequently, the system creates a strictly sequential processing pipeline. This pipeline sequentially submits sub-intent I1 to the backend LLM or dedicated processing module for computation, and synchronously waits for it to receive a 100% complete and final response R1. Only after receiving R1 will the system initiate processing of sub-intent I2, similarly waiting for its complete response R2. This process repeats until complete responses to all sub-intents (R1, R2, ..., R...) are obtained. n Ultimately, the system simply pieces these individual responses together in sequence to form a seemingly complete document, which is then returned to the client all at once.
[0036] The technical essence of this scheme is a blocking synchronous call chain. Its advantages lie in its extremely simple implementation logic, ensuring the sequentiality and contextual coherence of output results (each subsequent task is generated based on the complete result of the previous task), and its low development and debugging difficulty. However, its main drawback is its high response latency. The time between a user initiating a request and receiving any valid content, such as the Time To First Byte (TTFB) delay, is at least equal to the time required to process the most time-consuming sub-intent, and in the worst case, equal to the sum of the processing times of all sub-intents. This means that when faced with a complex request, a user may have to wait tens of seconds or even longer with no screen feedback, resulting in an extremely poor user experience. This "blank waiting" interaction mode completely violates the principles of immediacy and smoothness pursued by current web applications.
[0037] Option 2: Parallel processing batch return mode This solution aims to overcome the high latency issue of Solution 1, focusing on improving system throughput and overall processing efficiency. After identifying multiple sub-intents, the system utilizes multithreading or asynchronous programming techniques to send processing requests in parallel to all processing modules or LLM services. This means processing I1, I2, ..., I... n The requests are sent almost simultaneously, allowing backend computing resources to be fully utilized, which can ideally significantly shorten the total completion time of the entire task.
[0038] However, this scheme makes a significant compromise in its output method. The system must wait for all parallel tasks to complete, i.e., for R1, R2, ..., R to be collected. n The return process only begins after all complete responses are received. It aggregates all responses and sends them to the client all at once. Therefore, although its total processing time may be better than the serial mode, the user-perceived TTFB (Time to First Result) is not improved; the user still has to wait for the slowest subtask to complete before seeing any content. This solution completely sacrifices streaming capabilities; users cannot enjoy the dynamic feedback and smooth experience of content generation word by word. Essentially, it only improves backend efficiency with minimal benefit to the frontend user experience. Furthermore, this solution loses the advantage of continuity in Solution 1, where each subsequent task is generated based on the complete context of the previous task.
[0039] Option 3: Disordered streaming aggregation mode (closest existing technology) This is a more complex pattern used in some advanced frameworks, also known as "multiplexing." It recognizes the importance of streaming for user experience and attempts to maintain the concurrent performance of Solution 2. The technical implementation of this solution involves establishing an independent streaming connection channel for each identified sub-intent. These channels operate concurrently, with each channel pushing the generation result of its corresponding intent to the front end in real-time and independently as asynchronous data chunks.
[0040] From a technical perspective, this scheme successfully achieves streaming output within each sub-intention and reduces TTFB to its theoretical minimum (the time to generate the first data block among all sub-intentions). However, it introduces a more serious new problem: global disorder of output results, semantic fragmentation, and context isolation. Because multiple streaming channels are parallel and independent, their outputs are completely intertwined and competing on the timeline. This results in completely chaotic content presented on the user's client interface: one might see an intermediate result of the second intention first, then jump to the beginning of the first intention, and then intersperse fragments of the third intention. This output loses any logical structure and narrative coherence, becoming completely unreadable.
[0041] More critically, its semantic coherence is fundamentally disrupted. The generation processes of each processing module are isolated, and subsequent modules cannot utilize the final conclusions of preceding modules. For example, in Solution 3, the "Stock Price Prediction" module starts working at almost the same time as the "Advantage Analysis" module, which is unaware of the final conclusions of the "Advantage Analysis." Therefore, its prediction is based on incomplete or completely unrelated contextual information, resulting in a disconnect between the prediction and the preceding text, and a lack of logical coherence. Users are forced to become information integrators, reordering and piecing together information in their minds, which greatly increases cognitive load, making the experience even worse than waiting for a complete but orderly answer. Therefore, while this solution solves the problem of "speed," it completely fails to address the issues of "quality" and "accuracy," and cannot provide usable service quality in a real production environment.
[0042] None of the existing solutions can simultaneously satisfy the four key metrics of low latency, streaming experience, ordered output, and semantic coherence. Solution 1 and Solution 3 represent two extremes: Solution 1 (ordered and coherent) sacrifices latency and streaming experience; Solution 3 (fast and streaming) sacrifices order and coherence. Solution 2 is an incomplete compromise.
[0043] Option 1: Serial processing synchronous return mode 1. High latency: Users must wait for all subtasks to complete sequentially, resulting in extremely high first-word latency (TTFB) and a poor user experience; 2. Unflowing experience: The response content is returned all at once, making it impossible to achieve a smooth interaction with text-by-text output; 3. Low resource utilization: Backend computing resources are idle while waiting, limiting system throughput.
[0044] Option 2: Parallel Processing Batch Return Mode 1. Lack of streaming capability: Although parallel execution improves backend efficiency, the response still needs to be completed before returning, which cannot achieve streaming output; 2. First character delay remains unresolved: Users still have to wait for the slowest subtask to complete, and the perceived latency is still very high; 3. Weak semantic coherence: Each subtask is executed independently, and subsequent tasks cannot utilize the complete results of previous tasks, resulting in fragmented output logic.
[0045] Option 3: Unordered Streaming Aggregation Mode 1. Disordered output: Content is pushed in parallel by multiple streaming channels, resulting in a messy display on the client side and poor readability; 2. Semantic fragmentation: Subsequent sub-intents cannot obtain the complete context of preceding sub-intents, resulting in a lack of logical coherence in the generated results; 3. Poor user experience: Users need to piece together fragmented information themselves, resulting in a high cognitive load and a poor interactive experience.
[0046] Therefore, there is a core contradiction in the existing technology that has not yet been resolved: how to maintain the advantages of low latency and high throughput brought about by modular concurrent execution, while ensuring that its streaming output results are not only macroscopically ordered, but also highly coherent at the semantic level, so that the processing of subsequent sub-intents can be built on the complete results of the preceding sub-intents.
[0047] To address the aforementioned technical issues, this application provides a multi-intent response processing method, apparatus, device, medium, and program product. By using a semantic integrity monitor to trigger subsequent operations immediately upon the generation of a phased complete response, the timing of context injection and subsequent task initiation is significantly advanced, forming a fine-grained pipeline parallelism. This reduces the first-word delay theory to the time of generating the first phased complete response among all sub-intents, while maintaining a word-by-word streaming output experience. Furthermore, by using a stream output sequence controller to output data blocks in the logical order of sub-intents, the readability of the overall structure is ensured. By dynamically injecting the phased complete responses of preceding sub-intents into subsequent sub-intents in real time, it ensures that the subsequent generation process is based on the complete context of the preceding sequence, solving the semantic fragmentation problem and achieving a high degree of logical coherence. In addition, this solution supports the concurrent initiation and execution of multiple sub-intents, avoiding resource idle waiting in serial solutions. Simultaneously, since subsequent tasks do not need to wait for all preceding tasks to complete before starting work based on the generated valid context, the overall system throughput and computing resource utilization are improved.
[0048] The embodiments provided in this application will now be described in detail with reference to the accompanying drawings.
[0049] This application provides a multi-intent response processing method that can be applied to, for example... Figure 1 The application environment shown. For example... Figure 1 As shown, the application environment includes a multi-intent response processing device 101 and a front-end device 102. The multi-intent response processing device 101 and the front-end device 102 are interconnected.
[0050] In some embodiments, the multi-intent response processing device 101 may be a server cluster consisting of multiple servers, a single server, a computer, or a processor or processing chip in a server or computer. This application does not limit the specific device form of the multi-intent response processing device 101. Figure 1 The example shown is a multi-intent response processing device 101, which is a single server.
[0051] In some embodiments, the front-end device 102 can be a device with wireless transceiver capabilities, such as a mobile phone, tablet computer, wearable device, in-vehicle device, augmented reality (AR) / virtual reality (VR) device, laptop computer, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), etc. This application embodiment does not limit the specific device form of the front-end device 102. Figure 1 The example shown is a mobile phone, with the front-end device 102 as the illustration.
[0052] In some embodiments, the multi-intent response processing device 101 controls the output of semantically complete response data blocks of all sub-intents to the front-end device 102. The front-end device 102 parses and renders the received semantically complete response data blocks of all sub-intents in sequence to achieve progressive presentation of content. Specifically, this includes: parsing the received data blocks into renderable text, images, or structured data elements in real time; dynamically arranging and laying out the data in the user interface according to the order determined by the sub-intent dependencies based on the metadata and logical order identifiers carried in the data blocks; and incrementally updating the parsed content to the display interface in a streaming manner to form a coherent document-growing visual experience while maintaining the responsiveness of user interaction.
[0053] It should be noted that the system architecture described in the embodiments of this application is for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and does not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the evolution of system architecture, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0054] See Figure 2 This is a flowchart illustrating a multi-intent response processing method provided in an embodiment of this application. Figure 2 As shown, the multi-intent response processing method provided in this application can be implemented by the above-mentioned multi-intent response processing device, specifically including the following steps 201 to 206.
[0055] Step 201: The multi-intent response processing device receives the user request, parses the user request, and generates at least two sub-intents and dependency information of at least two sub-intents.
[0056] In some embodiments, the aforementioned user request refers to a complex natural language query that includes multiple heterogeneous subtasks, entered by the user through a client (such as a webpage or an app), for example, "crawl the news titles from the official website of University A and generate a summary for them".
[0057] In some embodiments, the natural language understanding module of the multi-intent response processing device uses a pre-trained deep learning model (such as BERT, T5, etc.) to perform semantic analysis on user requests and complete tasks such as named entity recognition (NER) and semantic role labeling (SRL) to accurately understand user intent.
[0058] In some embodiments, the sub-intents are atomic operation units obtained by the NLU module after performing task decomposition on the composite request. Each sub-intent corresponds to a specific task that can be executed by a particular specialized module, such as "crawl news headlines" (I1) and "generate a summary" (I2).
[0059] In some embodiments, the dependency information described above describes the logical order of execution between sub-intents. This is generated by a dependency analyzer within the NLU module. This analyzer can analyze the logical relationships between sub-intents based on predefined domain knowledge rules (e.g., "generating a summary" necessarily depends on "getting text content") or a small, fine-tuned sequence-to-sequence (Seq2Seq) neural network model.
[0060] In some embodiments, the multi-intent response processing device can use the dependency analyzer in the natural language understanding module to preliminarily determine the logical dependencies between sub-intents based on predefined rules or neural network models; and output a dynamic execution dependency graph (DAG), where nodes represent sub-intents and edges represent dependencies; wherein the dynamic execution dependency graph can be dynamically adjusted by the subsequent coordination engine according to the real-time processing situation.
[0061] In some embodiments, the dynamic execution dependency graph described above is a visual and structured representation of dependency information. In this directed acyclic graph, nodes represent sub-intents, and directed edges represent dependency directions (e.g., a direction from I1 to I2 indicates that I2 depends on I1). Its "dynamic" nature is reflected in the fact that the initial DAG is not static; the subsequent Streaming Scheduling Coordination Engine can dynamically adjust it based on real-time execution status (e.g., a module fails or produces unexpected output), such as adding new dependency edges or bypassing faulty nodes. This greatly enhances the system's fault tolerance and adaptability.
[0062] It is understandable that a multi-intent response processing device can generate at least two sub-intents and dependency information of at least two sub-intents through a natural language understanding (NLU) and intent dependency resolution module. This module parses the user request and identifies the sub-intent list I1, I2, ..., I... n and its original prompt words P1, P2, ..., P nThis module not only performs intent recognition but also includes a lightweight dependency analyzer. Based on predefined rules or a small neural network model, this analyzer initially determines the logical dependencies between intents (e.g., I2 depends on I1) and outputs an initial dynamic execution dependency graph (DAG). This DAG is not fixed but can be dynamically adjusted by the subsequent coordination engine based on real-time conditions.
[0063] Step 202: The multi-intent response processing device initiates a streaming processing request to the corresponding dedicated processing module through the streaming processing channel of each sub-intent, and receives streaming response data from the dedicated processing module.
[0064] In some embodiments, the aforementioned Streaming Processing Channel is a bidirectional, persistent network connection connecting the coordination engine and the dedicated processing module, maintaining an independent logical channel for each sub-intent to ensure data stream isolation and full-duplex communication.
[0065] In some embodiments, the Specialized Processing Module (SPM) described above is a modular, pluggable service group. A SPM, also referred to as a service group, consists of multiple SPM modules, each responsible for processing a specific type of sub-intent. These modules support streaming output and can adjust the generation process based on dynamically injected context. Each module is a service highly optimized for a specific task (such as text summarization, data querying, code generation, or image synthesis), supporting streaming output—that is, returning the generated result in multiple chunks rather than a complete result all at once. SPM modules can be encapsulated and deployed using containerization technologies (such as Docker) for easy independent scaling.
[0066] In some embodiments, the multi-intent response processing device performs step 202 via a streaming scheduling and coordination engine for concurrent lifecycle management: creating and managing the lifecycle of streaming processing for all sub-intents, and concurrently initiating streaming requests to all relevant dedicated processing modules. This concurrent initialization is a primary prerequisite for reducing first-word latency, which is theoretically equal to the time it takes for the dedicated processing module that first starts returning a stream among all sub-intents to generate the first valid data block.
[0067] Step 203: The multi-intent response processing device parses the currently received first streaming response data and determines whether the first streaming response data contains a semantically complete response data block.
[0068] In some embodiments, the first streaming response data described above corresponds to the first sub-intent in at least two sub-intents.
[0069] In some embodiments, the first streaming response data refers to the data sequence transmitted in real time from the dedicated processing module corresponding to the first sub-intent through its streaming processing channel.
[0070] In some embodiments, the semantically complete response chunk described above is also called a partial complete response (PCR). It refers to a data unit that is semantically and / or structurally independent in the streaming output process, such as a complete sentence, a list item, a JSON object, or a logical paragraph. Identifying PCRs is crucial for implementing fine-grained pipelines.
[0071] In some embodiments, the multi-intent response processing device initiates streaming processing requests to a dedicated processing module through the streaming processing channel of each sub-intent, which are executed concurrently. The time when the dedicated processing module of the first sub-intent returns the first semantically complete response data block determines the user-perceived first-word delay time.
[0072] In some embodiments, the multi-intent response processing device uses a Semantic Completeness Monitor (SCM) to determine whether the first streaming response data contains semantically complete response data blocks. This SCM component continuously monitors the output data blocks of each sub-intent stream. Instead of simply waiting for the stream to end (onComplete), it evaluates each data block based on a predefined set of semantic completeness rules or a lightweight real-time model.
[0073] In some embodiments, combined with Figure 2 ,like Figure 3 As shown, step 203 above can be specifically implemented as steps 203a to 203c.
[0074] Step 203a: The multi-intent response processing device parses the first streaming response data to obtain the text structure and syntactic features of each data block in the first streaming response data.
[0075] In some embodiments, the aforementioned data chunk refers to a variable-length fragment of raw text data received from the streaming channel, and is the basic unit of streaming transmission.
[0076] In some embodiments, the semantic integrity monitor performs a preprocessing and analysis phase on the raw data blocks, transforming them into structured feature information that can be used by rule engines or machine learning models. This process typically does not involve deep semantic understanding, but rather focuses on surface-level, rapidly extractable formal features.
[0077] In some embodiments, the aforementioned text structure refers to the visual and logical organization of text data. SCM parses text structure features in the following ways: Paragraphs and line breaks: Detect consecutive line breaks (\n) or carriage return line feeds (\r\n) to identify paragraph boundaries; List identifiers: Identify whether a line of text begins with a number, a letter, or a specific bullet point to determine if it is a list item; Table markup: Detects specific markup sequences, such as the table delimiter |---| in Markdown syntax or the and in HTML tags, to identify the row structure of a table; Indentation and alignment: Analyze the starting whitespace character (space or tab) of a text line to determine its hierarchical relationship. This is often used in code blocks or structured documents.
[0078] In some embodiments, the aforementioned syntactic features refer to the formal characteristics of text at the sentence level that demonstrate adherence to grammatical rules. SCM obtains these features through lightweight lexical analysis and syntactic parsing. Punctuation sequence: Identifies sentence-ending punctuation and the matching and closing states of paired punctuation marks; Part-of-speech tagging: This involves tagging the part of speech (e.g., noun, verb, adjective) of each word in a data block. For example, detecting consecutive "noun + verb + noun" structures might indicate the formation of a subject-verb-object phrase. Syntactic component boundaries: Inferring the boundaries of clauses or components by identifying specific function words (such as conjunctions "and" and "or", prepositions "at" and "about") or phrase structures; Specific grammar patterns: Matching predefined grammar templates, such as detecting sentence structures introduced by summarizing conjunctions like "in conclusion / in summary / therefore".
[0079] It can be understood that text structure and syntactic features are a set of quantified or symbolized feature vectors or tag sequences. These features provide a precise description of the inherent formal regularity of data blocks for subsequent rule matching or model inference, and are the key basis for determining whether they constitute a semantically self-consistent independent unit (i.e., PCR).
[0080] Step 203b: The multi-intent response processing device matches the text structure and syntactic features of each data block with semantic integrity rules.
[0081] In some embodiments, the semantic integrity rules described above include at least one of the following: Punctuation rules are used to indicate the detection of sentence termination marks, paired parentheses, or paired quotation marks; Data structure rules are used to characterize the detection of list item identifiers, target syntax structure closures, or table row markers; Keyword triggering rules are used to characterize the detection of predefined summarizing words, transitional words, or task completion announcement words.
[0082] In some embodiments, the semantic integrity rules described above are a set of predefined, configurable pattern matching rules. The SCM integrates a rule engine that performs real-time syntax parsing and pattern matching on the incoming data blocks.
[0083] In some embodiments, the semantic integrity rules described above employ a priority matching strategy, meaning that once any rule is triggered, it is determined that a Partial Complete Response (PCR) has been generated. Semantic integrity rules include, but are not limited to, the following types and can be dynamically loaded and configured: (1) Punctuation Rules: Sentence termination rule: If a data block contains sentence termination punctuation marks such as period (.), question mark (?), exclamation mark (!), ellipsis (...), etc., and is immediately followed by a space or newline, then the text preceding it is determined to constitute a complete sentence; Quotation and bracket closure rules: If a pair of quotation marks (such as "") and brackets (such as (), [], {}) are detected to achieve opening and closing matching, then the content inside the brackets is determined to be a complete unit; Separator rules: Detects specific separators, such as newline (\n) and carriage return (\r\n), which are often used to separate list items and paragraphs.
[0084] (2) Data Structure Rules: List item rules: If a text line is detected to begin with a number (e.g., 1., 2.), a letter (e.g., a), b), or a bullet point (e.g., •, -, *), then the line is considered a complete list item. Structured data rules: For streaming output of structured data such as JSON, XML, and YAML, monitor its syntax closure. For example, if} or ] is detected to close a JSON object or array, or if is detected to close an XML tag, a lightweight parser (such as a state machine) can be used for real-time syntax analysis. Table row rules: If a row separator (|---|) is detected in a Markdown table or a tag in an HTML table, it is determined that a row of table data is complete.
[0085] (3) Keyword Trigger Rules: Summary vocabulary rule: The detection of summary phrases such as "in conclusion", "in summary", "therefore", "the conclusion is" indicates that the preceding argument has come to an end; Transitional vocabulary rules: Detecting words such as "on the other hand," "next," and "in addition" indicates the end of one semantic paragraph and the beginning of another; Task completion declaration rules: When phrases such as "Completed", "Generated", or "Query results are as follows" that clearly declare the completion of a task phase are detected; (4) Length & Timeout Rules (Auxiliary Rules): Maximum length truncation rule: To prevent infinite waiting, when the length of a single data block or the cumulative data exceeds a preset threshold (such as 1024 characters), it will be forcibly identified as a PCR and triggered. Timeout rule: If no new data is received and no other rules are triggered within a time window (e.g., 500 milliseconds), the currently buffered data will be forced as a PCR trigger to avoid system lag.
[0086] The punctuation rules are understandable: based on syntactic analysis, they identify symbol patterns that mark the end of sentences or clauses. Data structure rules: for structured data, SCM integrates a lightweight parser (such as a state machine-based JSON parser) for real-time verification of syntactic closure. Keyword triggering rules: based on a pre-loaded domain keyword dictionary, they perform real-time string matching. Length and timeout rules: as safeguards, these ensure the system can continue even when encountering unrecognized formats or module glitches, guaranteeing system robustness.
[0087] Step 203c: If the text structure and grammatical features of the first data block satisfy the semantic integrity rule, then the multi-intent response processing device determines the first data block as a semantically complete response data block in the first streaming response data.
[0088] Thus, by using a predefined set of semantic integrity rules (including punctuation, data structure, and keyword triggering rules) to perform real-time matching of data blocks, efficient and accurate identification of semantically complete response data blocks is achieved. Specifically, the comprehensive application of multiple rules can cover various text types, from simple sentences to complex structured data, ensuring high accuracy and wide applicability of semantic boundary determination; the computational overhead of rule matching is extremely low, meeting the stringent real-time requirements of streaming processing and achieving a balance between high precision and low latency; the rule set makes the determination process transparent, interpretable, and easy to debug and optimize, improving the system's reliability and maintainability.
[0089] In some embodiments, combined with Figure 2 ,like Figure 4 As shown, step 203 above can be specifically implemented as steps 203d to 203g.
[0090] Step 203d: The multi-intent response processing device parses the first streaming response data and obtains the data blocks in the first streaming response data.
[0091] Step 203e: The multi-intent response processing device concatenates each data block with its corresponding historical context information to obtain a sliding window text fragment corresponding to each data block.
[0092] In some embodiments, the aforementioned sliding window text fragment refers to: the SCM concatenates the current data block with the historical context of the preceding N characters (or tokens) in memory to form a fixed-length text fragment. This window slides as the data stream arrives to provide sufficient context for the machine learning model.
[0093] Step 203f: The multi-intent response processing device uses a machine learning model to reason about the sliding window text fragments corresponding to each data block, and obtains the confidence score of each data block.
[0094] In some embodiments, the confidence score described above is used to characterize the probability that a data block is a semantic boundary.
[0095] In some embodiments, the aforementioned semantic boundary refers to the dividing point in a continuous text stream where one relatively complete and independent semantic unit ends and another semantic unit begins. This semantic unit can be a complete sentence, a logical paragraph, a list item, a question-and-answer pair, etc. It signifies that the preceding text has expressed a relatively independent viewpoint, fact, or instruction, and the subsequent text will initiate new semantic content. Identifying semantic boundaries is fundamental to achieving fine-grained context segmentation and injection in streaming processing.
[0096] In some embodiments, the confidence score is a continuous numerical value between 0 and 1, output by a lightweight real-time machine learning model. This score is the model's probability estimate of the proposition that the end position of its input (i.e., the sliding window text fragment) is exactly a semantic boundary.
[0097] In some embodiments, the confidence score is derived from the model's internal analysis of the deep semantics and contextual relationships of the text within the window, and then normalized using the Softmax or Sigmoid function in its final layer. It quantifies the degree of certainty in the model's judgment. The confidence score transforms the originally ambiguous question of semantic completeness into a quantifiable and comparable continuous variable judgment. The main decision logic of the Semantic Completeness Monitor (SCM) compares this score with a preset threshold to ultimately determine whether to trigger the OnPartialComplete event, thereby achieving a probabilistic and intelligent semantic completeness judgment.
[0098] In some embodiments, step 203f can be specifically implemented as steps 203f1 to 203f4.
[0099] Step 203f1: The multi-intent response processing device stores the sliding window text fragment corresponding to each data block into the circular buffer in the semantic integrity monitor.
[0100] Step 203f2: The multi-intent response processing device sequentially retrieves the sliding window text fragments corresponding to each data block from the circular buffer through the various model inference threads in the semantic integrity monitor.
[0101] Step 203f3: The multi-intent response processing device calls the machine learning model through each model inference thread to infer the sliding window text fragment corresponding to each data block and obtain the confidence score of each data block.
[0102] In some embodiments, the above-mentioned machine learning model can be a lightweight real-time machine learning model. Based on the semantic integrity determination of the lightweight real-time machine learning model, it is suitable for complex scenarios with flexible output formats and blurred semantic boundaries, and can provide higher judgment intelligence and adaptability. The specific implementation is as follows: A. Model Selection and Input: An efficient sequence classification model is adopted. Lightweight Transformer variants (such as TinyBERT or MiniLM) based on distillation or pruning techniques are preferred, as are efficient recurrent neural networks (such as SRU). The model input is a text segment within a sliding window, which is composed of the current data block and the preceding N characters (historical context) (e.g., a window size of 256 tokens); this is to enable the model to make more accurate judgments based on local context. It's important to note that the lightweight real-time machine learning model is integrated with the streaming channel asynchronously. Specifically, the SCM temporarily stores incoming data blocks in a ring buffer. A separate model inference thread (or coroutine) continuously retrieves fixed-length text segments (e.g., 256 tokens) from the buffer for real-time inference. To reduce latency, the inference service is preferentially deployed on GPUs or dedicated AI accelerators (e.g., NPUs) in the same region as the processing module, and optimized using high-performance inference frameworks such as TensorRT or ONNX Runtime. The model's inference results (confidence scores) are returned to the SCM's main decision logic via function calls.
[0103] B. Output and Functionality: The model output is a confidence score between 0 and 1, representing the probability that the current sliding window's end position is a semantically complete point. The system presets a high threshold (e.g., 0.90, 0.95). When the model's output confidence score exceeds this threshold, the SCM triggers the OnPartialComplete event. After triggering, the text from the previous trigger point to the current point is truncated into a PCR. C. Training Data and Methods: This model requires supervised learning on a dataset containing a large number of semantic boundary annotations. Training data comes from: The manually annotated text corpus is marked with tags at the boundaries of sentences, paragraphs, list items, etc.
[0104] Synthesized data utilizes templates to generate multi-intent dialogue data with a clear structure.
[0105] The model can be continuously fine-tuned and optimized based on user feedback (such as corrections) in the actual production environment through an online learning mechanism.
[0106] Deployment and Inference: This lightweight model can be deployed as a standalone gRPC microservice or other high-performance inference engine to ensure extremely low inference latency (milliseconds) and meet the real-time requirements of streaming processing. The lightweight real-time machine learning model is integrated with the streaming channel asynchronously. Specifically, SCM temporarily stores incoming data blocks in a ring buffer. A separate model inference thread (or coroutine) continuously retrieves fixed-length (e.g., 256 tokens) text fragments from the buffer for real-time inference. To reduce latency, the inference service is preferentially deployed on GPUs or dedicated AI accelerators (e.g., NPUs) in the same region as the processing module and optimized using high-performance inference frameworks such as TensorRT or ONNX Runtime.
[0107] It is understandable that a lightweight real-time machine learning model is a model specifically optimized for low-latency inference. It can be a lightweight Transformer variant obtained based on knowledge distillation or model pruning. Such models can significantly reduce the number of parameters and computational cost while maintaining high performance.
[0108] Model Input and Output: The model is a sequence classifier. The input is a sliding window text segment, and the output is a scalar confidence score between 0 and 1, representing the probability that the end of the current window is a semantically complete point.
[0109] High-performance inference architecture: Ring Buffer: This is a fixed-size shared memory area within the SCM. It operates in a first-in, first-out (FIFO) manner, temporarily storing a continuous stream of sliding window text fragments. This addresses the potential mismatch between data production speed and model consumption speed, preventing unlimited memory growth. Independent model inference threads: The SCM launches one or more independent, high-priority threads (or coroutines) dedicated to retrieving text fragments from the ring buffer and asynchronously invoking the machine learning model for inference. This producer-consumer pattern effectively avoids model inference blocking the main data stream processing thread, which is crucial for ensuring system real-time performance. Inference optimization: Models are typically accelerated using high-performance inference frameworks such as TensorRT or ONNXRuntime, and may be deployed on GPUs or dedicated AI accelerators (NPUs) to achieve millisecond-level inference latency.
[0110] Step 203f4: The multi-intent response processing device returns the confidence score of each data block to the main decision logic of the semantic integrity monitor to determine whether the data block is semantically complete.
[0111] Thus, this architecture achieves efficient model integration by temporarily storing data in a circular buffer and performing asynchronous inference via an independent model inference thread. The circular buffer, acting as a decoupling middleware between the producer (data stream) and the consumer (model inference), effectively smooths fluctuations in data inflow and model computation speed, preventing data loss or blocking and ensuring smooth streaming processing. The independent asynchronous inference thread avoids computationally intensive model inference blocking the main processing flow, reducing overall system latency, ensuring high real-time performance of streaming responses, and achieving low latency.
[0112] Step 203g: If the confidence score of the second data block is greater than the preset threshold, the multi-intent response processing device determines the second data block as a semantically complete response data block in the first streaming response data.
[0113] Thus, semantic integrity judgment is achieved by concatenating data blocks with historical context into a sliding window and using a machine learning model to calculate its confidence level as a semantic boundary. The model can understand more complex and ambiguous semantic boundaries based on local context, and has stronger adaptability and judgment intelligence for flexible natural language expressions that are difficult to cover by rules. Quantitative judgment through confidence scores provides flexible and adjustable threshold control for decision-making, allowing the judgment strategy to be flexibly balanced according to the accuracy requirements of different scenarios, thereby improving the robustness of the system.
[0114] Step 204: If the first streaming response data contains a semantically complete response data block, the multi-intent response processing device determines a second sub-intent that depends on the first sub-intent from at least two sub-intents based on dependency information.
[0115] In some embodiments, the multi-intent response processing apparatus determines a second sub-intent that depends on the first sub-intent through a streaming scheduling and coordination engine. When the SCM triggers the OnPartialComplete event, the engine captures the event, which carries the sub-intent ID (e.g., I1) that generated the PCR and the PCR content. The streaming scheduling and coordination engine queries the generated dynamic execution dependency graph (DAG) to find all subsequent sub-intents (e.g., I2) that directly depend on the current sub-intent (I1). This query process is an efficient graph traversal operation.
[0116] Step 205: The multi-intent response processing device regenerates streaming response data based on the semantically complete response data block of the first sub-intent through the dedicated processing module corresponding to the second sub-intent.
[0117] In some embodiments, step 205 can be specifically implemented as steps 205a to 205c.
[0118] Step 205a: The multi-intent response processing device stores the semantically complete response data block of the first sub-intent into the distributed context cache.
[0119] In some embodiments, the Distributed Context Cache functions not as a simple list, but as a high-performance, low-latency key-value store (such as Redis or an in-memory hash table) for storing the historical PCRs of all sub-intents and their metadata (such as intent ID, generation timestamp, and confidence level). It maintains a context chain for each session, allowing subsequent intents to access the complete historical context of all preceding intents they depend on.
[0120] In some embodiments, the aforementioned context chain refers to the cache maintaining a logical context chain for each user session. This is essentially a versioned linked list structure that stores the PCRs and their metadata generated by all sub-intents within the session in chronological order. This structure supports fast appending and range queries, enabling subsequent intents to retrieve the complete historical context of their dependencies.
[0121] Step 205b: The multi-intent response processing device calls the prompt word dynamic assembler to construct a new prompt word containing the new context for the second sub-intent based on the historical context in the distributed context cache.
[0122] In some embodiments, the distributed context cache described above maintains a context chain for each user session; the context chain is used to store historically semantically complete response data blocks and their metadata for all sub-intents in the order of generation. The prompt word dynamic assembler described above constructs new prompt words containing complete historical context for subsequent sub-intents by querying the context chain.
[0123] In some embodiments, the aforementioned prompt word dynamic assembler is a component responsible for constructing or revising input prompt words for the Large Language Model (LLM). Its function is to dynamically construct new prompt words based on instructions from the streaming scheduling and coordination engine and the content in the context cache. The prompt word dynamic assembler, according to instructions from the streaming scheduling and coordination engine, queries the distributed context cache to retrieve the relevant context required by the second sub-intent (I2) (e.g., the news headlines just stored from I1), and dynamically inserts it into the original prompt word of the second sub-intent using a predefined template (String Interpolation), forming a new prompt word containing specific context. For example, "Generate a summary for each headline." is assembled into "Now start generating summaries for the following news headlines: [the headlines just injected]".
[0124] In some embodiments, the operation of injecting new prompt words into the dedicated processing module corresponding to subsequent sub-intents is achieved by updating the prompt word context in real time to the ongoing streaming process through a long connection channel of WebSocket or gRPC stream.
[0125] Step 205c: The multi-intent response processing device sends the new prompt word to the dedicated processing module corresponding to the second sub-intent through the streaming processing channel of the second sub-intent, so as to update the processing context of the dedicated processing module corresponding to the second sub-intent and regenerate the streaming response data.
[0126] In some embodiments, when the semantic integrity monitor determines that a Partial Complete Response (PCR) has been generated (e.g., a news headline has just been fully generated), it immediately triggers an OnPartialComplete event. This event carries the complete content (such as a headline) and the intent ID. Upon receiving this event, the coordination engine invokes the prompt dynamic assembler. The streaming scheduling and coordination engine injects this new prompt in real time into subsequent sub-intent processing processes that have not yet started or ended, via a long-lived connection channel.
[0127] It is understandable that the streaming scheduling and coordination engine sends the newly assembled prompt words to the corresponding dedicated processing module through the streaming processing channel of the second sub-intent. For LLM services that support hot updates of prompt words, this means that without interrupting the existing streaming connection, the context conditions of its generation task can be modified in real time, driving it to continue generating or start generating subsequent streaming response data based on the new information.
[0128] Thus, dynamic context injection is achieved through a complete process of distributed caching storage -> dynamic assembly of prompt words -> real-time sending of updates. The distributed cache ensures reliable storage and cross-module sharing of context state, guaranteeing context consistency in high-concurrency environments. The prompt word dynamic assembler intelligently constructs new prompt words containing new context, enabling subsequent processing modules to accurately and efficiently utilize previous results, ensuring high semantic coherence in multi-intent responses. Real-time updates of the processing module's context through streaming channels realize pipelined operations, significantly advancing the initiation of subsequent tasks and thus reducing overall response time.
[0129] Step 206: The multi-intent response processing device, based on dependency information, controls the output of semantically complete response data blocks of all sub-intents to the client.
[0130] In some embodiments, step 206 can be specifically implemented as steps 206a to 206e.
[0131] Step 206a: The multi-intent response processing device creates a global output queue in the stream output sequence controller.
[0132] In some embodiments, the multi-intent response processing apparatus maintains a globally unique, thread-safe first-in-first-out queue in the memory of the stream output sequence controller via the stream output sequence controller.
[0133] Step 206b: The multi-intent response processing device sends the semantically complete response data block of each sub-intent to the stream output sequence controller.
[0134] Step 206c: The multi-intent response processing device, through the stream output sequence controller, determines whether the response data block of the subsequent sub-intent is allowed to be added to the global output queue according to the order indicated by the dependency information.
[0135] In some embodiments, the order indicated by the dependency information above is the dynamic execution dependency graph, which defines a partial order relation, meaning that certain sub-intents (later ones) must wait for all their directly or indirectly dependent sub-intents (earlier ones) to complete execution and output before their output can begin in a logical order. For example, if the dynamic execution dependency graph is defined as I1->I2 and I1->I3, then the output order must ensure that all outputs of I1 precede any outputs of I2 and I3.
[0136] In some embodiments, the stream output sequence controller internally maintains an output state machine for each sub-intention, with states including waiting, outputting, and output complete. The stream output sequence controller checks whether the following two conditions are met simultaneously: Dependency condition met: Query the DAG to confirm that the output status of all the "preceding sub-intents" (i.e. all the preceding tasks it depends on) of the "sub-intent that is currently being queued" has reached the point of completion. This means that all semantically complete response data blocks generated by the preceding tasks that should logically precede it have been received by the client. Queue clearing condition (optional, to enhance robustness): Check if there are any data blocks belonging to the above "previous sub-intents" in the global output queue. This is a secondary confirmation to ensure that all data on the dependency chain has been completely cleared.
[0137] If the conditions are met, the stream output sequence controller allows the response data block of the current "sub-intent" to enter the global output queue and may set its state from waiting to output.
[0138] If any condition is not met, the stream output sequence controller will refuse to enqueue the data block and temporarily store it in a temporary buffer bound to the sub-intent, waiting for its dependent conditions to be met before trying again.
[0139] Step 206d: If all response data blocks of the preceding sub-intents that the subsequent sub-intent depends on have been output from the global output queue to the client, the multi-intent response processing device will add the response data blocks of the subsequent sub-intent to the global output queue.
[0140] In some embodiments, all PCRs of sub-intents are sent to the stream output sequence controller after generation. The stream output sequence controller follows the order defined by the dynamic execution dependency graph. Internally, the stream output sequence controller maintains the output state of each sub-intent. A sub-intent's PCR is only allowed to enter the global output queue after all its preceding dependent sub-intents' PCRs have been output from the global queue to the client. This is a strong ordering guarantee based on dependencies, solving the out-of-order problem caused by concurrent streams at the final output level.
[0141] Step 206e: The multi-intent response processing device outputs the response data blocks located in the global output queue to the client in the order indicated by the dependency information.
[0142] In some embodiments, the streaming output sequence controller maintains a global output queue. Only when all PCRs for the current intent have been output and the engine determines that its semantics are complete (or timed out) will the PCRs for the next intent be allowed to enter the output queue, which ensures macroscopic order. The streaming output sequence controller transmits the PCRs in the global output queue sequentially to the client via the network. The client receives a logically coherent and correctly ordered streaming response, presenting a document-growing visual effect.
[0143] Thus, by maintaining a global output queue through a stream output sequence controller and controlling the queuing order of data blocks based on dependencies, macroscopically ordered output is achieved. Strong sequence control of the final output through a central controller avoids the problems of client-side content chaos and poor readability caused by multiple concurrent streams outputting independently. Using the completion of all prior dependent tasks as the trigger condition for queuing subsequent task data blocks ensures absolute logical correctness, achieving a unity of micro-level concurrency and macro-level order, providing users with a fast and clearly structured interactive experience.
[0144] It is understandable that the streaming scheduling and coordination engine can receive multiple sub-intents and initial dependencies generated by the NLU module; concurrently initiate streaming processing requests for sub-intents to multiple dedicated processing modules; during streaming processing, the Semantic Completeness Monitor (SCM) analyzes the returned data stream in real time and determines whether the data block reaches the semantic completeness threshold based on a predefined set of semantic completeness rules or a lightweight real-time machine learning model; if it does, a context injection event is triggered, and the current staged complete response (PCR) is captured; the prompt word dynamic assembler is called to construct new prompt words for subsequent dependent sub-intents based on the PCR and the historical context in the distributed context cache; the new prompt words are injected into the dedicated processing module corresponding to the subsequent sub-intent through the real-time streaming connection channel to drive it to continue generating based on the updated context; and the streaming output sequence controller in the streaming scheduling and coordination engine controls the output of PCR data blocks of all sub-intents to the client in dependency order.
[0145] In the multi-intent response processing method provided in this application, after receiving a user request, streaming processing requests are initiated concurrently to each dedicated processing module, and semantically complete data blocks in each sub-intent response stream are monitored in real time. Upon recognizing that the preceding sub-intent (first sub-intent) has generated a valid semantically complete unit, i.e., based on pre-generated dependency information, the context update and content regeneration of the subsequent sub-intent (second sub-intent) are dynamically triggered. This event-driven, fine-grained triggering mechanism replaces the coarse-grained synchronization method of traditional solutions that must wait for the entire task flow to finish, thereby reducing system first-word latency and overall response time. Simultaneously, because subsequent sub-intents... The processing can instantly utilize the deterministic context generated by the preceding sub-intents, ensuring a high degree of semantic coherence in the output content of different task modules. Finally, by using dependency information to globally control the output content of all sub-intents, the final result presented to the user strictly follows the logical order in a macroscopic way, despite the high concurrency of internal processing. This avoids the content chaos caused by concurrent streaming output, and as a whole, it achieves low latency, high coherence, and strong order in multi-intent streaming response output. While maintaining the advantages of low latency and high throughput brought by modular concurrent execution, it ensures that its streaming output results are highly coherent at the semantic level.
[0146] The multi-intent response processing method of this application is described below with reference to specific embodiments.
[0147] like Figure 5 The diagram shown is a schematic representation of a semantic integrity determination process provided in an embodiment of this application. The specific process is as follows: Client: Sends a request to the system, which is a single, ordered, and coherent SSE stream.
[0148] Among them, the SSE stream is the Server-Sent Events stream.
[0149] API Gateway: Receives the SSE stream from the client, converts it into an ordered stream of data blocks, and continues to pass it on.
[0150] Request branch and NUI service output sub-intent list and initial DAG: The request enters the request branch and NUI service, which analyzes the request content and outputs a sub-intent list and initial DAG (directed acyclic graph) for subsequent process scheduling and execution planning.
[0151] The core engine, the flow scheduling and coordination engine, receives the list of sub-intents and the initial DAG, and begins the flow scheduling and coordination of the process. The flow scheduling and coordination engine simultaneously performs the following operations: querying / updating the context; assembling new prompt words; and constructing new prompt words for I2 according to instructions.
[0152] The distributed context cache and the prompt word assembler work together: the distributed context cache provides context support, and the prompt word assembler dynamically assembles prompt words according to engine instructions.
[0153] Inject new prompt words: Inject new prompt words into processing modules / service groups. The newly constructed prompt words are injected into each processing module / service group, including: Module 1: Generate Intent 1 stream; Module 2: Generate Intent 2 stream; Module N: Generate Intent N stream.
[0154] Streaming data blocks: While a module (e.g., module 1: generating Intent1 stream) generates streaming data blocks, these data blocks are sent in real time and in parallel to the Semantic Completeness Monitor (SCM) within the core engine for analysis.
[0155] The OnPartialComplete event carries a PCR: each module processes the intent stream in parallel or in DAG order; when a module completes part of the processing, the OnPartialComplete event is triggered, carrying the PCR.
[0156] Semantic Completeness Monitor (SCM) (located within the engine): Performs semantic integrity checks on the output to ensure the coherence and rationality of the intent flow.
[0157] If the semantic completeness requirement is met, the result can be returned to the client or enter the next round of scheduling; otherwise, the engine may reschedule or reassemble the prompt words and return to the flow scheduling and coordination engine to continue execution.
[0158] Once all intent streams have been processed and semantic integrity has been verified, the final result is returned to the client via the API gateway.
[0159] It is understandable that this process involves refining the coarse-grained "stream completion" event into a series of semantically driven fine-grained "stage completion" events. This allows the timing of context injection and subsequent task initiation to be brought forward, forming a pattern of multiple pipelines executing in parallel, rather than a simple "concurrency-wait-sequence" pattern.
[0160] After receiving a user request, the engine first calls the NLU module for parsing to obtain a list of sub-intents and an initial dependency graph (DAG). Then, the engine concurrently sends streaming requests to all relevant dedicated processing modules. For the return stream of each sub-intent, the engine activates the corresponding Semantic Completeness Monitor (SCM) for real-time analysis. Based on rules or models, the SCM immediately triggers an event once a Partial Complete Response (PCR) is identified. The engine captures this event, stores the PCR in a distributed cache, and then immediately calls the prompt assembler to generate new, context-rich prompts for all subsequent sub-intents that depend on this PCR. The engine injects these new prompts in real-time into subsequent sub-intent processing processes that have not yet started or finished via a long-lived connection. Simultaneously, the output sequence controller ensures that PCR blocks are output to the client strictly according to the logical dependency order between intents.
[0161] It should be noted that the description of the solution in this embodiment can be found in the above embodiments, and will not be repeated here.
[0162] like Figure 6 The diagram shown is a schematic representation of the entire process of multi-intent response processing provided in an embodiment of this application. The specific process is as follows: Start: Receive a user's multi-intent request.
[0163] For example, a user requests to "crawl the news headlines from the homepage of University A's official website and then generate a summary for each headline". NLU resolves the list of sub-intents and the initial dependency DAG.
[0164] For example, NLU identifies two sub-intents: I1: Crawling news headlines, with the initial prompt I1_Prompt="Crawling news headlines from the homepage of University A's official website and returning them in list format". I2: Generate a summary. Its initial prompt is I2_Prompt="Generate a summary for each heading". Meanwhile, NLU analysis revealed that I2 depends on the output of I1.
[0165] The coordination engine concurrently initiates streaming requests for all sub-intents, with the initial prompt word being the original prompt word.
[0166] The coordination engine initiates streaming requests for all sub-intents concurrently based on the DAG. For each intent, the initial prompt word is the original prompt word.
[0167] Initialize the distributed context cache: used to store shared data generated during the process.
[0168] For example, the coordination engine sends requests to both the crawling module (processing I1) and the summarizing module (processing I2) simultaneously. However, since I2 depends on I1, the summarizing module will be in a waiting state until it receives the result from I1.
[0169] Core Loop: Processes each streaming data block. The system enters the core loop to process each streaming data block. Specifically, this includes: The Semantic Completeness Monitor (SCM) analyzes incoming data blocks in real time to determine whether they constitute a complete semantic unit.
[0170] For example, the crawler module returns the first data block: "1. University A held an artificial intelligence seminar to discuss future development directions\n". The rule engine within SCM detected the numeric sequence number and newline character, which match the rules for a complete list item.
[0171] If the data block is irregular text, SCM will call a lightweight ML model to identify semantic boundaries (such as periods) to determine integrity.
[0172] Whether the semantic integrity threshold has been reached: integrity judgment and event triggering, SCM determines whether the current data block has reached the semantic integrity threshold.
[0173] If not (i.e., the semantic integrity threshold has not been reached), then proceed as follows: Continue monitoring the next data block. That is, wait for the next data block and continue analysis by SCM.
[0174] If so (i.e., the semantic integrity threshold is reached), then execute: SCM triggers the OnPartialComplete event, capturing the Partial Complete Response (PCR).
[0175] For example, the SCM trigger event captures the first PCR (PCR1): "University A holds an artificial intelligence seminar to discuss future development directions".
[0176] Appending the PCR to the distributed context cache: After updating the context and dynamic prompt word assembly, the system appends the captured PCR to the distributed context cache. The system then displays a dynamically linked table, explicitly indicating which subsequent sub-intents depend on the PCR generated this time.
[0177] Cue word dynamic assembler: Constructs new cue words for successors that depend on this PCR.
[0178] The coordination engine constructs new prompts for successor intentions that depend on this PCR based on the new context through a prompt dynamic assembler.
[0179] For example, the engine stores PCR1 in its cache. Recognizing that I2 depends on this PCR1, it dynamically assembles new prompts, such as: "Please generate a summary for the following news headline: 'University A hosts an artificial intelligence workshop to discuss future development directions.'"
[0180] The coordination engine injects new prompts into the processing of subsequent child intents in real time.
[0181] The successor intent can immediately begin or continue streaming generation based on the new context.
[0182] For example, the summarization module (I2) receives a new prompt to generate a summary for the first title and immediately begins streaming the summary content. Meanwhile, the crawler module (I1) may be fetching the second title, and the system enters a parallel pipeline mode.
[0183] Whether all sub-intent processing is complete: that is, the coordination engine determines.
[0184] If not (i.e. not completed): the process returns to the core loop to process subsequent data blocks.
[0185] If yes (i.e., completed): the process continues to the next step.
[0186] Sending end-of-stream flag: End and persistence, the coordination engine sends an end-of-stream flag to the client.
[0187] Persist the complete dialogue content and context for later use.
[0188] The entire process is now complete.
[0189] For example, suppose the scenario is: "Scrape the news headlines from the homepage of University A's official website, and then generate a summary for each headline." I1_Prompt = "Scrape the news titles from the homepage of University A's official website and return them as a list." I2_Prompt = "Generate a summary for each heading". NLU analysis: Two sub-intents were identified, and it was analyzed that the output of I2 depends on the output of I1.
[0190] Workflow: 1. Initial and concurrent requests: The engine concurrently requests the crawler module (I1) and the summary module (I2).
[0191] 2. Semantic monitoring and dynamic injection: a. Monitoring and triggering of SCM (rule set-driven scenarios): The crawler module begins streaming data. Let's assume the first data block returned is: "1. University A held an artificial intelligence seminar to discuss future development directions\n".
[0192] SCM analyzes the data block in real time. The list item rule in the rule engine is activated because it detects a pattern starting with "1." Simultaneously, the punctuation rule detects the trailing newline character \n.
[0193] If the triggering conditions are met, SCM immediately triggers the OnPartialComplete event. The PCR1 carried by the event is: "University A held an artificial intelligence seminar to discuss future development directions" (Note: Serial number 1 may be stripped or retained by the rules, depending on the specific implementation).
[0194] The engine stores PCR1 in the context cache and triggers the prompt word dynamic assembler to build a new prompt word for the I2 module.
[0195] b. Monitoring and triggering of SCM (model-driven scenarios): Suppose the data returned by the web crawler module is not in a very regular format, lacking sequence numbers and line breaks, but instead consisting of continuous text: "News: A University's Artificial Intelligence Symposium opens today, with numerous experts in attendance. Another piece of news: The Materials Science Laboratory achieves a new breakthrough." The rule engine cannot effectively segment the data using simple rules.
[0196] SMC feeds the current data block and its context into a lightweight ML model.
[0197] The model analyzes the input sequence. After the period at the point “Opening ceremony, attended by many experts.”, the model outputs a high confidence score (0.98), indicating that this is a very strong semantic boundary.
[0198] SMC thus triggers the first OnPartialComplete event, PCR1, which reads: "News: University A's Artificial Intelligence Symposium opens today, with many experts in attendance."
[0199] The model then continues to analyze the remaining text, “Another message: Materials Science Laboratory achieves new breakthrough.”, triggering again at the period to generate PCR2.
[0200] 3. Ordered output control: The coordination engine ensures the output order. It first allows the PCR1 data block from the I1 module to finish outputting (i.e., the user sees the title "1. University A hosts an artificial intelligence workshop\n"), and then allows the summary data block generated by the I2 module to be output.
[0201] 4. Parallel pipelines: Meanwhile, the crawler module I1 might still be retrieving the second title, "2. Our university's research team has made a breakthrough in the field of materials." SCM will trigger the event again, and the engine will inject the second title into module I2. After completing the first abstract, module I2 will immediately begin processing the second abstract. This process repeats, forming a pipeline-like processing flow between modules I1 and I2.
[0202] 5. Final output: The user client sees a completely ordered and coherent stream: [I1]1. University A held an artificial intelligence workshop.
[0203] [I2] Abstract: This workshop focuses on A.
[0204] [I1]2. Our school's research team has made breakthroughs in the field of materials.
[0205] [I2] Abstract: This breakthrough means B.
[0206] This solution achieves high semantic coherence. Through a dynamic context injection mechanism, subsequent sub-intents can reliably and timely acquire and utilize the effective context generated by previous sub-intents, ensuring the logical connection and semantic coherence of the output content of multiple processing tasks. It guarantees the logical orderliness of the macro-output. Strong control of the output sequence by the central scheduler ensures that, despite concurrent internal processing, the streaming content presented to the user is strictly organized according to the logical dependencies between sub-intents, fundamentally solving the problem of chaotic and disordered output and improving the readability and comprehensibility of the content. It reduces system response latency by introducing a fine-grained semantic unit completion event triggering mechanism, advancing the timing of context transmission and task triggering from the end of the stream to the completion of the semantic unit, forming a pipeline-like parallel processing, thereby reducing the user-perceived first-word delay and overall response time. It provides a smooth and natural interactive experience, ultimately presenting the user with a document-growing streaming output effect. Users can quickly see the beginning of the response and observe the subsequent content being presented coherently and smoothly while maintaining a strict logical order, achieving a high-quality interactive experience with low latency and high coherence. Thus, this solution utilizes a real-time triggering mechanism based on semantic integrity monitoring: by analyzing streaming data blocks in real time through the SCM component, events are triggered immediately when a semantic unit is complete, rather than waiting for the entire stream to end, achieving extremely low latency and true dynamism. Distributed context state management: In high-concurrency environments, a dedicated distributed buffer efficiently and reliably manages the context history of all sessions, solving the global state sharing problem in multi-intent streaming processing. Fine-grained pipelined ordered output control: Tasks are broken down into fine-grained PCRs, and the output order of PCRs with different intents is strictly controlled by a central scheduler, achieving a unity of macro-level ordering and micro-level concurrency.
[0207] Figure 7 This is a schematic diagram of the architecture of a multi-intent response processing system provided in an embodiment of this application. The multi-intent response processing system 800 may include: a natural language understanding and intent dependency parsing module 801, a streaming scheduling and coordination engine 802, a semantic integrity monitor 803, a dedicated processing module 804, a distributed context buffer 805, and a prompt word dynamic assembler 806.
[0208] The streaming scheduling and coordination engine 802 is connected to the natural language understanding and intent dependency parsing module 801; the semantic integrity monitor 803 is integrated into or independent of the streaming scheduling and coordination engine 802; the distributed context buffer 805 is connected to the streaming scheduling and coordination engine 802; and the prompt word dynamic assembler 806 is connected to the streaming scheduling and coordination engine 802.
[0209] The aforementioned natural language understanding and intent dependency parsing module 801 is used to receive user requests, parse user requests, and identify the sub-intent list I1, I2, ..., I n and its original prompt words P1, P2, ..., P n This module not only performs intent recognition but also incorporates a lightweight dependency analyzer. Based on predefined rules or a small neural network model, this analyzer initially determines the logical dependencies between intents (e.g., I2 depends on I1) and outputs an initial dynamic execution dependency graph (DAG). This DAG is not fixed but can be dynamically adjusted by the subsequent coordination engine based on real-time conditions. This is applied to step 201 and related solutions described above.
[0210] The aforementioned streaming scheduling and coordination engine 802 is used to create and manage the lifecycle of streaming processing for all sub-intents, and concurrently initiate streaming requests to all relevant dedicated processing modules; it is also used to determine the second sub-intent that depends on the first sub-intent based on dependency information when the semantic integrity monitor determines that the streaming response data of the first sub-intent contains a semantically complete response data block; and based on the semantically complete response data block of the first sub-intent, to trigger the dedicated processing module corresponding to the second sub-intent to regenerate the streaming response data; and finally, based on dependency information, to control the output of the semantically complete response data blocks of all sub-intents to the client. In step 202, a streaming processing request is initiated to the corresponding dedicated processing module through the streaming processing channel of each sub-intent, and streaming response data and its related schemes are received from the dedicated processing module; in step 204, based on dependency information, a second sub-intent and its related schemes that depend on the first sub-intent are determined from at least two sub-intents; in step 205, based on the semantically complete response data block of the first sub-intent, streaming response data and its related schemes are regenerated through the dedicated processing module corresponding to the second sub-intent; in step 206, based on dependency information, the semantically complete response data blocks of all sub-intents are controlled to be output to the client and its related schemes.
[0211] The aforementioned semantic integrity monitor 803 continuously monitors the output data blocks of each sub-intent stream. Instead of simply waiting for the stream to end, it evaluates each data block based on a predefined set of semantic integrity rules or a lightweight real-time model. When it determines that a semantically complete response data block exists within the streaming response data belonging to the first sub-intent, it triggers a context update event. This is applied in step 203 to parse the currently received first streaming response data, determining whether the first streaming response data contains a semantically complete response data block and its related scheme. Specific implementations include the related schemes in steps 203a to 203c, and steps 203d to 203g.
[0212] It is understandable that the Semantic Integrity Monitor (SCM) evaluates each data block based on a predefined set of semantic integrity rules or a lightweight real-time model. SCM is not a black box; internally, it consists of multi-level, configurable decision mechanisms designed to identify semantic boundaries in streaming data in real-time with high accuracy and low latency. The following is an explanation of its two main implementation methods: Semantic integrity determination based on multi-modal rule sets: suitable for scenarios with clear intent and relatively predictable output structure. The rule set adopts a priority matching strategy, meaning that once any rule is triggered, it is determined that a phased complete response (PCR) has been generated. The rule set includes, but is not limited to, the following types and can be dynamically loaded and configured: Punctuation Rules: A. Sentence Termination Rule: If a data block contains sentence termination punctuation marks such as period (.), question mark (?), exclamation mark (!), ellipsis (...), etc., and is immediately followed by a space or newline, then the preceding text is considered to constitute a complete sentence.
[0213] B. Quotation and bracket closure rules: If a pair of quotation marks (such as "") and brackets (such as (), [], {}) are detected to achieve opening and closing matching, then the content inside the brackets is determined to be a complete unit.
[0214] C. Separator Rules: Specific separators, such as newline (\n) and carriage return (\r\n), are detected. These are often used to separate list items and paragraphs.
[0215] Data Structure Rules: A. List item rules: If a text line is detected to begin with a number, letter, or bullet point, then the line is considered a complete list item.
[0216] B. Structured Data Rules: For streaming output of structured data such as JSON, XML, and YAML, monitor its syntax closure. For example, detect} or ] to close a JSON object or array; detect to close an XML tag. Lightweight parsers (such as state machines) can be used for real-time syntax analysis.
[0217] C. Table row rules: If a row separator (|---|) is detected in a Markdown table or a tag in an HTML table, it is determined that a row of table data is complete.
[0218] Keyword Trigger Rules: A. Summary vocabulary rule: The detection of summary phrases such as "in conclusion", "in summary", "therefore", and "the conclusion is" indicates that the preceding argument has come to an end.
[0219] B. Transitional vocabulary rules: Detecting words such as "on the other hand," "next," and "in addition" indicates the end of one semantic paragraph and the beginning of another.
[0220] C. Task completion declaration rules: When phrases such as "Completed", "Generated", or "Query results are as follows" are detected, clearly declaring the completion of a task phase, they are used.
[0221] Length & Timeout Rules (Auxiliary Rules): A. Maximum Length Truncation Rule: To prevent infinite waiting, when the length of a single data block or the cumulative data exceeds a preset threshold (e.g., 1024 characters), it is forcibly identified as a PCR and triggered. This ensures the robustness of the system.
[0222] B. Timeout rule: If no new data is received and no other rules are triggered within a time window (e.g., 500 milliseconds), the currently buffered data will be forced as a PCR trigger to avoid system lag.
[0223] The aforementioned dedicated processing module 804 consists of multiple dedicated processing modules, each responsible for processing a specific type of sub-intent. These modules support streaming output and can adjust the generation process according to the dynamically injected context. In step 202, it initiates a streaming processing request to the corresponding dedicated processing module through the streaming processing channel of each sub-intent and receives streaming response data and related schemes from the dedicated processing module.
[0224] The aforementioned distributed context cache 805 is used to store the historical PCRs and their metadata for all sub-intents; its data structure is specially designed to support fast querying, appending, and version management; it maintains a context chain for each session, allowing subsequent intents to access the complete historical context of all preceding intents they depend on. It is used in step 205a to store the semantically complete response data block of the first sub-intent to the distributed context cache and its related scheme.
[0225] The aforementioned prompt word dynamic assembler 806 is used to dynamically construct new prompt words based on instructions from the coordination engine and content in the context cache. Its assembly logic is intelligent; for example, for a newly injected news headline, the prompt word it constructs for the summary module might be: "Now start generating summaries for the following news headlines: [newly injected headline]", instead of waiting for all headlines. This achieves extremely streamlined operation and low latency. Applied to step 205b, the prompt word dynamic assembler is invoked to construct new prompt words containing the new context and their related schemes for the second sub-intent based on the historical context in the distributed context cache.
[0226] Thus, the natural language understanding and intent dependency parsing module 801 receives user requests and generates sub-intents and dependency information; the streaming scheduling and coordination engine 802 concurrently initiates streaming processing requests to the dedicated processing module 804; the semantic integrity monitor 803 listens to the streaming response data of each sub-intent and identifies semantically complete response data blocks; when a semantically complete response data block is identified, the distributed context cache 805 stores the data block; the prompt word dynamic assembler 806 constructs new prompt words based on the cached historical context; the streaming scheduling and coordination engine 802 sends the new prompt words to the dedicated processing modules of subsequent sub-intents; finally, the streaming output sequence controller controls the output of all sub-intent response data blocks to the client in dependency order.
[0227] Through the collaborative work of the above modules, this system achieves the goal of maintaining the advantages of low latency and high throughput brought about by modular concurrent execution, while ensuring that its streaming output results are highly consistent at the semantic level.
[0228] It should be noted that for a detailed explanation of the steps performed by each module and their beneficial effects, please refer to the description in the above embodiments, which will not be repeated here.
[0229] As can be seen, the above mainly describes the solutions provided by the embodiments of this application from a methodological perspective. To achieve the above functions, the embodiments of this application provide corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, in conjunction with the modules and algorithm steps of the various examples described in the embodiments disclosed herein, the embodiments of this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0230] This application embodiment can divide the multi-intent response processing device into functional modules according to the above method example. For example, each function can be divided into its own functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. Optionally, the module division in this application embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.
[0231] In some embodiments, this application also provides a multi-intent response processing apparatus. The multi-intent response processing apparatus may include one or more functional modules for implementing the multi-intent response processing method of the above method embodiments.
[0232] For example, Figure 8 This is a schematic diagram illustrating the composition of a multi-intent response processing device provided in an embodiment of this application. Figure 8 As shown, the multi-intent response processing device 900 includes: a receiving module 901, a processing module 902, a sending module 903, and a determining module 904.
[0233] The receiving module 901 is used to receive user requests; the processing module 902 is used to parse user requests and generate at least two sub-intents and dependency information of at least two sub-intents; the sending module 903 is used to initiate a streaming processing request to the corresponding dedicated processing module 902 through the streaming processing channel of each sub-intent; the receiving module 901 is also used to receive streaming response data from the dedicated processing module 902; and the determining module 904 is used to parse the currently received first streaming response data and determine whether the first streaming response data contains a semantically complete response data block. The first streaming response data corresponds to the first sub-intention among at least two sub-intentions; the determining module 904 is further configured to, when the first streaming response data contains a semantically complete response data block, determine a second sub-intention that depends on the first sub-intention from at least two sub-intentions based on dependency information; the processing module 902 is further configured to, based on the semantically complete response data block of the first sub-intention, regenerate the streaming response data through the dedicated processing module 902 corresponding to the second sub-intention; the processing module 902 is further configured to, based on dependency information, control the output of semantically complete response data blocks of all sub-intentions to the client.
[0234] In some embodiments, the determining module 904 is specifically used to: parse the first streaming response data to obtain the text structure and grammatical features of each data block in the first streaming response data; match the text structure and grammatical features of each data block with semantic integrity rules; if the text structure and grammatical features of a first data block satisfy the semantic integrity rules, then determine the first data block as a semantically complete response data block in the first streaming response data; wherein the semantic integrity rules include at least one of the following: punctuation rules, used to characterize the detection of sentence termination marks, paired parentheses closures, or paired quotation marks closures; data structure rules, used to characterize the detection of list item identifiers, target grammatical structure closures, or table row markers; keyword triggering rules, used to characterize the detection of predefined summarizing words, transitional words, or task completion declaration words.
[0235] In other embodiments, the determining module 904 is specifically used to: parse the first streaming response data to obtain data blocks in the first streaming response data; concatenate each data block with the corresponding historical context information to obtain a sliding window text fragment corresponding to each data block; use a machine learning model to infer the sliding window text fragment corresponding to each data block to obtain a confidence score for each data block, which is used to characterize the probability that the data block is a semantic boundary; if the confidence score of a second data block is greater than a preset threshold, then the second data block is determined to be a semantically complete response data block in the first streaming response data.
[0236] In some other embodiments, the determining module 904 is specifically used to: store the sliding window text fragment corresponding to each data block into a circular buffer in the semantic integrity monitor; sequentially retrieve the sliding window text fragment corresponding to each data block from the circular buffer through each model inference thread in the semantic integrity monitor; call the machine learning model through each model inference thread to infer the sliding window text fragment corresponding to each data block to obtain the confidence score of each data block; and return the confidence score of each data block to the main decision logic of the semantic integrity monitor to determine whether the data block is semantically complete.
[0237] In some other embodiments, the processing module 902 is specifically used to: store the semantically complete response data block of the first sub-intention to a distributed context cache; call the prompt word dynamic assembler to construct a new prompt word containing the new context for the second sub-intention based on the historical context in the distributed context cache; and send the new prompt word to the dedicated processing module 902 corresponding to the second sub-intention through the streaming processing channel of the second sub-intention to update the processing context of the dedicated processing module 902 corresponding to the second sub-intention and regenerate the streaming response data.
[0238] In some other embodiments, the processing module 902 described above is specifically used to: create a global output queue in the stream output sequence controller; send the semantically complete response data block of each sub-intent to the stream output sequence controller; determine, through the stream output sequence controller, whether it is currently allowed to add the response data block of the subsequent sub-intent to the global output queue according to the order indicated by the dependency information; if the response data blocks of all previous sub-intents that the subsequent sub-intent depends on have been output from the global output queue to the client, then add the response data block of the subsequent sub-intent to the global output queue; and output the response data blocks located in the global output queue to the client according to the order indicated by the dependency information.
[0239] It should be noted that the multi-intent response processing device can implement all the processes implemented in the above method embodiments and achieve the same beneficial effects. To avoid repetition, it will not be described again here.
[0240] In the case where the functions of the integrated modules described above are implemented in hardware, this application provides a possible structural schematic diagram of the electronic device involved in the above embodiments. For example... Figure 9 As shown, the electronic device 90 includes: a processor 92, a communication interface 93, and a bus 94. Optionally, the electronic device 90 may also include a memory 91.
[0241] Processor 92 may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 92 may be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 92 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0242] Communication interface 93 is used to connect with other devices via a communication network. This communication network can be Ethernet, wireless access network, wireless local area network (WLAN), etc.
[0243] The memory 91 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto.
[0244] As one possible implementation, the memory 91 can exist independently of the processor 92. The memory 91 can be connected to the processor 92 via a bus 94 and is used to store instructions or program code. When the processor 92 calls and executes the instructions or program code stored in the memory 91, it can implement the multi-intent response processing method provided in the embodiments of this application.
[0245] In another possible implementation, memory 91 can also be integrated with processor 92.
[0246] Bus 94 can be an Extended Industry Standard Architecture (EISA) bus, etc. Bus 94 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 9 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0247] Through the above description of the implementation methods, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the service calling device can be divided into different functional modules to complete all or part of the functions described above.
[0248] This application also provides a computer-readable storage medium. All or part of the processes in the above method embodiments can be executed by computer instructions instructing related hardware. The program can be stored in the aforementioned computer-readable storage medium, and when executed, it can include the processes of the above method embodiments. The computer-readable storage medium can be any of the foregoing embodiments or memory. The aforementioned computer-readable storage medium can also be an external storage device of the aforementioned service invocation device, such as a plug-in hard drive, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the aforementioned service invocation device. Further, the aforementioned computer-readable storage medium can include both internal storage units of the aforementioned service invocation device and external storage devices. The aforementioned computer-readable storage medium is used to store the aforementioned computer program and other programs and data required by the aforementioned service invocation device. The aforementioned computer-readable storage medium can also be used to temporarily store data that has been output or will be output.
[0249] This application also provides a computer program product comprising a computer program that, when run on a computer, causes the computer to execute any of the multi-intent response processing methods provided in the above embodiments.
[0250] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A multi-intent response processing method, characterized by, The method comprises the following steps: receiving a user request and parsing the user request to generate at least two sub-intents and dependency information of the at least two sub-intents; initiating a streaming processing request to a corresponding special processing module through a streaming processing channel of each sub-intent, and receiving streaming response data from the special processing module; parsing the first streaming response data currently received to determine whether the first streaming response data contains a semantically complete response data block, the first streaming response data corresponding to a first sub-intent of the at least two sub-intents; in the case that the first streaming response data contains a semantically complete response data block, determining a second sub-intent dependent on the first sub-intent from the at least two sub-intents according to the dependency information; re-generating streaming response data through the special processing module corresponding to the second sub-intent based on the semantically complete response data block of the first sub-intent; controlling the output of the semantically complete response data blocks of all sub-intents to the client based on the dependency information.
2. The multi-intent response processing method of claim 1, wherein, The parsing of the first streaming response data currently received to determine whether the first streaming response data contains a semantically complete response data block comprises: parsing the first streaming response data to obtain the text structure and syntax features of each data block in the first streaming response data; matching the text structure and syntax features of each data block with a semantic completeness rule; if the text structure and syntax features of a first data block meet the semantic completeness rule, determining that the first data block is a semantically complete response data block in the first streaming response data; wherein the semantic completeness rule comprises at least one of the following: a punctuation rule for indicating that a sentence end symbol, a pair of parentheses is closed, or a pair of quotation marks is closed is detected; a data structure rule for indicating that a list item identifier, a target syntax structure is closed, or a table row marker is detected; a keyword trigger rule for indicating that a predefined summary vocabulary, a transitional vocabulary, or a task completion announcement vocabulary is detected.
3. The multi-intent response processing method of claim 1, wherein, The parsing of the first streaming response data currently received to determine whether the first streaming response data contains a semantically complete response data block comprises: parsing the first streaming response data to obtain the data blocks in the first streaming response data; splicing each data block with corresponding historical context information to obtain a sliding window text segment corresponding to each data block; using a machine learning model to infer the sliding window text segment corresponding to each data block to obtain a confidence score of each data block, the confidence score representing the probability that the data block is a semantic boundary; if the confidence score of a second data block is greater than a preset threshold, determining that the second data block is a semantically complete response data block in the first streaming response data.
4. The multi-intent response processing method of claim 3, wherein, The using of a machine learning model to infer the sliding window text segment corresponding to each data block to obtain a confidence score of each data block comprises: storing the sliding window text segment corresponding to each data block in a ring buffer in a semantic completeness monitor; The semantic integrity monitor sequentially obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; 5. The multi-intent response processing method of claim 1, wherein, The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; 6. The multi-intent response handling method of claim 1, wherein, The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; 7. A multi-intent response processing apparatus characterized by comprising: The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model inference thread; The semantic integrity monitor obtains the sliding window text segment corresponding to each data block from the ring buffer through each model The processing module is also used to regenerate streaming response data based on the semantically complete response data block of the first sub-intention through the dedicated processing module corresponding to the second sub-intention; The processing module is also used to control the output of semantically complete response data blocks of all sub-intents to the client based on the dependency information.
8. The multi-intent response processing apparatus according to claim 7, characterized by, The determining module is specifically used for: The first streaming response data is parsed to obtain the text structure and syntactic features of each data block in the first streaming response data; The text structure and syntactic features of each data block are matched with semantic integrity rules; If the text structure and syntactic features of a first data block satisfy the semantic integrity rule, then the first data block is determined to be a semantically complete response data block in the first streaming response data; The semantic integrity rules include at least one of the following: Punctuation rules are used to indicate the detection of sentence termination marks, paired parentheses, or paired quotation marks; Data structure rules are used to characterize the detection of list item identifiers, target syntax structure closures, or table row markers; Keyword triggering rules are used to characterize the detection of predefined summarizing words, transitional words, or task completion announcement words.
9. The multi-intent response processing apparatus according to claim 7, wherein The determining module is specifically used for: The first streaming response data is parsed to obtain data blocks from the first streaming response data; Each data block is concatenated with its corresponding historical context information to obtain the sliding window text fragment corresponding to each data block; Using a machine learning model, reasoning is performed on the sliding window text fragment corresponding to each data block to obtain a confidence score for each data block. The confidence score is used to characterize the probability that the data block is a semantic boundary. If the confidence score of a second data block is greater than a preset threshold, then the second data block is determined to be a semantically complete response data block in the first streaming response data.
10. An electronic device, comprising: The device includes a processor and a memory, the processor being coupled to the memory; the memory is used to store computer instructions, which are loaded and executed by the processor to enable the computer device to implement the multi-intent response processing method as described in any one of claims 1 to 6.
11. A computer readable storage medium, characterized in that, The computer-readable storage medium includes computer-executable instructions that, when executed on a computer, cause the computer to perform the multi-intent response processing method as described in any one of claims 1 to 6.
12. A computer program product, characterised in that, The computer program product includes a computer program that, when run on an electronic device, causes the electronic device to perform the multi-intent response processing method as described in any one of claims 1 to 6.