Multi-context semantic recognition and understanding method based on large language model

By employing a multi-context semantic recognition and understanding method based on a large language model, which integrates semantic unit sequences and contextual nesting vectors, and combines prefix modulation mechanisms and neural networks, the problem of insufficient context modeling in multilingual semantic recognition is solved. This achieves high-precision intent recognition and multilingual adaptation, and enhances the system's intelligent response capabilities.

CN121234940APending Publication Date: 2025-12-30CHENGDU YUNDA ZHIYE TECH CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202511322910.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-16
Publication Date
2025-12-30

AI Technical Summary

Technical Problem

Existing multilingual semantic recognition methods exhibit insufficient generalization and semantic drift when dealing with complex interaction modes such as multi-turn dialogues, cross-lingual mixed expressions, and dynamic context switching. They are difficult to establish an effective context modeling mechanism, resulting in unstable intent recognition and low semantic accuracy, and lack of the ability to flexibly adapt to changes in context.

Method used

We adopt a multi-context semantic recognition and understanding method based on a large language model, which integrates semantic unit sequences, contextual nesting vectors, language labels and historical intent states. We guide semantic modeling through a prefix regulation mechanism, construct contextual prior representations, and use gated recurrent neural networks and feedforward neural networks for intent recognition and slot filling to achieve high robustness and high accuracy semantic understanding in multilingual scenarios.

Benefits of technology

It enhances semantic modeling capabilities in multilingual environments, ensures the accuracy of intent recognition and multilingual adaptability, realizes closed-loop processing from semantic recognition to service response, and enhances the system's intelligent response capabilities and user interaction experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121234940A_ABST
    Figure CN121234940A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-context semantic recognition and understanding method based on a large language model. The method comprises the following steps: S1, generating a semantic unit sequence; s2, constructing a context nested vector sequence; s3, constructing context priori representation, and generating a semantic representation sequence; s4, outputting a state vector of the semantic path by adopting a gating loop unit, obtaining a matching degree score according to a feedforward neural network, and determining a deliberate map tag and an alternative intention tag; s5, slot field extraction and semantic filling are completed, and a structured semantic task unit is generated; and S6, completing semantic recognition and service response closed loop. According to the method, by introducing a prefix regulation and control mechanism and a multi-context semantic modeling structure, the accuracy of intention recognition in multiple rounds of dialogues and the consistency of the context generated in response are remarkably improved, and the method is suitable for natural language understanding scenes of multi-language intelligent customer service, cross-context man-machine interaction and complex task driving.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of natural language processing, and particularly relates to a multi-context semantic recognition and understanding method based on a large language model. BACKGROUND

[0002] Under the background of rapid development of multi-language human-computer interaction systems, semantic recognition and understanding technology has become the core support for improving user experience and task execution efficiency. The current mainstream multi-language semantic recognition method usually relies on static word vector modeling, rule-driven intent recognition process or shallow neural network structure to parse the input text. This kind of method has certain adaptability when dealing with single round input with clear syntax structure and weak context dependence, but when facing complex interaction modes such as multi-round dialogue, mixed expression across languages and dynamic context switching in real scenarios, it shows obvious generalization deficiency and semantic drift problem.

[0003] Traditional multi-round dialogue systems are difficult to establish an effective context modeling mechanism, usually only retaining a simplified representation of a limited number of historical rounds, ignoring the key role of semantic evolution chain and context nesting structure in the semantic construction process. At the same time, the current intent recognition method based on a single language model mostly fails to fully consider the expression difference between languages and the cross-language common semantic mapping ability, resulting in unstable intent reasoning results and low semantic precision in a multi-lingual environment, which is difficult to support accurate task understanding and service response. In addition, the traditional task template matching and slot filling method is mostly based on fixed rules for parameter extraction and interface calling, lacking the ability to adapt to context changes, and is prone to cause intent misjudgment and task execution failure when the user's expression is ambiguous or the task structure is complex.

[0004] Based on the above problems, there is an urgent need for a semantic recognition and understanding method with strong context modeling capability, supporting multi-language expression understanding and being able to flexibly adapt to task semantic structure. For this purpose, the present application proposes a multi-context semantic recognition and understanding method based on a large language model, which fuses semantic unit sequence, context nesting vector, language label and historical intent state, constructs context prior representation, and guides the semantic modeling process through prefix regulation mechanism, realizes high robustness and high precision of main intent recognition, slot extraction and service response closed loop processing in multi-language scenarios, and effectively makes up for the deficiencies of the prior art in context dependent modeling, cross-language generalization and task structure adaptation. SUMMARY

[0005] One purpose of the present application is to propose a multi-context semantic recognition and understanding method based on a large language model, which fully integrates a pre-training language model, a prefix regulation mechanism, a gated recurrent neural network and a multi-language response generation strategy, systematically constructs a semantic understanding process covering semantic unit extraction, context modeling, intent recognition and slot filling, and has the advantages of strong cross-language adaptability, high context perception capability, high intent recognition accuracy and strong service response closed-loop capability.

[0006] According to the multi-context semantic recognition and understanding method based on a large language model, the method comprises the following steps:

[0007] S1, performing a standardization processing operation on the original multi-language text input by a user, generating a semantic unit sequence in combination with a lightweight language analyzer;

[0008] S2, extracting a historical interaction segment from the current user session, and constructing a context nested vector sequence by using an adaptive screening mechanism;

[0009] S3, introducing a context regulation structure, fusing the semantic unit sequence, the context nested vector sequence and the language label identifier, constructing a context priori representation, injecting the context vector into the semantic encoding process by using a prefix regulation mechanism, dynamically disturbing the semantic weight of the input feature, and generating a semantic representation sequence;

[0010] S4, based on the semantic representation sequence and the current context nested vector sequence, constructing a candidate intent set, and extracting a semantic vector representation of the candidate intent; using a gated recurrent unit structure to model the intent label sequence generated in the historical interaction, outputting a state vector of the current semantic path; concatenating the state vector and the semantic vector of each candidate intent and inputting them into a feedforward neural network to perform a matching degree score, and finally determining the main intent label of the current round according to the score result and outputting the alternative intent label.

[0011] S5, based on the main intent label, calling a matched task template, constructing a slot filling structure, performing position labeling and semantic type mapping operations on the semantic representation sequence, extracting task-related slot fields, slot fields and constraint conditions in the user input, and generating a structured semantic task unit.

[0012] S6, taking the structured semantic task unit as input, retrieving a matched business interface path according to the main intent label and the slot field, generating a multi-language response content consistent with the current context, and sending the multi-language response content to the client through a predefined service calling channel, to complete a closed-loop execution process of one round of semantic recognition and service response.

[0013] Optionally, the S1 specifically comprises:

