Intelligent contextual response method for natural language queries
By constructing local syntax trees and global state trees, the problems of missing filtering conditions and conflicting historical memories in multi-turn dialogues in natural language query systems are solved, ensuring the integrity and consistency of query statements and achieving the accuracy and traceability of query results.
Patent Information
- Application Number
- CN202611209533.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-11
- Publication Date
- 2026-11-03
AI Technical Summary
Existing natural language query systems suffer from implicit filtering omissions and historical memory conflicts in multi-turn dialogues, resulting in incomplete or logically conflicting structured query statements and affecting the accuracy of query results.
By constructing a deterministic multi-round context tracking and conflict resolution mechanism, and utilizing local syntax trees and global context state trees, automatic inheritance completion of filtering conditions and overwriting and weight decay of historical nodes are performed to ensure the integrity and consistency of query statements.
It enables the generation of complete, logically conflict-free structured query statements in any round and historical span, avoiding query illusion and context drift, and supports traceable auditing of the query process.
Smart Images

Figure CN123030627A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of natural language processing technology, specifically to an intelligent contextual response method for natural language queries. Background Technology
[0002] With the development of large language model technology, natural language query interfaces have been widely used in natural language to structured query statements and retrieval enhancement generation systems. These systems receive natural language input from users, generate structured query statements after the language model understands them, submit them to the underlying database or retrieval engine for execution, and return the results to the user. In real-world business scenarios, users often need to ask multiple follow-up questions, requiring the system to have contextual understanding capabilities. Currently, the most common implementation is a scheme combining historical text concatenation with vector memory accumulation. The system concatenates historical dialogue text with the current query text according to a fixed template and inputs it into the language model. It then uses a vector database to encode and store historical interaction content. When a new query arrives, it retrieves relevant historical memory fragments through vector retrieval and concatenates them with prompt words. The language model then uses the concatenated text... The above scheme directly generates structured query statements from prompt words and submits them to the retrieval engine for execution. It sequentially connects the historical text caching module, vector memory storage module, prompt word concatenation module, and language model query generation module to form a processing link from text memory to query generation. However, this scheme relies on the long text attention mechanism of the language model to achieve contextual understanding and adopts a memory accumulation strategy of appending only and not overwriting. When the number of historical rounds increases or the user's query intent changes, it is difficult to guarantee the completeness and logical consistency of the fields in the generated structured query statement. There are areas for improvement, especially in multi-round queries involving implicit filtering conditions such as region and time. This phenomenon is more prominent and restricts the application effect of natural language query interface in actual business systems. Therefore, we propose an intelligent context response method for natural language queries. Summary of the Invention
[0003] The purpose of this invention is to provide an intelligent contextual response method for natural language queries.
[0004] The technical problem this invention aims to solve is that existing multi-turn context processing schemes combining historical text concatenation with vector memory accumulation have two defects. First, since historical dialogues are input into the language model in the form of natural language text, and the language model has an attention dilution effect on long texts, as the number of historical turns increases and the concatenated text becomes longer, the language model's attention weight to the implicit filtering conditions expressed in earlier turns will be diluted or even forgotten by subsequent texts. This results in the generated structured query statements omitting the necessary filtering fields required by the underlying data source pattern, producing a query illusion phenomenon where the query results do not match the user's true intent. Second, since existing schemes adopt a vector memory accumulation strategy of only appending and not overwriting, when the user's query intent evolves or is modified, the old historical memory fragments are still stored in the memory bank with similar vector representations. In the subsequent retrieval and recall stage, two semantically similar but mutually exclusive memory fragments will be recalled and concatenated with prompt words at the same time, causing the language model to generate structured query statements with logical conflicts or incorrect values, resulting in context drift and context poisoning.
[0005] To address the aforementioned technical problems, this invention provides an intelligent context response method for natural language queries. By constructing a deterministic and traceable multi-round context tracking and conflict resolution mechanism at the underlying data structure level, it replaces the reliance on the long text memory capacity of the language model, fundamentally solving the two types of problems: incomplete inheritance of implicit filtering conditions and lack of historical memory conflict resolution.
[0006] The technical solution adopted in this invention is as follows: The system receives the natural language query text from the user's current round, performs syntactic and semantic parsing on the query text to obtain a local syntax tree containing intent nodes, entity nodes, attribute nodes, and filter condition nodes. It then determines whether a global context state tree generated and persistently maintained from previous rounds exists in the current session. If not, the local syntax tree is persistently stored as the initial state tree. If it exists, the intent node in the local syntax tree is used as an anchor point to locate the associated historical branch in the global context state tree, obtaining the schema definition of the target data source. The filter condition nodes in the local syntax tree are extracted as the current filter condition set. This set is compared with the constraint field set in the schema definition to obtain a set of missing fields not appearing in the current filter condition set. For each missing field, the system backtracks along the round order from most recent to furthest, searching for filter condition nodes of the same type. The found nodes are then... The value is copied and mounted to the corresponding position in the local syntax tree, and the source is marked as inheritance. For the new node in the local syntax tree, the set of candidate historical nodes of the same type is searched in the historical branch. The semantic similarity between the new node and each candidate historical node and the interval between their respective rounds are calculated. Based on this, a comprehensive conflict score is calculated. The target historical node whose score exceeds the corresponding scores of the other candidate nodes is determined. When the score is not less than the preset conflict judgment threshold, the value of the target historical node is replaced by the value of the new node in place, the source is marked as overwrite, and the weight of the historical nodes associated with the target historical node is decayed and updated. When the score is less than the preset threshold, the new node is added as an independent branch and mounted. The processed local syntax tree is merged with the global context state tree to obtain the updated global context state tree and persisted. A structured query statement is generated based on its node set and submitted to the retrieval engine for query execution.
[0007] As a preferred implementation, semantic similarity is obtained by mapping nodes to semantic vectors using an embedding model and then calculating cosine similarity. The comprehensive conflict score is obtained by a weighted combination of semantic similarity and round interval. The semantic similarity weight coefficient and the temporal distance penalty coefficient are both preset constants. The weight decay of historical nodes is calculated by exponential decay with the dialogue round interval. When the decayed weight is lower than the preset retrieval recall threshold, the corresponding historical vector is marked as low priority in the vector index layer and no longer participates in subsequent retrieval ranking. Each node in the global context state tree carries a source attribute to record whether the node is originally entered, inherited and completed, or overwritten and updated, thereby supporting traceable query of the state tree.
[0008] Compared with the prior art, the beneficial effects of the present invention by adopting the above technical solution are as follows:
[0009] 1. This invention achieves automatic inheritance of implicit filtering conditions through pattern definition and deterministic backtracking algorithm, without relying on the long text memory capability of language model, and can ensure the integrity of the generated structured query statement fields and semantic closure under any round and any historical span, avoiding the query illusion phenomenon caused by attention dilution;
[0010] 2. This invention constructs a dual quantitative evaluation mechanism based on semantic similarity and dialogue round time distance. When a conflict of intent change is detected between new and old query nodes forming the same semantic slot, the invention can actively perform in-situ overwriting of historical nodes and weight decay of historical vectors. This ensures that each semantic slot in the state tree retains only one currently valid value, thereby ensuring that the query statement finally generated and submitted to the retrieval layer always remains pure and without logical conflicts, avoiding context drift and context poisoning.
[0011] 3. This invention enables the global context state tree to be traceable through a node source marking mechanism, which facilitates the auditing and verification of the semantic node value evolution path during multiple rounds of queries. Attached Figure Description
[0012] Figure 1 This is a schematic diagram of the overall main process in an embodiment of the present invention;
[0013] Figure 2 This is a schematic diagram of the implicit constraint inheritance completion sub-process in an embodiment of the present invention;
[0014] Figure 3 This is a schematic diagram of the conflict detection and resolution sub-process in an embodiment of the present invention. Detailed Implementation
[0015] The following is in conjunction with the appendix Figure 1-3 The specific embodiments of the present invention will be further described below. It should be noted that the description of these embodiments is for the purpose of helping to understand the present invention, but does not constitute a limitation of the present invention.
[0016] Furthermore, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0017] The intelligent context response method for natural language queries provided in this invention runs on a processing system comprising a natural language parsing layer, a context state machine layer, a pattern mapping and implicit constraint inheritance layer, a conflict detection and resolution layer, and a structured query generation layer. The user interaction layer receives the user's natural language query input and displays the search results. The natural language parsing layer contains a dependency parsing and lightweight intent recognition submodule, which is responsible for converting the current query text into a local syntax tree. The context state machine layer uses an in-memory database as a carrier to maintain and persist the global context state tree and provides interfaces for adding, deleting, modifying, and querying nodes. This layer is bidirectionally connected to the pattern mapping and implicit constraint inheritance module and the conflict detection and resolution module. The former is responsible for comparing the target data source pattern definition and backtracking to complete the missing filtering conditions, while the latter is responsible for calculating semantic similarity and round difference, determining and executing node overwriting and weight decay. The results processed by the above two modules are summarized to the structured query generation layer to generate a structured query statement. The retrieval execution layer includes a relational database, a graph database, and a vector retrieval engine, executes the generated query statement, and returns the results to the user interaction layer along the original path.
[0018] In the global context state tree, after each round of natural language query is parsed into a local syntax tree, it is mounted to the state tree according to a unified node classification rule. The node types include intent nodes, entity nodes, attribute nodes, and filter condition nodes. Each node carries the following attributes: unique node identifier, node type, node value, round number, source tag, and current weight value. The source tag is used to distinguish whether the node is originally entered, inherited and completed, or overwritten and updated.
[0019] The transformation of the local syntax tree and the construction and updating of the state tree are as follows: First, the user's current round natural language query text is received and input into a pre-trained dependency parsing module or a lightweight intent recognition model for word segmentation, named entity recognition, and dependency relation parsing to obtain the local syntax tree corresponding to this round of query. Second, each node of the local syntax tree is traversed, and the nodes are classified into one of four types: intent nodes, entity nodes, attribute nodes, and filter condition nodes. A unique node identifier and round label are assigned to each node. Third, it is determined whether a historical state tree exists for the current session. If not, i.e., this round is the first round of query for the session, the local syntax tree is directly written as the initial state tree into the state machine storage layer. If a historical state tree exists, the intent node of the local syntax tree is used as the initial state tree. Using a node as an anchor point, the associated historical branch is located in the historical state tree. Each node in the local syntax tree is compared with the historical nodes of the same type under that branch. The comparison results are divided into three cases: First, if it is determined to be a new semantic misalignment, the corresponding node is added as a child node and attached to the corresponding branch of the state tree. Second, if it is determined to be implicit constraint completion, the value is copied from the historical node and attached to the corresponding missing position in the current query tree. Third, if it is determined to be a conflict overwrite, the historical node is replaced with the new node value in place. After the above operations, the updated state tree is obtained, which is persistently stored in the state machine storage layer. A structured query representation is generated based on its complete node set and submitted to the downstream search engine for query execution. At the same time, the state tree is retained as the context basis for the next round of query.
[0020] The implicit constraint inheritance method based on schema mapping is as follows: First, obtain the schema definition of the target data source, which includes the complete set of fields supported by the data source and the required and optional constraint markers for each field for a specific query intent. Second, extract all filter condition nodes in the local query tree generated in the current round into a set and compare it with the set of constraint fields in the schema definition. Find the fields in the schema definition that are marked as recommended associations under the current query intent but do not appear in the current set of filter conditions, and denote them as the missing field set. If the missing field set is empty, it means that the current query conditions are complete and no inheritance is needed. If the missing field set is not empty, then for each of the missing field nodes... For a missing field, the system backtracks along the branch of the current intent node in the historical state tree from the most recent to the oldest in the cycle, searching for filter condition nodes of the same type as the missing field. The first node found during the backtracking process is identified as the matching node. If a matching node is found, the value of the historical node is copied and attached as a new node to the position of the corresponding missing field in the current query tree, and the source attribute of the new node is marked as inherited. If no matching node is found, the field remains in its default state and no forced completion is performed. After traversing all fields in the missing field set, the completed query tree is output for use in the state tree merging process.
[0021] The method for resolving conflicts through temporal and semantic dual decay is as follows: For each new node in the current query tree, a set of candidate historical nodes of the same type is searched in the historical state tree. The new node and each candidate historical node in the candidate set are input into the lightweight embedding model to obtain the corresponding semantic vector. The semantic similarity between the two is calculated according to the following formula:
[0022] ;
[0023] In the formula, This represents the entity or condition node to be determined in the new query tree. Indicates the state tree of the first A number of historical candidate nodes of the same type and They are respectively and The semantic vector obtained by the embedding model mapping Represents the dot product of two vectors. and Let them represent the magnitudes of the two vectors, respectively. The value ranges from negative one to one, and the larger the value, the closer the semantics of the two nodes are.
[0024] Further calculate the round difference between the round in which the newly added node is located and the round in which the candidate historical node is located, and combine this with the semantic similarity mentioned above to calculate the conflict score according to the following comprehensive scoring formula:
[0025] ;
[0026] In the formula, This is the semantic similarity weight coefficient, used to adjust the influence of semantic proximity on conflict determination. This is the temporal distance penalty coefficient, used to adjust the influence of the round interval on conflict determination. Indicates the round to which the newly added node belongs and the number of... The number of dialogue rounds between the rounds to which each candidate historical node belongs. For the first The overall conflict score of each candidate historical node relative to the new node. The higher the value, the higher the possibility of a conflict of intent change under the same semantic difference.
[0027] From the candidate set, historical nodes whose comprehensive conflict score exceeds that of the corresponding scores of other candidate nodes are identified as the most likely conflict targets, and this score is recorded as the target score. The target score is compared with a preset conflict determination threshold: if the target score is not less than the threshold, it is determined that the new node and the target historical node constitute an intent change conflict at the same semantic node position. The node is overwritten in situ, that is, the value, semantic vector, and weight information of the target historical node in the state tree are replaced by the content corresponding to the new node. At the same time, the weights of historical vectors associated with the target historical node but not yet directly replaced in the state tree are attenuated and updated according to the following attenuation formula:
[0028] ;
[0029] In the formula, This represents the initial confidence weight assigned to a historical node at the time of its creation. The decay rate constant is preset for the system. This indicates the number of dialogue rounds since the creation of this historical node. This represents the current effective weight of the historical node after decay. When the target score is lower than the system's preset retrieval threshold, the historical vector corresponding to the node will be marked as low priority in the vector index layer and will no longer participate in subsequent retrieval sorting, thereby avoiding its erroneous retrieval and concatenation into the final query statement. If the target score is less than the preset conflict judgment threshold, the newly added node will be judged as an independent newly added node and will be directly appended to the corresponding branch of the state tree.
[0030] Taking a typical multi-turn interaction scenario as an example, the specific implementation of this invention is illustrated as follows: In the first round, the user inputs "check the equipment failure rate in Beijing last year". The system parses and generates a local syntax tree, which should be the first round query. The state tree is initialized to a tree structure containing the intent node "failure rate query", the entity node "Beijing", and the filter condition node "last year's time". Based on this, the corresponding query statement is generated and the retrieval is executed. In the second round, the user inputs "equipment failure rate in Shanghai". The system parses and finds that the query tree in this round only contains the entity node "Shanghai", and the time filter condition is missing. After pattern comparison, it is determined that the time field is the recommended associated field under this query intent, but it is missing in this round. Therefore, the system backtracks the historical state tree from the most recent to the oldest round to find the value of the time node in the previous round. Last year, the data was copied and inherited and attached to the current query tree, with the source marked as inherited. The final generated query statement automatically completed the condition that the time was equal to last year. In the third round, the user input was changed to the year before last. The system parsed out the new filter condition node with the time of the year before last, calculated its semantic similarity with the historical time node with the time of last year and the round interval, and the comprehensive conflict score obtained was not less than the preset threshold. It was determined that the two constituted the intention change under the same semantic difference. Therefore, the time node in the state tree was overwritten in place, and the value was updated from last year to the year before last. The source was marked as overwritten, and the weight decay processing was performed on the associated old vector to ensure that the subsequent generated query statement only contained the valid condition that the time was equal to the year before last, and no more search interference related to last year remained.
[0031] As an alternative implementation method, the present invention specification uses a memory database to store the global context state tree as the main implementation method. However, a graph database can also be used to store the state tree structure natively. The nodes and their parent-child mounting relationships, source tags, and weight attributes are all persisted in the form of nodes and edges of the graph database. The graph database's own graph traversal query language is used to realize historical backtracking and candidate node retrieval. In this way, in scenarios with massive concurrent sessions and the need for long-term archiving of historical state trees for auditing and traceability, better query efficiency and storage scalability can be obtained.
[0032] As an alternative implementation, the present invention primarily uses a weighted scoring function of semantic similarity and round interval as the basis for conflict determination. However, in scenarios where there are explicit business rules for specific field types, a rule engine can be pre-configured to directly maintain a mutual exclusion table for field types with finite enumeration values. When determining conflicts, the predefined mutual exclusion relationships in the rule engine are matched first. Only when the rule engine does not cover the field type will the judgment fall back to the aforementioned comprehensive scoring method of semantic similarity and round interval, thereby reducing computational overhead while ensuring the accuracy of the judgment.
[0033] 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 possible changes and modifications without departing from the spirit and scope of the present invention. Therefore, any modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention shall fall within the protection scope defined by the claims of the present invention.
Claims
1. An intelligent contextual response method for natural language queries, characterized in that, include: Receive the natural language query text of the user in the current round, perform syntactic and semantic parsing on the query text to obtain a local syntax tree, which includes intent nodes, entity nodes, attribute nodes and filter condition nodes; Determine whether the current session has a global context state tree generated and persistently maintained by previous rounds of queries. If the global context state tree does not exist, the local syntax tree is used as the initial state tree for persistent storage. If the global context state tree exists, the intent node in the local syntax tree is used as the anchor point to locate the associated historical branch in the global context state tree. Obtain the schema definition of the target data source, which includes the set of fields supported by the target data source and the constraint markers of each field for the query intent. Extract the filter condition nodes in the local syntax tree as the current filter condition set. Compare the current filter condition set with the constraint field set to obtain the set of missing fields that do not appear in the current filter condition set. For each missing field in the set of missing fields, backtrack the historical branches from near to far along the round order to find filter condition nodes of the same type as the missing field. Determine the filter condition node found first during the backtracking process as the matching node. Copy the value of the matching node and mount it to the position in the local syntax tree corresponding to the missing field. Mark the source attribute of the node obtained after mounting as inherited. For a new node in the local syntax tree that does not correspond to an existing node in the historical branch, a set of candidate historical nodes of the same type as the new node is searched in the historical branch. The semantic similarity between the new node and each candidate historical node in the set is calculated, as well as the round interval between the round to which the new node belongs and the round to which each candidate historical node belongs. Based on the semantic similarity and the round interval, the comprehensive conflict score corresponding to the new node and each candidate historical node is calculated. A target historical node whose comprehensive conflict score exceeds the scores of the other candidate historical nodes is determined from the set of candidate historical nodes. If the comprehensive conflict score corresponding to the target historical node is not less than a preset conflict judgment threshold, the value of the target historical node is replaced in place by the value of the new node to obtain the replaced node. The source attribute of the replaced node is marked as overwritten, and the weights of the historical nodes associated with the target historical node in the global context state tree are decayed and updated. If the comprehensive conflict score corresponding to the target historical node is less than the preset conflict judgment threshold, the new node is added as an independent branch to the corresponding branch of the global context state tree. The local syntax tree obtained after mounting the matching node and processing the new node is merged with the global context state tree to obtain an updated global context state tree, and the updated global context state tree is persisted and stored. A structured query statement is generated based on the node set of the updated global context state tree, and the structured query statement is submitted to the retrieval engine for execution.
2. The intelligent contextual response method for natural language queries according to claim 1, characterized in that: The constraint field set in the pattern definition includes fields that the target data source marks as recommended related to the current query intent, and the missing field set consists of fields in the constraint field set that are marked as recommended related to the current query intent but do not appear in the current filter condition set.
3. The intelligent contextual response method for natural language queries according to claim 1, characterized in that: The step of calculating the semantic similarity between the newly added node and each candidate historical node in the candidate historical node set includes: inputting the newly added node and the candidate historical nodes in the candidate historical node set into the embedding model respectively to obtain the semantic vector corresponding to the newly added node and the semantic vector corresponding to the candidate historical node, and calculating the semantic similarity between the newly added node and the candidate historical node according to the following formula: In the formula, This refers to the newly added node. Indicates the first in the set of candidate historical nodes One candidate historical node This represents the semantic vector corresponding to the newly added node. Indicates the first The semantic vectors corresponding to each candidate historical node This represents the inner product of two semantic vectors. and These represent the magnitudes of the two semantic vectors, respectively. This indicates that the newly added node is related to the first node. Semantic similarity between candidate historical nodes; The calculation of the comprehensive conflict score corresponding to the newly added node and each candidate historical node includes: calculating the comprehensive conflict score of the newly added node and each candidate historical node according to the following formula. The comprehensive conflict score corresponding to each candidate historical node: In the formula, This represents the preset semantic similarity weight coefficient. This represents the preset time-series distance penalty coefficient. Indicates the round to which the newly added node belongs and the number of rounds. The interval between rounds to which each candidate historical node belongs. This indicates that the newly added node is related to the first node. The comprehensive conflict score corresponding to each candidate historical node.
4. The intelligent contextual response method for natural language queries according to claim 1, characterized in that: The step of decaying and updating the weights of historical nodes associated with the target historical node in the global context state tree includes: calculating the current effective weight of the historical node according to the following formula: In the formula, This indicates the initial weight assigned to the historical node at the time of its creation. This represents the preset decay rate constant. This indicates the number of dialogue rounds since the creation of this historical node. This indicates the current effective weight of the historical node after attenuation; If the effective weight is lower than the preset retrieval recall threshold, the historical vector corresponding to the historical node is marked as low priority in the vector index layer so that the historical vector does not participate in the subsequent retrieval ranking.
5. The intelligent contextual response method for natural language queries according to claim 1, characterized in that: Each node in the global context state tree carries a source attribute, which includes one of three types: native entry, inherited completion, and overwrite update. The method further includes: in response to a trace query request for the global context state tree, outputting the value evolution path of the node in the multi-round query process according to the source attribute and round number of each node.
6. The intelligent contextual response method for natural language queries according to claim 1, characterized in that: The step of locating the associated historical branch in the global context state tree using the intent node in the local syntax tree as an anchor point includes: comparing the value of the intent node in the local syntax tree with the value of the corresponding intent node in each intent node branch in the global context state tree, and determining the intent node branch with the same value as the historical branch associated with the current round of query.
7. An intelligent contextual response system for natural language queries, characterized in that, include: The natural language parsing module is used to receive the natural language query text of the user in the current round, perform syntactic parsing and semantic parsing on the query text, and obtain a local syntax tree. The local syntax tree includes intent nodes, entity nodes, attribute nodes and filter condition nodes. The context state machine module is used to persistently maintain the global context state tree, and, when the global context state tree exists, to locate the associated historical branch in the global context state tree using the intent node in the local syntax tree as the anchor point. The implicit constraint inheritance module is used to obtain the schema definition of the target data source, extract the filter condition nodes in the local syntax tree as the current filter condition set, compare the current filter condition set with the constraint field set in the schema definition to obtain the missing field set, and for each missing field in the missing field set, backtrack the historical branches from near to far in the round order to find filter condition nodes of the same type, and copy and mount the value of the found node to the position in the local syntax tree corresponding to the missing field. The conflict detection and resolution module is used to find a set of candidate historical nodes of the same type in the historical branches for newly added nodes in the local syntax tree, calculate the semantic similarity and round interval between the newly added node and each candidate historical node, calculate the comprehensive conflict score based on the semantic similarity and the round interval, and perform in-situ replacement and weight decay update of the target historical node if the preset overwrite conditions are met, and add the newly added node as an independent branch if the preset overwrite conditions are not met. The structured query generation module is used to generate a structured query statement based on the node set of the merged and updated global context state tree, and submit the structured query statement to the retrieval engine for query execution.
8. The intelligent context response system for natural language queries according to claim 7, characterized in that: The conflict detection and resolution module is further configured to: after determining that the comprehensive conflict score of the target historical node exceeds the scores of the other candidate historical nodes, compare the comprehensive conflict score of the target historical node with a preset conflict determination threshold, and determine that the preset overwrite condition is met if the comprehensive conflict score is not less than the preset conflict determination threshold.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the intelligent context response method for natural language queries as described in any one of claims 1 to 6.
