User intention recognition method based on context semantic analysis

By constructing a dual-space structure and introducing a folding-unfolding operator mechanism, the problem of aligning the symbolic logic space with the continuous semantic space is solved, achieving high accuracy and stability in user intent recognition, which is suitable for human-computer interaction systems such as intelligent customer service and voice assistants.

CN121435979APending Publication Date: 2026-01-30安徽明生恒卓科技有限公司

Patent Information

Application Number
CN202511567737.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-30
Publication Date
2026-01-30

AI Technical Summary

Technical Problem

Existing user intent recognition methods lack structural alignment between the symbolic logic space and the continuous semantic space, resulting in weakened logical constraints, disconnected semantic representations, unstable model convergence, and difficulty in achieving high-precision and interpretable recognition in multi-turn dialogue scenarios.

Method used

A dual-space structure of symbolic logic space and continuous semantic space is constructed. A dual mapping mechanism of folding operator and unfolding operator is introduced. Semantic deviation is dynamically corrected and logical conflicts are detected through folding-unfolding loop. Hierarchical intent decoding and consistency verification are performed in combination with symbolic logic constraints.

Benefits of technology

It improves the accuracy of intent recognition and model convergence stability in multi-turn dialogue scenarios, reduces semantic drift and error triggering rate, and enhances the semantic understanding depth and execution security of human-computer interaction systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121435979A_ABST
    Figure CN121435979A_ABST
Patent Text Reader

Abstract

The invention discloses a user intention recognition method based on context semantic analysis, which comprises the following steps of: collecting multiple rounds of session texts, generating a semantic analysis graph, and constructing a symbol logic space consisting of an intention logic predicate, a slot constraint rule and a knowledge template and a continuous semantic space consisting of context embedded vectors; defining a dual mapping mechanism of a folding operator and an unfolding operator, and constraining reversible consistency through folding reconstruction loss; in the inference stage, intention candidates are generated based on a knowledge base, folding-unfolding circulation is executed for semantic alignment and logic verification, when an alignment error meets a threshold value, a semantic state vector subjected to folding alignment is output, and a final recognition result of a deliberate map, sub-intentions and slot position parameters is generated through an intention decoder. Through the bidirectional folding mapping and cyclic correction mechanism of the symbol logic space and the continuous semantic space, the accuracy, stability and interpretability of user intention recognition are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of natural language processing technology, and in particular to a method for user intent recognition based on contextual semantic parsing. Background Technology

[0002] With the widespread application of intelligent voice assistants, online customer service, and human-computer dialogue systems, user intent recognition has become a core problem in natural language understanding. Existing methods are mainly divided into symbolic logic reasoning and neural network semantic embedding: the former relies on intent templates, rules, and knowledge graphs to achieve semantic matching, with a clear logical structure but difficulty in adapting to colloquial, cross-domain, and ambiguous semantic scenarios; the latter uses deep models for continuous semantic modeling, with high recognition accuracy but poor interpretability, and is prone to logical conflicts and semantic drift.

[0003] Recent neural-symbolic hybrid methods have attempted to introduce knowledge graphs or logical rules into neural networks, but most remain at the level of loss constraints or feature fusion, only achieving unidirectional information injection and failing to establish a structural alignment relationship between the symbolic logic space and the continuous semantic space. As a result, the logical constraints of the system are weakened during reasoning, symbolic and semantic representations become disconnected, and the model convergence is unstable.

[0004] Therefore, how to provide a user intent recognition method based on contextual semantic parsing is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0005] One objective of this invention is to propose a user intent recognition method based on contextual semantic parsing. This invention constructs a dual-space structure of symbolic logic space and continuous semantic space, and introduces a dual mapping mechanism of folding and unfolding operators to achieve reversible consistency between symbolic logic representation and continuous semantic representation. During the inference stage, semantic deviations are dynamically corrected and logical conflicts are detected through folding-unfolding loops to ensure dual consistency of recognition results at both semantic and logical levels. During the output stage, hierarchical intent decoding and consistency verification are performed in conjunction with symbolic logic constraints, thereby improving the accuracy of intent recognition, model convergence stability, and result interpretability in multi-turn dialogue scenarios.

[0006] A user intent recognition method based on contextual semantic parsing according to an embodiment of the present invention includes the following steps: Collect multi-turn conversation input text, perform sentence segmentation, normalization and syntactic analysis on the input text, extract predicate-argument structure and entity relations, and generate semantic parsing graph; Based on the semantic parsing graph, a symbolic logic space and a continuous semantic space are constructed. The symbolic logic space consists of intent logic predicates, slot constraint rules, and knowledge templates. The continuous semantic space consists of context embedding vectors. Define a pair of dual mapping operators, including a folding operator and an unfolding operator, and constrain the invertible consistency of the folding operator and the unfolding operator through a folding reconstruction loss function during the training phase; During the reasoning phase, intent candidates are generated based on the symbolic logic space and knowledge base. The intent candidates are then mapped to the continuous semantic space and fused with the context semantics by the folding operator. The unfolding operator is then used to back-feed back to the symbolic logic space for logical consistency verification. The loop terminates when the space alignment error is lower than a preset threshold, resulting in a folded and aligned semantic state vector. The folded and aligned semantic state vector is input into the intent decoder, which outputs a structured recognition result including the main idea, sub-intents, and slot parameters, and outputs the final intent recognition result when the logic is consistent.