[0014] S11, receive the original multilingual text input by the user, take the original multilingual text as the input data source of the multi-context semantic recognition task; perform character cleaning operation on the input data source, delete illegal characters, special control symbols, redundant punctuation symbols and repeated spaces, obtain the normalized text sequence; perform semantic unit segmentation operation on the normalized text sequence, use the semantic unit decomposition algorithm based on the BPE language model to map the continuous text into semantic unit level semantic units;

[0015] S12, perform language recognition operation based on the normalized text sequence, use the pre-trained language classification model to determine the language category of the input text, and generate the corresponding language label identification;

[0016] S13, based on the normalized text sequence, determine the language category using the pre-trained language classification model, and generate a language label identification; according to the language rule of the language label identification, the text encoding format is standardized and converted into UTF-8 encoding, and the semantic unit with consistent encoding is output;

[0017] S14, perform part-of-speech recognition on the semantic units, and output the corresponding grammatical tags of each semantic unit, including nouns, verbs, adjectives, adverbs, prepositions and conjunctions;

[0018] S15, through the language label identification and the grammatical tag, the subject-predicate relationship, the modification structure and the dependent relationship between the language units are extracted, and a dependency relationship structure diagram is generated;

[0019] S16, the language label identification, the grammatical tag and the dependency relationship structure diagram are uniformly packaged as a semantic unit sequence.

[0020] Optionally, the S2 specifically comprises:

[0021] S21, obtain the dialogue data of a plurality of consecutive interaction rounds in the current user session, each round of interaction data comprising user input text and system response text, and form an initial context segment set in time sequence;

[0022] S22, extract the semantic representation of each historical interaction segment, and calculate the relevance with the semantic representation of the current user input to obtain the semantic similarity score of the context segment;

[0023] S23, assign a round decay weight to each historical interaction segment, and set the distance according to the round decay weight and the current interaction round;

[0024] S24, calculate the importance score of the segment according to the semantic similarity score and the round decay weight, and select the high correlation segment using an adaptive screening mechanism to form an effective context set;

[0025] S25, arrange the segments in the effective context set in chronological order, and construct a context state chain structure;

[0026] S26, mark semantic evolution dependency and interaction order index in the context state chain, form an information chain with hierarchical semantic structure, and output a context nested vector sequence. According to the response of each round of historical interaction segment in the context state chain structure, the identified main intention label is extracted, and an intention label sequence is formed in the order of interaction rounds, which is used as the input basis for subsequent intention state modeling;

[0027] Optionally, the S3 specifically comprises:

[0028] S31, the semantic unit sequence, the context nested vector sequence and the corresponding language label identification are used as an input feature set for semantic modeling;

[0029] S32, the semantic unit sequence and the context nested vector sequence are dimensionally aligned, and the language label identification is combined to construct a learnable context prior representation, which is used to guide the semantic modeling process;

[0030] S33, a prefix control mechanism is adopted, the context prior representation is inserted into the front part of the semantic modeling input stream as a control signal, and a prefix guide structure is constructed;

[0031] S34, based on the prefix guide structure, the weight distribution of the semantic unit sequence in the semantic modeling input is dynamically disturbed, and the semantic modeling process is guided to converge in the direction of stronger current context relevance;

[0032] S35, in the semantic modeling process, according to the context prior representation, the semantic modeling focuses on specific semantic sub-path, and the adaptability to multi-language and cross-domain context is improved;

[0033] S36, the prefix guide structure after the action of the prefix control mechanism is sent into the semantic modeling, and the structure information of the semantic unit sequence, the context nested context and the language label embedding are fused in the semantic modeling process, and a semantic representation sequence containing context-aware semantics is output, which is used to support subsequent intention recognition and semantic task analysis process.

[0034] Optionally, the prefix regulation mechanism refers to the prefix guidance structure constructed during the semantic modeling stage by inserting the contextual prior representation obtained by fusing the semantic unit sequence, the context nested vector sequence, and the language label identifier as a prefix vector into the beginning of the semantic modeling input sequence. The prefix regulation mechanism projects the contextual prior representation to the same representation space as the semantic unit through a linear transformation function, forming an explicit guidance structure in the semantic modeling input stream. Subsequently, in the multi-head self-attention mechanism, attention scores are calculated based on the dot product similarity between the semantic unit vector and the prefix vector, and prefix weighting perturbation is introduced in the attention weight allocation, thereby highlighting the importance of contextual and language features during the modeling process. The guided semantic unit representation sequence is input into the standard Transformer encoder structure to perform semantic modeling operations including positional encoding, multi-head attention, feedforward neural network, and normalization, gradually generating semantic representation results with context awareness and language adaptation capabilities. The prefix regulation mechanism adjusts the modeling focus weights between semantic units and context in the input sequence, making the semantic modeling process more focused on key information in the current context, and effectively enhancing the model's ability to construct semantic consistency under multilingual and multi-contextual conditions.

[0035] Optionally, S4 specifically includes:

[0036] S41. Based on the semantic representation sequence and context nested vector sequence output in the current round, and combined with the registered intent nodes and semantic instruction rules in the semantic knowledge graph, retrieve the set of candidate intents with semantic relevance higher than a set threshold; for each candidate intent in the candidate intent set, combine the corresponding instruction description, semantic associated entity and context applicable conditions to construct a standardized semantic vector representation, forming a candidate intent embedding sequence consistent with the current context.

[0037] S42. Extract intention graph labels from the context state chain generated from historical interaction fragments, and construct an intention label sequence in chronological order. The intention label sequence is used to characterize the evolution trajectory of the user's intention expressed in multiple rounds of interaction. Embed the intention label sequence and input it into the gated loop unit structure. Combine the temporal dependency relationship and semantic change characteristics to output the semantic path state vector, which is used to reflect the context prior of the current round of intention reasoning.

[0038] S43. The semantic path state vector is concatenated and fused with the semantic vector of each candidate intention in the candidate intention embedding sequence to form a joint semantic representation pair representing "historical path-current candidate intention"; the joint semantic representation pair is input into the feedforward neural network, and the semantic similarity modeling mechanism and the context instruction preference modeling mechanism are combined to output the matching degree score of each candidate intention in the current context. The score result is used to reflect its semantic rationality and contextual adaptability.

[0039] S44. Sort all candidate intents in descending order according to their matching score, and select the candidate intent with the highest matching score as the main intent tag for the current round; select the candidate intent tags ranked from 2nd to δth from the sorting results to form a set of alternative tags, where δ is the preset upper limit of the number of alternative tags, which is used to support the rollback and alternative selection of intent state in subsequent user interaction correction, context backtracking or fault tolerance verification process.

