A multi-round question-answering implementation method for standard specifications
By combining natural language processing, knowledge graphs and quantum state superposition technology to generate dynamic knowledge graphs and optimize question and answer strategies, it solves many shortcomings of intelligent question answering systems in processing standard questions and answers, and achieves efficient, accurate and flexible question and answer capabilities.
Patent Information
- Application Number
- CN202411600482.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2044-11-11
AI Technical Summary
The existing intelligent question-and-answer system has keyword matching limitations, inefficient knowledge base maintenance, insufficient natural language understanding and entity recognition capabilities, limited multi-condition query processing capabilities, poor failed query processing, and multiple rounds of conversations. The problems of limited capabilities and insufficient utilization of user feedback are difficult to meet the complex and professional needs of users.
Use natural language processing, knowledge graph, conditional random field, quantum state superposition and multi-modal learning technology to generate a dynamic knowledge graph with a directed acyclic graph structure, and use the conditional random field model to perform word segmentation, part-of-speech tagging and syntactic analysis to convert users The question is a database query statement, and the quantum state superposition principle is used to calculate path similarity, dynamically adjust the question and answer path, and optimize the training data through adversarial training and data enhancement technology.
It improves the accuracy and flexibility of the question and answer system, enhances the processing capabilities of complex and multi-condition queries, improves the user experience and system robustness, and ensures the stability and accuracy of the system when processing diverse inputs.
Smart Images