[0007] Furthermore, the steps for generating the semantic parsing graph include: The input text is segmented into sentences, and modal punctuation, colloquial expressions, and abbreviations are standardized into a formal written form. A graph structure analysis algorithm based on dependency syntax is used to identify subject-verb, verb-object, prepositional phrase, and modification dependencies in a sentence and generate the corresponding syntactic dependency tree. Semantic role labels are annotated on the nodes of the syntactic dependency tree; A semantic role recognition network based on bidirectional encoder representation is used to extract verb predicates and their corresponding agent, patient, instrument and target arguments, and a set of predicate-argument pairs is generated based on the dependency relationship between arguments; Using predicate-argument pairs and entity relations as nodes, and argument dependency relations and entity semantic relations as edges, a weighted directed graph structure, namely a semantic parsing graph, is constructed.

[0008] Furthermore, the construction of the symbolic logic space includes: Based on predicate-argument pairs and entity nodes in the semantic parsing graph, the intent logic predicate is used as the core node; Define the parameter dependencies, value range constraints, and mutual exclusion conditions in the slot constraint rules as logical edges; And map the causal, synonym, and hierarchical logical relationships described in the knowledge template into structural connections; Symbolic logic graphs with node type, edge type, and logical weight attributes are generated through graph structure modeling. The logical weights are initialized based on constraint strength, reasoning confidence, and the credibility of the knowledge template source.

[0009] Furthermore, the construction of the continuous semantic space includes: The node sequence in the semantic parsing graph is encoded using a context semantic coding network; Generate a multidimensional semantic feature matrix that includes word vectors, position vectors, and semantic role embeddings; Calculate the context association weights between nodes based on the adjacency relationships in the semantic parsing graph; Local semantic and global contextual features are fused through an attention aggregation mechanism; Forming a high-dimensional embedding representation of a continuous semantic space; Each node in the continuous semantic space is mapped to a corresponding node in the symbolic logical space.

[0010] Furthermore, the dual mapping operator includes a folding operator and an unfolding operator, specifically: Folding operators are used to map node representations and relational structures in symbolic logic space to continuous semantic space; The folding operator mapping function takes the semantic feature vector of the symbolic logical node, the node type identifier, and the adjacency matrix as input; The corresponding continuous semantic embedding is generated through linear transformation, nonlinear activation, and relation-aware weighted aggregation operations; The expansion operator is used to backflip embedded representations from a continuous semantic space into the symbolic logic space; Its mapping function takes a continuous semantic feature matrix and contextual weights as input; After decoding, transformation, and logical constraint projection, the symbolic logical node representation is output to restore the corresponding logical connection relationship; The folding operator and the unfolding operator maintain a one-to-one mapping index at the node level.

[0011] Furthermore, the step of reconstructing the loss function constraints through folding includes: Based on batches of dialogue samples, a semantic parsing graph and the corresponding symbolic logic graph are constructed. Continuous semantic embeddings are obtained through folding operators and symbolic reconstruction representations are generated by back-subtracting the unfolding operators. Calculate the fold reconstruction loss, including semantic reconstruction terms and logical consistency terms; The semantic reconstruction term is used to minimize the difference between the continuous semantic embedding and the target semantic features; The logical consistency term is used to minimize the difference between the symbolic logic structure after resubmission and the original logical relationship; Cyclic consistency regularization is introduced to constrain the deviation between the expansion-folding composite mapping and the identity mapping, and norm constraints are imposed on the mapping weights to stabilize training. The parameters of the folding and unfolding operators are updated using a gradient-based first-order optimization method until the folding reconstruction loss on the validation set converges and the logical consistency index reaches a preset threshold.

[0012] Furthermore, the step of generating the folded and aligned semantic state vector includes: After generating intent candidates based on knowledge base reasoning in the symbolic logic space, the context embedding vector of the current round is used as the input state of the continuous semantic space. The intent candidate is mapped to a continuous semantic space and fused with contextual semantic features using a folding operator; The fusion result is fed back into the symbolic logic space by the expansion operator for logical consistency verification. Calculate the alignment error between the symbol space and the continuous space, wherein the alignment error is determined by both the reconstruction difference of symbolic logical nodes and the similarity of continuous embeddings; When the alignment error is lower than the preset threshold or the number of iterations reaches the upper limit, the fold-unfold loop is terminated and the current semantic state is output as the convergence result.