[0040] Optionally, the semantic modeling mechanism refers to a representation structure used to construct the semantic relationship between the embedded semantic representation of the candidate intent and the current semantic path state vector. Essentially, it is a set of multi-layer feedforward neural networks that take the concatenation result of the semantic vector of the candidate intent and the semantic path state vector as input, perform nonlinear mapping operations, and encode the semantic consistency features between the candidate intent and the current context. The semantic modeling mechanism generates a high-dimensional semantic score representation of the candidate intent in the current context by learning the intrinsic connection between semantic representations, which serves as the basis for matching degree calculation.

[0041] The aforementioned contextual instruction preference modeling mechanism refers to a personalized contextual modeling module introduced during the intent matching and scoring process. This module simulates the user's temporal preferences, instruction biases, and semantic offset features in historical interactions regarding intent selection. Based on the distribution of the main intent labels in each round of interaction within the contextual state chain structure, this mechanism constructs the user's semantic selection trajectory. In the current round of intent recognition, it performs joint modeling by combining the contextual applicability conditions of candidate intents with the semantic path state vector. This adjusts the weight distribution of candidate intent scores under historical preference conditions, improving the contextual adaptability of intent recognition results.

[0042] The semantic modeling mechanism and the context instruction preference modeling mechanism work together in the candidate intent matching score generation process. The former ensures the consistency between the semantic features of the candidate intent and the context representation, while the latter enhances the ability to model user behavior tendencies and historical semantic evolution patterns, jointly constructing an intent recognition support framework oriented towards dynamic changes in context.

[0043] Optionally, S5 specifically includes:

[0044] S51. Based on the main intent tag identified in the current round, retrieve a task template that matches the main intent tag from the predefined task template library. The predefined task template library is a set of structured semantic task configurations. In the predefined task template library, each task template corresponds to a specific intent tag and includes the task's structural definition, semantic slot configuration, task execution elements, and matching conditions. The predefined task template library serves as an external knowledge support component in the semantic recognition process, providing standardized references for generating the service response structure of the main intent tag.

[0045] S52. Construct the slot filling structure of the task template. Based on the slot type defined in the task template, determine the set of slot fields to be filled, including slot fields, slot fields and constraint fields.

[0046] S53. Based on the semantic vector representation in the semantic representation sequence, perform a semantic unit-level position labeling operation, identify the semantic role of the semantic unit, and determine the semantic role of the task template corresponding to the current main graph label:

[0047]

[0048] Where, r i Represents the semantic role label of the i-th semantic unit; R represents the set of semantic roles defined in the task template; v i Represents semantic unit u i Vector representation in a semantic representation sequence; y intent Indicates the current idea graph label; P(r|v i ,y intent ) represents the semantic unit u given the semantic vector and the idea graph label. i The conditional probability of belonging to role r.

[0049] S54. Based on the semantic role and slot type, complete the type mapping between semantic units and slot fields, and fill each semantic unit into the corresponding slot defined in the task template.

[0050] S55. Integrate the populated slot fields and task templates to output structured semantic task units:

[0051]

[0052] Among them, T task The structured semantic task unit represents the final output; s k This represents the k-th slot field in the task template; f k This represents the semantic value obtained by mapping the semantic unit and filling it into the slot field; M is the number of slot fields defined in the task template.

[0053] Structured semantic task units serve as the semantic expression basis for service response logic, supporting subsequent response generation processes and business interface call processes.

[0054] Optionally, S6 specifically includes:

[0055] S61. Receive the structured semantic task unit output from the previous round of semantic task processing as the input basis for generating the current service response;

[0056] S62. Based on the main intent tag and slot field values ​​contained in the structured semantic task unit, match the preset business interface call mapping rules in the task template and retrieve the target interface path corresponding to the current semantic task.

[0057] S63. Based on the interface specification of the target interface path, construct an interface call data encapsulation body that conforms to the parameter specification. The interface call data encapsulation body is used to carry the main graph label and the field values ​​of each slot, and complete the format mapping and semantic filling from the structured semantic task unit to the interface parameter structure.

[0058] S64. Based on the language tag identifier and context nested vector sequence of the current semantic task, call the predefined multilingual template generation method to generate multilingual response content, ensuring that the response content is consistent with the current context in terms of semantic logic and language expression;

[0059] S65. Bind the multilingual response content to the interface call data encapsulation body to construct a complete service response data packet, which serves as the semantic output representation of this round of semantic tasks;

[0060] S66. Send the service response data packet to the client through the predefined service call channel to complete the response delivery of the current round of semantic tasks, forming a closed-loop processing path from semantic recognition to service feedback.

[0061] The beneficial effects of this invention are:

[0062] This invention introduces a semantic representation mechanism based on a large language model, combines semantic unit sequences, context-nested vector sequences, and language tag identifiers to construct a contextual prior representation, and injects it into the semantic modeling process through prefix regulation. This enables dynamic semantic understanding of multilingual input text in different contexts, significantly improving the context awareness and multilingual adaptability of semantic modeling.

[0063] This invention constructs a candidate intent set in the intent recognition stage, uses a gated loop structure to model the historical intent evolution path, and combines a feedforward neural network to realize the joint scoring reasoning of "historical path-candidate intent", which improves the robustness and rationality of intent recognition under multi-round interaction, and ensures the accurate determination of intent graph labels and the high coverage of candidate intents.

[0064] This invention constructs a slot-filling structure based on task templates, employs semantic role recognition and type mapping mechanisms to accurately extract task-related parameter fields, and generates multilingual service content by combining language tags and contextual information during the response phase. Through a service call channel, it achieves closed-loop processing from semantic recognition to interface response, effectively enhancing the system's intelligent response capabilities and user interaction experience. Overall, this invention realizes an integrated processing path for semantic recognition and understanding under multi-context, multi-round, and multi-language conditions, possessing good scalability and application value. Attached Figure Description

[0065] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0066] Fig. 1 This is an overall flowchart of a multi-context semantic recognition and understanding method based on a large language model proposed in this invention;

[0067] Fig. 2 This is a schematic diagram of the prefix regulation mechanism structure of a multi-context semantic recognition and understanding method based on a large language model proposed in this invention;

[0068] Fig. 3 This is a schematic diagram of the semantic modeling mechanism structure of the multi-context semantic recognition and understanding method based on a large language model proposed in this invention. Detailed Implementation

[0069] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.

[0070] refer to Figs. 1-3 A multi-context semantic recognition and understanding method based on a large language model includes the following steps:

[0071] S1. Perform standardization processing on the multilingual text input by the user to generate a sequence of semantic units;

[0072] S2. Extract historical interaction fragments from user sessions and construct a context-nested vector sequence using an adaptive filtering mechanism;

[0073] S3. By integrating semantic unit sequences, context-nested vector sequences, and language tag identifiers, a priori context representation is constructed. A prefix control mechanism is then used to inject context vectors into the semantic encoding process to generate a semantic representation sequence.