Figure CN119128115B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of knowledge graphs and intelligent question answering in computers, and in particular to a method for implementing multi-round question answering based on standard specifications. Background Art
[0002] With the rapid development of information technology, intelligent question-answering systems are increasingly being used in various fields. However, existing intelligent question-answering technologies have exposed many defects when dealing with standard question-answering, and are unable to meet user needs. Standard question-answering usually involves a large number of professional terms and complex rules, and users' questions may have multi-level conditions and contextual backgrounds. Existing technologies are unable to cope with these problems.
[0003] In the existing technology, traditional intelligent question-answering systems mainly rely on keyword matching and information retrieval technology. These systems find relevant answers by matching keywords in the questions input by users. They work well when dealing with simple questions, but are unable to cope with complex questions. Specifically, traditional methods have obvious shortcomings in the following aspects:
[0004] 1. Limitations of keyword matching: Standardized questions and answers often contain multiple levels of conditions and context. It is difficult to accurately understand and answer these questions simply by relying on keyword matching.
[0005] 2. Inefficiency of knowledge base maintenance: The existing system mainly relies on manual methods to build and maintain the knowledge base, which is inefficient and difficult to cope with the dynamic changes of knowledge. The content of standards and specifications is frequently updated, and manual maintenance of the knowledge base is time-consuming, labor-intensive, and error-prone, making it difficult for the system to keep up to date.
[0006] 3. Insufficient natural language understanding and entity recognition capabilities: Existing knowledge graph systems lack effective natural language understanding and entity recognition technologies when processing user input, resulting in insufficient ability to parse and understand complex questions.
[0007] 4. Limited ability to process multi-condition queries: Questions raised by users often involve multiple conditions and constraints, but existing systems have limited ability to process multi-condition queries and cannot accurately return results that meet all conditions. Standard specifications often require specific measures to be taken or specific values to be used under specific conditions, and existing systems find it difficult to accurately process these complex queries.
[0008] 5. Poor handling of failed queries: When the system cannot find a suitable answer, it usually returns empty results or recommends other questions that are less relevant to the query. This handling method not only affects the user experience, but also makes it more difficult for users to obtain the information they need. In standard question and answer, user queries are often highly professional and targeted, and simple recommendations cannot meet user needs.
[0009] 6. Limited multi-round dialogue capabilities: Most systems are unable to fully utilize the contextual information in the previous text when users ask follow-up questions, resulting in poor coherence and accuracy of answers. Especially in scenarios where multiple rounds of questions and answers are required to gradually clarify the problem, the shortcomings of existing systems have significantly reduced user satisfaction.
[0010] 7. Insufficient use of user feedback: Most question-answering systems find it difficult to adjust and optimize their question-answering strategies in a timely manner after receiving user feedback, resulting in slow system improvement and inability to quickly adapt to changes in user needs. Especially in standard question-answering, user feedback is crucial to improving the accuracy and reliability of the system. The shortcomings of existing systems in this regard have seriously affected their actual application effects.
[0011] Therefore, how to provide a multi-round question-answering implementation method based on standard specifications is an urgent problem that technicians in this field need to solve. Summary of the invention
[0012] The purpose of this invention is to propose a method for implementing multi-round question-answering based on standard specifications, using natural language processing, knowledge graph, conditional random field, quantum state superposition and multimodal learning technology. The specific steps include: generating and storing a knowledge graph of a directed acyclic graph; using The conditional random field model is used for word segmentation, part-of-speech tagging, syntactic analysis and entity extraction; user questions are converted into database query statements; when processing query results, the quantum state superposition principle is used to calculate path similarity and display node content layer by layer; training data is optimized through adversarial training and data enhancement technology, and question-answering strategies are optimized using a multimodal interface and an adaptive weight adjustment algorithm. The present invention has the advantages of high efficiency, high accuracy, good flexibility, high robustness and optimized user experience.
[0013] A method for implementing multi-round question-answering for standard specifications according to an embodiment of the present invention includes the following steps:
[0014] S1. Use based The natural language processing technology of the architecture generates a dynamic knowledge graph with a directed acyclic graph structure based on the standard specification content and stores it in a high-performance graph database;
[0015] S2, obtain the content of the entity node and add it to the adaptive vocabulary, pre-mark possible questions, and use Perform word segmentation, part-of-speech tagging, and syntactic analysis, and train a conditional random field model to extract key entities in the question.
[0016] S3, obtain the question input by the user, and convert the question in natural language into a database query statement, extract the key entities in the result after processing through the conditional random field model, and generate a database query statement in combination with the entity relationship and path information stored in the knowledge graph;
[0017] S4. Query the database to obtain all paths involving the query entity, and return the query results to the front-end page;
[0018] S5. When the query result is empty, it returns an empty message to prompt the user that there is no corresponding answer, and automatically jumps to the keyword search page based on deep learning;
[0019] S6. When multiple paths are returned, the paths are converted into a dynamic tree structure, and the node contents are displayed layer by layer. After the user selects a node at each level, the next level of nodes is displayed until the leaf node, and the content of the leaf node is returned to the user as the final answer. When only one query result is returned, this answer is returned directly.
[0020] Optionally, the S1 specifically includes:
[0021] S11. Use based The natural language processing technology of the architecture extracts information from the standard specification content and performs deep semantic analysis to generate nodes and edges;
[0022] S12, use The model preprocesses and encodes the standard specification content to generate context-related word vector representations;
[0023] S13. Use The locality-sensitive hashing mechanism in the model captures the complex dependencies and semantic information in the standard specification content when generating nodes and edges;
[0024] S14, applying the generated context-related word vectors and semantic information to the generation of nodes and edges;
[0025] S15. The generated nodes and edges are organized according to the structure of a directed acyclic graph, where each node represents an entity in the standard specification and each edge represents the relationship between entities;
[0026] S16. Use a high-performance graph database to store the generated dynamic knowledge graph.
[0027] Optionally, the S3 specifically includes:
[0028] S31, obtaining a question in natural language form input by a user, and performing preliminary text preprocessing, including removing stop words and performing word form restoration, to obtain a preprocessed question text;
[0029] S32, using a conditional random field model to perform entity recognition and extraction on the preprocessed question text;
[0030] S33. The state sequence probability of the conditional random field model is:
[0031] ;
[0032] in, is a state sequence, each state Indicates the corresponding entity category, is the preprocessed question text, is the normalization factor, Represents the question text after preprocessing Length, and are model parameters, Indicates status With the previous state The characteristic function between Indicates status With the current word The characteristic function between
[0033] S34, by maximizing To identify and extract key entities, combine the entity relationships and path information stored in the knowledge graph, perform association analysis on the extracted key entities, and generate a set of entity relationship paths;
[0034] S35, constructing a database query statement according to the entity relationship path set;
[0035] S36. Optimize the generated database query statements and use query optimization technology to perform syntax and semantic checks on the query statements.
[0036] Optionally, the S6 specifically includes:
[0037] S61, when the query returns multiple paths, convert the path set into a dynamic tree structure;
[0038] S62. Use the quantum state superposition principle to process the path set and generate the quantum superposition state representation of the path , let each path Corresponding to a quantum state , the quantum superposition state of the path is expressed as:
[0039] ;
[0040] in, For path The weight coefficient satisfies the normalization condition ;
[0041] S63. Quantum superposition Perform quantum measurements and generate a set of measurement results , the density matrix of the measurement results for:
[0042] ;
[0043] in, For path The complex conjugate of the weight coefficient, Indicates the path and path The outer product of
[0044] S64. Using the density matrix Calculate the similarity between paths, similarity for:
[0045] ;
[0046] in, For path and path The sum of similarities of shared nodes in For path and path The number of shared nodes in For shared nodes The weight coefficient of is the weighted sum of the feature functions, indicating shared nodes On the path and path The relationship between the states, is the characteristic function, calculating the path and path Medium status and The similarity between them, combined with the density matrix Information, is the normalization factor used to standardize the similarity value, and Is the path and path The number of nodes, and The paths and path The sum of squares of the midpoint weights;
[0047] S65, converting the similarity matrix into a tree structure, initially displaying the root node, and after the user selects a certain level of node, displaying the child nodes under the node;
[0048] S66, repeat step S65 until the node selected by the user is a leaf node, and return the leaf node content of the path to the user as the final answer;
[0049] S67. When the query result returns only one path, the node content of the path is directly displayed, and the content of the last node is returned to the user as the final answer.
[0050] Optionally, the method further includes:
[0051] Obtain initial training data and generate a training data set;
[0052] Generate adversarial samples using adversarial training techniques:
[0053] ;
[0054] in, To counteract the amplitude of the disturbance, is the state sequence probability defined, is the state sequence probability input The gradient of represents the two-norm of a vector;
[0055] Add the generated adversarial examples to the training dataset to form an expanded training dataset;
[0056] The expanded training dataset is further expanded using data augmentation techniques, including synonym replacement and sentence reconstruction, to generate diverse question samples;
[0057] Add the data-augmented samples to the training dataset to form the final augmented training dataset;
[0058] Automatically annotate the expanded training data set, use the trained model to predict the unlabeled data, and use the prediction results as labels to generate an automatically annotated data set;
[0059] Combine adversarial training and data augmentation techniques to further process the training dataset to generate more diverse and robust training data;
[0060] Combine the initial training data set, the expanded training data set, and the automatically labeled data set to retrain the model and update the model parameters :
[0061] ;
[0062] in, is the learning rate, Based on the expanded training data set The loss function is calculated as, is a regularization parameter used to prevent overfitting. is the weight of the path node, For Node With feedback The correlation function of and Represent the model parameters The first and second norms of .
[0063] Optionally, the method further includes:
[0064] Obtain user feedback data, where each feedback data includes the question entered by the user, the answer returned by the system, and the user's feedback;
[0065] Use a multimodal learning model to process user feedback data and transform text, voice, and image feedback into a unified embedding representation;
[0066] Optimize the question-answering strategy through an adaptive weight adjustment algorithm and calculate the weight coefficients of different modal feedback , , , combined with the defined state sequence probability , the update of weight coefficient is:
[0067] ;
[0068] ;
[0069] ;
[0070] in, , , Represent the initial weight values of text, voice and image feedback respectively, Representing modality The initial weight value of Representing modality The exponential function of the weight value, Indicates the number of feedback data, represents a set of three modes, Represents the defined state sequence probability, combines the weight coefficients to perform weighted fusion on the multimodal feedback embedding, and generates a unified feedback representation :
[0071] ;
[0072] in, Representing modality The weight coefficient of Representing modality Embedding representation of ;
[0073] According to the unified feedback Dynamically optimize question-answering strategies and update question-answering model parameters :
[0074] ;
[0075] in, Indicated in The model parameters are updated at all times. is the learning rate, Represents the model parameters The gradient of Based on feedback The loss function is calculated as, is a regularization parameter used to prevent overfitting. is the weight of the path node; adaptively adjust the question-answer path and generate the optimal question-answer path based on the optimized model :
[0076] ;
[0077] in, Path Node The weight of For Node With feedback The correlation function of is the adjustment factor, is the total correlation between the path and the feedback representation, is the adjustment weight of the path node, For path With feedback The correlation function of
[0078] In the subsequent question-and-answer process, the optimized model and path are used to answer;
[0079] Continue to record user interaction logs and add new feedback data to the feedback dataset, repeat the above steps, and continuously optimize and improve system performance.
[0080] The beneficial effects of the present invention are:
[0081] (1) The present invention combines Natural language processing technology based on architecture, The conditional random field model can accurately understand and parse user questions, ensure the generated query statements are accurate, and improve the accuracy of question and answer.
[0082] (2) The present invention uses the principle of quantum state superposition to process multiple paths, calculate path similarity, and dynamically adjust the question-answering path, allowing the system to provide multi-level and detailed answer choices when answering complex questions, ensuring that users obtain the most relevant information, significantly improving the system's flexibility and ability to respond to complex queries.
[0083] (3) The present invention combines adversarial training and data augmentation techniques to automatically annotate and expand training data, thereby enhancing the generalization ability and robustness of the model, effectively reducing the system's misjudgment of abnormal or complex problems, and improving the system's stability when processing diverse inputs.
[0084] (4) The present invention improves the user-system interaction experience by providing a multimodal user interface that supports text, voice, and image input and combines cross-modal alignment and fusion technology. At the same time, through an adaptive weight adjustment algorithm, the question-answering strategy is dynamically optimized using user feedback and the question-answering path is adaptively adjusted, further improving the accuracy of the question-answering system and user satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS
[0085] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0086] Figure 1 This is a flow chart of a method for implementing multi-round question and answer based on standard specifications proposed by the present invention. DETAILED DESCRIPTION
[0087] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.
[0088] refer to Figure 1 , a method for implementing multi-round question and answer based on standard specifications, comprising the following steps:
[0089] S1. Use based The natural language processing technology of the architecture generates a dynamic knowledge graph with a directed acyclic graph structure based on the standard specification content and stores it in a high-performance graph database;
[0090] S2, obtain the content of the entity node and add it to the adaptive vocabulary, pre-mark possible questions, and use Perform word segmentation, part-of-speech tagging, and syntactic analysis, and train a conditional random field model to extract key entities in the question.
[0091] S3, obtain the question input by the user, and convert the question in natural language into a database query statement, extract the key entities in the result after processing through the conditional random field model, and generate a database query statement in combination with the entity relationship and path information stored in the knowledge graph;
[0092] S4. Query the database to obtain all paths involving the query entity, and return the query results to the front-end page;
[0093] S5. When the query result is empty, it returns an empty message to prompt the user that there is no corresponding answer, and automatically jumps to the keyword search page based on deep learning;
[0094] S6. When multiple paths are returned, the paths are converted into a dynamic tree structure, and the node contents are displayed layer by layer. After the user selects a node at each level, the next level of nodes is displayed until the leaf node, and the content of the leaf node is returned to the user as the final answer. When only one query result is returned, this answer is returned directly.
[0095] Optionally, the S1 specifically includes:
[0096] S11. Use based The natural language processing technology of the architecture extracts information from the standard specification content and performs deep semantic analysis to generate nodes and edges;
[0097] S12, use The model preprocesses and encodes the standard specification content to generate context-related word vector representations;
[0098] S13. Use The locality-sensitive hashing mechanism in the model captures the complex dependencies and semantic information in the standard specification content when generating nodes and edges;
[0099] S14, applying the generated context-related word vectors and semantic information to the generation of nodes and edges;
[0100] S15. The generated nodes and edges are organized according to the structure of a directed acyclic graph, where each node represents an entity in the standard specification and each edge represents the relationship between entities;
[0101] S16. Use a high-performance graph database to store the generated dynamic knowledge graph.
[0102] Optionally, the S3 specifically includes:
[0103] S31, obtaining a question in natural language form input by a user, and performing preliminary text preprocessing, including removing stop words and performing word form restoration, to obtain a preprocessed question text;
[0104] S32, using a conditional random field model to perform entity recognition and extraction on the preprocessed question text;
[0105] S33. The state sequence probability of the conditional random field model is:
[0106] ;
[0107] in, is a state sequence, each state Indicates the corresponding entity category, is the preprocessed question text, is the normalization factor, Represents the question text after preprocessing Length, and are model parameters, Indicates status With the previous state The characteristic function between Indicates status With the current word The characteristic function between
[0108] S34, by maximizing To identify and extract key entities, combine the entity relationships and path information stored in the knowledge graph, perform association analysis on the extracted key entities, and generate a set of entity relationship paths;
[0109] S35, constructing a database query statement according to the entity relationship path set;
[0110] S36. Optimize the generated database query statements and use query optimization technology to perform syntax and semantic checks on the query statements.
[0111] Optionally, the S6 specifically includes:
[0112] S61, when the query returns multiple paths, convert the path set into a dynamic tree structure;
[0113] S62. Use the quantum state superposition principle to process the path set and generate the quantum superposition state representation of the path , let each path Corresponding to a quantum state , the quantum superposition state of the path is expressed as:
[0114] ;
[0115] in, For path The weight coefficient satisfies the normalization condition ;
[0116] S63. Quantum superposition Perform quantum measurements and generate a set of measurement results , the density matrix of the measurement results for:
[0117] ;
[0118] in, For path The complex conjugate of the weight coefficient, Indicates the path and path The outer product of
[0119] S64. Using the density matrix Calculate the similarity between paths, similarity for:
[0120] ;
[0121] in, For path and path The sum of similarities of shared nodes in For path and path The number of shared nodes in For shared nodes The weight coefficient of is the weighted sum of the feature functions, indicating shared nodes On the path and path The relationship between the states, is the characteristic function, calculating the path and path Medium status and The similarity between them, combined with the density matrix Information, is the normalization factor used to standardize the similarity value, and Is the path and path The number of nodes, and The paths and path The sum of squares of the midpoint weights;
[0122] S65, converting the similarity matrix into a tree structure, initially displaying the root node, and after the user selects a certain level of node, displaying the child nodes under the node;
[0123] S66, repeat step S65 until the node selected by the user is a leaf node, and return the leaf node content of the path to the user as the final answer;
[0124] S67. When the query result returns only one path, the node content of the path is directly displayed, and the content of the last node is returned to the user as the final answer.
[0125] Optionally, the method further includes:
[0126] Obtain initial training data and generate a training data set;
[0127] Generate adversarial samples using adversarial training techniques:
[0128] ;
[0129] in, To counteract the amplitude of the disturbance, is the state sequence probability defined, is the state sequence probability pair input The gradient of represents the two-norm of a vector;
[0130] Add the generated adversarial examples to the training dataset to form an expanded training dataset;
[0131] The expanded training data set is further expanded using data augmentation techniques, including synonym replacement and sentence reconstruction, to generate diverse question samples;
[0132] Add the data-augmented samples to the training dataset to form the final augmented training dataset;
[0133] Automatically annotate the expanded training data set, use the trained model to predict the unlabeled data, and use the prediction results as labels to generate an automatically annotated data set;
[0134] Combine adversarial training and data augmentation techniques to further process the training dataset to generate more diverse and robust training data;
[0135] Combine the initial training data set, the expanded training data set, and the automatically labeled data set to retrain the model and update the model parameters :
[0136] ;
[0137] in, is the learning rate, Based on the expanded training data set The loss function is calculated as, is a regularization parameter used to prevent overfitting. is the weight of the path node, For Node With feedback The correlation function of and Represent the model parameters The first and second norms of .
[0138] Optionally, the method further includes:
[0139] Obtain user feedback data, where each feedback data includes the question entered by the user, the answer returned by the system, and the user's feedback;
[0140] Use a multimodal learning model to process user feedback data and transform text, voice, and image feedback into a unified embedding representation;
[0141] Optimize the question-answering strategy through an adaptive weight adjustment algorithm and calculate the weight coefficients of different modal feedback , , , combined with the defined state sequence probability , the update of weight coefficient is:
[0142] ;
[0143] ;
[0144] ;
[0145] in, , , Represent the initial weight values of text, voice and image feedback respectively, Representing modality The initial weight value of Representing modality The exponential function of the weight value, Indicates the number of feedback data, represents a set of three modes, Represents the defined state sequence probability, combines the weight coefficients to perform weighted fusion on the multimodal feedback embedding, and generates a unified feedback representation :
[0146] ;
[0147] in, Representing modality The weight coefficient of Representing modality Embedded representation of ;
[0148] According to the unified feedback Dynamically optimize question-answering strategies and update question-answering model parameters :
[0149] ;
[0150] in, Indicated in The model parameters are updated at all times. is the learning rate, Represents the model parameters The gradient of Based on feedback The loss function is calculated as, is a regularization parameter used to prevent overfitting. is the weight of the path node; adaptively adjust the question-answer path and generate the optimal question-answer path based on the optimized model :
[0151] ;
[0152] in, Path Node The weight of For Node With feedback The correlation function of is the adjustment factor, is the total correlation between the path and the feedback representation, is the adjustment weight of the path node, For path With feedback The correlation function of
[0153] In the subsequent question-and-answer process, the optimized model and path are used to answer;
[0154] Continue to record user interaction logs and add new feedback data to the feedback dataset, repeat the above steps, and continuously optimize and improve system performance.
[0155] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A method for implementing multi-round question and answer based on standard specifications, characterized in that: The steps include: S1. Use based The natural language processing technology of the architecture generates a dynamic knowledge graph with a directed acyclic graph structure based on the standard specification content; S2, obtain the content of the entity node and add it to the adaptive vocabulary, pre-label possible questions, and train the conditional random field model to extract key entities in the questions; S3, obtain the question input by the user, and generate a database query statement by combining the key entities with the entity relationships and path information stored in the knowledge graph; S4. Query the database to obtain all paths involving the query entity, and return the query results to the front-end page; S5. When the query result is empty, it returns an empty message to prompt the user that there is no corresponding answer, and automatically jumps to the keyword search page based on deep learning; S6. When multiple paths are returned, the paths are converted into a dynamic tree structure, and the node contents are displayed layer by layer. After the user selects a node at each level, the next level of nodes are displayed until the leaf node, and the content of the leaf node is returned to the user as the final answer; When only one query result is returned, this answer is returned directly; The S3 specifically includes: S31, obtaining a question in natural language form input by a user, and performing preliminary text preprocessing, including removing stop words and performing word form restoration, to obtain a preprocessed question text; S32, using a conditional random field model to perform entity recognition and extraction on the preprocessed question text; S33. The state sequence probability of the conditional random field model is: ; in, is a state sequence, each state Indicates the corresponding entity category, is the preprocessed question text, is the normalization factor, Represents the question text after preprocessing Length, and are model parameters, Indicates status With the previous state The characteristic function between Indicates status With the current word The characteristic function between S34, by maximizing To identify and extract key entities, combine the entity relationships and path information stored in the knowledge graph, perform association analysis on the extracted key entities, and generate a set of entity relationship paths; S35, constructing a database query statement according to the entity relationship path set; S36, optimizing the generated database query statements, and using query optimization technology to perform syntax and semantic checks on the query statements; The S6 specifically includes: S61, when the query returns multiple paths, convert the path set into a dynamic tree structure; S62. Use the quantum state superposition principle to process the path set and generate the quantum superposition state representation of the path , let each path Corresponding to a quantum state , the quantum superposition state of the path is expressed as: ; in, For path The weight coefficient satisfies the normalization condition ; S63. Quantum superposition Perform quantum measurements and generate a set of measurement results , the density matrix of the measurement results for: ; in, For path The complex conjugate of the weight coefficient, Indicates the path and path The outer product of S64. Using the density matrix Calculate the similarity between paths, similarity for: ; in, For path and path The sum of similarities of shared nodes in For path and path The number of shared nodes in For shared nodes The weight coefficient of is the weighted sum of the feature functions, indicating shared nodes On the path and path The relationship between the states, is the characteristic function, calculating the path and path Medium status and The similarity between them, combined with the density matrix Information, is the normalization factor used to standardize the similarity value, and Is the path and path The number of nodes, and The paths and path The sum of squares of the midpoint weights; S65, converting the similarity matrix into a tree structure, initially displaying the root node, and after the user selects a certain level of node, displaying the child nodes under the node; S66, repeat step S65 until the node selected by the user is a leaf node, and return the leaf node content of the path to the user as the final answer; S67. When the query result returns only one path, the node content of the path is directly displayed, and the content of the last node is returned to the user as the final answer.
2. A method for implementing multi-round question and answer based on standard specifications according to claim 1, characterized in that , the S1 specifically includes: S11. Use based The natural language processing technology of the architecture extracts information from the standard specification content and performs deep semantic analysis to generate nodes and edges; S12, use The model preprocesses and encodes the standard specification content to generate context-related word vector representations; S13. Use The locality-sensitive hashing mechanism in the model captures the complex dependencies and semantic information in the standard specification content when generating nodes and edges; S14, applying the generated context-related word vectors and semantic information to the generation of nodes and edges; S15. The generated nodes and edges are organized according to the structure of a directed acyclic graph, where each node represents an entity in the standard specification and each edge represents the relationship between entities; S16. Use a high-performance graph database to store the generated dynamic knowledge graph.
3. A method for implementing multi-round question and answer based on standard specifications according to claim 1, characterized in that: The method further comprises: Obtain initial training data and generate a training data set; Generate adversarial samples using adversarial training techniques: ; in, To counteract the amplitude of the disturbance, is the state sequence probability defined, is the state sequence probability input The gradient of represents the two-norm of a vector; Add the generated adversarial examples to the training dataset to form an expanded training dataset; The expanded training dataset is further expanded using data augmentation techniques, including synonym replacement and sentence reconstruction, to generate diverse question samples; Add the data-augmented samples to the training dataset to form the final augmented training dataset; Automatically annotate the expanded training data set, use the trained model to predict the unlabeled data, and use the prediction results as labels to generate an automatically annotated data set; Combine adversarial training and data augmentation techniques to further process the training dataset to generate more diverse and robust training data; Combine the initial training data set, the expanded training data set, and the automatically labeled data set to retrain the model and update the model parameters : ; in, is the learning rate, Based on the expanded training data set The loss function is calculated as, is a regularization parameter used to prevent overfitting. is the weight of the path node, For Node With feedback The correlation function of and Represent the model parameters The first and second norms of .
4. A method for implementing multi-round question and answer based on standard specifications according to claim 1, characterized in that: The method further comprises: Obtain user feedback data, where each feedback data includes the question entered by the user, the answer returned by the system, and the user's feedback; Use a multimodal learning model to process user feedback data and transform text, voice, and image feedback into a unified embedding representation; Optimize the question-answering strategy through an adaptive weight adjustment algorithm and calculate the weight coefficients of different modal feedback , , , combined with the defined state sequence probability , the update of weight coefficient is: ; ; ; in, , , Represent the initial weight values of text, voice and image feedback respectively, Representing modality The initial weight value of Representing modality The exponential function of the weight value, Indicates the number of feedback data, represents a set of three modes, Represents the defined state sequence probability, combines the weight coefficients to perform weighted fusion on the multimodal feedback embedding, and generates a unified feedback representation : ; in, Representing modality The weight coefficient of Representing modality Embedding representation of ; According to the unified feedback Dynamically optimize question-answering strategies and update question-answering model parameters : ; in, Indicated in The model parameters are updated at all times. is the learning rate, Represents the model parameters The gradient of Based on feedback The loss function is calculated as, is a regularization parameter used to prevent overfitting. is the weight of the path node; adaptively adjust the question-answer path and generate the optimal question-answer path based on the optimized model : ; in, Path Node The weight of For Node With feedback The correlation function of is the adjustment factor, is the total correlation between the path and the feedback representation, is the adjustment weight of the path node, For path With feedback The correlation function of In the subsequent question-and-answer process, the optimized model and path are used to answer; Continue to record user interaction logs and add new feedback data to the feedback dataset, repeat the above steps, and continuously optimize and improve system performance.
Citation Information
Patent Citations
Government affair service field multi-strategy fusion dialogue method based on knowledge graph
CN116628172A
Document complex knowledge object extraction method fusing knowledge graph and large language model
CN117725222A