Semantic analysis response method, device and equipment and computer storage medium
By segmenting input information into semantic fragments and dynamically selecting agents for intent recognition, the problems of high latency and intent misjudgment in existing NLU technology are solved, achieving efficient and accurate semantic parsing response and resource management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-12
- Publication Date
- 2026-03-10
AI Technical Summary
Existing NLU technology suffers from high latency in semantic parsing responses, difficulty in real-time interaction with users, and difficulty in adapting to specialized terminology and high historical information loss rates in multi-turn dialogues, leading to misjudgment of agent intent and excessive memory usage.
The input information is segmented into semantic fragments by an input stream processor, semantic feature data is determined by a dynamic semantic routing engine, target agents are selected from the agent cluster for intent recognition, response information is generated by combining historical intent vectors, and agents are unloaded to release resources when there is no new input.
It improves semantic parsing response efficiency, reduces latency, enhances the accuracy of intent recognition and system robustness, and reduces resource consumption.
Smart Images

Figure CN121638255A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of the Internet of Things, and particularly relates to a method, apparatus, device, and computer storage medium for semantic parsing response. Background Technology
[0002] In existing technologies, large-scale language models (LMs) are typically used to achieve natural language understanding (NLU), which is capable of semantic parsing of user-initiated speech or text input and responding to the user.
[0003] However, existing NLU technology is limited by traditional pipeline architecture, which requires waiting for the user to input information before semantic parsing can be performed, resulting in high latency, difficulty in real-time interaction with the user, and low semantic parsing response efficiency. Summary of the Invention
[0004] This invention provides a semantic parsing response method, apparatus, device, and computer storage medium, which can improve the efficiency of semantic parsing response.
[0005] In a first aspect, embodiments of the present invention disclose a method for semantic parsing response, applied to a system including an input stream processor and a dynamic semantic routing engine. The semantic parsing response method includes: In response to the detection of input information, the input stream processor segments the input information according to a preset partitioning method to obtain semantic fragments; The semantic feature data of semantic fragments is determined by a dynamic semantic routing engine, and the target intelligent agent in the domain corresponding to the semantic feature data is determined from the intelligent agent cluster. The intent vector is obtained by identifying the intent of semantic fragments through the target intelligent agent; Response information is generated based on the intent vector corresponding to each semantic fragment.
[0006] In one feasible embodiment, the preset segmentation method includes segmenting the input information according to a preset step size using a time sliding window of a preset size.
[0007] In one feasible embodiment, the semantic feature data of semantic fragments is determined by a dynamic semantic routing engine, and the target intelligent agent corresponding to the semantic feature data in the domain is determined from the intelligent agent cluster, including: The dynamic semantic routing engine determines the keywords and corresponding entities of semantic fragments, and then uses the keywords and entities to determine semantic feature data. Extract the input feature vector from semantic feature data; Calculate the similarity between the input feature vector and the feature vector of each preset neighborhood weight matrix to obtain multiple similarity scores; The agent in the domain corresponding to the preset domain weight matrix with the highest similarity among multiple similarity values is taken as the target agent.
[0008] In one feasible embodiment, after calculating the similarity between the input feature vector and the feature vector of each preset neighborhood weight matrix to obtain multiple similarity scores, the method further includes: The initial similarity is the largest among multiple similarity values. If the initial similarity is less than the preset similarity threshold, the semantic fragment is input into the general agent in the agent cluster and the agent in the domain corresponding to the preset domain weight matrix of the initial similarity to perform structured parsing operations and obtain multiple confidence scores. The agent in the domain corresponding to the highest confidence value among multiple confidence values is taken as the target domain agent.
[0009] In one feasible embodiment, the semantic fragment is subjected to intent recognition by a target domain agent to obtain an intent vector, including: An initial intent vector is obtained by performing intent recognition on semantic fragments using a target domain intelligent agent; The stored historical intent vector is obtained from the context state library. The historical intent vector is obtained based on the intent recognition of historical semantic fragments. The similarity between historical semantic fragments and semantic fragments is greater than the target preset threshold. The initial intent vector and the historical intent vector are fused together to obtain the intent vector.
[0010] In one feasible embodiment, after generating response information based on the intent vector corresponding to each semantic fragment, the method further includes: If no new input information is obtained within a preset time period, the target domain agent is unloaded to free up resources.
[0011] Secondly, embodiments of the present invention disclose a semantic parsing response apparatus applied to a system, the system including an input stream processor and a dynamic semantic routing engine, the apparatus including: The segmentation module is used to segment the input information according to a preset partitioning method in response to the detection of input information, thereby obtaining semantic fragments; The determination module is used to determine the semantic feature data of semantic segments through a dynamic semantic routing engine, and to determine the target intelligent agent in the domain corresponding to the semantic feature data from the intelligent agent cluster; The recognition module is used to identify the intent of semantic segments through the target intelligent agent and obtain the intent vector. The generation module is used to generate response information based on the intent vector corresponding to each semantic fragment.
[0012] Thirdly, embodiments of the present invention provide a semantic parsing response apparatus, the apparatus including a processor and a memory storing computer program instructions; the processor reads and executes the computer program instructions to implement a semantic parsing response method as described in any of the first aspects.
[0013] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing computer program instructions, which, when executed by a processor, implement a method for semantic parsing response as described in any of the first aspects.
[0014] Fifthly, embodiments of the present invention provide a computer program product, including a computer program, wherein when the computer program is executed by a processor, a method for implementing a semantic parsing response as described in any of the first aspects.
[0015] This invention, in response to detected input information, segments the input information according to a preset partitioning method using an input stream processor to obtain semantic segments. A dynamic semantic routing engine determines the semantic feature data of the semantic segments and identifies target agents in the domain corresponding to the semantic feature data from an agent cluster. The target agents perform intent recognition on the semantic segments to obtain intent vectors. Response information is generated based on the intent vectors corresponding to each semantic segment. This invention, after segmenting the input information into semantic segments, can immediately perform intent recognition based on the speech segments to obtain the corresponding intent vectors, thereby generating response information based on the intent vectors corresponding to multiple semantic segments. Compared to existing technologies where semantic parsing can only be performed after the input information is completed, this invention improves the efficiency of semantic parsing response. Attached Figure Description
[0016] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments of the present invention will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a flowchart illustrating a semantic parsing response method provided in an embodiment of the present invention; Figure 2 This is a flowchart illustrating a method for determining a target intelligent agent according to an embodiment of the present invention; Figure 3 This is a flowchart illustrating a method for determining a target domain intelligent agent according to an embodiment of the present invention; Figure 4This is a flowchart illustrating a method for determining an intent vector according to an embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of a semantic parsing response device provided in an embodiment of the present invention; Figure 6 This is a schematic diagram of the structure of a semantic parsing response device provided in an embodiment of the present invention. Detailed Implementation
[0018] The features and exemplary embodiments of various aspects of the present invention will now be described in detail. To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely intended to explain the present invention and not to limit the present invention. For those skilled in the art, the present invention can be practiced without some of these specific details. The following description of the embodiments is merely to provide a better understanding of the present invention by illustrating examples of the invention.
[0019] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.
[0020] It should be noted that the acquisition, storage, use, and processing of data in this application embodiment all comply with the relevant provisions of national laws and regulations.
[0021] It should be noted that in the embodiments of this application, certain software, components, models and other existing solutions in the industry may be mentioned. These should be regarded as exemplary and are only intended to illustrate the feasibility of implementing the technical solution of this application. However, it does not mean that the applicant has used or necessarily used the solution.
[0022] Before describing the technical solutions provided by the embodiments of the present invention, in order to facilitate understanding of the embodiments of the present invention, the present invention will specifically explain the problems existing in the related technologies: Real-time semantic parsing by agents based on large-scale NLU models represents a significant technological direction integrating large language models, natural language understanding, and agent technologies. The large-scale NLU model, based on the Transformer architecture, is pre-trained on massive text corpora, enabling deep learning of grammatical, semantic, and contextual relationships. Leveraging zero-shot and few-shot learning capabilities, it requires only minor adjustments with limited domain data to accurately complete core NLU tasks such as intent recognition, slot filling, and referential resolution. The agent, possessing autonomous decision-making and action capabilities, combined with these technologies, elevates semantic parsing from simple text analysis to intelligent parsing capable of supporting subsequent tasks, providing the technological foundation for real-time semantic parsing.
[0023] However, in current technologies, the process of parsing semantic information such as speech / text input by intelligent agents based on large-scale NLU models often requires the user to input complete input information before semantic parsing can be performed. This results in a high delay in the system's response to the user, making real-time interaction with the user difficult and leading to low efficiency in semantic parsing response.
[0024] In addition, existing technologies suffer from several drawbacks. Static models struggle to adapt to specialized domain terminology, such as financial or medical terminology. Furthermore, the high rate of historical information loss during multi-turn dialogues leads to misinterpretations of agent intent. Moreover, existing technologies often deploy redundant agents to cover multiple domains, resulting in excessive memory usage.
[0025] To address the problems of the prior art, embodiments of the present invention provide a method, apparatus, device, and computer storage medium for semantic parsing responses.
[0026] This invention, in response to detected input information, segments the input information according to a preset partitioning method using an input stream processor to obtain semantic segments. A dynamic semantic routing engine determines the semantic feature data of the semantic segments and identifies target agents in the domain corresponding to the semantic feature data from an agent cluster. The target agents perform intent recognition on the semantic segments to obtain intent vectors. Response information is generated based on the intent vectors corresponding to each semantic segment. This invention, after segmenting the input information into semantic segments, can immediately perform intent recognition based on the speech segments to obtain the corresponding intent vectors, thereby generating response information based on the intent vectors corresponding to multiple semantic segments. Compared to existing technologies where semantic parsing can only be performed after the input information is completed, this invention improves the efficiency of semantic parsing response.
[0027] Figure 1 A flowchart illustrating a semantic parsing response method according to an embodiment of the present invention is shown. This method is applied to a system including an input stream processor and a dynamic semantic routing engine. Figure 1As shown, the method includes steps S110-S140.
[0028] S110: In response to the detection of input information, the input information is segmented by the input stream processor according to a preset segmentation method to obtain semantic segments.
[0029] The input information is the input voice / text information. A semantic segment is the smallest text unit that carries an independent and complete meaning.
[0030] In one embodiment, the system receives input information through an input stream processor. Upon detecting input information, the input stream processor reads information from a preset partitioning method stored in the storage space and segments the input information according to the partitioning operation corresponding to the preset partitioning method to obtain segmented semantic fragments.
[0031] S120: Determine the semantic feature data of semantic segments through a dynamic semantic routing engine, and identify the target intelligent agent in the domain corresponding to the semantic feature data from the intelligent agent cluster.
[0032] Semantic feature data includes keywords and their corresponding entities. An intelligent agent cluster comprises multiple intelligent agents. An intelligent agent is a system or program capable of perceiving its environment, making decisions, and executing actions to achieve a goal; it can contain large models.
[0033] In one embodiment, after obtaining a semantic fragment, a dynamic semantic routing engine can extract semantic feature data from the semantic fragment based on the semantic information within it. Then, based on the domain associated with the semantic feature data, the target agent corresponding to that domain is determined from the agent cluster.
[0034] S130: The target intelligent agent performs intent recognition on semantic fragments to obtain the intent vector.
[0035] In one embodiment, after determining the target agent, the target agent can perform contextual association and reasoning decisions on the information in the semantic segment for intent recognition, thereby obtaining the intent vector corresponding to the semantic segment.
[0036] S140: Generate response information based on the intent vector corresponding to each semantic fragment.
[0037] In one embodiment, after obtaining the intent vector corresponding to each semantic fragment, all intent vectors can be fused to generate response information.
[0038] After dividing the input information into semantic segments, the present invention can immediately perform intent recognition based on the speech segments to obtain the corresponding intent vectors, thereby generating response information based on the intent vectors corresponding to multiple semantic segments. Compared with the prior art, which requires the input information to be completed before semantic parsing can be performed, the semantic parsing response efficiency can be improved.
[0039] In one embodiment, the preset segmentation method includes segmenting the input information according to a preset step size using a time sliding window of a preset size.
[0040] The size of the time sliding window needs to ensure that the semantic fragment is basically complete, the delay is controllable, and it conforms to the rhythm of the language. The preset step size needs to be a trade-off between response speed and computational cost, ensuring that the system can respond quickly without frequently switching contexts.
[0041] In one example, if the window size is set to 500ms and the step size to 200ms, and the user inputs "I want to query yesterday's stocks...", the input information can be segmented into multiple semantic fragments based on the preset time sliding window and the preset step size, including S1="I want to query" → S2="yesterday's stocks" → S3="stocks...".
[0042] The embodiments of the present invention segment the input information by using a time sliding window of a preset size and a preset step size, which can ensure that the semantic information of the semantic segment is basically complete, thereby facilitating the subsequent determination of the intent vector of the semantic segment and improving the accuracy of determining the response information.
[0043] In one embodiment, a dynamic semantic routing engine determines the semantic feature data of semantic fragments, and identifies the target intelligent agent in the domain corresponding to the semantic feature data from the intelligent agent cluster, such as... Figure 2 As shown, it may include steps S121-S124.
[0044] S121: Determine the keywords and corresponding entities of semantic fragments through a dynamic semantic routing engine, and determine the semantic feature data of keywords and entities.
[0045] In one embodiment, a dynamic semantic routing engine can process semantic fragments according to a preset structured processing method to obtain keywords and their corresponding entities. The keywords and entities are then used to determine semantic feature data.
[0046] In one example, the default structured processing method could be the processing method for NLU models such as BERT+CRF.
[0047] In one example, the semantic fragment is "I have a slight pain in my chest, and I also feel...". The dynamic semantic routing engine can determine the keywords of the semantic fragment, such as "chest" and "pain", and the corresponding entities, such as "chest" (body part) and "pain" (symptom).
[0048] It is important to note that semantic fragments are unstructured data. Since dynamic semantic routing engines cannot directly process raw text, structured data such as keywords and their corresponding entities must be extracted from the text to facilitate the subsequent determination of the domain corresponding to the semantic fragment.
[0049] S122: Extract the input feature vector of semantic feature data.
[0050] The input feature vector represents the core semantic content of the semantic segment.
[0051] In one embodiment, a dynamic semantic routing engine can be used to extract features from semantic feature data to obtain an input feature vector.
[0052] S123: Calculate the similarity between the input feature vector and the feature vector of each preset neighborhood weight matrix to obtain multiple similarity scores.
[0053] In one embodiment, the similarity between the input feature vector and the feature vector of each preset domain weight matrix can be calculated according to a preset similarity calculation method to obtain multiple similarities.
[0054] The expression for the preset similarity calculation method is shown in formula (1).
[0055] Where S represents the current semantic segment. Let `k` represent the j-th domain. Let `k` represent the keyword in the current semantic segment. TF-IDF(k): measures the importance of a keyword in the current semantic segment. DomainWeight(k, ) indicates that keyword k and domain The degree of relevance. , ) is the current semantic fragment and each domain The similarity.
[0056] S124: Select the agent in the domain corresponding to the preset domain weight matrix with the highest similarity among multiple similarities as the target agent.
[0057] In one embodiment, after obtaining multiple similarities, the largest similarity can be selected from the multiple similarities by a filtering module, and the agent in the domain corresponding to the preset domain weight matrix corresponding to that similarity can be used as the target agent.
[0058] This invention extracts the input feature vector of semantic feature data and calculates the similarity with the feature vector of each preset domain weight matrix. This enables the identification of the agent in the domain with the highest similarity to the semantic feature data, thereby allowing the agent in that domain to respond to the user, improving the user experience and increasing the accuracy of the response.
[0059] In one embodiment, after calculating the similarity between the input feature vector and the feature vector of each preset neighborhood weight matrix, and obtaining multiple similarity scores, as follows: Figure 3 As shown, the semantic parsing response method also includes steps S210-S230.
[0060] S210: Use the highest similarity among multiple similarity values as the initial similarity.
[0061] In one embodiment, after obtaining multiple similarities, the largest similarity can be selected from the multiple similarities as the initial similarity using a filtering module.
[0062] S220: If the initial similarity is less than the preset similarity threshold, the semantic fragments are input into the general agent in the agent cluster and the agent in the domain corresponding to the preset domain weight matrix of the initial similarity to perform structured parsing operations and obtain multiple confidence scores.
[0063] Among them, the general intelligent agent is a general intelligent agent that covers everyday conversations.
[0064] In one embodiment, after obtaining the initial similarity, a detection module can check whether the initial similarity is less than a preset similarity threshold. If the detection module detects that the initial similarity is less than the preset similarity threshold, a general agent can be obtained from the agent cluster. The semantic fragment is then input into the general agent and the agent in the domain corresponding to the preset domain weight matrix corresponding to the initial similarity, respectively, for structured parsing operations to obtain multiple confidence levels.
[0065] In one example, if the initial similarity is less than 0.7, the semantic representation of the fragment is semantically ambiguous, and the routing result has high uncertainty. Secondary verification is required: the semantic fragment is input into a general agent and then into an agent corresponding to a predefined domain weight matrix based on the initial similarity, with each agent outputting a structured parsing result. The structured parsing result includes: {intent classification, entity list, confidence score}. Finally, multiple confidence scores are obtained based on these multiple structured parsing results.
[0066] S230: Select the agent in the domain with the highest confidence value among multiple confidence values as the target domain agent.
[0067] In one embodiment, a filtering module can filter multiple confidence levels to obtain the highest confidence level. The agent in the domain corresponding to this confidence level is then selected as the target domain agent.
[0068] In one example, if the domain agent returns a significantly higher confidence level than the general agent, the domain agent's result is adopted. If the confidence levels of the two agents are similar, or the general agent's result is higher, the general agent's result is adopted.
[0069] In this embodiment of the invention, when the initial similarity is less than a preset similarity threshold, the semantic fragments are input into different agents to obtain the corresponding confidence scores. The agent with the highest confidence score among multiple confidence scores is selected as the target domain agent, which prevents erroneous routing caused by keyword ambiguity and improves the robustness and accuracy of the system.
[0070] In one embodiment, an intent vector is obtained by performing intent recognition on semantic fragments using a target domain agent, such as... Figure 4 As shown, steps S131-S133 may be included.
[0071] S131: The initial intent vector is obtained by performing intent recognition on semantic fragments through the target domain intelligent agent.
[0072] In one embodiment, the target agent can perform contextual association and reasoning decisions on the information in the semantic segment for intent recognition, thereby obtaining an initial intent vector corresponding to the semantic segment.
[0073] S132: Retrieve the stored historical intent vector from the context state library.
[0074] Among them, the historical intent vector is obtained based on the intent recognition of historical semantic fragments, and the similarity between the historical semantic fragments and the semantic fragments is greater than the target preset threshold.
[0075] In one embodiment, stored historical intent vectors can be read from the context state library.
[0076] S133: Merge the initial intent vector and the historical intent vector to obtain the intent vector.
[0077] In one embodiment, after obtaining the historical intent vector, the initial intent vector and the historical intent vector can be fused to obtain the intent vector.
[0078] In one example, the historical intent vector can be obtained, and the initial intent vector and the historical intent vector can be incrementally fused with the historical context using the IIR algorithm to output the intent vector.
[0079] The expression for the IIR algorithm is shown in formula (2).
[0080] Where W is a trainable weight matrix used for dynamically learning intent relevance. I_n represents the nth intent, which is one of the structured results output by the NLU agent (general or domain) during NLU parsing. Embed(I_n) is the vectorized representation of intent I_n, usually obtained by encoding the intent text through a pre-trained language model.
[0081] The embodiments of the present invention obtain an intent vector by fusing an initial intent vector and a historical intent vector, which can be combined with context to improve the accuracy of determining the intent vector.
[0082] In one embodiment, after generating response information based on the intent vector corresponding to each semantic fragment, the method for semantically parsing the response further includes step S310.
[0083] S310: If no new input information is obtained within a preset time period, unload the target domain agent to release resources.
[0084] In one embodiment, a detection module can detect whether there is new input information within a preset time period. If the detection module detects new input information within the preset time period, the target domain agent can be unloaded to free up resources.
[0085] In one embodiment of the above embodiments, a detection module can detect whether there is new input information within a preset time period. If the detection module detects new input information within the preset time period, the domain agent can be unloaded according to session activity to free up resources. Session activity is determined based on interaction frequency, interaction quality, time decay, resource consumption, and user value.
[0086] In another embodiment, the target domain agent can be unloaded to release resources after receiving explicit closing remarks from the user, such as "thank you" or "no problem".
[0087] In this embodiment of the invention, the target domain agent is unloaded without acquiring new input information, which enables dynamic scheduling of agents, avoids agents from continuously occupying resources, and reduces system resource performance overhead.
[0088] Figure 5 This is a schematic diagram of a semantic parsing response apparatus 500 provided in an embodiment of the present invention. The apparatus is applied to a system including an input stream processor and a dynamic semantic routing engine. The apparatus 500 includes: The segmentation module 501 is used to segment the input information according to a preset segmentation method by the input stream processor in response to the detection of input information to obtain semantic segments; The determination module 502 is used to determine the semantic feature data of the semantic segment through the dynamic semantic routing engine, and to determine the target intelligent agent in the domain corresponding to the semantic feature data from the intelligent agent cluster; The recognition module 503 is used to perform intent recognition on semantic segments through the target intelligent agent to obtain an intent vector; The generation module 504 is used to generate response information based on the intent vector corresponding to each semantic fragment.
[0089] This invention, in response to detected input information, segments the input information according to a preset partitioning method using an input stream processor to obtain semantic segments. A dynamic semantic routing engine determines the semantic feature data of the semantic segments and identifies target agents in the domain corresponding to the semantic feature data from an agent cluster. The target agents perform intent recognition on the semantic segments to obtain intent vectors. Response information is generated based on the intent vectors corresponding to each semantic segment. This invention, after segmenting the input information into semantic segments, can immediately perform intent recognition based on the speech segments to obtain the corresponding intent vectors, thereby generating response information based on the intent vectors corresponding to multiple semantic segments. Compared to existing technologies where semantic parsing can only be performed after the input information is completed, this invention improves the efficiency of semantic parsing response.
[0090] In one embodiment, the preset segmentation method includes segmenting the input information according to a preset step size using a time sliding window of a preset size.
[0091] In one embodiment, the determining module 502 is specifically used for: The dynamic semantic routing engine determines the keywords and corresponding entities of semantic fragments, and then uses the keywords and entities to determine semantic feature data. Extract the input feature vector from semantic feature data; Calculate the similarity between the input feature vector and the feature vector of each preset neighborhood weight matrix to obtain multiple similarity scores; The agent in the domain corresponding to the preset domain weight matrix with the highest similarity among multiple similarity values is taken as the target agent.
[0092] In one embodiment, the determining module 502 is specifically used for: The initial similarity is the one with the highest similarity among multiple similarity values. When the initial similarity is less than the preset similarity threshold, the semantic fragments are input into the general agent in the agent cluster and the agent in the domain corresponding to the preset domain weight matrix corresponding to the initial similarity to perform structured parsing operations and obtain multiple confidence scores. The agent in the domain corresponding to the highest confidence value among multiple confidence values is taken as the target domain agent.
[0093] In one embodiment, the determining module 502 is specifically used for: An initial intent vector is obtained by performing intent recognition on semantic fragments using a target domain intelligent agent; The stored historical intent vector is obtained from the context state library. The historical intent vector is obtained based on the intent recognition of historical semantic fragments. The similarity between historical semantic fragments and semantic fragments is greater than the target preset threshold. The initial intent vector and the historical intent vector are fused together to obtain the intent vector.
[0094] In one embodiment, the device 500 includes an unloading module, which is used to unload the target domain agent to release resources when no new input information is obtained within a preset time period.
[0095] Figure 6 A schematic diagram of the hardware structure of the semantic parsing response provided in an embodiment of the present invention is shown.
[0096] The device for semantic parsing response may include a processor 601 and a memory 602 storing computer program instructions.
[0097] Specifically, the processor 601 may include a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of the present invention.
[0098] Memory 602 may include mass storage for data or instructions. For example, and not limitingly, memory 602 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 602 may include removable or non-removable (or fixed) media. Where appropriate, memory 602 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 602 is non-volatile solid-state memory.
[0099] Memory 602 may include read-only memory (ROM), random access memory (RAM), disk storage media devices, optical storage media devices, flash memory devices, electrical, optical, or other physical / tangible memory storage devices. Therefore, typically, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to one aspect of this disclosure.
[0100] The processor 601 implements any of the semantic parsing response methods in the above embodiments by reading and executing computer program instructions stored in the memory 602.
[0101] In one example, the device for semantic parsing responses may also include a communication interface 603 and a bus 604. Wherein, as Figure 6 As shown, the processor 601, memory 602, and communication interface 603 are connected through bus 604 and complete communication with each other.
[0102] The communication interface 603 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of the present invention.
[0103] Bus 604 includes hardware, software, or both, that couples components of an online data traffic metering device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 604 may include one or more buses. Although specific buses are described and illustrated in embodiments of the invention, the invention contemplates any suitable bus or interconnect. Additionally, in conjunction with the semantic parsing response method in the above embodiments, embodiments of the invention also provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when these computer program instructions are executed by the processor, they implement any of the semantic parsing response methods in the above embodiments.
[0104] This invention also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the semantic parsing response methods described in the above embodiments. This invention further provides a vehicle, including a control device and a terminal, wherein the terminal is used to implement the semantic parsing response methods described in the above embodiments, and the control device is used to implement the semantic parsing response methods described in the above embodiments.
[0105] It should be clarified that the present invention is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of the present invention.
[0106] The functional blocks shown in the above structural diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this invention are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, read-only memory (ROM), flash memory, erasable read-only memory (EROM), floppy disks, compact disc read-only memory (CD-ROM), optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0107] It should also be noted that the exemplary embodiments mentioned in this invention describe methods or systems based on a series of steps or apparatus. However, this invention is not limited to the order of the steps described above; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0108] The aspects of this disclosure have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.
[0109] The above are merely specific embodiments of the present invention. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the protection scope of the present invention.
Claims
1. A method for semantic parsing response, characterized in that, The method is applied to a system comprising an input stream processor and a dynamic semantic routing engine, and comprises: In response to detecting input information, segmenting the input information according to a preset segmentation mode through the input stream processor to obtain semantic segments; Determining semantic feature data of the semantic segments through the dynamic semantic routing engine, and determining a target agent of a domain corresponding to the semantic feature data from a cluster of agents; Performing intent recognition on the semantic segments through the target agent to obtain an intent vector; Generating response information according to the intent vector corresponding to each semantic segment.
2. The method of claim 1, wherein, The preset segmentation mode comprises a time sliding window based on a preset size, and the input information is segmented according to a preset step size.
3. The method of claim 1, wherein, The method of determining semantic feature data of the semantic segments through the dynamic semantic routing engine, and determining a target agent of a domain corresponding to the semantic feature data from a cluster of agents comprises: Determining a keyword of the semantic segments and an entity corresponding to the keyword through the dynamic semantic routing engine, and determining the keyword and the entity as the semantic feature data; Extracting an input feature vector of the semantic feature data; Calculating the similarity between the input feature vector and a feature vector of each preset domain weight matrix to obtain a plurality of similarities; Taking the agent of the domain corresponding to the preset domain weight matrix corresponding to the similarity with the maximum value in the plurality of similarities as the target agent.
4. The method of claim 3, wherein, After the calculation of the similarity between the input feature vector and the feature vector of each preset domain weight matrix to obtain a plurality of similarities, the method further comprises: Taking the similarity with the maximum value in the plurality of similarities as an initial similarity; In the case where the initial similarity is less than a preset similarity threshold, inputting the semantic segments into a general agent in the cluster of agents and an agent of the domain corresponding to the preset domain weight matrix corresponding to the initial similarity to perform a structured parsing operation to obtain a plurality of confidences; Taking the agent of the domain corresponding to the confidence with the highest value in the plurality of confidences as the target domain agent.
5. The method of claim 1, wherein, The method of performing intent recognition on the semantic segments through the target domain agent to obtain an intent vector comprises: Performing intent recognition on the semantic segments through the target domain agent to obtain an initial intent vector; Obtaining a stored historical intent vector from a context state library, the historical intent vector being obtained based on historical semantic segment intent recognition, and the historical semantic segment having a similarity greater than a target preset threshold with the semantic segment; Fusing the initial intent vector and the historical intent vector to obtain the intent vector.
6. The method of claim 1, wherein, After the generation of response information according to the intent vector corresponding to each semantic segment, the method further comprises: In the case where no new input information is detected within a preset time period, uninstalling the target domain agent for releasing resources.
7. An apparatus for semantic parsing of responses, the apparatus comprising: The device is applied to a system comprising an input stream processor and a dynamic semantic routing engine, and comprises: The segmentation module is configured to segment the input information according to a preset segmentation manner through the input stream processor to obtain semantic segments in response to detecting the input information. The determination module is configured to determine semantic feature data of the semantic segments through the dynamic semantic routing engine, and determine a target agent of a domain corresponding to the semantic feature data from a cluster of agents. The recognition module is configured to perform intent recognition on the semantic segments through the target agent to obtain an intent vector. The generation module is configured to generate response information according to the intent vector corresponding to each semantic segment.
8. A device for semantic parsing response, characterized in that, The device comprises a processor and a memory storing computer program instructions; the processor reads and executes the computer program instructions to implement the method for semantic analysis and response according to any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer program instructions, and the computer program instructions are executed by the processor to implement the method for semantic analysis and response according to any one of claims 1-6.
10. A computer program product, characterised in that, The computer program is executed by the processor to implement the method for semantic analysis and response according to any one of claims 1-6.