[0074] S4. A gated recurrent unit is used to model the intent label sequence generated in the historical interaction, output the state vector of the semantic path, and obtain the matching score based on the feedforward neural network to determine the main graph label and the candidate intent label.

[0075] S5. Based on the main idea map label, call the task template, construct the slot filling structure, complete the slot field extraction and semantic filling, and generate structured semantic task units;

[0076] S6. Match the business interface with the main idea map label and slot field, generate multilingual response content and send it to complete the semantic recognition and service response closed loop.

[0077] This invention proposes a multi-context semantic recognition and understanding method based on a large language model. It generates a sequence of semantic units by standardizing multilingual text and constructs a nested context vector sequence by combining historical interaction fragments. Language tags are then fused to form a contextual prior representation and injected into the semantic encoding process, enhancing the contextual adaptability of semantic modeling. Gated recurrent units are used to model historical intent sequences, and a feedforward neural network is combined to achieve candidate intent matching score, accurately identifying intention graph tags and alternative tags. Furthermore, a slot-filling structure is constructed based on the intention graph and task templates to generate semantic task units. These units are then matched with business interfaces to generate multilingual response content, achieving closed-loop processing of semantic recognition and service response. This method possesses strong context awareness, multilingual adaptation, and task-driven response capabilities.

[0078] In this embodiment, S1 specifically includes:

[0079] S11. Receive raw multilingual text input from the user as the input data source; perform character cleaning on the input data, deleting illegal characters, special control symbols, redundant punctuation, and repeated spaces to obtain a normalized text sequence; use a semantic unit decomposition algorithm based on the BPE (BytePairEncoding) language model to perform semantic unit segmentation on the normalized text sequence, assuming the normalized sequence is x = [x1, x2, ..., x...]. T The BPE algorithm iteratively constructs substring pairs (x) based on the merging frequency. i ,x i+1 The final output semantic unit sequence is u = [u1, u2, ..., u...]. N ], where u = g BPE (x), and uses semantic units as the basic granularity for subsequent semantic modeling.

[0080] S12. A pre-trained language classification model is adopted, wherein the pre-trained language classification model is an XLM-R model. Language identification is performed on the semantic unit sequence u to extract the global context vector h = f. θ (u), then the language label is output by a linear classifier. Where W and b are model parameters. Based on the encoding specifications corresponding to the identified language tags, the semantic units are standardized and uniformly converted to UTF-8 encoding, outputting a sequence of semantic units with consistent encoding.

[0081] S13. Perform part-of-speech tagging on the above semantic units, and use the BiLSTM-CRF model for structured annotation; assign each semantic unit u i Mapped to word vector embedding e i The context representation h is obtained by inputting a bidirectional LSTM. i Then, the syntax tag sequence is obtained through CRF decoding:

[0082]

[0083] Where y represents the set of grammatical tags, specifically including nouns, verbs, adjectives, adverbs, prepositions, and conjunctions.

[0084] S14. Using language and grammar tags, and employing a graph structure construction algorithm based on dependency parsing, extract subject-predicate relations, modification structures, and dependency relations between semantic units to construct a dependency relation structure graph g = (V, E), where V = u1, u2, ..., u N Let E be the set of semantic unit nodes, and let E be the set of semantic dependency edges, which includes syntactic directions and semantic dependency relationships.

[0085] S15. Unify the language tag identifier, grammar tag, and dependency relationship structure diagram into a structured grammatical feature set, and output the final semantic unit sequence.

[0086] In the initial stage of the semantic recognition process, this invention first receives raw multilingual text input by the user and removes illegal characters, control characters, redundant punctuation, and repeated spaces through character cleaning operations to obtain a normalized text sequence. Then, it uses a BPE (BytePairEncoding) algorithm to segment the normalized text into semantic units, outputting a sequence of semantic units as the basic granularity for subsequent modeling. Next, a pre-trained XLM-R language classification model is used to identify the language of the semantic unit sequence, extracting a global context vector and outputting language labels through a linear classifier. Finally, a unified encoding conversion is performed based on the recognition results to output...

[0087] Semantic units are encoded in UTF-8. Based on this, a BiLSTM-CRF model is used for part-of-speech tagging of the semantic units. A bidirectional LSTM is used to obtain the context representation, which is then combined with CRF for structured decoding, outputting the grammatical tag corresponding to each semantic unit. Further, combining the language tag and grammatical tag, a dependency relation structure graph is constructed based on a dependency parsing algorithm to extract subject-verb, modification, and dependency relationships between semantic units. Finally, the language tag, grammatical tag, and dependency relation structure graph are uniformly encapsulated to generate a sequence of semantic units with structured grammatical information, providing an accurate and consistent basic grammatical representation for subsequent context modeling and semantic understanding.

[0088] In this embodiment, S2 specifically includes:

[0089] S21. Obtain dialogue data from multiple consecutive interaction rounds in the current user session. Each round of interaction data includes user input text and system response text, arranged in chronological order to form an initial set of context fragments, denoted as:

[0090]

[0091] Where u i r represents the user input in the i-th round. i This represents the system response, and T-1 represents the total number of historical rounds before the current interaction round.

[0092] S22. Extract the semantic representation h of each historical interaction segment. i And combined with the semantic representation h of the current user input T Perform relevance calculations to obtain the semantic similarity score s of the context segments. i :

[0093]

[0094] Where cos(·,·) represents the cosine similarity function.

[0095] S23. Assign a round decay weight γ to each historical interaction segment. i The distance d between this weight and the interaction round i =Ti is inversely proportional to the setting:

[0096] γ i =exp(-α·d i );

[0097] Where α is the decay coefficient, used to control the rate at which the importance of historical rounds decreases.

[0098] S24. Score based on semantic similarity. i with round decay weight γ iCalculate the importance score w for each historical segment. i :

[0099] w i =s i ·γi;

[0100] Based on the set threshold τ, select the option that satisfies w. i Highly relevant fragments ≥τ constitute the effective context set C. * :

[0101] C * ={(u i ,r i )∣w i ≥τ};

[0102] S25. Reorder the interaction fragments in the filtered set of valid contexts according to their chronological order in the original conversation. Let the round indices of these fragments in the original dialogue be i1, i2, ..., i K Where i1 <i2<…<i K That is, segments that appear earlier in time are arranged first, and segments that appear later in time are arranged last. The sorted set of contexts is denoted as C. ordered The context state chain structure is represented as a sequence of interaction pairs arranged chronologically. Where u ij Indicates the i-th j The user input wheel, r ij This indicates the corresponding system response.

[0103] S26. For the context state chain structure sorted chronologically, extract the semantic representation vector corresponding to each round of interaction segment to form a context nested vector sequence, denoted as:

[0104]

