Semantic understanding and question and answer matching method and system
Semantic features and core field collections are extracted through deep learning models, and combined with language big models to optimize answer generation, the shortcomings of core field association analysis and answer quality control in natural language processing are solved, and more efficient and accurate semantic understanding and question-and-answer matching are achieved.
Patent Information
- Application Number
- CN202411139695.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-08-20
AI Technical Summary
The existing natural language processing technology has shortcomings in understanding long text, complex contexts and semantic logical reasoning, especially in the lack of efficiency and accuracy in word association analysis, answer generation and quality control in core fields.
The deep learning model is used to extract the semantic features of queries and documents, capture context information and long-distance dependencies, assign weights through mapping relationships, generate core field sets, and combine language big models to generate answers and quality control to optimize the organization of answer information. Structure, fluency and factual consistency.
Improve the accuracy and efficiency of semantic analysis, and generate more concise, logical and high-quality answer information.
Smart Images

Figure CN119128077A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of natural language processing, and in particular to a method and system for matching semantic understanding with question and answer. Background Art
[0002] The current word processing function still has defects in understanding long texts, complex contexts, and semantic logical reasoning. On the one hand, the association analysis of contextual information needs to be enhanced, especially for words in some core fields, which are still at the stage of using key identification judgment on conventional data, and their efficiency and accuracy are average. On the other hand, in the generation and matching of answers, the mapping relationship for the generation and quality control of answers needs to be improved and enhanced, and its effect is average in terms of fluency control and factual consistency. For this reason, we propose a semantic understanding and question-answering matching method and system for optimizing the contextual association analysis of core fields and the matching generation of answers. Summary of the invention
[0003] In view of the above-mentioned problems existing in the existing natural language processing data processing, the present invention is proposed.
[0004] Therefore, one of the objects of the present invention is to provide a method and system for matching semantic understanding with question and answer, which utilizes a deep learning model to extract semantic features of queries and documents, capture contextual information and long-distance dependencies, and thus realize contextual association analysis of core fields, and improve the matching generation mechanism of answers, thereby improving the accuracy and efficiency of semantic analysis.
[0005] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0006] In one aspect, the present invention provides a method for matching semantic understanding with question and answer, comprising:
[0007] Semantic question and answer information collection: sorting the collected semantic question and answer data through part-of-speech analysis, obtaining semantic question and answer information in a unified format, and entering the semantic question and answer information in a unified format into a database;
[0008] Database data processing: divide the fields of the unified format semantic question and answer information into data sets, pre-process and confirm the data sets;
[0009] Semantic understanding optimization processing, using natural language processing data sets after data preprocessing, and based on deep learning models to extract semantic features of queries and documents, capture context information and long-distance dependencies, and determine the mapping relationship between the context information and the long-distance dependencies, assign weights according to the mapping relationship between the context information and the long-distance dependencies, select core field information in the context information, and generate a set of core fields;
[0010] Retrieval enhancement generation, based on retrieving the associated relevant information from the database, combining the retrieved associated relevant information with the language model, and generating corresponding answer information based on similarity analysis;
[0011] Answer generation and quality control responds to the answer information and, based on the information retrieved by the language macro model, determines and optimizes the semantic fields according to the organizational structure features, fluency features, and factual consistency features in the answer information, generates optimized answer information and outputs it.
[0012] As a preferred solution of the present invention, wherein: the semantic features of queries and documents are extracted based on a deep learning model, and a clustering algorithm is specifically used to cluster the data set, and the complete data set is divided into several categories according to the extracted query and document data, and the core point of each category is determined by a K-value clustering algorithm, and the core point is used as the optimized clustering center of the category, and the Euclidean distance value between the core point and the optimized clustering center is calculated, and the Euclidean distance value is determined as the distance metric between the cluster sample and the training sample, and the distance metric between the cluster sample and the training sample is used as the numerical output of the semantic feature sample of the query and document to be extracted; the distance metric between the cluster sample and the training sample is calculated as follows:
[0013]
[0014] Among them, Dist(x i ,y j ) is the cluster sample x i The distance measure between the training samples, x ik is the kth cluster sample x i ,y jk is the kth training sample y j .
[0015] As a preferred solution of the present invention, weight assignment is performed according to the mapping relationship between context information and long-distance dependencies, core field information in the context information is selected, and a set of core fields is generated. Specifically, the weight assignment of the mapping relationship is determined by analyzing the discrimination of the core field information, as follows:
[0016]
[0017] in, n Represents the i-th cluster sample x i , f i Represented as a data set cluster sample x i The frequency of occurrence, Represents cluster sample x iAs the logarithm of the discrimination, m is represented by the cluster sample x i The number of core fields recorded, H i Represents the i-th cluster sample x i The distinguishing value of M is the clustering sample x i The total number of core fields in Q i Represents the i-th cluster sample x i The discrimination degree is determined as the weight assignment of the core field information in the context information.
[0018] As a preferred solution of the present invention, wherein: by obtaining the weight assignment of the core field information in the context information, a core field optimization vector model is constructed, specifically using the BERT-Base-Chinese model as the basic model, and using the cosine distance as the loss function, based on the data set after extracting the query and document, the vector representation model parameters based on Sentence-BERT are trained to calculate and generate the optimized core field information, and a set of optimized core fields is simultaneously generated for subsequent retrieval enhancement generation.
[0019] As a preferred solution of the present invention, in the semantic understanding optimization process, selecting the core field information in the context information also includes evaluating the ranking results of the core field information matching, specifically using the average of the precision, recall and F1 value as the evaluation index, as follows:
[0020]
[0021] Among them, TP is the number of samples predicted as positive examples by the core field information and labeled as positive examples, TP is the number of samples predicted as positive examples by the core field information but labeled as negative examples, and FN is the number of samples predicted as negative positive examples by the core field information but labeled as positive examples.
[0022] As a preferred solution of the present invention, after the retrieved associated relevant information is combined with the large language model, a virtual expert group is generated by building an answer based on the large language model. After the virtual expert group determines the associated relevant information, the associated related information is fused and selected according to the classic covariance cross-fusion algorithm to determine the information retrieved by the large language model as the answer information of the large language model.
[0023] As a preferred solution of the present invention, in answer generation and quality control, the semantic field is optimized based on the organizational structure features, fluency features, and factual consistency features in the answer information, as follows:
[0024]
[0025] Among them, G i is the evaluation value of the i-th answer information; wp represents the weight coefficient of the answer information in the information retrieved by the language model, that is, the similarity between the information retrieved by the language model and the answer information; They represent the weight coefficients of α, β and χ indicators corresponding to the three characteristics of organizational structure, fluency and factual consistency respectively; U(xi) represents the accuracy parameter of the answer information, and U represents the set of accuracy parameters of the answer information.
[0026] As a preferred solution of the present invention, the generation of the accuracy parameter of the answer information uses the deep learning neural network model for judging accuracy as the deep learning neural network model, and the answer information is specifically analyzed by the following formula, as follows:
[0027]
[0028] Among them, U(xi) e k+1 represents the accuracy parameter output of the answer information of the e-th neuron in the k+1th layer, D represents the number of items of the d-th neuron, represents the connection weight between neuron d in the kth layer and neuron e in the k+1th layer, represents the bias term of the e-term neuron in the k+1th layer, and sig[*] represents the activation function.
[0029] As a preferred solution of the present invention, when determining and optimizing the semantic field according to the organizational structure features, fluency features, and factual consistency features in the answer information, it also includes performing attention-based knowledge distillation on the generated optimized answer information and generating high-quality answer information. The loss function of the knowledge distillation is as follows:
[0030]
[0031] Among them, KL, H represent the divergence and cross entropy of KL respectively, G i is a model parameter, a is a hyperparameter, and controls the ratio of the true label cross entropy to the model distribution and the KL divergence of the language model output distribution, P S The parameters of the answer information generated by the semantic understanding optimization module, is the smoothing value of the language large model, The smoothed value of the parameters of the answer information generated by the semantic understanding optimization module.
[0032] In one aspect, the present invention provides a system for matching semantic understanding with question and answer, comprising:
[0033] An acquisition module is used to organize the collected semantic question and answer data through part-of-speech analysis, obtain semantic question and answer information in a unified format, and enter the semantic question and answer information in a unified format into a database;
[0034] The database processing module is used to divide the fields of the unified format semantic question and answer information and divide the data sets into data sets, and pre-process and determine the data sets;
[0035] A semantic understanding optimization module is used to use natural language processing to process the data set after data preprocessing, and to extract semantic features of queries and documents based on a deep learning model, capture context information and long-distance dependencies, and determine the mapping relationship between the context information and the long-distance dependencies, assign weights according to the mapping relationship between the context information and the long-distance dependencies, select core field information in the context information, and generate a set of core fields;
[0036] A search enhancement generation module is used to retrieve the associated related information from the database, combine the retrieved associated related information with the language model, and generate corresponding answer information according to similarity analysis;
[0037] The answer generation and quality control module is used to respond to the answer information and, based on the information retrieved by the language macro model, determine and optimize the semantic fields according to the organizational structure characteristics, fluency characteristics, and factual consistency characteristics in the answer information, generate and output the optimized answer information.
[0038] Beneficial effects of the present invention: The present invention utilizes a deep learning model to extract semantic features of queries and documents, captures contextual information and long-distance dependencies, and thereby realizes contextual correlation analysis of core fields, and improves the matching generation mechanism of answers, introduces multi-dimensional evaluation and matching of answer information, which is more concise, logically reasonable and accurate, and generates high-quality answer information through attention-based knowledge distillation, further improving the accuracy and efficiency of semantic analysis answer result generation. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. Among them:
[0040] Figure 1 This is a flow chart of a method for matching semantic understanding and question answering according to Embodiment 1 of the present invention;
[0041] Figure 2This is a flow chart of a method for optimizing semantic understanding in Embodiment 1 of the present invention;
[0042] Figure 3 A flow chart of a method for retrieval enhancement generation and answer generation in Embodiment 2 of the present invention;
[0043] Figure 4 A flow chart of a method for generating high-quality answers based on attention-based knowledge distillation in Example 3 of the present invention;
[0044] Figure 5 This is an organizational structure diagram of the system of the method for matching semantic understanding and question answering in Example 4 of the present invention. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solution and advantages of the embodiment of the present invention clearer, the technical solution of the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings of the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all of the embodiments. Based on the described embodiment of the present invention, all other embodiments obtained by ordinary technicians in this field belong to the scope of protection of the present invention.
[0046] Reference Figure 1-Figure 4 , is an embodiment of the present invention, which provides a method for matching semantic understanding with question and answer, including:
[0047] Semantic question and answer information collection: sorting the collected semantic question and answer data through part-of-speech analysis, obtaining semantic question and answer information in a unified format, and entering the semantic question and answer information in a unified format into a database;
[0048] Database data processing: divide the fields of the unified format semantic question and answer information into data sets, pre-process and confirm the data sets;
[0049] Semantic understanding optimization processing, such as Figure 2 As shown, this embodiment uses a data set after data preprocessing by natural language processing, and extracts semantic features of queries and documents based on a deep learning model, captures context information and long-distance dependencies, and determines a mapping relationship between the context information and the long-distance dependencies, assigns weights according to the mapping relationship between the context information and the long-distance dependencies, selects core field information in the context information, and generates a set of core fields;
[0050] Retrieval enhancement generation, based on retrieving the associated relevant information from the database, combining the retrieved associated relevant information with the language model, and generating corresponding answer information based on similarity analysis;
[0051] Answer generation and quality control responds to the answer information and, based on the information retrieved by the language macro model, determines and optimizes the semantic fields according to the organizational structure features, fluency features, and factual consistency features in the answer information, generates optimized answer information and outputs it.
[0052] Specifically, this embodiment extracts semantic features of queries and documents based on a deep learning model, and specifically uses a clustering algorithm to perform clustering processing on a data set, divides the complete data set into several categories according to the extracted query and document data, and determines the core point of each category through a K-value clustering algorithm, uses the core point as the optimized cluster center of the category, and calculates the Euclidean distance value between the core point and the optimized cluster center, determines the Euclidean distance value as the distance metric between the cluster sample and the training sample, and uses the distance metric between the cluster sample and the training sample as the numerical output of the semantic feature sample for predicting the query and document to be extracted; the distance metric between the cluster sample and the training sample is calculated as follows:
[0053]
[0054] Among them, Dist(x i ,y j ) is the cluster sample x i The distance measure between the training samples, x ik is the kth cluster sample x i ,y jk is the kth training sample y j .
[0055] Specifically, this embodiment performs weight assignment according to the mapping relationship between context information and long-distance dependency, selects core field information in the context information, and generates a set of core fields. Specifically, the weight assignment of the mapping relationship is determined by analyzing the discrimination of the core field information, as follows:
[0056]
[0057] Where n represents the i-th cluster sample x i , f i Represented as a data set cluster sample x i The frequency of occurrence, Represents cluster sample x i As the logarithm of the discrimination, m is represented by the cluster sample x i The number of core fields recorded, H i Represents the i-th cluster sample x i The distinguishing value of M is the clustering sample x i The total number of core fields in Q i Represents the i-th cluster sample x iThe discrimination degree is determined as the weight assignment of the core field information in the context information.
[0058] Specifically, this embodiment obtains the weight assignment of the core field information in the context information, constructs a core field optimization vector model, specifically uses the BERT-Base-Chinese model as the basic model, uses the cosine distance as the loss function, and based on the data set after extracting the query and document, trains the vector representation model parameters based on Sentence-BERT to calculate and generate the optimized core field information, and simultaneously generates a set of optimized core fields for subsequent retrieval enhancement generation. In addition, specifically, in the semantic understanding optimization process, selecting the core field information in the context information also includes evaluating the ranking results of the core field information matching, specifically using the average of the precision, recall and F1 value as the evaluation index, as follows:
[0059]
[0060] Among them, TP is the number of samples predicted as positive examples by the core field information and labeled as positive examples, TP is the number of samples predicted as positive examples by the core field information but labeled as negative examples, and FN is the number of samples predicted as negative positive examples by the core field information but labeled as positive examples.
[0061] Based on the above, this embodiment uses a deep learning model to extract semantic features of queries and documents, capture contextual information and long-distance dependencies, and then implement contextual association analysis of core fields, so that the semantic understanding of this embodiment can more accurately understand the semantic meaning of the question and answer data, which is beneficial to the subsequent generation and association of answer data, and improves the accuracy and efficiency of the overall semantic processing.
[0062] Example 2
[0063] like Figure 3 As shown, this embodiment, based on Embodiment 1, combines the retrieved associated relevant information with the large language model, and then generates a matching virtual expert group by building an answer based on the large language model. After the virtual expert group determines the associated relevant information, it fuses and selects the associated relevant information according to the classic covariance cross-fusion algorithm to determine the information retrieved by the large language model as the answer information of the large language model.
[0064] It should be emphasized in this embodiment that in answer generation and quality control, the semantic field is optimized based on the organizational structure characteristics, fluency characteristics, and factual consistency characteristics in the answer information, as follows:
[0065]
[0066] Among them, G i is the evaluation value of the i-th answer information; wp represents the weight coefficient of the answer information in the information retrieved by the language model, that is, the similarity between the information retrieved by the language model and the answer information; They represent the weight coefficients of α, β and χ indicators corresponding to the three characteristics of organizational structure, fluency and factual consistency respectively; U(xi) represents the accuracy parameter of the answer information, and U represents the set of accuracy parameters of the answer information.
[0067] It can be further known that this embodiment introduces multi-dimensional evaluation and matching of answer information, and can specifically evaluate the answer information from three dimensions of organizational structure characteristics, fluency characteristics, and factual consistency to obtain an evaluation value.
[0068] Specifically, in the above-mentioned embodiment 2, the accuracy parameter of the answer information is generated by using the deep learning neural network model for judging the accuracy as the deep learning neural network model, and the answer information is analyzed specifically by the following formula, as follows:
[0069]
[0070] Among them, U(xi) e k+1 represents the accuracy parameter output of the answer information of the e-th neuron in the k+1th layer, D represents the number of items of the d-th neuron, represents the connection weight between neuron d in the kth layer and neuron e in the k+1th layer, represents the bias term of the e-term neuron in the k+1th layer, and sig[*] represents the activation function.
[0071] Based on the above, this embodiment introduces multi-dimensional evaluation and matching of answer information, and can conduct specific evaluation of answer information from three dimensions: organizational structure characteristics, fluency characteristics, and factual consistency, and obtain evaluation values, and selectively match and output them based on the judgment of the evaluation values. This not only makes the answer information integrate the characteristics of the three dimensions of organizational structure characteristics, fluency, and factual consistency, but also is more concise, logically reasonable, and accurate than the process of directly outputting the answer information.
[0072] Example 3
[0073] like Figure 4As shown, this embodiment is based on the above-mentioned embodiments 1 and 2. When determining and optimizing the semantic field according to the organizational structure characteristics, fluency characteristics, and factual consistency characteristics in the answer information, it also includes performing attention-based knowledge distillation on the generated optimized answer information and generating high-quality answer information. The loss function of the knowledge distillation is specifically as follows:
[0074]
[0075] Among them, KL, H represent the divergence and cross entropy of KL respectively, G i is a model parameter, a is a hyperparameter, and controls the ratio of the true label cross entropy to the model distribution and the KL divergence of the language model output distribution, P S The parameters of the answer information generated by the semantic understanding optimization module, is the smoothing value of the language large model, The smoothed value of the parameters of the answer information generated by the semantic understanding optimization module.
[0076] Example 4
[0077] like Figure 5 As shown, this embodiment provides a system for a method for matching semantic understanding with question and answer, including:
[0078] An acquisition module is used to organize the collected semantic question and answer data through part-of-speech analysis, obtain semantic question and answer information in a unified format, and enter the semantic question and answer information in a unified format into a database;
[0079] The database processing module is used to divide the fields of the unified format semantic question and answer information and divide the data sets into data sets, and pre-process and determine the data sets;
[0080] The semantic understanding optimization module is used to use the data set after data preprocessing by natural language processing and extract the semantic features of queries and documents based on the deep learning model, capture context information and long-distance dependencies, and determine the mapping relationship between context information and long-distance dependencies. According to the mapping relationship between context information and long-distance dependencies, weights are assigned, core field information in the context information is selected, and a set of core fields is generated;
[0081] A search enhancement generation module is used to retrieve the associated related information from the database, combine the retrieved associated related information with the language model, and generate corresponding answer information according to similarity analysis;
[0082] The answer generation and quality control module is used to respond to the answer information and, based on the information retrieved by the language model, determine and optimize the semantic fields according to the organizational structure characteristics, fluency characteristics, and factual consistency characteristics in the answer information, generate and output the optimized answer information.
[0083] In summary, the beneficial effects of the present invention are as follows: the semantic understanding of the present invention uses advanced natural language processing technology to extract the semantic features of queries and documents through a deep learning model, captures and determines the mapping relationship between the context information and long-distance dependencies, and selects the core field information in the context information. Retrieval Enhanced Generation (RAG): Based on the retrieval of relevant information from the knowledge base, the retrieved associated relevant information is combined with the language large model to generate accurate, relevant and rich answer information. Answer generation and quality control: Based on the information retrieved by the language large model, after determining and optimizing the semantic fields according to the organizational structure features, fluency features, and factual consistency features in the answer information, the optimized answer information is generated and output, and the answer is controlled from aspects such as the organizational structure, fluency control, and factual consistency, so that the answer information integrates the characteristics of the three dimensions in terms of organizational structure features, fluency, and factual consistency, and is more concise, logically reasonable and accurate than the direct output of the answer information process.
[0084] In summary, the present invention utilizes deep learning models to extract semantic features of queries and documents, capture contextual information and long-distance dependencies, and then realizes contextual association analysis of core fields, and improves the answer matching generation mechanism to generate high-quality answer information, thereby improving the accuracy and efficiency of semantic analysis.
[0085] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
[0086] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples, unless they are contradictory.
[0087] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0088] Any process or method description in the flow chart or otherwise described herein can be understood to represent a module, fragment or portion of a code including one or more executable instructions for implementing the steps of a specific logical function or process. And the scope of the preferred embodiment of the present application includes other implementations, in which the functions may not be performed in the order shown or discussed, including in a substantially simultaneous manner or in a reverse order according to the functions involved.
[0089] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, which can be embodied in any computer-readable medium for use by an instruction execution system, apparatus or device (such as a computer-based system, a system including a processor or other system that can fetch instructions from an instruction execution system, apparatus or device and execute instructions), or used in combination with these instruction execution systems, apparatuses or devices.
[0090] It should be understood that the various parts of the present application can be implemented with hardware, software, firmware or a combination thereof. In the above embodiments, multiple steps or methods can be implemented with software or firmware stored in a memory and executed by a suitable instruction execution system. All or part of the steps of the above embodiment method can be completed by instructing the relevant hardware through a program, which can be stored in a computer-readable storage medium, and when the program is executed, it includes one of the steps of the method embodiment or a combination thereof.
[0091] In addition, each functional unit in each embodiment of the present application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. If the above-mentioned integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. The storage medium can be a read-only memory, a disk or an optical disk, etc.
[0092] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for matching semantic understanding with question answering, characterized in that: include: Semantic question and answer information collection: sorting the collected semantic question and answer data through part-of-speech analysis, obtaining semantic question and answer information in a unified format, and entering the semantic question and answer information in a unified format into a database; Database data processing: divide the fields of the unified format semantic question and answer information into data sets, pre-process and confirm the data sets; Semantic understanding optimization processing, using natural language processing data sets after data preprocessing, and based on deep learning models to extract semantic features of queries and documents, capture context information and long-distance dependencies, and determine the mapping relationship between the context information and the long-distance dependencies, assign weights according to the mapping relationship between the context information and the long-distance dependencies, select core field information in the context information, and generate a set of core fields; Retrieval enhancement generation, based on retrieving the associated relevant information from the database, combining the retrieved associated relevant information with the language model, and generating corresponding answer information based on similarity analysis; Answer generation and quality control responds to the answer information and, based on the information retrieved by the language macro model, determines and optimizes the semantic fields according to the organizational structure features, fluency features, and factual consistency features in the answer information, generates optimized answer information and outputs it.
2. A method for matching semantic understanding with question and answer as claimed in claim 1, characterized in that: The method extracts the semantic features of queries and documents based on the deep learning model, specifically uses a clustering algorithm to perform clustering processing on the data set, divides the complete data set into several categories according to the extracted query and document data, and determines the core point of each category through the K value clustering algorithm, uses the core point as the optimized cluster center of the category, and calculates the Euclidean distance value between the core point and the optimized cluster center, determines the Euclidean distance value as the distance metric between the cluster sample and the training sample, and uses the distance metric between the cluster sample and the training sample as the numerical output of the semantic feature sample of the query and document to be extracted; the distance metric between the cluster sample and the training sample is calculated as follows: Among them, Dist(x i ,y j ) is the cluster sample x i The distance measure between the training samples, x ik is the kth cluster sample x i ,y jk is the kth training sample y j .
3. A method for matching semantic understanding with question and answer as claimed in claim 2, characterized in that: According to the mapping relationship between context information and long-distance dependencies, weights are assigned, core field information in the context information is selected, and a set of core fields is generated. Specifically, the weight assignment of the mapping relationship is determined by analyzing the discrimination of the core field information, as follows: Where n represents the i-th cluster sample x i , f i Represented as a data set cluster sample x i The frequency of occurrence, Represents cluster sample x i As the logarithm of the discrimination, m is represented by the cluster sample x i The number of core fields recorded, H i Represents the i-th cluster sample x i The distinguishing value of M is the clustering sample x i The total number of core fields in Q i Represents the i-th cluster sample x i The discrimination degree is determined as the weight assignment of the core field information in the context information.
4. A method for matching semantic understanding with question and answer as claimed in claim 3, characterized in that: Also includes: By obtaining the weight assignment of the core field information in the context information, a core field optimization vector model is constructed. Specifically, the BERT-Base-Chinese model is used as the basic model, and the cosine distance is used as the loss function. Based on the data set after extracting the query and document, the vector representation model parameters based on Sentence-BERT are trained to calculate and generate the optimized core field information, and a set of optimized core fields is simultaneously generated for subsequent retrieval enhancement generation.
5. A method for matching semantic understanding with question and answer as claimed in claim 1, characterized in that: In the semantic understanding optimization process, selecting the core field information in the context information also includes evaluating the ranking results of the core field information matching, specifically using the average of precision, recall and F1 value as the evaluation index, as follows: Among them, TP is the number of samples predicted as positive examples by the core field information and labeled as positive examples, TP is the number of samples predicted as positive examples by the core field information but labeled as negative examples, and FN is the number of samples predicted as negative positive examples by the core field information but labeled as positive examples.
6. A method for matching semantic understanding with question and answer as claimed in claim 1, characterized in that: After combining the retrieved associated relevant information with the large language model, a virtual expert group is generated by building answers based on the large language model. After the virtual expert group determines the associated relevant information, the associated relevant information is fused and selected according to the classic covariance cross-fusion algorithm to determine the information retrieved by the large language model as the answer information of the large language model.
7. A method for matching semantic understanding with question and answer as claimed in claim 1, characterized in that: In answer generation and quality control, the semantic fields are determined and optimized based on the organizational structure characteristics, fluency characteristics, and factual consistency characteristics of the answer information, as follows: Among them, G i is the evaluation value of the i-th answer information; wp represents the weight coefficient of the answer information in the information retrieved by the language model, that is, the similarity between the information retrieved by the language model and the answer information; They represent the weight coefficients of α, β and χ indicators corresponding to the three characteristics of organizational structure, fluency and factual consistency respectively; U(xi) represents the accuracy parameter of the answer information, and U represents the set of accuracy parameters of the answer information.
8. A method for matching semantic understanding with question and answer as claimed in claim 7, characterized in that: The generation of the accuracy parameter of the answer information uses the deep learning neural network model for judging the accuracy as the deep learning neural network model, and the answer information is analyzed specifically by the following formula, as follows: Among them, U(xi) e k+1 represents the accuracy parameter output of the answer information of the e-th neuron in the k+1th layer, D represents the number of items of the d-th neuron, represents the connection weight between neuron d in the kth layer and neuron e in the k+1th layer, represents the bias term of the e-term neuron in the k+1th layer, and sig[*] represents the activation function.
9. A method for matching semantic understanding with question and answer as claimed in claim 8, characterized in that: When determining and optimizing the semantic field based on the organizational structure features, fluency features, and factual consistency features in the answer information, it also includes performing attention-based knowledge distillation on the generated optimized answer information and generating high-quality answer information. The loss function of knowledge distillation is as follows: Among them, KL, H represent the divergence and cross entropy of KL respectively, G i is a model parameter, a is a hyperparameter, and controls the ratio of the true label cross entropy to the model distribution and the KL divergence of the language model output distribution, P S The parameters of the answer information generated by the semantic understanding optimization module, is the smoothing value of the language large model, The smoothed value of the parameters of the answer information generated by the semantic understanding optimization module.
10. A system applied to the method for matching semantic understanding and question answering as claimed in claim 1, characterized in that: include: An acquisition module is used to organize the collected semantic question and answer data through part-of-speech analysis, obtain semantic question and answer information in a unified format, and enter the semantic question and answer information in a unified format into a database; The database processing module is used to divide the fields of the unified format semantic question and answer information and divide the data sets into data sets, and pre-process and determine the data sets; A semantic understanding optimization module is used to use natural language processing to process the data set after data preprocessing, and to extract semantic features of queries and documents based on a deep learning model, capture context information and long-distance dependencies, and determine the mapping relationship between the context information and the long-distance dependencies, assign weights according to the mapping relationship between the context information and the long-distance dependencies, select core field information in the context information, and generate a set of core fields; A search enhancement generation module is used to retrieve the associated related information from the database, combine the retrieved associated related information with the language model, and generate corresponding answer information according to similarity analysis; The answer generation and quality control module is used to respond to the answer information and, based on the information retrieved by the language macro model, determine and optimize the semantic fields according to the organizational structure characteristics, fluency characteristics, and factual consistency characteristics in the answer information, generate and output the optimized answer information.
Citation Information
Patent Citations
Text semantic similarity calculation model based on deep reinforcement learning
CN109783817A
Text entity relationship extraction method based on multi-feature information enhancement
CN112163425A
Power file question and answer type intelligent retrieval method and system
CN117171333A
Intelligent question and answer implementation method and system based on big data
CN118211648A
Intelligent question answering method, apparatus and device, and computer-readable storage medium
WO2021196920A1
Cited By
Semantic comprehension and generation model based on artificial intelligence
CN119849510A
Contract retrieval enhancement optimization method, equipment and medium
CN120596647A