[0013] Furthermore, the intent decoder includes a semantic feature encoding layer, a hierarchical intent classification layer, and a slot filling layer, specifically: The semantic feature encoding layer is used to receive the folded and aligned semantic state vector, realize the feature dimension mapping through multi-head attention weighting and feedforward transformation, and fuse the node constraint weights in the symbolic logic space to generate a unified semantic representation. The hierarchical intent classification layer adopts a two-layer decision structure. The first layer predicts the intent graph category based on the unified semantic representation, and the second layer predicts the sub-intent labels under the condition of the intent graph. The two layers are constrained by the label dependency matrix, and the output is a set of intent labels that satisfy the logical hierarchy. The slot filling layer is generated based on the slot template corresponding to the intent tag, and the slot keywords, value range and contextual evidence are encoded into slot parameter vectors, which together with the intent tag constitute the structured recognition result.

[0014] Furthermore, the generation of the final intent recognition result includes: Based on the expansion operator, the decoding result is projected onto the symbolic logic space, and the constraint rules in the symbolic logic space are used to detect the dependency, mutual exclusion and value legality between the intent and the slot. When a logical conflict is detected, the prediction result is corrected based on the context consistency score in the collapse-expand loop, or a clarification request is generated to fill in the missing slots. The final user intent recognition result is output only when all intent-slot combinations meet the logical constraints and the consistency score is higher than the preset threshold.

[0015] The beneficial effects of this invention are: This invention constructs a dual-space structure of symbolic logic space and continuous semantic space based on semantic parsing, and introduces a dual mapping mechanism of folding and unfolding operators to achieve an invertible mapping between symbolic logic representation and continuous semantic representation. By constraining the consistency of the two spaces through the folding reconstruction loss function, the model can maintain the continuity of semantic expression and the stability of logical relationships during training and inference.

[0016] This invention employs a folding-unfolding loop mechanism during the inference phase. Through alternating mapping and verification between the symbolic space and semantic space, it dynamically corrects semantic deviations and detects logical conflicts, thereby ensuring the consistency of the recognition results at both the structural and semantic levels. This mechanism enables the model to have self-correcting capabilities, significantly improving the recognition accuracy and convergence stability in complex, multi-turn, and cross-domain dialogue scenarios.

[0017] The intent decoder of this invention combines symbolic logic constraints with hierarchical decoding and consistency verification during the output stage. It automatically determines logical compliance and slot matching before output, ensuring the interpretability and reliability of the final result. Experiments show that this method effectively reduces semantic drift and error triggering rate while maintaining recognition accuracy, thus improving the semantic understanding depth and execution security of human-computer interaction systems. Attached Figure Description

[0018] 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:

[0019] Figure 1 This is a flowchart of a user intent recognition method based on contextual semantic parsing proposed in this invention; Figure 2 This is a schematic diagram of the dual-space construction of a user intent recognition method based on contextual semantic parsing proposed in this invention; Figure 3 This is a diagram of the dual mapping operator mechanism of a user intent recognition method based on contextual semantic parsing proposed in this invention. Detailed Implementation

[0020] 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.

[0021] refer to Figure 1 - Figure 3 A user intent recognition method based on contextual semantic parsing includes the following steps: Collect multi-turn conversation input text, perform sentence segmentation, normalization and syntactic analysis on the input text, extract predicate-argument structure and entity relations, and generate semantic parsing graph; Based on the semantic parsing graph, a symbolic logic space and a continuous semantic space are constructed. The symbolic logic space consists of intent logic predicates, slot constraint rules, and knowledge templates. The continuous semantic space consists of context embedding vectors. Define a pair of dual mapping operators, including a folding operator and an unfolding operator, and constrain the invertible consistency of the folding operator and the unfolding operator through a folding reconstruction loss function during the training phase; During the reasoning phase, intent candidates are generated based on the symbolic logic space and knowledge base. The intent candidates are then mapped to the continuous semantic space and fused with the context semantics by the folding operator. The unfolding operator is then used to back-feed back to the symbolic logic space for logical consistency verification. The loop terminates when the space alignment error is lower than a preset threshold, resulting in a folded and aligned semantic state vector. The folded and aligned semantic state vector is input into the intent decoder, which outputs a structured recognition result including the main idea, sub-intents, and slot parameters, and outputs the final intent recognition result when the logic is consistent.