[0105] In a context-nested vector sequence, for any two adjacent rounds of interaction pairs (h) ij ,h ij+1 ), calculate its semantic evolutionary dependencies, and combine the original round order with the interaction order index to construct a hierarchical semantic structure information chain, represented as:

[0106]

[0107] Where, d j,j+1 This represents the semantic evolution dependency between round j and round j+1, o j,j+1 h represents the turn order of the two in the original context. ij Indicates the i-th jThe round semantic representation vector, where K is the number of interaction rounds in the context state chain structure, and is the number of valid context fragments.

[0108] Meanwhile, based on the system response text r of each round of historical interaction segments ij Extract the identified main intent label y from it. ij Arranged in round order to form an intent label sequence, represented as:

[0109] Y intent =[y i1 ,y i2 ,…,y iK ];

[0110] The intent label sequence serves as the input for subsequent intent state modeling, supporting the state reasoning of the current round's intent graph recognition process and semantic path.

[0111] This invention, in constructing a contextual semantic modeling structure for multi-turn dialogues, first extracts dialogue data from multiple consecutive interaction turns in the current user session. Each turn includes user input and system response text, forming an initial set of context fragments in chronological order. Then, the semantic representation of each historical fragment is extracted, and semantic similarity is calculated by combining it with the current input semantic representation. Simultaneously, a turn-based attenuation weight is set based on the distance between interaction turns. The importance score of each fragment is calculated by fusing similarity and weight, and highly relevant fragments are selected using a set threshold to form an effective context set. The interaction fragments in the effective context set are rearranged in their original chronological order to generate a context state chain structure, and the semantic representation vectors of each turn are further extracted to form a nested context vector sequence. In this sequence, the semantic evolution dependency relationship of any adjacent fragments is calculated, and a hierarchical information chain is constructed by combining the interaction turn order to capture the semantic development context. Simultaneously, identified main intent tags are extracted from the response text of each round of interaction fragments and arranged in chronological order to form an intent tag sequence, providing structured input support for subsequent semantic path state modeling and intent graph recognition. This process effectively enhances the expressive power of semantic evolution and contextual dependencies within the dialogue context.

[0112] In this embodiment, S3 specifically includes:

[0113] S31. The semantic unit sequence, the context nested vector sequence, and the corresponding language label are used together as the input feature set for the semantic modeling stage. The language label is transformed into a language vector through an embedding mapping function and then fused with other features.

[0114] S32. Perform dimension alignment on the semantic unit sequence and the context nested vector sequence, and project them to the semantic space of the same dimension using a linear transformation function; aggregate the dimension-aligned context nested vector sequence into a context representation vector using an aggregation function; concatenate the context representation vector with the language vector to form a contextual prior representation;

[0115] S33. A prefix control mechanism is adopted to inject the contextual prior representation into the beginning of the semantic modeling input stream, forming a prefix guidance structure. The prefix control mechanism refers to explicitly embedding the contextual prior representation into the sequence modeling process, and guiding the modeling attention by adjusting the contextual representation weights of the input sequence.

[0116] S34. In the pre-semantic modeling stage, a prefix-weighted attention perturbation is introduced for each semantic unit based on the prefix regulation mechanism, and the attention score α between it and the prior representation is calculated. i :

[0117]

[0118] in, This represents the aligned representation of the i-th semantic unit. This represents the aligned representation of the j-th semantic unit;

[0119] The guided semantic unit vector is:

[0120]

[0121] in A learnable linear transformation matrix used to project the context prior vector onto the vector. In the same space, so that inner product calculations can be performed.

[0122] S35. A semantic modeling mechanism based on a multi-head attention structure is used to model the perturbed prefix guidance structure and construct a semantic representation sequence. The overall structure of the semantic modeling mechanism is a standard Transformer encoder, including position encoding, a multi-head self-attention mechanism, a feedforward neural network, and a normalization module; the final output is a semantic representation sequence containing context-aware information.

[0123] In the semantic modeling stage, this invention first uses a set of input features, including a sequence of semantic units, a sequence of nested context vectors, and language labels. The language labels are transformed into language vectors using an embedding mapping function. Then, a linear transformation function is used to perform dimension alignment on the semantic unit sequence and the nested context vector sequence. An aggregation function is then used to integrate the nested context vector sequence into a context representation vector, which is concatenated with the language vectors to form a contextual prior representation. This prior representation is injected into the front of the semantic modeling input stream through a prefix modulation mechanism, thus constructing a prefix guidance structure. Before modeling, a context-based weighted attention perturbation is introduced into each semantic unit, and its attention score with the contextual prior representation is calculated to generate a guided semantic vector. Based on this, a standard Transformer encoder is used as the semantic modeling mechanism. A multi-head self-attention mechanism and a feedforward network are used to model the prefix guidance structure, ultimately generating a semantic representation sequence that integrates contextual information and semantic structure, providing deep semantic expression support for main intent recognition and task generation.

[0124] In this embodiment, S4 specifically includes:

[0125] S41. Based on the semantic representation sequence and context nested vector sequence generated in the current round, and in conjunction with the semantic context representation, retrieve from the semantic knowledge graph any sequence with a correlation higher than a set threshold τ with the semantic representation sequence and context nested vector sequence generated in the current round. s The candidate intent set is composed of registered intent nodes, where each intent node is defined as a four-tuple including an intent label, task description, a set of associated semantic entities, and applicable context conditions. The task description, semantic entities, and applicable conditions of each candidate intent are encoded according to semantic instruction rules to construct a candidate intent embedding sequence. To support structured modeling of semantic background, task description, and contextual constraints in intent recognition tasks, a semantic knowledge graph is introduced as an organizational carrier of intent-level task knowledge. Through the association relationships between intent nodes and semantic entity nodes, the semantic knowledge graph supports intent retrieval and contextual semantic relevance matching, constructing a semantically consistent candidate intent set, providing structural support for subsequent intent graph recognition.

[0126] S42. Based on the responses of each round of historical interaction segments in the context state chain structure, extract the identified main intent tags, arrange them in the order of interaction rounds to form a main intent map tag sequence, and input the main intent map tag sequence into the Gated Recurrent Unit (GRU) model for modeling. The GRU unit generates a semantic path state vector s based on the temporal dependencies and semantic transition characteristics of the semantic tag sequence. path ;

[0127] h j =GRU(e j ,hj-1 ),s path =h K ;

[0128] Among them, e j h represents the embedding vector of the j-th idea graph label. j Let h represent the hidden state of the GRU at time step j, K be the length of the main intent tag sequence, and h be the value of the hidden state. K This indicates the hidden state following the last tag in the GRU unit's encoded idea graph tag sequence.

[0129] S43. Perform a concatenation operation on the semantic vector and semantic path state vector of each candidate intent to form a joint semantic representation. Input all joint semantic representations into a feedforward neural network, and combine the semantic modeling mechanism and the context instruction preference modeling mechanism to output the matching degree score s of each candidate intent in the current context. k A higher matching score indicates a stronger consistency between the candidate's intent and the semantic context of the current round.

