An artificial intelligence-based question and answer dialogue semantic recognition method and system
By introducing intent role recognition and constructing a restrictive intent residue structure in question-and-answer dialogues, the problem of insufficient temporal weight of intent in existing technologies is solved, and the stability of semantic fusion and the accuracy of response are achieved in multi-turn dialogues, making it suitable for task-oriented question-and-answer recommendation scenarios.
Patent Information
- Application Number
- CN202610406871.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-31
- Publication Date
- 2026-07-07
AI Technical Summary
Existing question-answering semantic recognition methods lack an explicit mechanism for preserving the temporal weights of intents, making it difficult to cope with the misalignment of primary and secondary intents and the distortion of semantic fusion in multi-turn dialogues. This leads to the model generating incorrect answers or recommendations that violate the initial conditions when faced with subsequent supplementary intents.
By introducing an intent role recognition mechanism, restrictive and non-restrictive intent semantic units are distinguished, a restrictive intent residual structure is constructed as a long-term semantic constraint for cross-turn dialogue, and restrictive intents are explicitly injected during semantic fusion. Combined with intent consistency verification, the consistency between the current semantics and the historical dominant intent is ensured.
It effectively prevents semantic drift or misjudgment when the model processes supplementary input, improves the stability and context preservation of semantic fusion in multi-turn dialogues, and ensures the accuracy of the dialogue system's response. It is particularly suitable for task-oriented question answering and recommendation scenarios with global constraints.
Smart Images