[0022] In this embodiment, the step of generating the semantic parsing graph includes: The input text is segmented into sentences according to the preset sentence segmentation rules, and regular expression matching and word form merging functions are used to unify modal marks, colloquial expressions, dialect abbreviations and abnormal punctuation into a standard written form. A graph structure analysis algorithm based on dependency syntax is adopted to identify subject-verb, verb-object, prepositional object and modification dependency relations in the sentence and generate the corresponding syntactic dependency tree. Each node in the dependency tree corresponds to a term or phrase unit, and each edge corresponds to the dependency type and direction. Both nodes and edges are attached with part-of-speech tags, dependency type and confidence parameters. Semantic role labels are annotated on the nodes of the syntactic dependency tree. Based on the grammatical position of the verb predicate in the sentence and the syntactic dependency path, the corresponding argument roles are identified and labeled. Argument roles include agent, patient, instrument, target and condition type. The role labeling results are recorded as node attributes. A semantic role recognition network based on bidirectional encoder representation is used to extract verb predicates and their corresponding agent, patient, instrument, and target arguments. A set of predicate-argument pairs is generated based on the dependency relationship between arguments. The network extracts the contextual semantic dependency relationship between verb predicates and arguments through a bidirectional context window mechanism to generate a set of predicate-argument pairs. Each predicate-argument pair is represented as a triple <predicate, argument type, argument content>, while preserving its relative position and dependency path in the syntax tree. Using predicate-argument pairs and entity relations as nodes, and argument dependency relations and entity semantic relations as edges, a weighted directed graph structure, namely a semantic parsing graph, is constructed. The edge weights are calculated based on the context co-occurrence frequency, dependency path length, and semantic similarity, and are dynamically updated according to the time decay factor in multi-turn conversation scenarios.

[0023] This implementation method combines standardized preprocessing, dependency parsing, semantic role labeling, and bidirectional encoder recognition to accurately extract predicate-argument structures and entity relationships. It constructs a weighted semantic parsing graph that includes node types, edge types, and semantic weights, thereby achieving a structured representation of semantic dependencies and high-confidence modeling of contextual associations, and improving the completeness and accuracy of semantic parsing.

[0024] In this embodiment, the construction of the symbolic logic space includes: Based on the predicate-argument pairs and entity nodes in the semantic parsing graph, the intention logic predicate is used as the core node. All predicate-argument pairs are extracted in the semantic parsing graph. The intention expression corresponding to the verb predicate is used as the core node of the symbolic logic space. The argument nodes and entity nodes directly associated with the core node are defined as subordinate nodes, which are used to describe the semantic participants of the intention. Define the parameter dependencies, value range constraints, and mutual exclusion conditions in the slot constraint rules as logical edges. Based on the preset slot constraint rule table, enumerate the dependencies, mutual exclusions, and value restrictions between each slot. For example, when the "target location" slot under a certain main graph depends on the "action type" slot, generate a "dependency" type logical edge between the two nodes. When the values ​​of the two slots cannot coexist, generate a "mutual exclusion" type logical edge. When the value range of the slot is limited by the parent category, generate a "constraint" type logical edge. The causal, synonym, and hierarchical logical relationships described in the knowledge templates are mapped into structural connections. The logical patterns defined in the knowledge template library are read, and the "cause-effect", "synonym substitution", and "hierarchical-hyperarchical" relationships are converted into directional logical edges. Symbolic logic graphs with node types, edge types, and logical weights are generated through graph structure modeling. In the logic graph, each node and edge retains its corresponding type label and logical attribute. The logical weights are initialized based on constraint strength, inference confidence, and knowledge template source credibility. Constraint strength is determined by the dependency level defined by the rule, inference confidence is calculated by the knowledge template matching probability, and source credibility is set according to the manual annotation level of the knowledge template or the data source weight.

[0025] This implementation method constructs a symbolic logic graph with node type, edge type, and logical weight attributes at the symbolic level by extracting logical structures and mapping knowledge constraints based on semantic parsing graphs. This enables hierarchical organization and logical constraint expression between intents, slots, and knowledge templates, improves the interpretability of logical relationships and the accuracy of constraint propagation, and provides a stable symbolic logic foundation for semantic space mapping.

[0026] In this embodiment, the construction of the continuous semantic space includes: The context semantic coding network is used to encode the node sequence in the semantic parsing graph. The node sequence in the semantic parsing graph is used as input to encode the text content, part-of-speech tag and semantic role of each node in multiple layers. A context semantic encoding network with multi-head attention mechanism is adopted to perform weighted calculation of the semantic dependencies of each node in the context, so as to obtain an embedding vector representation that can represent the local semantics and global semantics of the node; All node embeddings are arranged in the order of the semantic parsing graph to form an initial embedding matrix, and then mapped to a fixed-dimensional multidimensional semantic feature matrix through linear projection and normalization operations. The context association weight between nodes is calculated based on the adjacency relationship of the semantic parsing graph. The context dependency strength between adjacent nodes is calculated based on the adjacency matrix of the semantic parsing graph. The distance decay factor and semantic similarity factor are introduced to comprehensively determine the context association weight between nodes. Local semantic and global contextual features are fused through an attention aggregation mechanism; Forming a high-dimensional embedding representation of a continuous semantic space; Each node in the continuous semantic space is mapped to a corresponding node in the symbolic logic space. Based on the node identifier in the symbolic logic space, a mapping index is established between it and the corresponding semantic node in the continuous semantic space to ensure semantic consistency between the two spaces at the node level.