[0130] s k =f FFN ([v k ;s path ]);

[0131] Where v k Let f represent the semantic vector of the candidate intent k, and [·,;,·] represent the vector concatenation operation. FFN This represents a feedforward neural network.

[0132] S44, Score the matching degree of all candidate intents. k Sort the intent tags in descending order and select the highest-scoring intent tag as the main intent tag for the current round. Select the intent tags ranked 2nd to δth from the sorted list to form a candidate tag set, where δ is the preset upper limit of the number of candidate tags, which is used for subsequent correction feedback and backtracking verification.

[0133] In the idea graph recognition stage, this invention first combines the semantic representation sequence generated in the current round with the context nesting vector sequence to jointly construct a semantic context representation. Then, it retrieves a set of candidate intentions from the semantic knowledge graph whose relevance to this context representation is higher than a set threshold. Each candidate intention consists of a registered intention node, defined as a quadruple containing an intention label, task description, a set of associated semantic entities, and applicable context conditions. All nodes are encoded according to semantic instruction rules to construct a candidate intention embedding sequence. The semantic knowledge graph, as a structured carrier of task-level semantic knowledge, supports semantic association matching between intentions and context. Based on this, the idea graph label sequence is extracted from the historical context state chain and input into a GRU model to capture temporal dependencies and semantic changes, outputting a semantic path state vector. Subsequently, the candidate intention semantic vector and the semantic path state vector are concatenated to form a joint semantic representation, which is input into a feedforward neural network. Combining semantic modeling and context instruction preference modeling mechanisms, the matching score of the candidate intentions is calculated. Finally, the intentions with the highest matching scores are selected as the main intention label for the current round, and a set of candidate labels consisting of the second-highest-scoring candidate intentions is generated to support subsequent task execution and feedback correction mechanisms.

[0134] In this embodiment, S5 specifically includes:

[0135] S51. Based on the main intent tag identified in the current round, retrieve a task template that matches the main intent tag from the predefined task template library. The predefined task template library is a set of structured semantic task configurations. In the predefined task template library, each task template corresponds to a specific intent tag and includes the task's structural definition, semantic slot configuration, task execution elements, and matching conditions. The predefined task template library serves as an external knowledge support component in the semantic recognition process, providing standardized references for generating the service response structure of the main intent tag.

[0136] S52. Construct the slot filling structure of the task template. Based on the slot type defined in the task template, determine the set of slot fields to be filled, including slot fields, slot fields and constraint fields.

[0137] S53. Based on the semantic vector representation in the semantic representation sequence, perform a semantic unit-level position labeling operation, identify the semantic role of the semantic unit, and determine the semantic role of the task template corresponding to the current main graph label:

[0138]

[0139] Where, r i Represents the semantic role label of the i-th semantic unit; R represents the set of semantic roles defined in the task template; v i Represents semantic unit ui Vector representation in a semantic representation sequence; y intent Indicates the current idea graph label; P(r|v i ,y intent ) represents the semantic unit u given the semantic vector and the idea graph label. i The conditional probability of belonging to role r.

[0140] S54. Based on the semantic role and slot type, complete the type mapping between semantic units and slot fields, and fill each semantic unit into the corresponding slot defined in the task template.

[0141] S55. Integrate the populated slot fields and task templates to output structured semantic task units:

[0142]

[0143] Among them, T task The structured semantic task unit represents the final output; s k This represents the k-th slot field in the task template; f k This represents the semantic value obtained by mapping the semantic unit and filling it into the slot field; M is the number of slot fields defined in the task template.

[0144] Structured semantic task units serve as the semantic expression basis for service response logic, supporting subsequent response generation processes and business interface call processes.

[0145] In the structured semantic task construction phase, this invention first retrieves matching task templates from a predefined task template library based on the main intent tags identified in the current round. The predefined task template library, as an external knowledge support component in the semantic recognition process, contains structured semantic task configurations corresponding to each intent tag, specifically defining the task structure, semantic slot types, task execution elements, and matching conditions. The system constructs a slot filling structure, determining the set of slot fields to be filled based on the preset slot types in the task template, including basic slot fields and slot fields with constraints. During the filling phase, the system performs semantic role recognition on semantic units based on the semantic vector representation in the semantic representation sequence, determining their semantic roles under the task template, and using semantic roles as a bridge to complete the type mapping between semantic units and slot fields. Finally, the filled slot fields are integrated with the task template to output structured semantic task units, providing a unified semantic expression basis for subsequent service response generation and interface calls.

[0146] In this embodiment, S6 specifically includes:

[0147] S61. Receive the structured semantic task unit output from the previous round of semantic task processing as the input basis for generating the current service response;

[0148] S62. Based on the main intent tags and slot field values ​​contained in the structured semantic task unit, match the preset business interface call mapping rules in the task template to retrieve the target interface path corresponding to the current semantic task. The business interface call mapping rules refer to a set of structured matching logic established for the correspondence between different main intent tags and slot field values, used to accurately map the main intent tags and their associated slot information contained in the structured semantic task unit to the target interface path that can be called in the business processing flow. The business interface call mapping rules consist of intent tags, a set of slot fields, and target interface paths, supporting dynamic association and binding of various semantic intents and interfaces, ensuring that after the current semantic task completes semantic recognition, it can automatically locate the correct interface entry according to the matching rules, thereby realizing a semantically driven interface call process.

[0149] S63. Based on the interface specification of the target interface path, construct an interface call data encapsulation body that conforms to the parameter specification. The interface call data encapsulation body is used to carry the main graph label and the values ​​of each slot field, completing the format mapping and semantic filling from the structured semantic task unit to the interface parameter structure. The parameter specification refers to the parameter structure constraints and format requirements defined by the interface provider for each target interface path, including the naming method, data type, nesting hierarchy, transmission location, and character encoding requirements of the parameter fields. In the process of constructing the interface call data encapsulation body, the main graph label and the values ​​of each slot field must be accurately filled into the interface parameter structure according to the parameter specification to ensure that the generated call data has parsability and legality, thereby ensuring that the subsequent interface service can respond stably and execute business operations correctly.

[0150] S64. Based on the language tag identifier and context nesting vector sequence of the current semantic task, a predefined multilingual template generation method is invoked to generate multilingual response content, ensuring that the response content is consistent with the current context in terms of semantic logic and language expression. The predefined multilingual template generation method refers to a natural language generation mechanism that, for different language tags, uses the main graph tags and slot field information in the structured semantic task unit to call the corresponding language template to fill semantic content. Each language template has multiple task response styles preset according to standard expression sentence patterns. Slot placeholders are reserved in the template to receive slot field values ​​from the structured semantic task unit for dynamic replacement. The predefined multilingual template generation method ensures that the final generated response text is consistent with the current context in terms of semantic logic and language expression, and can output natural expressions that conform to language habits according to the user's language category, thereby improving the language adaptation capability and user interaction experience in the semantic service process.