Figure CN122347145A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of semantic recognition technology, specifically to a question-and-answer dialogue semantic recognition method and system based on artificial intelligence. Background Technology
[0002] AI-based question-and-answer dialogue semantic recognition methods primarily rely on pre-trained language models (such as BERT and GPT) to perform vector encoding and semantic modeling of user natural language input. Through techniques such as contextual understanding, multi-turn dialogue tracking, and semantic matching, they achieve accurate identification of user intent and effective responses to questions. In typical applications, the system inputs the current input along with historical dialogues into the model, compressing and fusing multi-turn semantics through attention mechanisms or sequence fusion algorithms to generate context-aware semantic representations. This supports various intelligent interactive functions such as task-oriented question answering, recommendation, and guided dialogue. These methods have achieved significant results in semantic understanding, intent recognition, and dynamic dialogue response, becoming core technological supports for systems such as intelligent customer service, travel guides, and intelligent assistants.
[0003] However, in practical applications, the aforementioned semantic fusion methods still suffer from critical structural flaws, particularly when processing multi-turn contextual information. Systems typically assume that historical statements "closer to the current input" are more important, ignoring global constraints or dominant intents raised by the user in earlier turns. This default temporal decay mechanism can lead to semantic misjudgment when faced with subsequent supplementary intents, resulting in incorrect answers or recommendations that violate the initial conditions. For example, if a user explicitly limits their choice to "only consider local short-distance travel" in the first turn, but subsequently only adds "where is a good place to go during the holidays," the model may be biased towards the later context due to context compression, ignoring the hard constraints in the earlier context, leading to unexpected recommendations. Therefore, current question-answering semantic recognition methods lack explicit mechanisms for preserving the temporal weight of intents, making it difficult to address the challenges of complex semantic structures such as misalignment of primary and secondary intents and semantic fusion distortion in multi-turn dialogues. Summary of the Invention
[0004] The purpose of this invention is to address the problem mentioned in the background art that current question-answering semantic recognition methods lack an explicit mechanism for maintaining the temporal weight of intent, making it difficult to cope with the challenges of complex semantic structures such as the misalignment of primary and secondary intents and the distortion of semantic fusion in multi-turn dialogues. Therefore, this invention proposes a question-answering dialogue semantic recognition method and system based on artificial intelligence.
[0005] A first aspect of this invention provides an artificial intelligence-based question-and-answer dialogue semantic recognition method, the method comprising: S1. Obtain the user's historical input statements and current input statements in multi-round question-and-answer dialogues, perform semantic parsing on the historical input statements and current input statements to obtain the corresponding semantic unit set, and perform intent role recognition on each semantic unit to distinguish between restricted intent semantic units and unrestricted intent semantic units; S2. Extract the semantic units of the restrictive intent from the set of semantic units, construct the residual structure of the restrictive intent, and maintain the residual structure of the restrictive intent as a long-term semantic constraint for cross-turn dialogue; S3. Based on the semantic parsing result of the input statement in the current round, and combined with the contextual semantic representation generated in the previous round, perform contextual fusion processing on the semantics of the current round. During the fusion process, the restrictive intent residual structure is called so that the restrictive intent semantic unit does not decay with the dialogue rounds in the semantic fusion. S4. Based on the fused semantic representation of the current round and the residual structure of the restrictive intent, execute the intent. Figure 1 Consistency check: Determines whether the semantics of the current round conflict with the restrictive intent; S5. If there is no conflict between the current round semantics and the restrictive intent, the fused current round semantic representation will be used as the target semantic representation of the question-and-answer dialogue to generate the corresponding question-and-answer response or recommendation result.
[0006] Optionally, in step S1, the steps of obtaining the user's historical input statements and current input statements in a multi-turn question-and-answer dialogue, performing semantic parsing on the historical input statements and current input statements to obtain the corresponding semantic unit set, and performing intent role recognition on each semantic unit to distinguish between restricted intent semantic units and non-restricted intent semantic units are as follows: S11. Perform statement-level segmentation on the historical input statements and the current input statements according to the dialogue rounds. For each segmented statement, further segment it based on semantic breakpoints to obtain several candidate semantic segments with complete semantic expression capabilities. The semantic breakpoints represent semantic trigger words for range, condition, negation, transition, or limiting relationships. S12. For each candidate semantic segment, construct a corresponding semantic feature representation, wherein the semantic feature representation includes at least the position number of the semantic segment in the original sentence, the dialog round identifier, and the distribution features of semantic trigger words, and bind the semantic feature representation to the semantic segment to form a structured semantic unit. S13. Based on structured semantic units, perform semantic constraint detection processing on each semantic unit in sequence to determine whether the semantic unit contains a constraint expression that limits the subsequent question and answer results. The constraint expression includes at least spatial range restrictions, time range restrictions, travel mode restrictions, or result exclusion expressions. S14. When a semantic unit is detected to contain a restrictive expression, the corresponding semantic unit is marked as a restrictive intent semantic unit and assigned an intent retention flag that cannot be automatically invalidated; when no restrictive expression is detected, the corresponding semantic unit is marked as a non-restrictive intent semantic unit. S15. All semantic units that have completed intent role marking are reorganized according to their respective dialogue rounds and their original order in the sentences to generate a set of semantic units for subsequent processing, wherein each semantic unit carries a corresponding intent role identifier.
[0007] Optionally, in step S2, the steps of extracting semantic units identified as restrictive intentions from the semantic unit set, constructing a restrictive intention residual structure, and maintaining the restrictive intention residual structure as a long-term semantic constraint for cross-turn dialogue are as follows: S21. Number and index the semantic units that have been marked as restrictive intention semantic units in step S1, and establish semantic labels based on their semantic types. Semantic types include, but are not limited to, semantic constraint categories such as spatial location restrictions, time range restrictions, transportation mode restrictions, exclusionary expressions, or budget limits, and generate a set of restricted intention units with labels. S22. Construct a structured residual node for each restrictive intent unit. The residual node includes the original semantic fragment, intent label, round information, trigger keyword, context coupling score, and explicit cancellation flag. The context coupling score is used to indicate the strength of the association between the intent and the current semantic context. The cancellation flag is initially set to an invalid state, indicating that the restrictive intent has not been modified or denied by the user. S23. Group and archive all residual nodes according to their semantic tags, and establish a cross-turn organizational structure according to the user dialogue turn. Under the same tag, if there are multiple turns of repeated expression of restrictive intent, retain the semantic content of the latest turn as the main residual node, and set other nodes with the same tag as historical backup nodes, and record their generation turn and differences. S24. Construct a restricted intent residual structure, which is an ordered node table that supports dynamic updates. This structure is used to maintain synchronous injection with the current semantics in each round of semantic fusion. The structure supports node-level indexing, tag-level retrieval, and condition-level conflict comparison. S25. Before a user explicitly revokes a restrictive intent, each main residual node in the residual structure of the restrictive intent remains in an effective state and does not participate in the round decay rule of the attention mechanism, serving as a long-term semantic constraint source in subsequent dialogue semantic processing.
[0008] Optionally, in step S3, based on the semantic parsing result of the input statement in the current round and combined with the contextual semantic representation generated in the previous round, contextual fusion processing is performed on the semantics of the current round. The step of invoking the restrictive intent residual structure during the fusion process to ensure that the restrictive intent semantic units do not decay with each dialogue round during semantic fusion is as follows: S31. Based on the set of semantic units for the current round obtained in step S1, generate the semantic representation vector for the current round, and at the same time obtain the contextual semantic representation generated in the previous round of dialogue as the historical semantic benchmark. S32. Read the main residual nodes in the valid state from the restricted intent residual structure constructed in step S2, and match and filter the current round semantic unit set according to their intent labels to determine the candidate fusion positions related to the semantics of each main residual node. S33. For each master residual node, construct a corresponding constraint injection anchor point in the semantic representation vector of the current round. The constraint injection anchor point is used to indicate the fixed participation position of the restrictive intent in the semantic fusion process and to prevent the restrictive intent from participating in the decay calculation based on the round distance. S34. Based on the constraint injection anchor point, the restrictive intent semantics corresponding to the main residual node are jointly fused with the current round semantic representation and the historical semantic benchmark representation to form the current round fused semantic representation with explicit constraint information. S35. After completing the joint fusion, the current round fusion semantic representation with explicit constraint information is used as the new context semantic representation for the semantic fusion processing of the next round of dialogue.
[0009] Optionally, in step S4, based on the fused semantic representation of the current round and the residual structure of the restrictive intent, the intention is executed. Figure 1 The consistency check, which determines whether the semantics of the current round conflict with the restrictive intent, involves the following steps: Based on the fused semantic representation of the current round and the residual structure of the restrictive intent, the semantic trajectory deviation index and the instruction meaning masking index are calculated. The semantic trajectory deviation index and the instruction meaning masking index are added together to obtain the verification index. The current round of semantics is determined to conflict with the restrictive intent based on the verification index and the preset verification index threshold.
[0010] Optionally, the calculation steps for the semantic track deviation index are as follows: Obtain the semantic representation vector of the main residual node in the restricted intent residual structure, denoted as the restricted center vector; Obtain the semantic representation vector of the current round, and the context semantic representation vectors of the previous K rounds of historical dialogue, numbered in chronological order from round 1 to round K+1; Subtract the restrictive center vector from the semantic representation vector in each round to obtain a sequence of semantic orbit displacement vectors relative to the restrictive semantic center; For each adjacent cycle in the orbit displacement vector sequence, the difference between adjacent orbit vectors is calculated one by one, and their normalized direction vectors are added together to obtain a cumulative direction vector. Then, the cumulative direction vector is normalized as a whole to obtain the principal tangential direction vector of the historical orbit. Calculate the difference vector between the current semantic track and the previous semantic track, and normalize it to the tangential direction vector of the current track. Perform a dot product operation between the current orbital tangential direction vector and the historical main tangential direction vector, take the absolute value, and subtract this value from one to obtain the orbital direction deviation, which is used to measure whether the current semantics deviates from the historical evolution trend. The resulting orbital direction deviation is the first offset. The magnitude of the orbital displacement vector for each wheel is calculated to obtain the orbital radius sequence; The square root of the average of the squares of the historical K-round orbit radii is taken as the equilibrium center value of the orbit radius. Calculate the absolute value of the difference between the current wheel's track radius and the equilibrium center value, and divide it by the larger of the two values to obtain the track radius deviation ratio. The resulting value is the second offset. The semantic orbit deviation index is obtained by multiplying the first offset and the second offset together and then subtracting the result from the first offset. The semantic orbit deviation index is a dimensionless quantity between 0 and 1. The larger the value, the higher the degree of orbit deviation and the more the semantic evolution trend deviates from the main orbit of the restrictive intent.
[0011] Optionally, the calculation steps for the instruction meaning masking index are as follows: Structural parsing is performed on the semantic representation of the current round, and the semantic representations of the subject slot, verb slot and object slot in the main clause are extracted and denoted as the current subject slot vector, the current verb slot vector and the current object slot vector, respectively. Perform the same structural parsing on the semantic representation of the main residual node in the residual structure of the restrictive intent to obtain the subject slot vector, verb slot vector and object slot vector of the restrictive intent; The semantic directions of the current semantics and the restrictive intent are compared in the subject slot, verb slot, and object slot respectively. The semantic difference between the three sets of vectors is calculated. The semantic difference is obtained by taking the absolute value of the direction cosine similarity between the current vector and the restrictive vector in each slot and then subtracting one. The three difference values represent the degree of deviation of the three slots in semantic expression. The semantic differences of the three slots are combined into a three-dimensional vector. The magnitude of the three-dimensional vector is calculated and divided by the square root of three. Then, the value is subtracted by one to obtain the first occlusion parameter, which is used to reflect the coverage tension between the current main clause structure and the restrictive intention main clause structure in the overall semantic structure. Further extract all subordinate expression structures other than the main clause from the current semantic representation, including modifiers, conditional clauses, time adverbs, and additional components, and extract the semantic vector representations corresponding to the subordinate expression structures to form a set of subordinate expression vectors; The average values of the three vectors in the current main clause (subject slot, verb slot, and object slot) are calculated to obtain the central semantic vector of the main clause; at the same time, the average value of all the subordinate expression vectors in the subordinate expression vector set is calculated to obtain the average semantic vector of the subordinate expressions. Compare the directional consistency between the main sentence central semantic vector and the subordinate expression semantic vector, calculate the dot product of the normalized direction vectors corresponding to the main sentence central semantic vector and the subordinate expression semantic vector, and subtract the absolute value of the dot product from the numerical value of 1 to obtain the second masking parameter, which is used to reflect whether the subordinate expression deviates from the focus of the main sentence expression in the semantic direction in the current round of semantics, thus constituting a potential instruction masking behavior; Subtract the first occlusion parameter and the second occlusion parameter from the value 1 respectively to obtain the first difference and the second difference. Multiply the first difference and the second difference together, and subtract the result of the multiplication from the value 1. The value of the instruction meaning occlusion index is a dimensionless quantity between zero and one. The larger the value, the stronger the semantic focus of the current round of semantics covers the original restrictive intent in terms of expression structure, and the higher the risk of being structurally occluded.
[0012] Optionally, the step of determining whether the semantics of the current round conflict with the restrictive intent based on the verification index and a preset verification index threshold is as follows: The verification index is compared with a preset verification index threshold. If the verification index is not less than the preset verification index threshold, then it indicates that... Figure 1 The consistency check failed because the semantics of the current round conflict with the restrictive intent. The verification index is compared with a preset verification index threshold. If the verification index is less than the preset verification index threshold, it indicates that... Figure 1 The consistency check passed, and there is no conflict between the semantics of the current round and the restrictive intent.
[0013] A second aspect of this invention provides an artificial intelligence-based question-and-answer dialogue semantic recognition system, the system comprising: Semantic Unit Module: Obtains the user's historical input statements and current input statements in multi-turn question-and-answer dialogues, performs semantic parsing on the historical input statements and current input statements to obtain the corresponding set of semantic units, and performs intent role recognition on each semantic unit to distinguish between restricted intent semantic units and unrestricted intent semantic units; Module construction: Extracts semantic units of restrictive intent from the set of semantic units, constructs the residual structure of restrictive intent, and maintains the residual structure of restrictive intent as a long-term semantic constraint for cross-turn dialogue; Restriction Module: Based on the semantic parsing result of the input statement in the current round, and combined with the contextual semantic representation generated in the previous round, the semantics of the current round are fused. During the fusion process, the residual structure of the restrictive intent is called so that the semantic units of the restrictive intent do not decay with the dialogue rounds in the semantic fusion. Verification module: Based on the fused semantic representation of the current round and the residual structure of the restrictive intent, execute the intent... Figure 1 Consistency check: Determines whether the semantics of the current round conflict with the restrictive intent; Result generation module: If there is no conflict between the current round semantics and the restrictive intent, the fused current round semantic representation will be used as the target semantic representation of the question-and-answer dialogue to generate the corresponding question-and-answer response or recommendation result.
[0014] The beneficial effects of this invention are: This invention proposes an AI-based question-and-answer dialogue semantic recognition method and system. By introducing an intent role recognition mechanism during multi-turn dialogue semantic parsing and constructing restrictive intent semantic units into a persistent residual structure, it avoids the problem of important intent information being weakened or forgotten due to temporal decay strategies in traditional context fusion algorithms. Furthermore, this invention explicitly injects restrictive intents into the residual structure during the semantic fusion stage and, through... Figure 1 The consistency verification mechanism ensures the consistency between the current semantics and the historical dominant intent, thereby effectively preventing semantic drift or misjudgment when the model processes supplementary input. Compared with existing attention mechanisms that rely on proximity principles, this invention can significantly improve the stability and context preservation capability of semantic fusion in multi-turn dialogues, ensuring that the dialogue system always responds based on complete and accurate intent boundaries when facing users. It is particularly suitable for task-oriented question answering and recommendation scenarios with global constraints. Attached Figure Description
[0015] Figure 1 This is a flowchart of a question-and-answer dialogue semantic recognition method based on artificial intelligence, provided as an embodiment of the present invention. Detailed Implementation
[0016] To further illustrate the technical means and effects adopted by the present invention in order to achieve the intended purpose, the following detailed description is provided in conjunction with the accompanying drawings and preferred embodiments, based on the specific implementation methods, structures, features and effects of the present invention.
[0017] This invention provides an artificial intelligence-based question-and-answer dialogue semantic recognition method. See also... Figure 1 , Figure 1 A flowchart illustrating an artificial intelligence-based question-and-answer dialogue semantic recognition method provided in this embodiment of the invention. The method includes the following steps: S1. Obtain the user's historical input statements and current input statements in multi-round question-and-answer dialogues, perform semantic parsing on the historical input statements and current input statements to obtain the corresponding semantic unit set, and perform intent role recognition on each semantic unit to distinguish between restricted intent semantic units and unrestricted intent semantic units; S2. Extract the semantic units of the restrictive intent from the set of semantic units, construct the residual structure of the restrictive intent, and maintain the residual structure of the restrictive intent as a long-term semantic constraint for cross-turn dialogue; S3. Based on the semantic parsing result of the input statement in the current round, and combined with the contextual semantic representation generated in the previous round, perform contextual fusion processing on the semantics of the current round. During the fusion process, the restrictive intent residual structure is called so that the restrictive intent semantic unit does not decay with the dialogue rounds in the semantic fusion. S4. Based on the fused semantic representation of the current round and the residual structure of the restrictive intent, execute the intent. Figure 1 Consistency check: Determines whether the semantics of the current round conflict with the restrictive intent; S5. If there is no conflict between the current round semantics and the restrictive intent, the fused current round semantic representation will be used as the target semantic representation of the question-and-answer dialogue to generate the corresponding question-and-answer response or recommendation result.
[0018] This invention provides an AI-based question-and-answer dialogue semantic recognition method. By introducing an intent role recognition mechanism during multi-turn dialogue semantic parsing and constructing restrictive intent semantic units into a persistent residual structure, it avoids the problem of important intent information being weakened or forgotten due to temporal decay strategies in traditional context fusion algorithms. Furthermore, this invention explicitly injects restrictive intents into the residual structure during the semantic fusion stage and, through... Figure 1 The consistency verification mechanism ensures the consistency between the current semantics and the historical dominant intent, thereby effectively preventing semantic drift or misjudgment when the model processes supplementary input. Compared with existing attention mechanisms that rely on proximity principles, this invention can significantly improve the stability and context preservation capability of semantic fusion in multi-turn dialogues, ensuring that the dialogue system always responds based on complete and accurate intent boundaries when facing users. It is particularly suitable for task-oriented question answering and recommendation scenarios with global constraints.
[0019] In one embodiment, step S1, acquiring the user's historical input statements and current input statements in a multi-round question-and-answer dialogue, performing semantic parsing on these statements, and realizing semantic unit construction and intent role recognition includes the following operations: First, according to the round order of the user's dialogue, all statements are segmented at the statement level according to the round. Then, for each statement, clause-level segmentation is performed through semantic breakpoints. Semantic breakpoints include, but are not limited to, indicating scope (such as "only in", "limited to"), conditions (such as "if", "when"), negation (such as "not", "don't"), transition (such as "but", "however"), or other keywords with semantic limiting effects. Through such breakpoints, candidate semantic segments with self-consistent expression capabilities can be effectively segmented. For example, if a user inputs "I don't want to go too far, but I can consider it if necessary," it will be segmented into two segments: "I don't want to go too far" and "I can consider it if necessary," corresponding to a restrictive expression and a conditional mitigation expression, respectively.
[0020] Subsequently, for each candidate semantic segment, a semantic feature vector containing multi-dimensional attributes such as position number, round number, and breakpoint type distribution is constructed. This feature vector is then bound to the original segment to form a structured semantic unit. This structured processing enables subsequent semantic role recognition to be based on precise location, contextual hierarchy, and logical semantics, rather than the traditional coarse-grained processing based on sentence vectors or keyword matching. Next, the system performs semantic constraint detection on each structured semantic unit, identifying whether there are any expressions in the unit that have a restrictive impact on downstream question answering. Such expressions include, but are not limited to, user restrictions on location (e.g., "within the city" or "surrounding area"), time conditions (e.g., "departing today" or "returning tomorrow"), mode of transportation (e.g., "only by subway"), and exclusion targets (e.g., "don't want to go to crowded places").
[0021] When a semantic unit is detected to contain the aforementioned restrictive content, the system marks it as a "restrictive intent semantic unit" and assigns it a non-automatically expired "intent retention flag." This flag will remain active in subsequent conversations until the user explicitly modifies or withdraws the intent. Conversely, segments without restrictive functions, such as statements purely expressing preferences or asking questions, are marked as "non-restrictive intent semantic units." Ultimately, all semantic units with completed role labeling will be reorganized according to their order and turn number in the original statements, forming a complete set of semantic units. This serves as the basis for subsequent residual structure construction, context fusion, and meaning... Figure 1 Consistency verification provides structured input. This processing flow significantly improves the granularity of semantic parsing and the accuracy of semantic role recognition, avoiding the problems of ignoring or misclassifying important semantic constraints caused by traditional sentence-based judgment.
[0022] In one embodiment, in step S2, semantic units identified as restrictive intentions are extracted from the semantic unit set, and a restrictive intention residual structure is constructed to support the continuous retention and invocation of this type of semantics in multi-turn dialogues. The specific implementation process is as follows: First, the semantic units marked as restrictive intentions in step S1 are uniformly numbered, and a label system is established according to the constraint type expressed by their semantics. The semantic types include at least spatial location restrictions (such as "only local"), time range restrictions (such as "round trip today"), transportation mode restrictions (such as "only by bus"), exclusionary expressions (such as "don't recommend too popular places"), or budget limits (such as "no more than 200 per person"), etc., generating a set of restrictive intention units with clear semantic labels. Next, a corresponding structured residual node is constructed for each restrictive intention unit. This node includes the original semantic fragment content, the intention label to which it belongs, the dialogue turn number to which it belongs, triggering keywords (such as "only", "no", "must", etc.), context coupling score, and explicit revocation flag. The context coupling score is used to quantify the semantic association between the current semantic unit and subsequent user input, in order to help determine whether the restriction should be retained in the current round of semantic processing; while the cancellation flag is set to "invalid" by default, which indicates that the intention has not been actively denied by the user.
[0023] After constructing the residual nodes, the system archives all nodes according to their semantic tags and builds a cross-round organizational structure based on the user's historical dialogue rounds. For example, if a user says "I don't want to go too far" in round 1 and "It's more convenient to stay in the city" in round 3, the system will merge and retain these two nodes that both belong to the "spatial restriction" tag, selecting only the "city" segment updated in the round as the master residual node, and recording the semantics of round 1 as a historical backup node for difference comparison and contextual tracing. Finally, all valid master residual nodes will be aggregated to form a restrictive intent residual structure. This structure is represented as an ordered node table that supports dynamic updates, with node-level indexing, tag-level retrieval, and condition-level conflict comparison capabilities, ensuring that it can be synchronously injected as explicit input in each subsequent round of semantic fusion, thereby maintaining the consistency of the global intent and the cross-round validity of the restrictive semantics. It is worth emphasizing that the master node in the residual structure remains valid until the user actively changes or withdraws the restrictive intent. It is not affected by the attention mechanism's round decay rule for historical statements, ensuring that the semantic compression process is not weakened or lost due to distance from the current round, thus continuously playing a semantic constraint role when generating the final response.
[0024] In one embodiment, in step S3, the specific implementation of context fusion processing of the current round's semantics based on the semantic parsing result of the current round's user input statement and combined with the context semantic representation generated in the previous round is as follows: First, based on the current round's semantic unit set obtained in step S1, a preset semantic encoding module (such as a sub-model based on the Transformer structure) is used to generate the semantic representation vector of the current round; simultaneously, the historical cache structure is called to obtain the context semantic representation generated in the previous round of dialogue as a historical benchmark for the fusion process. Subsequently, all main residual nodes in the "valid state" are read from the restricted intent residual structure constructed in step S2, and based on the intent labels of each main residual node, semantic matching and filtering are performed on the current round's semantic unit set to identify the semantic fragments in the current input that are associated with each restricted intent, and to locate their candidate fusion positions in the semantic vector. Building upon this, a "constraint injection anchor" is constructed in the current semantic representation vector for each master residual node. This anchor has two functional attributes: first, it indicates the range of positions where the restrictive intent should be injected during the fusion process; second, it indicates that the restrictive intent semantics does not participate in the default decay calculation based on round distance in the attention mechanism, thus achieving "non-temporal decay preservation." For example, if a user inputs "I only consider attractions within the city" in the first round, this restrictive intent is constructed as a master residual node. When the user inputs "What are some good places to go during the Qingming Festival?" in the third round, this node will be injected into the vector region corresponding to the query semantics of "where to go" in the third round of semantic fusion through the anchor mechanism, ensuring that the constraint "within the city" continues to play a role in the current round's response and is not ignored by the model due to the long time elapsed since the current input. After anchor point construction is completed, the semantic content of the main residual node is jointly fused with the current semantic representation and historical context representation, using the anchor point as the fusion starting point, to form a current-round fused semantic representation containing explicit constraint information. The joint fusion employs an interpolated context fusion strategy or a structured positional signal weighting method, ensuring that the restrictive intent is embedded in the overall semantic representation in a "non-decaying, highly stable" state. Finally, the fused result is written as a new context semantic representation into the dialogue state storage structure for use in the next round of semantic processing. This achieves continuous preservation and fusion participation of restrictive intent semantics in multi-round dialogues, effectively overcoming the problem of important intent loss caused by context round distance in existing attention mechanisms.
[0025] In one embodiment, it should be noted that all vector data involved in the calculation of the semantic trajectory deviation index are constructed based on the standard output results of the dialogue semantic recognition model deployed in the current system. Specifically, the semantic representation vector of the main residual node in the restrictive intent residual structure is a static semantic vector obtained by calling a semantic encoding module (such as a Transformer-based encoder or an embedded vector generation network) to encode the restrictive intent statements expressed by the user in historical dialogue rounds. This vector is saved into the residual structure when the restrictive intent is recognized and is directly read in the form of a "restrictive center vector" in subsequent calculations. The semantic representation vector of the current round and the context semantic representation vector of the historical K rounds are both derived from the semantic output results of the dialogue model in each round of semantic fusion. After each round of fusion is completed, the system caches the final fused semantic vector generated in the semantic history module, along with the round identifier and timestamp. The above semantic vectors are usually high-dimensional floating-point arrays of fixed dimensions (such as 768-dimensional or 1024-dimensional), extracted through the hidden layer output of the model or a fully connected semantic projection head, possessing continuity and measurable semantic similarity, and do not rely on manual annotation. When performing semantic orbit offset index calculation, the system sequentially calls these semantic representation vectors to construct the orbit displacement sequence and calculate the tangential offset and radius change. All data can be obtained through the native interface of the dialogue model or the internal cache structure, without the need for additional sensors or external database calls, ensuring the system's self-consistency, closed-loop, and embeddability.
[0026] It's important to note that the semantic trajectory deviation index is essentially a comprehensive metric used to characterize whether semantic evolution in multi-turn dialogue still stably unfolds around a predetermined limiting intention. Its core idea is not to judge whether the current turn's semantics are "similar" to the limiting intention in content, but rather to determine whether the current turn's semantics, in the overall evolution process, continues to advance along the semantic development trajectory established by the limiting intention. In this method, the limiting intention is considered the central reference point for semantic evolution. Historical multi-turn semantics gradually unfold around this reference point, forming a semantic trajectory with directionality and a stable radius. In a normal, consistent dialogue, the user's subsequent input is usually refined, supplemented, or extended near this trajectory, with its semantic change direction basically consistent with the historical evolution direction, and its distance from the limiting center remaining within a relatively stable range. The Semantic Trajectory Deviation Index measures consistency by simultaneously examining two aspects: whether the direction of semantic evolution has significantly shifted and whether the relative distance between the semantics and the restrictive center has changed abnormally. On the one hand, if the current semantic evolution direction is significantly inconsistent with the main tangential direction of the historical trajectory, it indicates that the user's expression is beginning to develop in a direction different from the existing semantic mainline, potentially implying an circumvention or reconstruction of the original constraints. On the other hand, if the radius of the current semantic trajectory around the restrictive center significantly increases or decreases, it indicates that the semantic expression has jumped out of the semantic activity range allowed by the original restrictive intent, exhibiting overstepping or contraction imbalance. When both deviations occur simultaneously, it indicates that the current semantics has not only changed in "what it says," but also deviated from the semantic constraints set by the restrictive intent in both "where it develops" and "how far it develops," thus significantly increasing the likelihood of conflict with the restrictive intent. For example, if a user initially explicitly limits their choice to "only consider short-distance trips within the city," subsequent rounds of semantic evolution gradually develop around topics such as "city attractions" and "day trips," with the trajectory direction and radius remaining stable. However, if a user suddenly asks "Are there any places worth staying for two nights?" or "Recommendations for out-of-town cities directly accessible by high-speed rail," even without explicitly negating the original limitation, the semantic evolution has shifted towards "cross-regional" and "accommodation-based itineraries." Simultaneously, the semantic distance from the central point of "short-distance trips within the city" significantly increases, leading to a substantial increase in the semantic trajectory deviation index. This indicates that the current round of semantics has deviated significantly from the original restrictive intent at both structural and evolutionary levels, posing a significant risk of conflict. Because this index reflects both directional mismatch and scope overstepping—two non-intuitive but essential deviation characteristics—the larger its value, the more objectively it reflects the degree of inconsistency between the current round of semantics and the restrictive intent at the deep semantic structure, and the more suitable it is as a quantitative basis for judging the likelihood of conflict.
[0027] It should be noted that the greatest advantage of using this approach to calculate the semantic trajectory deviation index lies in its starting from the geometric structure of the dynamic semantic evolution trajectory. It comprehensively considers two highly essential dimensions—"directional stability" and "consistency of evolutionary range"—that are difficult for traditional methods to capture. This avoids the risks of information compression and misjudgment inherent in existing technologies that rely solely on static semantic similarity, cosine angle, keyword overlap, or deep learning scores. Specifically, the trajectory deviation reflects whether the current semantic expression's evolutionary trend still follows the historical direction of multiple semantic developments. It can effectively identify whether a user is implicitly negating their original intent without explicitly denying it. Intent shift or topic slippage, while orbit radius deviation is used to measure whether the current semantic expression has moved outside the "semantic influence range" set by the restrictive intent, thereby capturing whether the user's expression has engaged in "exploration beyond the range" or "boundary breach." This two-layer nonlinear offset detection mechanism based on the orbit model does not rely on any manually defined weights or rules, and can more realistically reflect the continuity and abrupt changes of semantic behavior in the dialogue process. At the same time, it avoids misjudgments caused by semantic compression or ignoring historical semantic structure in conventional methods. It is particularly suitable for complex situations in multi-turn open dialogues where user intent may change in a gradual, probing, shifting, or withdrawing manner. It should be noted that all semantic vector data involved in the calculation of the instruction meaning masking index originates from the results of encoding, structural parsing, and semantic slot extraction of user input by the semantic representation model integrated into the system. Specifically, the current round of semantic representation first undergoes syntactic analysis and semantic decomposition by the natural language understanding module, extracting the three core components of the main sentence structure: subject, verb, and object. These three components are then independently embedded into a semantic embedding encoder (e.g., a multi-layer context-aware model based on the Transformer architecture) to obtain the subject slot vector, verb slot vector, and object slot vector of the current semantic meaning, which serve as the main structural semantic representation. Furthermore, when the restrictive intent statement stored in the residual structure is identified and saved, the system has already performed the same main sentence structure parsing and embedding process on it, thus allowing direct extraction of its corresponding subject slot, verb slot, and object slot vectors for comparison calculation. Building upon this foundation, auxiliary structures in the current sentence, excluding the main clause, such as modifiers, conditional clauses, time adverbs, and additional descriptions, are also extracted from the original text through syntax tree analysis or dependency relation recognition. These are then individually fed into the semantic encoder for vectorization, forming a set of auxiliary semantic expressions. All slot vectors and auxiliary expression vectors are fixed-dimensional numerical vectors (e.g., 768-dimensional or 1024-dimensional floating-point arrays). In actual system deployment, these vectors are uniformly managed by the semantic processing engine. All input text has undergone structural deconstruction and vector extraction before entering the semantic consistency judgment process, and these data are all standard outputs from local or online model encoders.
[0028] It's important to note that the instruction meaning masking index is a quantitative indicator used to measure whether the current user's semantic expression structurally covers, replaces, or conceals the core of the original restrictive intent. Its essence is not to detect whether the user explicitly negates the restrictive instruction, but rather to determine whether the user has achieved "focus substitution" or "transfer of expressive dominance" through structural expression, thereby weakening, marginalizing, or implicitly invalidating the originally dominant restrictive intent in the current semantics. The core calculation logic of this index includes two parts: the first part compares the directional shifts between the three core semantic slots (subject, verb, and object) in the current semantic main clause and their corresponding slots in the restrictive intent to determine whether the focus of semantic expression remains consistent; if the current semantics structurally contains a subject or verb completely different from the restrictive intent or substantially replaces the expressive target, a high masking tension will be observed at this point. The second part detects whether the subordinate structures (such as conditional clauses, modifiers, and additional descriptions) in the current semantics deviate from the focus of the main clause in terms of direction, thus forming a "reverse overlay of subordinate expressions onto the main focus" behavior. For example, if a user previously expressed "only considering attractions within the city," and the main clause in the current round is still "wanting to find a place," but the additional conditional clause is "if the scenery is better further away, that's fine too." This type of semantics does not explicitly negate the restrictive intention, but expresses a tendency to accept the limitation being broken through through the conditional structure, which is reflected in the focus shift. If both of the above-mentioned masking behaviors exist simultaneously, it means that the current round of semantics has structurally "suppressed" the original instruction claim outside the main semantic structure, making it impossible for the system to use the restrictive intention as the core guiding principle in the subsequent generation process. Therefore, the larger the instruction meaning masking index, the more likely there is a trend of "replacing the restrictive intention in semantic structure" in the current round of semantics, that is, the higher the risk of structural conflict.
[0029] It should be noted that the greatest advantage of calculating the instruction meaning masking index using the above method is that it starts from the internal semantic structure and accurately captures the behavioral path of "implicitly weakening restrictive intent" in user expression. This avoids the misjudgment, misunderstanding, and dull masking perception problems caused by relying on external expression layer signals such as semantic similarity scores, keyword co-occurrence, and intent classification probabilities in traditional methods. Specifically, this calculation method constructs the main sentence expression skeleton with the subject slot, verb slot, and object slot as the core. By analyzing the degree of directional offset between the current semantics and restrictive intent in the three semantic slots, it constructs the masking tension of the main structure. Then, combined with the degree of directional split between the subordinate expressions and the semantic focus of the main sentence, it forms an internal tension coupling of the structure. The combined index is used to identify whether users have substantially changed the semantic dominance through structural substitution, expression shift, or the penetration of subordinate tension without explicit negative constraints. This method does not rely on fuzzy thresholds, nor does it introduce weighting or empirical parameters. It is based entirely on changes in structural and directional fields to establish the index. It has the advantages of strong coverage of expressive behavior, strong retention of main focus, low false trigger rate, and faster response to changes in structural conflict. It is particularly suitable for the expressive behavior of users bypassing constraints through "non-explicit rejection" strategies in complex question-and-answer scenarios. Therefore, compared with traditional methods based on probability models, semantic distance, or keyword templates, the above method is not only more accurate and sensitive, but also has greater generalization ability and interpretability.
[0030] In one embodiment, it should be noted that, in terms of... Figure 1 In the final step of consistency verification, the system determines whether a semantic conflict exists by comparing a verification index calculated between the current semantics and the restrictive intent with a preset verification index threshold. Specifically, the verification index is obtained by adding the semantic trajectory deviation index and the instruction meaning obscuring index, representing the combined strength of the current semantics' deviation from the original restrictive intent in terms of both structural evolution trend and the dominance of the main clause expression. The system-set verification index threshold serves as the boundary line for the degree of semantic consistency acceptance, typically determined based on extensive dialogue data experience or a manually defined semantic consistency tolerance. When the verification index is not less than this threshold, it indicates that the current semantics has undergone a significant directional shift or substantially obscured the original restrictive intent in terms of expression structure; the system then determines this as a semantic conflict. Figure 1 If the consistency check fails, it means there is a semantic conflict between the current semantics and the restrictive intent. Subsequent processing should prioritize the original restrictive conditions and alert the user to the risk of conflict. Conversely, if the verification index is less than a preset threshold, it indicates that although there may be slight semantic changes in the current semantics, it is still generally within the scope of the original intent, and the system can determine that the intent is valid. Figure 1 The consistency check passed, indicating that the semantics of the current round are consistent with the restrictive intent. Figure 1If the expression is consistent or compatible, recommendations or answers can continue to be generated based on the current expression. This mechanism ensures that the automatic identification of potential semantic conflicts has a logical basis and controllable parameters through quantitative comparison, thereby improving the system's ability to dynamically control the evolution trend of the user's true intent in complex dialogue scenarios.
[0031] In one embodiment, S5, in concern Figure 1 If the consistency check passes, the fused semantic representation of the current round will be used as the target semantic representation of the question-and-answer dialogue to generate the corresponding question-and-answer response or recommendation result.
[0032] In step S5, when the system completes the intention... Figure 1 After consistency verification and determining that the current round of semantics does not conflict with the restrictive intent, it indicates that the current round of user input remains within an acceptable range of intent in terms of content expression, structural focus, and semantic development trend. At this point, the system confirms the fused semantic representation of the current round as a reliable semantic result and uses it as the target semantic representation for subsequent question-and-answer response generation or recommendation tasks. Specifically, this target semantic representation is typically a high-dimensional vector result that fuses the current round of input with historical context semantics and restrictive intent semantics, containing the complete context of the user's intent, preference information, and constraints. The system will use this target semantic as input to call downstream question-and-answer response generation modules, information retrieval modules, or content recommendation modules to generate output content that matches the user's needs and does not violate the restrictive constraints. For example, if a user initially asks "Recommend only for a day trip within the city," and then asks "Where is a good place to go during the Qingming Festival?", after confirming that the current semantics do not deviate from the original intention of a short trip within the city, the system will input the fused semantic vector into the recommendation engine. The engine will then retrieve information on attractions in the database or knowledge graph that match "within the city + reachable within one day + open during the Qingming Festival," thereby generating output such as "Recommended: ×× Park, ×× Museum, etc., convenient for day trips, suitable for spring travel." This step ensures that the system's response is generated strictly based on the semantic target after semantic consistency verification, effectively preventing answer bias or inaccurate recommendations due to unclear user expression, model attention shift, or semantic ambiguity, thus improving the credibility, relevance, and user satisfaction of the question-and-answer results.
[0033] Based on the same inventive concept, embodiments of the present invention also provide an artificial intelligence-based question-and-answer dialogue semantic recognition system. This includes: Semantic Unit Module: Obtains the user's historical input statements and current input statements in multi-turn question-and-answer dialogues, performs semantic parsing on the historical input statements and current input statements to obtain the corresponding set of semantic units, and performs intent role recognition on each semantic unit to distinguish between restricted intent semantic units and unrestricted intent semantic units; Module construction: Extracts semantic units of restrictive intent from the set of semantic units, constructs the residual structure of restrictive intent, and maintains the residual structure of restrictive intent as a long-term semantic constraint for cross-turn dialogue; Restriction Module: Based on the semantic parsing result of the input statement in the current round, and combined with the contextual semantic representation generated in the previous round, the semantics of the current round are fused. During the fusion process, the residual structure of the restrictive intent is called so that the semantic units of the restrictive intent do not decay with the dialogue rounds in the semantic fusion. Verification module: Based on the fused semantic representation of the current round and the residual structure of the restrictive intent, execute the intent... Figure 1 Consistency check: Determines whether the semantics of the current round conflict with the restrictive intent; Result generation module: If there is no conflict between the current round semantics and the restrictive intent, the fused current round semantic representation will be used as the target semantic representation of the question-and-answer dialogue to generate the corresponding question-and-answer response or recommendation result.
[0034] This invention provides an AI-based question-and-answer dialogue semantic recognition system. By introducing an intent role recognition mechanism during multi-turn dialogue semantic parsing and constructing restrictive intent semantic units into a persistent residual structure, it avoids the problem of important intent information being weakened or forgotten due to temporal decay strategies in traditional context fusion algorithms. Furthermore, this invention explicitly injects restrictive intents into the residual structure during the semantic fusion stage and, through... Figure 1 The consistency verification mechanism ensures the consistency between the current semantics and the historical dominant intent, thereby effectively preventing semantic drift or misjudgment when the model processes supplementary input. Compared with existing attention mechanisms that rely on proximity principles, this invention can significantly improve the stability and context preservation capability of semantic fusion in multi-turn dialogues, ensuring that the dialogue system always responds based on complete and accurate intent boundaries when facing users. It is particularly suitable for task-oriented question answering and recommendation scenarios with global constraints.
[0035] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention should still fall within the scope of the claims of the present invention.
Claims
1. A question-and-answer dialogue semantic recognition method based on artificial intelligence, characterized in that, Includes the following steps: The system acquires the user's historical input statements and current input statements in multi-turn question-and-answer dialogues, performs semantic parsing on the historical and current input statements to obtain the corresponding semantic unit set, and identifies the intent role of each semantic unit to distinguish between restricted and unrestricted intent semantic units. Semantic units of restrictive intent are extracted from the set of semantic units, a residual structure of restrictive intent is constructed, and the residual structure of restrictive intent is maintained as a long-term semantic constraint for cross-turn dialogue; Based on the semantic parsing results of the input statement in the current round, combined with the contextual semantic representation generated in the previous round, the semantics of the current round are subjected to contextual fusion processing. During the fusion process, the residual structure of the restrictive intent is invoked so that the semantic units of the restrictive intent do not decay with the dialogue rounds in the semantic fusion. Based on the fused semantic representation of the current round and the residual structure of the restrictive intent, perform an intent consistency check to determine whether the semantic representation of the current round conflicts with the restrictive intent; If the current round semantics does not conflict with the restrictive intent, the fused current round semantic representation will be used as the target semantic representation for the question-and-answer dialogue to generate the corresponding question-and-answer response or recommendation result.
2. The question-and-answer dialogue semantic recognition method based on artificial intelligence according to claim 1, characterized in that, The steps for semantic parsing of historical input statements and current input statements are as follows: The historical input statements and the current input statements are segmented according to the dialogue rounds. For each segmented statement, it is further segmented based on semantic breakpoints to obtain several candidate semantic segments with complete semantic expression capabilities. The semantic breakpoints represent semantic trigger words for range, condition, negation, transition, or limiting relationships. For each candidate semantic segment, a corresponding semantic feature representation is constructed, and the semantic feature representation is bound to the semantic segment to form a structured semantic unit; the semantic feature representation includes the position number of the semantic segment in the original sentence and the identifier of the dialogue round to which it belongs; Based on structured semantic units, semantic constraint detection processing is performed on each semantic unit in sequence to determine whether the semantic unit contains a constraint expression that limits the subsequent question-and-answer results; When a semantic unit is detected to contain a restrictive expression, the corresponding semantic unit is marked as a restrictive intent semantic unit; when no restrictive expression is detected, the corresponding semantic unit is marked as a non-restrictive intent semantic unit. All semantic units that have completed the intent role marking are reorganized according to their respective dialogue rounds and their original order in the sentences to generate a set of semantic units.
3. The question-and-answer dialogue semantic recognition method based on artificial intelligence according to claim 1, characterized in that, Based on the semantic parsing results of the current round's input statement, and combined with the contextual semantic representation generated in the previous round, the steps for contextual fusion processing of the current round's semantics are as follows: Based on the set of semantic units in the current round, generate the semantic representation vector of the current round, and at the same time obtain the contextual semantic representation generated in the previous round of dialogue as the historical semantic benchmark; Read the main residual nodes that are in a valid state from the restricted intent residual structure, and match and filter the current round semantic unit set according to their intent tags to determine the candidate fusion positions that are semantically related to each main residual node; For each master residual node, a corresponding constraint injection anchor point is constructed in the semantic representation vector of the current round. The constraint injection anchor point is used to indicate the fixed participation position of the restrictive intent in the semantic fusion process and to prevent the restrictive intent from participating in the decay calculation based on the round distance. Based on the constraint injection anchor point, the restrictive intent semantics corresponding to the main residual node are jointly fused with the current round semantic representation and the historical semantic benchmark representation to form the current round fused semantic representation with explicit constraint information; After joint fusion is completed, the current round fusion semantic representation with explicit constraint information is used as a new context semantic representation for semantic fusion processing in the next round of dialogue.
4. The question-and-answer dialogue semantic recognition method based on artificial intelligence according to claim 1, characterized in that, Based on the fused semantic representation of the current round and the residual structure of the restrictive intent, the following steps are performed to check the consistency of intent and determine whether there is a conflict between the semantic representation of the current round and the restrictive intent: Based on the fused semantic representation of the current round and the residual structure of the restrictive intent, the semantic trajectory deviation index and the instruction meaning masking index are calculated. The semantic trajectory deviation index and the instruction meaning masking index are added together to obtain the verification index. The current round of semantics is determined to conflict with the restrictive intent based on the verification index and the preset verification index threshold.
5. The question-and-answer dialogue semantic recognition method based on artificial intelligence according to claim 4, characterized in that, The calculation steps for the semantic orbit deviation index are as follows: Obtain the semantic representation vector of the main residual node in the restricted intent residual structure, denoted as the restricted center vector; Obtain the semantic representation vector of the current round, and the context semantic representation vectors of the previous K rounds of historical dialogue, numbered in chronological order from round 1 to round K+1; Subtract the restrictive center vector from the semantic representation vector in each round to obtain a sequence of semantic orbit displacement vectors relative to the restrictive semantic center; For adjacent cycles in the orbit displacement vector sequence, the difference between adjacent orbit vectors is calculated one by one, and their normalized direction vectors are added together to obtain a cumulative direction vector. Then, the cumulative direction vector is normalized as a whole to obtain the principal tangential direction vector of the historical orbit. Calculate the difference vector between the current semantic track and the previous semantic track, and normalize it to the tangential direction vector of the current track. Perform a dot product operation between the current orbital tangential direction vector and the historical principal tangential direction vector, take the absolute value of the product, and subtract this value from the absolute value to obtain the orbital direction deviation. Record the orbital direction deviation as the first offset. The semantic track deviation index is calculated based on the first offset.
6. The question-and-answer dialogue semantic recognition method based on artificial intelligence according to claim 5, characterized in that, The steps for calculating the semantic orbit deviation index based on the first offset are as follows: The magnitude of the orbital displacement vector for each wheel is calculated to obtain the orbital radius sequence; The square root of the average of the squares of the historical K-round orbit radii is taken as the equilibrium center value of the orbit radius. Calculate the absolute value of the difference between the current wheel's track radius and the equilibrium center value, and divide it by the larger of the two values to obtain the track radius deviation ratio. The resulting value is the second offset. The semantic track deviation index is obtained by multiplying the first offset and the second offset by one and then subtracting the result.
7. The question-and-answer dialogue semantic recognition method based on artificial intelligence according to claim 4, characterized in that, The steps for calculating the masking index of the instruction meaning are as follows: Structural parsing is performed on the semantic representation of the current round, and the semantic representations of the subject slot, verb slot and object slot in the main clause are extracted and denoted as the current subject slot vector, the current verb slot vector and the current object slot vector, respectively. Perform the same structural parsing on the semantic representation of the main residual node in the residual structure of the restrictive intent to obtain the subject slot vector, verb slot vector and object slot vector of the restrictive intent; The semantic directions of the current semantic and restrictive intent are compared in the subject slot, verb slot, and object slot respectively. The semantic difference between the three sets of vectors is calculated. The semantic difference is obtained by taking the absolute value of the direction cosine similarity between the current vector and the restrictive vector in each slot and then subtracting one. The semantic differences of the three slots are combined into a three-dimensional vector. The magnitude of the three-dimensional vector is calculated and divided by the square root of three. Then, the value is subtracted by one to obtain the first occlusion parameter. The meaning of the instruction is calculated based on the first occlusion parameter, which is the occlusion index.
8. The question-and-answer dialogue semantic recognition method based on artificial intelligence according to claim 7, characterized in that, The steps for calculating the occlusion index based on the first occlusion parameter are as follows: Extract all subordinate expression structures other than the main clause from the current semantic representation, and extract the semantic vector representations corresponding to the subordinate expression structures to form a set of subordinate expression vectors; The average values of the three vectors in the current main clause (subject slot, verb slot, and object slot) are calculated to obtain the central semantic vector of the main clause; at the same time, the average value of all the subordinate expression vectors in the subordinate expression vector set is calculated to obtain the average semantic vector of the subordinate expressions. Calculate the dot product of the normalized direction vectors corresponding to the central semantic vector of the main sentence and the semantic vector of the subordinate expression, and subtract the absolute value of the dot product from the numerical value of 1 to obtain the second occlusion parameter; Subtract the first occlusion parameter and the second occlusion parameter from the value 1 respectively to obtain the first difference and the second difference. Multiply the first difference and the second difference together, and subtract the result of the multiplication from the value 1 to obtain the occlusion index of the instruction meaning.
9. The question-and-answer dialogue semantic recognition method based on artificial intelligence according to claim 4, characterized in that, The steps for determining whether the semantics of the current round conflict with the restrictive intent based on the verification index and a preset verification index threshold are as follows: The verification index is compared with the preset verification index threshold. If the verification index is not less than the preset verification index threshold, it means that the intent consistency verification is unqualified and there is a conflict between the current round of semantics and the restrictive intent. The verification index is compared with the preset verification index threshold. If the verification index is less than the preset verification index threshold, it means that the intent consistency verification is qualified and there is no conflict between the current round of semantics and the restrictive intent.
10. An artificial intelligence-based question-and-answer dialogue semantic recognition system, used to implement the artificial intelligence-based question-and-answer dialogue semantic recognition method according to any one of claims 1-9, characterized in that, The system includes: Semantic Unit Module: Obtains the user's historical input statements and current input statements in multi-turn question-and-answer dialogues, performs semantic parsing on the historical input statements and current input statements to obtain the corresponding set of semantic units, and performs intent role recognition on each semantic unit to distinguish between restricted intent semantic units and unrestricted intent semantic units; Module construction: Extracts semantic units of restrictive intent from the set of semantic units, constructs the residual structure of restrictive intent, and maintains the residual structure of restrictive intent as a long-term semantic constraint for cross-turn dialogue; Restriction Module: Based on the semantic parsing result of the input statement in the current round, and combined with the contextual semantic representation generated in the previous round, the semantics of the current round are fused. During the fusion process, the residual structure of the restrictive intent is called so that the semantic units of the restrictive intent do not decay with the dialogue rounds in the semantic fusion. Verification module: Based on the fused semantic representation of the current round and the residual structure of the restrictive intent, perform intent consistency verification to determine whether there is a conflict between the semantic representation of the current round and the restrictive intent; Result generation module: If there is no conflict between the current round semantics and the restrictive intent, the fused current round semantic representation will be used as the target semantic representation of the question-and-answer dialogue to generate the corresponding question-and-answer response or recommendation result.