[0027] This implementation achieves multi-layer semantic embedding and context-dependent weighting of semantic parsing graph nodes through context semantic coding networks, multi-head attention weighting, and feature matrix normalization modeling. It generates high-dimensional continuous semantic representations by combining adjacency relationships and similarity calculations, and establishes a mapping index with the symbolic logical space at the node level to achieve structural alignment and semantic consistency between symbols and semantic representations.

[0028] In this embodiment, the dual mapping operator includes a folding operator and an unfolding operator, specifically: Folding operators are used to map node representations and relational structures in symbolic logic space to continuous semantic space; The folding operator mapping function takes the semantic feature vector of the symbolic logical node, the node type identifier, and the adjacency matrix as input; The corresponding continuous semantic embedding is generated through linear transformation, nonlinear activation and relation-aware weighted aggregation operation. The aggregation operation performs weighted summation according to the logical edge type and logical weight to realize the mapping of symbolic structure to semantic features. The expansion operator is used to backflip embedded representations from a continuous semantic space into the symbolic logic space; Its mapping function takes a continuous semantic feature matrix and contextual weights as input; After decoding, transformation, and logical constraint projection, the symbolic logical node representation is output to restore the corresponding logical connection relationship; The folding operator and the unfolding operator maintain a one-to-one mapping index at the node level.

[0029] This implementation achieves a reversible mapping between symbolic logic structures and continuous semantic features by defining a dual mapping mechanism between folding and unfolding operators. The folding operator completes the semantic embedding of symbolic relations, and the unfolding operator completes the logical reversal of semantic representation. The two maintain a one-to-one correspondence at the node level, achieving bidirectional alignment and reversible mapping consistency between semantic features and logical structures.

[0030] In this embodiment, the step of reconstructing the loss function constraint by folding includes: Based on batches of dialogue samples, a semantic parsing graph and the corresponding symbolic logic graph are constructed. Continuous semantic embeddings are obtained through folding operators and symbolic reconstruction representations are generated by back-subtracting the unfolding operators. Calculate the fold reconstruction loss, including semantic reconstruction terms and logical consistency terms; The semantic reconstruction term is used to minimize the difference between the continuous semantic embedding and the target semantic features; The logical consistency term is used to minimize the difference between the symbolic logic structure after resubmission and the original logical relationship; Cyclic consistency regularization is introduced to constrain the deviation between the expansion-folding composite mapping and the identity mapping, and norm constraints are imposed on the mapping weights to stabilize training. The parameters of the folding and unfolding operators are updated using a gradient-based first-order optimization method until the folding reconstruction loss on the validation set converges and the logical consistency index reaches a preset threshold.

[0031] This implementation constrains the mapping process between the folding and unfolding operators through the folding reconstruction loss function. It combines semantic reconstruction terms and logical consistency terms for joint optimization to achieve bidirectional correction of continuous semantic embedding and symbolic logic structure. It introduces cycle consistency regularization and norm constraints to stabilize the training process. It updates the mapping parameters iteratively through gradient optimization to ensure that the model maintains both semantic reconstruction accuracy and logical consistency during convergence.

[0032] In this embodiment, the step of generating the folded and aligned semantic state vector includes: After generating intent candidates based on knowledge base reasoning in the symbolic logic space, the context embedding vector of the current round is used as the input state of the continuous semantic space. The intent candidate is mapped to a continuous semantic space and fused with contextual semantic features using a folding operator; The fusion result is fed back into the symbolic logic space by the expansion operator for logical consistency verification. Calculate the alignment error between the symbol space and the continuous space, wherein the alignment error is determined by both the reconstruction difference of symbolic logical nodes and the similarity of continuous embeddings; When the alignment error is lower than the preset threshold or the number of iterations reaches the upper limit, the fold-unfold loop is terminated and the current semantic state is output as the convergence result.

[0033] This implementation achieves dynamic alignment and convergence of semantic states by performing folding-unfolding loop reasoning between the symbolic logic space and the continuous semantic space. Based on knowledge base reasoning, it generates intent candidates. Through the combined effects of folding mapping and context feature fusion, unfolding back projection and logic verification, it calculates the alignment error based on the symbol reconstruction difference and semantic similarity. When the error meets the convergence condition, it outputs the folded and aligned semantic state vector, thus achieving consistent alignment between semantics and logic.