[0151] S65. Bind the multilingual response content to the interface call data encapsulation body to construct a complete service response data packet, which serves as the semantic output representation of this round of semantic tasks;

[0152] S66. The service response data packet is sent to the client through a predefined service call channel, completing the response delivery for the current round of semantic tasks and forming a closed-loop processing path from semantic recognition to service feedback. The predefined service call channel refers to a pre-established set of general communication path configurations for sending service response data packets to the target client. It supports multiple protocol formats such as HTTP, WebSocket, and MQTT, and has data format verification, interface authentication, exception handling, and response confirmation mechanisms. As the terminal carrier module of the semantic understanding process, the service call channel is responsible for accurately delivering the complete service response data packet, which is composed of structured semantic task units and multilingual response content, to the client, realizing a closed-loop path from semantic recognition to service feedback, and ensuring the accurate delivery of semantic task execution results and the consistency of user responses.

[0153] In the service response generation phase, this invention uses the structured semantic task units output from the previous semantic task as input. First, based on the main intent tags and slot field values ​​contained within, it matches the pre-defined business interface call mapping rules in the task template to retrieve the target interface path corresponding to the current semantic task. The business interface call mapping rules ensure that semantically driven interface calls accurately locate the target business entry point by constructing a mapping relationship between the main intent graph, slot fields, and target interface paths. Subsequently, based on the retrieved target interface path, an interface call data encapsulation body is constructed according to the interface specification, completing the format mapping and semantic filling of semantic task information to the interface parameter structure. To improve the language adaptability of the response content, the system further combines the current language tag and context nesting vector, calling a predefined multilingual template generation method to fill the structured semantic task information into the standard response template, generating multilingual response text highly consistent with the context. Finally, the interface call data encapsulation body is bound to the multilingual response content to generate a complete service response data packet. This data is then accurately sent to the client through a service call channel with protocol adaptation, authentication verification, and response confirmation capabilities, completing the closed-loop path from semantic recognition to service feedback.

[0154] Example 1:

[0155] To verify the feasibility of this invention in practice, it was applied to the semantic recognition and response generation module of a certain intelligent customer service platform in a multilingual, multi-turn dialogue scenario. This platform serves integrated e-commerce and logistics companies and needs to provide stable and accurate automatic question-and-answer capabilities to users in multiple regions worldwide. The platform's original semantic recognition model, based on a traditional single-turn BiLSTM architecture, struggles to fully understand the semantic evolution and contextual dependencies in users' multi-turn expressions. Especially in complex contexts such as non-native language expressions, ambiguous instructions, and cross-turn ellipsis, it frequently suffers from misinterpretation of intent, missing slot recognition, and inconsistent response styles, leading to decreased user satisfaction, increased human intervention in customer service, and low system efficiency.

[0156] After deploying the proposed "Multi-Context Semantic Recognition and Understanding Method Based on a Large Language Model" in this scenario, the system first performs standardized preprocessing on the multilingual text input by the user, and then identifies the language tags corresponding to the text based on the XLM-R model. Subsequently, the system divides the text into basic semantic units using the BytePairEncoding algorithm, and then constructs a context-nested vector sequence by combining user questions and system responses from historical conversations. The system scores and filters the importance of historical contexts through semantic similarity and round decay mechanisms. Next, the system adopts a prefix regulation mechanism to fuse context representations with language vectors and guide the semantic modeling structure, explicitly constructing contextual prior representations within the Transformer encoder. After semantic modeling is completed, the system combines historical idea graph tag sequences and semantic path state vectors to construct candidate intention semantic vectors, and introduces a context instruction preference mechanism for multi-dimensional scoring to select the optimal idea graph and candidate intention set. Finally, the system calls the task template matching the idea graph to complete semantic slot extraction, task unit structuring, and multilingual response generation, and sends the generated response to the client through a unified interface, forming a complete closed loop from semantic recognition to service response.

[0157] To comprehensively evaluate the performance advantages of this invention, we conducted multi-dimensional comparative tests using the original platform version (Baseline) and the improved version integrating this invention (Proposed). The test sample covered five typical business scenarios (account binding, logistics tracking, order after-sales service, preferential policies, and frequently asked questions), involving five languages: English, Chinese, German, Spanish, and French. The total number of dialogue rounds exceeded 48,000, with approximately 3,400 users, and the test period was 30 days. As shown in Table 1, the following are the comparative data for key indicators:

[0158] Table 1. Comparison of the application evaluation of multi-context semantic recognition methods in cross-language customer service platforms.

[0159]

[0160] As can be seen from the table above, the method of this invention demonstrates significant advantages in semantic recognition, slot extraction, response generation, and interaction efficiency, especially exhibiting stronger robustness in complex contexts such as non-standard expressions, mixed language usage, and multi-turn ellipsis. It is worth noting that the prefix regulation mechanism and context instruction preference modeling mechanism integrated in this invention play a crucial role in improving the understanding of historical intent trajectories, semantic consistency judgment, and response fluency, ultimately increasing the overall semantic task closure rate of the platform to over 95%.

[0161] Therefore, this invention not only has innovative theoretical structure, but also demonstrates excellent engineering applicability and commercial value in practical deployment. It is particularly suitable for scenarios such as intelligent customer service, knowledge Q&A, and intelligent assistant that are designed for multilingual users, have complex task structures, and require high semantic expression flexibility.

[0162] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A method for multi-context semantic recognition and understanding based on a large language model, characterized in that, Comprise the following steps: S1, the user input multi-language text performs standardization processing operation, generates semantic unit sequence; S2, extract historical interaction fragments from user session, adopt adaptive screening mechanism to build context nested vector sequence; S3, fusion semantic unit sequence, context nested vector sequence and language label identification, build context priori representation, adopt prefix control mechanism and inject context vector into semantic coding process, generate semantic representation sequence; S4, adopt the gating cycle unit to the intention label sequence generated in historical interaction modeling, output semantic path state vector, according to the feedforward neural network, determine the main intention label and alternative intention label; S5, based on the main intention label, call the task template, build slot filling structure, complete slot field extraction and semantic filling, generate structured semantic task unit; S6, according to the main intention label and slot field matching business interface, generate multi-language response content and send, complete semantic recognition and service response closed loop.