[0034] In this embodiment, the intent decoder includes a semantic feature encoding layer, a hierarchical intent classification layer, and a slot filling layer, specifically: The semantic feature encoding layer is used to receive the folded and aligned semantic state vector, realize the feature dimension mapping through multi-head attention weighting and feedforward transformation, and fuse the node constraint weights in the symbolic logic space to generate a unified semantic representation. The hierarchical intent classification layer adopts a two-layer decision structure. The first layer predicts the intent graph category based on the unified semantic representation, and the second layer predicts the sub-intent labels under the condition of the intent graph. The two layers are constrained by the label dependency matrix, and the output is a set of intent labels that satisfy the logical hierarchy. The slot filling layer is generated based on the slot template corresponding to the intent tag, and the slot keywords, value range and contextual evidence are encoded into slot parameter vectors, which together with the intent tag constitute the structured recognition result.

[0035] This implementation achieves structured decoding of semantic states by setting up an intent decoder that includes a semantic feature encoding layer, a hierarchical intent classification layer, and a slot filling layer. The semantic feature encoding layer integrates context and symbolic logic constraints to generate a unified semantic representation. The hierarchical intent classification layer determines the main graph and sub-intents level by level according to the label dependency relationship. The slot filling layer generates parameter vectors based on the slot template and outputs structured recognition results, thereby achieving hierarchical consistency and semantic interpretability of intent recognition.

[0036] In this embodiment, the generation of the final intent recognition result includes: Based on the expansion operator, the decoding result is projected onto the symbolic logic space, and the constraint rules in the symbolic logic space are used to detect the dependency, mutual exclusion and value legality between the intent and the slot. When a logical conflict is detected, the prediction result is corrected based on the context consistency score in the collapse-expand loop, or a clarification request is generated to fill in the missing slots. The final user intent recognition result is output only when all intent-slot combinations meet the logical constraints and the consistency score is higher than the preset threshold.

[0037] This implementation introduces a symbolic logic constraint verification mechanism in the output stage to achieve logical consistency control of the intent recognition result. Based on the expansion operator, the decoding result is projected onto the symbolic logic space to detect the dependency, mutual exclusion, and value legality of the intent and slot. When a logical conflict occurs, the result is corrected or a clarification feedback is triggered based on the context consistency score. The final user intent recognition result is output only when all logical constraints are met and the consistency score is up to standard, ensuring the correctness and interpretability of the recognition output.

[0038] Example 1: To verify the feasibility of this invention in practice, it was applied to an online customer service system. This embodiment selects multi-turn dialogue data from customer service scenarios as experimental samples. The corpus is derived from the interaction logs between the online customer service system and real users, covering five types of intents: inquiry, complaint, order placement, payment, and refund. The training samples number approximately 200,000, with an average multi-turn length of 4.8 turns and an average sentence length of 16.2 words.

[0039] During the input phase, the system receives a multi-turn conversational text stream from the user, such as: User: I would like to check my last order.

[0040] System: Which platform was this order from? User: XX, mobile phone order.

[0041] The preprocessing module performs sentence segmentation and normalization operations, converting colloquial short sentences into standard written language. Subsequently, the dependency parser generates a syntactic dependency tree, identifying subject-verb, verb-object, prepositional phrase, and modification relations; the semantic role labeling module extracts argument roles such as agent, patient, and target, forming a set of predicate-argument pairs.

[0042] Table 1 Examples of predicate-argument pairs

[0043] Using predicate-argument pairs and identified entities as nodes, and argument dependency relations and semantic relations as edges, a weighted directed graph is constructed to form a semantic parsing graph. The edge weights are calculated based on the co-occurrence frequency of the context and the length of the dependency path.

[0044] After the semantic parsing graph is generated, the system uses verb predicates such as "check order," "refund," and "complaint" as core intent nodes based on the knowledge template. Slot constraint rules define parameter dependencies, such as "order number depends on platform" and "refund amount and payment method are mutually exclusive." These logical relationships form the constraint edges of the symbolic logic graph.

[0045] The knowledge template further supplements logical relationships such as "cause-effect" and "superior-inferior", realizing the structured modeling of the logic diagram.

[0046] The continuous semantic space is constructed using a contextual semantic encoding network. Each node is input with its text, part-of-speech tag, and semantic label, which are weighted by multi-head attention to generate a 512-dimensional embedding vector. The association weights between nodes are calculated based on the adjacency matrix and semantic similarity, ultimately forming a high-dimensional semantic feature matrix.

[0047] The symbolic logic graph and the semantic embedding matrix establish a mapping index at the node level to ensure that the two spaces are structurally consistent and provide input for subsequent folding mapping.

[0048] The folding operator receives the symbolic logic node vector and the logic constraint matrix, and outputs a continuous semantic embedding; the unfolding operator then projects the semantic embedding back into the symbolic logic space to recover the logical relationships. Cycle consistency regularization and parameter norm constraints are added during training to stabilize the mapping.

[0049] Training was performed using the Adam optimizer with a learning rate of 1. The batch size is 64, and the system converges on the validation set after 20 epochs of training. During inference, the system generates intent candidates based on the knowledge base in the symbolic logic space, maps them to the continuous semantic space through the folding operator and fuses them with the context semantics, and then performs logical consistency verification by unfolding the operator.