2. The method according to claim 1, wherein, The S1 specifically includes: S11, receive the original multi-language text input by user as input data source; carry out character cleaning operation to input data source, delete illegal characters, special control symbols, redundant punctuation symbols and repeated spaces, then carry out semantic unit segmentation operation, adopt semantic unit decomposition algorithm based on BPE language model, map the processed input data to semantic unit; S12, adopt pre-training language classification model to determine the language category of input data, generate language label identification; according to the language rule of language label identification, standardize the text encoding format, uniformly convert to UTF-8 encoding, output semantic unit; S13, carry out part-of-speech identification to semantic unit, output the corresponding grammar tag of each semantic unit, the grammar tag includes noun, verb, adjective, adverb, preposition and conjunction; S14, extract the subject-predicate relationship, modification structure and dependent relationship between language units through language label identification and grammar tag, generate dependency relationship structure diagram; S15, encapsulate language label identification, grammar tag and dependency relationship structure diagram as semantic unit sequence.

3. The method of claim 1, wherein the method further comprises: The S1 specifically includes: S21, obtain the dialogue data of continuous multiple interaction rounds in current user session, each round of interaction data includes user input text and response text, form initial context fragment set in time sequence; S22, extract the semantic representation of each historical interaction fragment, and combine the semantic representation of current user input to carry out correlation calculation, obtain the semantic similarity score of context fragment; S23, assign round attenuation weight to each historical interaction fragment, set according to the distance between round attenuation weight and current interaction round; S24, calculate the importance score of fragment according to semantic similarity score and round attenuation weight, and select high correlation fragment by using adaptive screening mechanism to form effective context set; S25, arrange the fragments in effective context set in time sequence, build context state chain structure; S26, mark semantic evolution dependency relationship and interaction order index in the context state chain to form an information chain with hierarchical semantic structure, and output a context nested vector sequence; according to the response of each round of historical interaction fragment in the context state chain structure, extract the identified main intent label, and arrange it in order of interaction round to form an intent label sequence.

4. The method of claim 1, wherein the method further comprises: The S3 specifically comprises: S31, the semantic unit sequence, the context nested vector sequence and the corresponding language label identification are taken as an input feature set of semantic modeling; S32, the semantic unit sequence and the context nested vector sequence are dimensionally aligned, and the language label identification is combined to construct a learnable context prior representation; S33, a prefix control mechanism is adopted, the context prior representation is taken as a control signal and inserted into the front part of the semantic modeling input stream to form a prefix guide structure; S34, based on the prefix guide structure, the weight distribution of the semantic unit sequence in the semantic modeling input is dynamically disturbed; S35, the prefix guide structure after the action of the prefix control mechanism is sent into the semantic modeling, and the structure information of the semantic unit sequence, the context nested context and the language label embedding are fused in the semantic modeling process to output a semantic representation sequence containing context-aware semantics.

5. The method of claim 1, wherein the method further comprises: The prefix control mechanism refers to that in the semantic modeling stage, the context prior representation obtained by fusing the semantic unit sequence, the context nested vector sequence and the language label identification is inserted into the front part of the semantic modeling input sequence as a prefix vector to construct a prefix guide structure; the prefix control mechanism projects the context prior representation into the same representation space as the semantic unit through a linear transformation function; in the multi-head self-attention mechanism, based on the dot product similarity between the semantic unit vector and the prefix vector, the attention score is calculated, and the prefix weighting disturbance is introduced in the attention weight distribution, the guided semantic unit representation sequence is input into the standard Transformer encoder structure, and the semantic modeling operation including position encoding, multi-head attention, feedforward neural network and normalization is performed to generate the semantic representation result.

6. The method of claim 1, wherein the method further comprises: The S4 specifically comprises: S41, based on the semantic representation sequence and the context nested vector sequence output in the current round, combining the registered intent nodes and semantic instruction rules in the semantic knowledge graph, a candidate intent set with a semantic relevance higher than a set threshold is retrieved; for each candidate intent in the candidate intent set, a standardized semantic vector representation is constructed combining the corresponding instruction description, semantic associated entity and context applicable condition to form a candidate intent embedding sequence consistent with the current context; S42, the main intent label is extracted from the context state chain generated from the historical interaction fragment, and an intent label sequence is formed in time sequence, which is used to depict the intent evolution trajectory expressed by the user in the multi-round interaction process; the intent label sequence is embedded and input into the gated recurrent unit structure to output a semantic path state vector; S43, splice the semantic path state vector with each candidate intention semantic vector in the candidate intention embedding sequence to form a joint semantic representation pair representing "historical path-current candidate intention"; input the joint semantic representation pair into a feedforward neural network to output a matching degree score of each candidate intention under the current context by combining the semantic modeling mechanism and the context instruction preference modeling mechanism; S44, sort all candidate intention matching degree score results in descending order, select the candidate intention with the highest matching degree score value as the main intention label of the current round; select the candidate intention labels ranked 2th to δth from the sorting result to form a candidate label set, δ is a preset upper limit of the number of candidate labels.

7. The method of claim 1, wherein the method further comprises: The S5 specifically includes: S51, based on the main intention label identified in the current round, retrieve a task template matching the main intention label from a pre-defined task template library; S52, build a slot filling structure of the task template, determine a set of slot fields required to be filled based on the slot types defined in the task template, including slot fields, slot fields and constraint condition fields; S53, according to the semantic vector representation in the semantic representation sequence, perform a semantic unit level position labeling operation, perform semantic role recognition on the semantic unit, and determine the semantic role of the task template corresponding to the current main intention label; S54, according to the semantic role and the slot type, complete the type mapping of the semantic unit and the slot field, and fill each semantic unit into the corresponding slot defined in the task template; S55, integrate the filled slot field and the task template, and output a structured semantic task unit.

8. The method of claim 1, wherein the method further comprises: The S6 specifically includes: S61, receive the structured semantic task unit output by the previous round of semantic task processing result as the input basis for generating the current service response; S62, according to the main intention label and each slot field value contained in the structured semantic task unit, match the pre-defined business interface call mapping rule in the task template, and retrieve the target interface path corresponding to the current semantic task; S63, according to the interface specification of the target interface path, construct an interface call data encapsulator conforming to the parameter specification, which is used to carry the main intention label and each slot field value, complete the format mapping and semantic filling from the structured semantic task unit to the interface parameter structure; S64, according to the language label identifier of the current semantic task and the context nesting vector sequence, call the pre-defined multilingual template generation method to generate multilingual response content; S65, bind the multilingual response content with the interface call data encapsulator to construct a complete service response data packet; S66, send the service response data packet to the client through the pre-defined service call channel to complete the response delivery of the current round of semantic task, and form a closed loop processing path from semantic recognition to service feedback.

Citation Information

Cited By

  • Vehicle-mounted edge computing task unloading method based on semantic communication

    CN121957726A

  • A vehicle-mounted edge computing task offloading method based on semantic communication

    CN121957726B

  • Clinical experiment environment simulation interaction method based on knowledge graph

    CN122314431A