[0050] The alignment error is calculated as a weighted sum of the symbol reconstruction error and the semantic embedding difference. The loop terminates when the error is below 0.05. The final output semantic state vector is then input into the intent decoder.

[0051] The intent decoder consists of a semantic feature encoding layer, a hierarchical intent classification layer, and a slot-filling layer. The first layer predicts the intent graph (e.g., "order query"), and the second layer predicts sub-intents (e.g., "platform confirmation") based on the intent graph. The slot-filling layer generates a slot parameter vector based on a template.

[0052] Table 2. Examples of Structured Recognition Results

[0053] The decoding result is fed back into the symbolic logic space using the expansion operator to verify dependencies, mutual exclusions, and value validity. If a conflict is detected, the slot is corrected or a clarification request is generated based on the context consistency score. When all constraints are satisfied, the final user intent recognition result is output.

[0054] Under the conditions described above, the model achieved a main idea recognition accuracy of 96.4% and a sub-intention recognition accuracy of 92.7% on the test set, representing an improvement of approximately 7.8% compared to the baseline model without the dual-space folding mechanism. The folding-unfolding loop effectively reduces semantic shift, lowering the logical conflict rate to 1.3% and maintaining stable recognition performance in multi-round mixed scenarios.

[0055] This embodiment demonstrates that the present invention can achieve graphical modeling of semantic structure and symbol-semantic bidirectional consistency constraints in natural language understanding tasks, effectively improving the accuracy, logical consistency and interpretability of user intent recognition, and is applicable to various human-computer interaction systems such as intelligent customer service, voice assistants, and robot command parsing.

[0056] 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 recognizing user intent based on context semantic parsing, characterized in that, The method comprises the following steps: Collecting multi-round conversation input texts, performing sentence segmentation, normalization and syntax analysis on the input texts, extracting predicate-argument structures and entity relationships, and generating a semantic parsing graph; Based on the semantic parsing graph, a symbolic logic space and a continuous semantic space are constructed, the symbolic logic space is composed of intent logic predicates, slot constraint rules and knowledge templates, and the continuous semantic space is composed of context embedding vectors; Defining a pair of dual mapping operators, including a folding operator and an unfolding operator, and constraining the reversible consistency of the folding operator and the unfolding operator through a folding reconstruction loss function in the training stage; In the reasoning stage, intent candidates are generated based on the symbolic logic space and the knowledge base, the intent candidates are mapped to the continuous semantic space through the folding operator and fused with the context semantics, the symbolic logic space is projected back through the unfolding operator for logical consistency verification, and the cycle is terminated when the space alignment error is lower than a preset threshold, and a folded and aligned semantic state vector is obtained; The folded and aligned semantic state vector is input into an intent decoder to output a structured recognition result including a main intent, a sub-intent and a slot parameter, and the final intent recognition result is output when the logic is consistent. 2.The user intent recognition method based on context semantic parsing according to claim 1, characterized in that, The generation step of the semantic parsing graph comprises: Performing sentence segmentation on the input text, and unifying tone symbols, colloquial expressions and abbreviations into standard written forms; Using a graph structure analysis algorithm based on dependency syntax to identify the subject-predicate, verb-object, preposition and modification dependency relationships in the sentence, and generating a corresponding syntax dependency tree; Labeling semantic role labels on the nodes of the syntax dependency tree; Using a semantic role recognition network based on a bidirectional encoder to extract the verb predicate and its corresponding agent, patient, tool and target arguments, and generating a set of predicate-argument pairs according to the dependency relationships between the arguments; A weighted directed graph structure, i.e. a semantic parsing graph, is constructed with the predicate-argument pairs and entity nodes as nodes and the argument dependency relationships and entity semantic relationships as edges. 3.The user intent recognition method based on context semantic parsing according to claim 1, characterized in that, The construction of the symbolic logic space comprises: Based on the predicate-argument pairs and entity nodes in the semantic parsing graph, taking the intent logic predicate as the core node; Defining the parameter dependency relationship, value range constraint and mutual exclusion condition in the slot constraint rule as a logic edge; Mapping the cause-and-effect, synonymous and superordinate and subordinate logic relationships described in the knowledge template to a structure connection; Generating a symbolic logic graph with node type, edge type and logic weight attributes through graph structure modeling; The logic weight is initialized according to the constraint strength, reasoning confidence and knowledge template source credibility. 4.The user intent recognition method based on context semantic parsing according to claim 1, characterized in that, The construction of the continuous semantic space comprises: Using a context semantic encoding network to encode the node sequence in the semantic parsing graph; Generating a multi-dimensional semantic feature matrix containing word vectors, position vectors and semantic role embeddings; Calculating the context association weight between nodes according to the adjacency relationship of the semantic parsing graph; Fusing local semantics and global context features through an attention aggregation mechanism; Forming a high-dimensional embedding representation of the continuous semantic space; Each node in the continuous semantic space is indexed to the corresponding node in the symbolic logic space.

5. The user intent recognition method based on context semantic parsing according to claim 1, characterized in that, The dual mapping operator comprises a folding operator and an unfolding operator, specifically: The folding operator is used to map the node representation in the symbolic logic space to the continuous semantic space with the relational structure; The folding operator mapping function takes the semantic feature vector of the symbolic logic node, the node type identifier and the adjacency matrix as input; The corresponding continuous semantic embedding is generated through linear transformation, nonlinear activation and weighted aggregation operation of relation perception; The unfolding operator is used to project the embedding representation in the continuous semantic space back to the symbolic logic space; Its mapping function takes the continuous semantic feature matrix and the context correlation weight as input; The decoded transformation and logical constraint projection output the symbolic logic node representation, restoring the corresponding logical connection relationship; The folding operator and the unfolding operator maintain one-to-one mapping index at the node level.

6. The user intent recognition method based on context semantic parsing according to claim 1, characterized in that, The step of constraining the folding reconstruction loss function includes: Based on the batch dialogue sample, the semantic parsing graph and the corresponding symbolic logic graph are constructed, the continuous semantic embedding is obtained through the folding operator, and the symbolic reconstruction representation is generated through the unfolding operator; The folding reconstruction loss including the semantic reconstruction term and the logical consistency term is calculated; The semantic reconstruction term is used to minimize the difference between the continuous semantic embedding and the target semantic feature; The logical consistency term is used to minimize the difference between the symbolic logic structure after projection and the original logical relationship; The cyclic consistency regularization is introduced to constrain the deviation of the composite mapping and the identity mapping of unfolding-folding, and the norm constraint is applied to the mapping weight to stabilize the training; The first-order optimization method based on gradient is used to update the parameters of the folding operator and the unfolding operator until the folding reconstruction loss on the validation set converges and the logical consistency index reaches the preset threshold.

7. The user intent recognition method based on context semantic parsing according to claim 1, characterized in that, The generation step of the folded aligned semantic state vector includes: After generating the intent candidate based on the knowledge base reasoning in the symbolic logic space, the context embedding vector of the current round is taken as the input state in the continuous semantic space; The folding operator is used to map the intent candidate to the continuous semantic space and fuse it with the context semantic feature; The unfolding operator is used to project the fusion result back to the symbolic logic space for logical consistency verification; The alignment error between the symbolic space and the continuous space is calculated, which is determined by the symbolic logic node reconstruction difference and the continuous embedding similarity; When the alignment error is lower than the preset threshold or the number of cyclic iterations reaches the upper limit, the folding-unfolding cycle is terminated and the current semantic state is output as the convergence result. 8.The method of claim 1, wherein, The intent decoder includes a semantic feature encoding layer, a hierarchical intent classification layer and a slot filling layer, specifically: The semantic feature encoding layer is used to receive the folded aligned semantic state vector, realize feature dimension mapping through multi-head attention weighting and feedforward transformation, and fuse the node constraint weight in the symbolic logic space to generate a unified semantic representation; The hierarchical intent classification layer adopts a double-layer judgment structure, the first layer predicts the main intent category according to the unified semantic representation, and the second layer predicts the sub-intent label under the condition of the main intent, the first layer and the second layer are constrained through the label dependency matrix, and the intent label set satisfying the logical hierarchical relationship is output; The slot filling layer performs parameter generation according to the slot template corresponding to the intent label, encodes the slot keyword, value range and context evidence into a slot parameter vector, and together with the intent label forms a structured recognition result. 9.The user intent recognition method based on context semantic parsing of claim 1, wherein, The generation of the final intent recognition result comprises: projecting the decoding result to a symbolic logic space based on an unfolding operator, detecting dependencies, mutual exclusions and value legality between the intent and the slot in the symbolic logic space by using constraint rules in the symbolic logic space; when a logical conflict is detected, correcting the prediction result according to the context consistency score in the folding-unfolding cycle, or generating a clarification request to complete the missing slot; only when all intent-slot combinations meet the logical constraint condition and the consistency score is higher than a preset threshold, outputting the final user intent recognition result.

Citation Information

Patent Citations

  • Knowledge graph construction method and system based on large model

    CN120561316A

  • Knowledge Discovery Agent System and Method

    US20070203693A1

  • System And Method For Fuzzy Concept Mapping, Voting Ontology Crowd Sourcing, And Technology Prediction

    US20140075004A1

  • Text-to-image generation method and system based on local detail editing

    WO2024130751A1

Cited By

  • Training method of intention recognition model for understanding user requirements in text software scene

    CN121682283A

  • Content security assessment method based on multi-round interaction intention accumulation atlas

    CN122087832A