Power standard question-answering model training method and system based on retrieval enhancement

By training the power standard question and answer model based on retrieval enhancement methods, the problem of deviations and misunderstandings of existing models in understanding and parsing power standard documents is solved, efficient and accurate power standard knowledge acquisition is achieved, and the operation and maintenance of the power system are improved. ability.

CN118733706BActive Publication Date: 2025-01-24GLOBAL ENERGY INTERCONNECTION RES INST CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410838596.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-26
Publication Date
2025-01-24
Estimated Expiration
2044-06-26

AI Technical Summary

Technical Problem

The existing power standard Q&A model adopts rules or template-based methods, resulting in lack of flexibility and generalization capabilities, making it difficult to cope with the complexity and diversity of power standard documents, and thus prone to deviations or misunderstandings when understanding and parsing documents, making the answers Inaccurate.

Method used

By providing the training methods and systems of electricity standard Q & A model based on retrieval, use big data to collect power standard documents to build a power standard question and answer database, train the power data answer model and search model, and conduct joint training and optimization to generate efficient and accurate power power power Standard Q & A model.

Benefits of technology

It achieves accurate understanding and analysis of power standard documents, improves the accuracy and completeness of answers, meets the need for efficient and accurate acquisition of power standard knowledge, and improves the normal operation and maintenance capabilities of the power system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733706B_ABST
    Figure CN118733706B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of machine learning, and provides a method and system for training an electric power standard question-and-answer model based on retrieval enhancement. The method includes: collecting electric power field data based on big data to construct electric power standard documents; constructing a question-and-answer database; training a retrieval model; training a reply model; jointly optimizing the retrieval and reply models to generate a joint optimization result; constructing an initial question-and-answer model, backtracking training and outputting an electric power standard question-and-answer model. The present application solves the problem that the existing electric power standard question-and-answer model adopts a rule-based or template-based approach, resulting in a lack of flexibility and generalization ability, making it difficult to cope with the complexity and diversity of electric power standard documents, and thus prone to deviations or misunderstandings when understanding and parsing documents, resulting in inaccurate answers to technical problems. The present application implements a question-and-answer model based on the semantic similarity of the input text to accurately and efficiently match the electric power standard knowledge, thereby improving the accuracy, professionalism and reliability of the electric power standard question-and-answer model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, specifically to the field of machine learning technology, and in particular to a method and system for training an electric power standard question-answering model based on retrieval enhancement. Background Art

[0002] With the rapid development and intelligent transformation of the power industry, the power standard question-and-answer system plays an increasingly important role in power production, operation, maintenance and management. However, the existing power standard question-and-answer models often adopt rule-based or template-based methods, which lack flexibility and generalization capabilities and are difficult to cope with the complexity and diversity of power standard documents. Power standard documents usually contain a large number of professional terms and complex technical requirements, and their structures and contents vary. Traditional question-and-answer models are often prone to deviations or misunderstandings when understanding and parsing these documents, resulting in inaccurate or incomplete answers. This cannot meet the needs of efficiently and accurately acquiring power standard knowledge, affecting the normal operation and maintenance of the power system. Summary of the invention

[0003] This application provides a retrieval-enhanced power standard question-answering model training method and system, aiming to solve the problem that the existing power standard question-answering model adopts a rule-based or template-based approach, which leads to a lack of flexibility and generalization ability, and is difficult to cope with the complexity and diversity of power standard documents. In turn, it is easy to have deviations or misunderstandings when understanding and parsing the documents, resulting in inaccurate technical issues.

[0004] In view of the above problems, the present application provides a method and system for training an electric power standard question-answering model based on retrieval enhancement.

[0005] The first aspect disclosed in the present application provides a method for training an electric power standard question and answer model based on retrieval enhancement, the method comprising: performing data collection based on big data to obtain an electric power standard document, the electric power standard document comprising an electric power question information set, an electric power answer information set, and an electric power standard clause information set; constructing an electric power standard question and answer database, the electric power standard question and answer database being obtained by matching and training the electric power question information set with the electric power answer information set; encoding based on the electric power standard question and answer database, training and constructing an electric power data reply model; performing feature extraction based on the electric power question information set and the electric power standard clause information set, training and constructing an electric power data retrieval model; jointly training and optimizing the electric power data retrieval model and the electric power data reply model to generate a joint optimization result; constructing an electric power standard question and answer initial model, back-training the electric power standard question and answer initial model based on the joint optimization result, and outputting an electric power standard question and answer model based on the back-tracing result.

[0006] Furthermore, matching training is performed based on the power question information set and the power answer information set, and the method includes: extracting question keywords of the power question information set and extracting answer keywords of the power answer information set based on the text sentence structure; performing word meaning extraction on the question keywords and the answer keywords, performing keyword matching based on the word meaning extraction results, and generating matching results; matching the power question information set with the power answer information set according to the matching results to obtain multiple question-answer pairs; and constructing the power standard question and answer database based on the multiple question-answer pairs.

[0007] Furthermore, feature extraction is performed based on the power problem information set and the power standard clause information set, and a power data retrieval model is trained and constructed, including: performing word segmentation on the power problem information set based on the power standard clause information set, matching the power problem information set with the power standard clause information set according to the word segmentation result, and generating multiple question-clause pairs; performing feature extraction on the multiple question-clause pairs, and performing dimension conversion on the feature extraction results to obtain a first dimensional vector; extracting context features of the power problem information set as additional features based on the power standard clause information; using the multiple question-clause pairs as supervision signals, training the correlation between the first dimensional vector and the additional features, and capturing the complex semantic information of the power problem information set and the power standard clause information set based on the correlation coefficient; performing retrieval enhancement training on the initial retrieval results based on the complex semantic information until the training results converge, and outputting the power data retrieval model.

[0008] Furthermore, based on the complex semantic information, retrieval enhancement training is performed on the initial retrieval results until the training results converge, including: automatically expanding the query on the initial retrieval results based on the complex semantic information to obtain expanded vocabulary; calculating the retrieval loss data of the expanded vocabulary through a loss function; reordering the initial retrieval results according to the retrieval loss data to determine a rearrangement sequence; performing retrieval feedback on the initial retrieval results according to the rearrangement sequence to generate a retrieval feedback score, and judging whether the retrieval feedback score meets a preset score threshold; when the retrieval feedback score does not meet the preset score threshold, performing random retrieval optimization on the initial retrieval results through random search until a preset number of random retrievals is met and the initial retrieval results are stopped; when the retrieval feedback score meets the preset score threshold, the initial retrieval result is deemed to be converged.

[0009] Furthermore, encoding is performed based on the power standard question and answer database, and a power data reply model is trained and constructed, including: retrieving the target question based on the power data retrieval model to construct a candidate answer set; traversing the power standard question and answer database, taking the multiple question-answer pairs as supervision signals, and training the power data reply model; randomly extracting and generating the kth answer data based on the candidate answer set, and the kth answer data has a kth fitness; determining whether the kth fitness of the kth answer is greater than the k-1th fitness of the k-1th answer; if so, numerically increasing the priority of the kth answer, and if not, numerically increasing the priority of the k-1th answer to generate an answer selection sequence; updating the ranking of the candidate answer set based on the answer selection sequence, extracting the first order of the answer selection sequence, and determining the optimal answer data; evaluating the optimal answer data based on the target question, adjusting the model reply structure according to the evaluation result, and outputting the power data reply model according to the model adjustment structure.

[0010] Furthermore, the power data retrieval model and the power data reply model are jointly trained and optimized to generate a joint optimization result, including: mapping the interaction correlation factor between the power data retrieval model and the power data reply model; calculating the joint loss function of the power data retrieval model and the power data reply model, and setting a joint training target based on the interaction correlation factor; inputting the target problem into the power data retrieval model to obtain a candidate list of power standard clauses; based on the candidate list, inputting the target problem into the power data reply model in accordance with the power standard clauses in turn, and outputting an initial reply result; calculating the reply loss data of the initial reply result according to the joint training target; calculating the loss gradient of the reply loss data through a back propagation algorithm to obtain a minimized joint loss function, and updating the power data retrieval model and the power data reply model respectively based on the minimized joint loss function to generate the joint optimization result.

[0011] Furthermore, an initial model of electric power standard question and answer is constructed, the initial model of electric power standard question and answer is back-trained based on the joint optimization result, and the electric power standard question and answer model is output based on the back-tracing result, including: constructing the initial model of electric power standard question and answer according to the updated electric power data retrieval model and the electric power data reply model; decomposing the joint optimization result to obtain the clause ranking information of the electric power data retrieval model and the reply ranking information of the electric power data reply model; matching the retrieval results with the original questions using the clause ranking information and the reply ranking information to construct a back-tracing data set; re-extracting features based on the back-tracing data set, back-tracing training the initial model of electric power standard question and answer is performed, and back-tracing results are generated; verifying and testing the back-tracing results, and outputting the electric power standard question and answer model.

[0012] Another aspect disclosed in the present application provides a retrieval-enhanced power standard question-answer model training system, the system comprising: a data acquisition module, the data acquisition module is used to perform data acquisition based on big data to obtain a power standard document, the power standard document includes a power question information set, a power answer information set, and a power standard clause information set; a database construction module, the database construction module is used to construct a power standard question-answer database, the power standard question-answer database is obtained by matching the power question information set with the power answer information set; a reply model training module is used to train the power standard question-answer database based on the power standard question-answer database. The invention relates to a power data query and answer module, wherein the power data query and answer module are encoded, and the power data query and answer model is trained and constructed; a retrieval model training module is used for extracting features based on the power problem information set and the power standard clause information set, and training and constructing the power data retrieval model; a joint training optimization module is used for jointly training and optimizing the power data retrieval model and the power data query and answer model to generate a joint optimization result; a backtracking training module is used for constructing an initial model of power standard question and answer, and the initial model of power standard question and answer is backtracked based on the joint optimization result, and the power standard question and answer model is output based on the backtracking result.

[0013] Another aspect disclosed in the present application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the retrieval-enhanced power standard question-and-answer model training method provided in the present application.

[0014] One or more technical solutions provided in this application have at least the following technical effects or advantages:

[0015] The above-mentioned method for training the power standard question-answering model based on retrieval enhancement collects power field data based on big data to obtain power standard documents containing power questions, answers and standard clauses. Subsequently, the power standard question-answering database is constructed using these questions and answer information sets. After that, the power data reply model is trained based on the question-answering database to generate accurate answers. At the same time, the power data retrieval model is trained by extracting the features of power questions and standard clauses to quickly locate relevant information. In order to further improve the performance of the model, the power data retrieval model and the power data reply model are jointly trained and optimized to obtain better joint effects. Then, an initial model of power standard question-answering is constructed, and the joint optimization results are used for backtracking training, and finally an efficient and accurate power standard question-answering model is output. This model can help users quickly and accurately acquire power standard knowledge and improve the level of intelligence in the power industry.

[0016] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of 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 work.

[0018] Figure 1 A flowchart of a method for training a power standard question-answering model based on retrieval enhancement in one embodiment;

[0019] Figure 2 This is an architecture diagram of a system for training a retrieval-enhanced power standard question-answering model in one embodiment.

[0020] Explanation of the accompanying drawings: data collection module 1, database construction module 2, reply model training module 3, retrieval model training module 4, joint training optimization module 5, backtracking training module 6. DETAILED DESCRIPTION

[0021] The embodiments of the present application provide a retrieval-enhanced power standard question-and-answer model training method and system to solve the problem that the existing power standard question-and-answer model adopts a rule-based or template-based approach, which leads to a lack of flexibility and generalization ability, and is difficult to cope with the complexity and diversity of power standard documents. In addition, deviations or misunderstandings are prone to occur when understanding and parsing the documents, resulting in inaccurate answers to technical questions.

[0022] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0023] It should be noted that the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or modules that are not explicitly listed or inherent to these processes, methods, products or devices.

[0024] Embodiment 1

[0025] like Figure 1 As shown, the present application provides a method for training an electric power standard question-answering model based on retrieval enhancement, the method comprising:

[0026] Perform data collection based on big data to obtain an electric power standard document, wherein the electric power standard document includes an electric power question information set, an electric power answer information set, and an electric power standard clause information set;

[0027] The power standards question-and-answer model is an intelligent model based on big data and machine learning, which is mainly used to process and answer questions related to power standards. Its core function is to provide efficient and accurate power standards knowledge services to help quickly obtain and understand standard information in the power industry.

[0028] In the embodiment of the present application, the system terminal successfully obtained a wealth of power standard documents by extensively collecting big data. These documents not only contain a large number of power questions and their corresponding answers, but also cover various power standard clause information. The integration of this information provides a valuable resource for the system terminal, helps to gain a deeper understanding of the standards and specifications of the power industry, and provides a solid foundation for the construction of the subsequent power standard question-and-answer model.

[0029] Constructing an electric power standard question-and-answer database, wherein the electric power standard question-and-answer database is obtained by matching and training the electric power question information set with the electric power answer information set;

[0030] In one embodiment, in order to construct the power standard question and answer database, the system terminal first performs keyword matching on the power question information set and the power answer information set. Through this matching process, the question and answer can be accurately matched, thereby ensuring the accuracy and reliability of each data pair. Subsequently, the power standard question and answer database is constructed based on the multiple matched data pairs. This database will become the core of the power standard question and answer model, providing rich and accurate knowledge support for the system terminal, and helping to quickly answer questions related to power standards raised by users. We will implement it promptly and use the matching training method to successfully construct the power standard question and answer database, laying a solid foundation for the intelligent question and answer service in the power industry.

[0031] Furthermore, the present application provides matching training based on the power question information set and the power answer information set, including:

[0032] Extracting question keywords of the power question information set and answer keywords of the power answer information set based on the text sentence structure;

[0033] Extracting the meanings of the question keywords and the answer keywords, performing keyword matching based on the meaning extraction results, and generating matching results;

[0034] Preferably, in order to construct the electric power standard question-answering model, the system terminal first extracts question keywords from the electric power question information set based on the text sentence structure, and extracts answer keywords from the electric power answer information set. These keywords can summarize the core content of the question and the key information of the answer. Subsequently, the question keywords and answer keywords are tagged with parts of speech, and the part of speech of each word (such as noun, verb, adjective, etc.) is identified, which helps to understand its function and meaning in the sentence. Then, professional terms or specific entities in the electric power field are identified, which are usually part of the key information, and the semantic relationship between keywords, such as synonyms, antonyms, and upper and lower relationships, are analyzed to provide a basis for subsequent matching. After that, the question keywords and answer keywords are matched according to predefined rules. These rules are formulated based on professional knowledge and historical experience in the electric power field. Then, according to the matching results, the matching relationship between the question keywords and the answer keywords is determined, and the matching results are generated. These matching results provide important data support for the subsequent construction of the electric power standard question-answering database and training model. We will implement it as soon as possible, successfully associate the electric power questions and answers through keyword extraction and word meaning matching, and lay a solid foundation for the construction of the electric power standard question-answering model.

[0035] Matching the power question information set with the power answer information set according to the matching result to obtain a plurality of question-answer pairs;

[0036] The power standard question-answer database is constructed based on the plurality of question-answer pairs.

[0037] Preferably, the system terminal accurately matches the power question information set with the power answer information set based on the generated matching results, thereby obtaining multiple question-answer pairs. These matching pairs are all derived based on the meaning extraction and matching results of the keywords, ensuring the accuracy and relevance between the questions and the answers. Subsequently, an electricity standard question and answer database is constructed using these matching question-answer pairs. This database not only contains a wealth of electricity standard knowledge, but also ensures the accurate correspondence between questions and answers. By constructing this database, a fast and accurate source of information on electricity standard questions and answers can be provided for the system terminal, helping the subsequent model training and improving the accuracy, professionalism and reliability of the electricity standard question and answer model.

[0038] Encoding, training and constructing a power data response model based on the power standard question and answer database;

[0039] In one embodiment, the power standard question and answer database contains a large number of power-related questions and corresponding answers. This database provides a rich data resource for the system terminal to train and build a power data reply model. The system terminal encodes the power standard question and answer database. Encoding is to convert the original data into a format that the model can understand and process. In the construction of the power data reply model, encoding involves converting questions and answers into digital form so that the model can analyze and learn. With the encoded data, the system terminal starts to train the power data reply model. Specifically, the system terminal retrieves the target question based on the power data retrieval model and constructs a candidate answer set. Subsequently, the power data reply model is trained using the power standard question and answer database. Training is an iterative process, and the model will continuously adjust its parameters according to the input questions and corresponding answers to improve the accuracy of the reply. Through multiple trainings, the model gradually learns how to extract key information from the questions and give corresponding answers. Afterwards, by randomly extracting the candidate answer set, the fitness of multiple data is obtained, and the optimal answer data is determined based on these fitness, and then the model is adjusted. Then, after training and adjustment, the system terminal obtains a power data reply model. This model can search for relevant information in the electricity standard question and answer database based on the questions raised by the user and generate corresponding answers.

[0040] Furthermore, the present application provides encoding based on the power standard question and answer database, training and constructing a power data reply model, and the method also includes:

[0041] Retrieve the target question based on the power data retrieval model and construct a candidate answer set;

[0042] Traversing the power standard question-answer database, taking the multiple question-answer pairs as supervisory signals, and training the power data reply model;

[0043] Optionally, the system terminal retrieves the target question based on the power data retrieval model, and uses the model to search in relevant power data resources to find information related to the target question. Through this process, a candidate answer set can be constructed, which contains the information or documents that are initially screened and may answer the target question.

[0044] After obtaining the candidate answer set, in order to further improve the accuracy of the answer, the system terminal traverses the power standard question and answer database. This database contains a large number of question-answer pairs, which provide clear supervision signals for the system terminal. The supervision signal refers to the known correct answer, which is used to guide the learning process of the model. Subsequently, the basic framework of the power data reply model is constructed according to deep learning, and the parameters of the constructed basic framework are initialized in the form of random numbers. After that, the question is passed as input to the basic framework of the power data reply model. The basic framework of the power data reply model generates a predicted answer based on the current parameters. The cross entropy loss is used to calculate the loss between the predicted answer and the true answer. Then, the back propagation algorithm is used to update the parameters of the model by calculating the gradient of the loss to the model parameters. The above process is repeated many times until the maximum number of iterations is reached, and the trained model is used as the final power data reply model. By continuously traversing the database and training the model, the power data reply model gradually improves its ability to understand and answer power questions. Ultimately, this model can more accurately select or generate the most appropriate response from the candidate answer set based on the target question.

[0045] Generating k-th answer data by randomly extracting based on the candidate answer set, wherein the k-th answer data has a k-th fitness;

[0046] Determine whether the kth fitness of the kth answer is greater than the k-1th fitness of the k-1th answer;

[0047] If yes, the priority of the kth answer is numerically increased; if no, the priority of the k-1th answer is numerically increased to generate an answer selection sequence;

[0048] Optionally, the system terminal generates the kth answer data by random extraction based on the candidate answer set, and extracts the fitness value in each answer data, which is used to measure the accuracy and relevance of the answer. Subsequently, the kth fitness of the kth answer is compared with the k-1th fitness of the k-1th answer. If the fitness of the kth answer is greater than the fitness of the k-1th answer, it means that the kth answer is better to some extent, so the priority value of the kth answer will be increased. The higher the priority value, the more likely the answer is to be selected in the final selection. On the contrary, if the fitness of the kth answer is not greater than the fitness of the k-1th answer, then the priority value of the k-1th answer is increased to improve its competitiveness in the answer selection. Through this process, the system terminal generates an answer selection sequence, and the answers in this sequence are sorted from high to low according to priority. In this way, when finally selecting the answer, the system terminal can quickly determine which answer is the most appropriate based on this sequence.

[0049] updating the ranking of the candidate answer set based on the answer selection sequence, extracting the first order of the answer selection sequence, and determining the optimal answer data;

[0050] The optimal answer data is evaluated based on the target question, the model response structure is adjusted according to the evaluation result, and the power data response model is output according to the model adjustment structure.

[0051] Optionally, the system terminal reorders the candidate answer set based on the previously generated answer selection sequence. By extracting the first order of the answer selection sequence, the optimal answer data, that is, the answer that is most likely to meet the user's needs, is determined. Subsequently, the determined optimal answer data is evaluated using the target question. The purpose of the evaluation is to determine whether the answer accurately and completely answers the target question and whether it meets the user's expectations. If the evaluation result shows that the answer meets the requirements, then it is considered that the current power data reply model performs well in answering this question. However, if the evaluation result is not ideal, the power data reply model needs to be structurally adjusted. The structural adjustment here is mainly to increase or decrease the number of layers of the model to reduce the computational complexity of the model and improve the performance of the model. Increasing the number of layers helps the model better capture the characteristics of the data and improve the accuracy of the answer; while reducing the number of layers can reduce the complexity of the model and speed up the calculation of the model. When adjusting the model structure, the system terminal selects the appropriate number of layers based on the evaluation results and the performance indicators of the model. Through multiple attempts and adjustments, a model structure that can both ensure the accuracy of the answer and control the computational complexity is found. Finally, according to the adjusted model structure, a new power data reply model is output. This new model improves the efficiency and accuracy of responses by optimizing the structure while maintaining the original functions. In summary, this process mainly determines the best answer through the answer selection sequence, evaluates the best answer, and then adjusts the number of layers of the model according to the evaluation results to optimize the model structure, and finally outputs the optimized power data response model. This ensures that the model is both accurate and efficient when answering power-related questions.

[0052] Based on the power problem information set and the power standard clause information set, feature extraction is performed to train and construct a power data retrieval model;

[0053] In one embodiment, in order to construct a power data retrieval model, the system terminal first extracts features from the power problem information set and the power standard clause information set. These features represent the core information in the problem and standard clause, which helps to accurately understand the professional content in the power field. Subsequently, the obtained feature extraction results are dimensionally converted, and retrieval enhancement training is performed based on the conversion results. By continuously optimizing the parameters and structure of the model, it is possible to quickly retrieve relevant power standard clauses based on the input power problem. In this way, when a user asks a power question, the power data retrieval model can quickly give an accurate answer to meet the user's query needs.

[0054] Furthermore, the present application provides a method for extracting features based on the power problem information set and the power standard clause information set, training and constructing a power data retrieval model, and the method also includes:

[0055] Segmenting the power problem information set based on the power standard clause information set, matching the power problem information set with the power standard clause information set according to the segmentation result, and generating a plurality of question-clause pairs;

[0056] Extract features from the multiple question-clause pairs, and perform dimension conversion on the feature extraction results to obtain a first dimension vector;

[0057] Preferably, in order to construct a power data retrieval model, the system terminal performs word segmentation on the power problem information set. During the word segmentation process, the system terminal uses a predefined stop word list to filter the text in the power problem information set, removing those commonly used function words that are not substantially helpful for information understanding, such as "de" (的), "le" (了), etc. Subsequently, the system terminal constructs a power professional dictionary, which contains common professional terms, nouns, verbs, etc. in the power field. This dictionary is constructed based on the power standard clause information set, relevant literature, professional term databases, etc., and is continuously updated and improved. Then, based on the maximum matching method in the word segmentation algorithm of the dictionary, starting from the beginning of the text in the power problem information set, it attempts to match the longest vocabulary in the dictionary. For example, starting from the first character of the text, it attempts to match the vocabulary in the dictionary. If the match is successful, the vocabulary is used as a word segmentation result; if the match fails, the matching length is shortened and the attempt continues. To handle some ambiguities that may occur in forward matching, the system terminal also adopts the reverse maximum matching method. That is, starting from the end of the text, it performs maximum matching forward. By combining the forward and reverse matching methods, the accuracy and reliability of word segmentation are further improved. By removing these stop words and performing word segmentation through the above methods, the core vocabulary of the problem can be more accurately extracted, providing a clearer data basis for subsequent feature extraction and matching work. Then, the system terminal extracts the keywords in the power problem information set according to the word segmentation results, and searches for matching words or phrases in the power standard clause information set to generate multiple question-clause pairs. These question-clause pairs associate the questions with relevant standard clauses, providing a basis for subsequent feature extraction.

[0058] After obtaining the question-clause pairs, the system terminal extracts text-level features such as word frequency, word frequency-inverse document frequency value, etc. for each question-clause pair. These features can reflect the importance and occurrence pattern of words in questions or clauses. Subsequently, the various features extracted from questions and clauses are combined to form a comprehensive feature set. This feature set will contain multiple dimensions, each dimension representing a feature type or feature attribute. After the feature combination, in order to reduce the computational complexity and improve the model performance, the system terminal performs feature selection to select the most representative or informative features. Subsequently, the selected features are mapped to a fixed dimension. This is because different features may have different dimensions or representations, and they need to be converted into a unified dimension for subsequent model processing. After that, the system terminal defines a hash function that can map the selected features to a vector of fixed length. Specifically, the system terminal determines the length of the vector output by the hash function according to the task requirements. This length should be long enough to accommodate all the important features of the question-clause pair, while being as short as possible to reduce storage and computational overhead. Subsequently, the selected features are encoded. The encoding method of the feature depends on its feature type. For example, numerical features use their original values; text features are converted to word vectors; structured features (such as keywords, category labels, etc.) are represented using one-hot encoding or embedded vectors. Afterwards, a suitable hashing strategy is designed based on the form of feature encoding. For example, for numerical features, directly round or use the decimal part of a floating point number as part of the hash value. For the word vectors of text features, the word vectors are averaged to obtain a vector of fixed length, and then the vector is hashed. Then, a hash function is constructed based on the designed hashing strategy. The constructed hash function is then used to map the features of each question-clause pair to a vector of fixed length, i.e., the first dimension vector. These vectors can capture the key information and semantic features of the question, help achieve efficient retrieval and matching of power data, and lay a solid foundation for building a power data retrieval model.

[0059] Extracting context features of the power problem information set as additional features based on the power standard clause information;

[0060] Using the multiple question-clause pairs as supervisory signals, training the correlation between the first dimension vector and the additional feature, and capturing the complex semantic information of the power question information set and the power standard clause information set based on the correlation coefficient;

[0061] Preferably, the system terminal extracts context features closely related to the power problem information set from the power standard clause information, and these features are integrated into the original feature set as additional information. This is done to more comprehensively describe the intrinsic connection between the power problem information and the power standard clauses.

[0062] After obtaining the additional features, the system terminal uses the obtained multiple question-term pairs as supervision signals to train the correlation between the first dimension vector and the additional features. This is achieved by calculating the similarity between the vector and the feature, for example, using methods such as cosine similarity or Euclidean distance. The goal is to make the matching question-term pairs closer in the vector space, while the mismatched pairs are farther apart, so as to achieve the purpose of enhancing the distinguishing ability of the model retrieval. During the training process, for the first dimension vector and the additional features, all corresponding values ​​are added up and divided by the corresponding number to calculate the average value of the first dimension vector and the additional features. Subsequently, for each value of the first dimension vector and each value of the additional feature, the corresponding average value calculated previously is subtracted from them to obtain the first dimension vector deviation and the additional feature deviation. After that, each deviation of the first dimension vector is multiplied by each deviation of the additional feature, and all the products are added up. This sum represents a measure of how the two variables change together. Then, the square of each deviation is calculated separately, these square values ​​are added up, and then divided by the number of values, and finally the square root is taken to calculate the standard deviation of the first dimension vector deviation and the additional feature deviation. Then, the product of the two standard deviations of the deviations calculated using the sum of the calculated deviation products is used to obtain the correlation coefficient. Further, the system terminal analyzes the semantic relationship between the power problem information set and the power standard clause information set based on the calculated correlation coefficient value. A high positive correlation coefficient indicates that there is a strong positive correlation between the problem vector and a certain additional feature, which means that the feature is very critical for describing or classifying power problems. A low correlation coefficient or a negative correlation coefficient indicates that the feature is not strongly associated with the problem or has an opposite trend. Subsequently, by analyzing the correlation coefficients between multiple problem vectors and multiple additional features, the complex semantic information between the power problem information set and the power standard clause information set is captured. For example, identifying which keywords or terms are highly correlated with specific types of power problems helps understand and classify these problems. The semantic similarities or differences between different problems and their corresponding relationships with standard clauses can also be discovered to obtain complex semantic information. In summary, by training the correlation between the first dimension vector and the additional features, the vector's ability to distinguish in matching and retrieving power problem information can be enhanced, enabling it to more accurately find standard clauses related to the problem, providing strong support for decision-making in the power industry.

[0063] Based on the complex semantic information, the initial retrieval results are subjected to retrieval enhancement training until the training results converge, and the power data retrieval model is output.

[0064] Preferably, the system terminal uses the captured semantic information to perform enhanced training on the initial power data retrieval results. This means that the system terminal adjusts the parameters and strategies of the retrieval model according to the guidance of the semantic information, so that it can more accurately identify and match the relevant power data. During the training process, the system terminal automatically expands the query for complex semantic information and calculates the loss of the query results. Subsequently, a retrieval feedback score is generated based on the calculation results to determine whether convergence has occurred. When the training results converge, the system terminal outputs the optimized and enhanced power data retrieval model. This model can more accurately capture the complex semantic relationships between power data, thereby providing users with more accurate and useful power data retrieval services. In general, this process is to continuously improve the performance of the power data retrieval model through the use of complex semantic information and enhanced training of the model, so that it can better meet the needs of users.

[0065] Furthermore, the present application provides that, based on the complex semantic information, retrieval enhancement training is performed on the initial retrieval results until the training results converge, and the method further includes:

[0066] Performing an automatic expansion query on the initial search results based on the complex semantic information to obtain an expanded vocabulary;

[0067] Calculating the retrieval loss data of the expanded vocabulary by using a loss function;

[0068] Rearrange the initial search results according to the search loss data to determine a re-arrangement sequence;

[0069] Optionally, the system terminal automatically expands the query on the initial search results based on the complex semantic information between the captured power problem information set and the power standard clause information set. The purpose of this step is to cover more documents related to the original query and improve the comprehensiveness and accuracy of the search. When performing an automatic expansion query, the system terminal generates new words or phrases related to the original query based on the complex semantic information. These expanded words can help expand the search scope and discover documents that may not be covered by the initial search results but are equally important.

[0070] After obtaining the extended vocabulary, the system terminal uses the loss function to calculate the retrieval loss data of these extended vocabulary. The loss function is used to quantify the effect of the extended vocabulary in the retrieval process and help determine how to adjust the retrieval strategy to minimize the loss. The goal of the system terminal is to minimize this retrieval loss data, that is, to allow the extended vocabulary to maximize the accuracy and relevance of the retrieval results. Specifically, the system terminal first defines a suitable loss function to quantify the effect of the extended vocabulary in the retrieval process based on actual needs and the accuracy of the retrieval results. Subsequently, the loss value of each extended vocabulary is calculated using the defined loss function. These loss values ​​reflect the relevance and accuracy of the extended vocabulary to the initial retrieval query and the degree of their influence on the retrieval results. The values ​​are between 0 and 1. The larger the loss value, the lower the relevance. Afterwards, the scores of each extended vocabulary are summarized to form the retrieval loss data. These loss data are used to quantify the impact of the extended vocabulary on the entire retrieval process.

[0071] Furthermore, the system terminal merges the initial search results with the expanded vocabulary obtained by automatically expanding the query to form a broader set of candidate results. Subsequently, a loss judgment is made for each result in the candidate result set based on the calculated retrieval loss data. This judgment process comprehensively considers the ranking of the initial search results and the loss value of the expanded vocabulary. Afterwards, the candidate result set is reordered according to the judgment results. Results that are more relevant and accurate to the original query and have lower loss values ​​in the expanded query will be ranked first. Then, the system terminal obtains a reordered retrieval result sequence that more accurately reflects the intent of the retrieval and improves the efficiency and accuracy of the retrieval. Among them, the retrieval result sequence not only includes the initial retrieval results, but also incorporates the vocabulary that is automatically expanded based on complex semantic information. This list more comprehensively covers documents related to the original query and improves the accuracy and efficiency of the retrieval.

[0072] In summary, using complex semantic information to automatically expand queries and calculating the retrieval loss data of the expanded vocabulary through a loss function can help the system terminal optimize the retrieval results, cover more relevant documents, and minimize the retrieval loss.

[0073] Performing search feedback on the initial search results according to the rearranged sequence, generating a search feedback score, and determining whether the search feedback score meets a preset score threshold;

[0074] When the search feedback score does not meet the preset score threshold, the initial search result is randomly searched and optimized by random search until the preset random search times are met;

[0075] When the search feedback score meets the preset score threshold, the initial search result is considered to be converged.

[0076] Optionally, the system terminal performs retrieval feedback on the initial retrieval results according to the rearrangement sequence, uses 1 to subtract each loss value in the rearrangement sequence, and performs mean calculation to generate a retrieval feedback score. This score can reflect the degree of match between the rearranged retrieval results and the actual needs. Subsequently, it is determined whether the retrieval feedback score reaches the preset score threshold. If the score does not meet the preset threshold, it means that the current retrieval results need to be further optimized. In this case, the system terminal sets the step size of the random search, that is, the amplitude of the change each time the retrieval parameters or query conditions are adjusted, and then sets the number of iterations or rounds of the random search, that is, the preset number of random searches. After that, a part of the parameters are randomly selected from the initial retrieval results as adjustment objects, such as the weight of the query term, the strategy of document ranking, etc. Then, the selected adjustment items are randomly changed, for example, the values ​​therein are increased, decreased or replaced. These adjustments are based on a certain probability distribution, such as a normal distribution or a uniform distribution, to ensure a wide coverage of the search space. Further, the retrieval operation is re-executed using the adjusted retrieval parameters or query conditions, new retrieval loss data is obtained, and the corresponding retrieval feedback score is calculated. Subsequently, the new retrieval feedback score is compared with the previous score to determine whether there is an improvement. If the new score is higher (i.e., closer to the preset score threshold or exceeds the previous score), the current retrieval parameters and retrieval results are updated. Repeat the above process of random adjustment, retrieval, comparison and update until the preset number of random retrievals is reached. In each iteration, the system terminal records the current highest score and the corresponding retrieval parameters for subsequent analysis. When the preset number of random retrievals is met, the iteration is stopped, and the currently recorded highest score and the corresponding retrieval results are output. If the retrieval feedback score meets the preset score threshold, the system terminal considers that the initial retrieval results have converged, that is, they have reached a relatively stable state that meets the requirements. At this time, the system terminal determines that the current retrieval model is accurate enough and outputs it. In summary, this process continuously optimizes the retrieval results through feedback scoring and random search tuning until the preset requirements are met, thereby ensuring the effectiveness and accuracy of the power data retrieval model.

[0077] Performing joint training optimization on the power data retrieval model and the power data reply model to generate a joint optimization result;

[0078] In one embodiment, the process of joint training and optimization of the power data retrieval model and the power data reply model is actually to train the two models as a whole to further improve the performance of the entire system. During the joint training process, the power data retrieval model is responsible for retrieving a set of candidate answers related to the target question from a large amount of power data, while the power data reply model is responsible for selecting the best answer from these candidate answers. The two models work together to provide accurate power data replies. Through joint training, the parameters and structures of the two models can be optimized at the same time so that they can work better together. Specifically, when the power data retrieval model retrieves the candidate answers, the power data reply model outputs the initial reply results based on these candidate answers. Subsequently, the reply loss data of the initial reply result is calculated according to the joint training objective. This reply loss data is the difference between the matched reply result and the actual reply result corresponding to the question. The greater the difference, the greater the loss. Afterwards, during the training process, the system terminal calculates the loss gradient of the reply loss data through the back propagation algorithm, obtains the minimized joint loss function, and then updates the power data retrieval model and the power data reply model based on this minimized joint loss function to generate the final joint optimization result, that is, a power data retrieval and reply model with better performance. This model can better understand and answer electricity questions, and provide users with more accurate and efficient electricity data services. In summary, joint training optimization is a process of synergistically improving the performance of the two models. By continuously optimizing their parameters and structures, the power data retrieval and reply system can answer users' questions more accurately.

[0079] Furthermore, the present application provides joint training optimization of the power data retrieval model and the power data reply model to generate a joint optimization result, and the method also includes:

[0080] mapping an interactive correlation factor between the power data retrieval model and the power data reply model;

[0081] calculating a joint loss function of the power data retrieval model and the power data reply model, and setting a joint training target based on the interaction correlation factor;

[0082] Optionally, the system terminal analyzes the interaction point between the power data retrieval model and the power data reply model. This interaction point exists between the candidate answer set output by the retrieval model and the candidate answer set input by the reply model. The intersection of these two sets is the key part of the interaction between the models. Subsequently, the features of the candidate answers output by the retrieval model and the optimal answer finally selected by the reply model are extracted. These features include text similarity, semantic relevance, length of the answer, included professional terms, etc. These features can reflect the quality of the answer and the degree of matching with the question. Afterwards, based on the extracted features, the correlation between each candidate answer output by the retrieval model and the optimal answer selected by the reply model is calculated by using the cosine similarity algorithm. The calculation of the correlation can reflect the degree of matching and correlation between the answers. Then, the calculated correlation is used as an interaction correlation factor and is mapped to the corresponding candidate answer. In this way, each candidate answer has an interaction correlation factor associated with it, indicating the degree of correlation between it and the optimal answer.

[0083] During the joint training process, the core goal of the system terminal is to maximize this interaction while minimizing the overall loss function, which means that the system terminal should not only pursue a high degree of functional synergy between the two models, but also ensure that their performance in practical applications is optimal. By optimizing the parameters and structure of the model, the interaction between the retrieval model and the reply model can be improved, while the error of the model in the prediction process can be reduced. To achieve this goal, the system terminal defines loss function components for the power data retrieval model and the power data reply model respectively. The loss of the retrieval model is based on the degree of match between the candidate answer and the true answer, such as accuracy, recall, etc.; the loss of the reply model is based on the error between the optimal answer it selects and the true answer, such as cross entropy loss. Subsequently, these two loss function components are combined to form a joint loss function. This is done by weighted summation, where the weights are adjusted according to the actual situation to balance the importance of the retrieval model and the reply model in the training process. When calculating the joint loss function, the system terminal minimizes the objective function through gradient descent, and adjusts the parameters of the model to reduce the prediction error in combination with the interaction correlation factor, ensuring that the model can take into account the interaction with the reply model when outputting the candidate answer. In summary, mapping the interaction correlation factors and calculating the joint loss function are important steps in jointly training and optimizing the power data retrieval model and the power data reply model. Setting the joint training goal of maximizing correlation and minimizing loss can ensure that the two models can cooperate with each other during the training process.

[0084] Inputting the target question into the power data retrieval model to obtain a candidate list of power standard clauses;

[0085] Based on the candidate list, the target questions are sequentially input into the power data answer model according to power standard clauses, and an initial answer result is output;

[0086] Optionally, after the system terminal inputs the target question into the power data retrieval model, the model will generate a candidate list containing power standard clauses based on its internal algorithm and training data. These candidate clauses are possible answers or reference information related to the target question. Subsequently, based on this candidate list, the system terminal passes the target question to the power data reply model in turn according to each power standard clause as input. The reply model processes each input according to the rules and knowledge obtained from its training, and outputs the corresponding initial reply result. Through this process, the system terminal can obtain multiple initial reply results based on different power standard clauses. These results provide a multi-angle understanding and answer to the target question, which helps to grasp the essence of the problem and related information more comprehensively. In summary, by inputting the target question into the power data retrieval model and the power data reply model successively, a candidate list based on the power standard clause can be obtained, and multiple initial reply results can be further obtained, which provides rich references and basis for answering the problem.

[0087] Calculate the response loss data of the initial response result according to the joint training objective;

[0088] The loss gradient of the reply loss data is calculated by a back-propagation algorithm to obtain a minimized joint loss function, and the power data retrieval model and the power data reply model are respectively updated based on the minimized joint loss function to generate the joint optimization result.

[0089] Optionally, during the joint training process, the system terminal uses a method similar to the aforementioned method for obtaining the retrieval loss data to calculate the reply loss data according to the joint training objective. This loss data measures the difference between the reply result generated by the model and the actual reply result corresponding to the question. The larger the difference, the more inaccurate the reply of the model and the greater the loss. In order to optimize the model and reduce this loss, the system terminal uses a back propagation algorithm to calculate the loss gradient of the reply loss data. The loss gradient provides the system terminal with guidance information on how to adjust the model parameters to reduce the loss. By minimizing the joint loss function, the system terminal comprehensively considers the performance of the power data retrieval model and the power data reply model, and strives to improve the degree of interaction between them. Based on the calculated loss gradient, the parameters of the retrieval model and the reply model are updated respectively to optimize their performance. This process is iterative, and as the training progresses, the reply accuracy of the model will gradually increase, and the reply loss data will gradually decrease. Finally, through joint optimization, the joint optimization results of the power data retrieval model and the reply model are obtained, which can more accurately retrieve and reply to questions related to power data. In summary, the reply loss data measures the difference between the model reply results and the actual reply results. By minimizing the joint loss function and using the back propagation algorithm to optimize the model parameters, the joint optimization of the power data retrieval model and the reply model is achieved.

[0090] An initial model of electric power standard question and answer is constructed, the initial model of electric power standard question and answer is back-trained based on the joint optimization result, and the electric power standard question and answer model is output based on the back-training result.

[0091] In one embodiment, after completing the joint optimization of the power data retrieval model and the power data reply model, the system terminal obtains two updated models. The two models have better retrieval and reply capabilities, respectively, and the degree of interaction between them is also improved. Subsequently, the two updated models are integrated to construct the initial model of power standard question and answer. The integration process is to merge the functions of the two models so that the initial model can simultaneously utilize the retrieval capability of the retrieval model and the reply capability of the reply model to provide users with a complete power standard question and answer service. After the integration is completed, the system terminal obtains the initial model of power standard question and answer. This model combines the functions of power data retrieval and reply, and can accurately retrieve and reply to questions related to power standards. After that, the system terminal decomposes the joint optimization results and constructs a retrospective data set based on the decomposition results. Then, the system terminal uses this retrospective data set to retrospectively train the initial model of power standard question and answer and output the power standard question and answer model.

[0092] Further, the present application provides for constructing an initial model of electric power standard question and answer, backtracking training the initial model of electric power standard question and answer based on the joint optimization result, and outputting the electric power standard question and answer model based on the backtracking result. The method also includes:

[0093] Constructing the power standard question and answer initial model according to the updated power data retrieval model and the power data reply model;

[0094] Decomposing the joint optimization result to obtain clause ranking information of the power data retrieval model and reply ranking information of the power data reply model;

[0095] Preferably, after completing the update of the power data retrieval model and the power data reply model, the system terminal uses the two updated models to construct the power standard question and answer initial model. This initial model integrates the functions of retrieval and reply, and can provide users with a complete power standard question and answer service. In order to further improve the performance of the model, the system terminal further decomposes the joint optimization results. The joint optimization results contain rich information. By decomposing this information, more specific optimization details can be obtained. Specifically, the joint optimization results are decomposed to obtain the clause ranking information of the power data retrieval model and the reply ranking information of the power data reply model. The clause ranking information reflects the priority or importance of different power standard clauses in the retrieval process. This information helps to understand which clauses are more relevant to the question, thereby optimizing the ranking algorithm of the retrieval model and improving the accuracy and efficiency of the retrieval. The reply ranking information reveals the preference or weight of the reply model for different possible answers when generating a reply. By analyzing this information, the decision-making process of the reply model can be better understood and adjusted accordingly to improve the accuracy and consistency of the reply. By decomposing the joint optimization results and obtaining these specific ranking information, the power standard question and answer initial model can be adjusted and optimized in more detail. This will help to further improve the performance of the model so that it can better meet the users' question-answering needs.

[0096] Matching the search results with the original questions using the clause ranking information and the answer ranking information to construct a backtracking data set;

[0097] Preferably, the system terminal uses the previously obtained clause ranking information and answer ranking information to extract the retrieval clauses and their corresponding answers that best match the original question from the power data retrieval model and the power data answer model. These retrieval clauses and answers are selected based on the priority or weight of the ranking information, so they are more relevant to the original question. Subsequently, these matched retrieval results are paired with the original question to construct a retrospective data set. This retrospective data set not only contains the original question, but also contains the corresponding retrieval clauses and answers, providing basic data for subsequent model retrospective training. By constructing such a retrospective data set, we can better understand the decision-making process of the model when answering the original question, and find out possible problems or deficiencies. Based on these data, model retrospective training can be performed to further optimize the performance of the model so that it can more accurately answer questions in power standard questions and answers.

[0098] Re-extracting features based on the retrospective data set, retrospectively training the initial model of the electric power standard question and answer, and generating a retrospective result;

[0099] The traceback results are verified and tested, and the power standard question-and-answer model is output.

[0100] Preferably, the system terminal re-extracts features based on the constructed retrospective data set. This means that the system terminal analyzes and extracts feature information related to the power standard question and answer from the retrospective data set. These features include keywords, sentence structures, semantic relationships, etc. of the questions, which help to improve the accuracy of the model's answers. Subsequently, these re-extracted features are used to perform retrospective training on the initial model of the power standard question and answer. Retrospective training is a process of adjusting model parameters based on historical data, with the aim of allowing the model to better learn and adapt to the laws and patterns in the data. Through retrospective training, the performance of the model can be further optimized so that it can more accurately answer questions related to power standards. After completing the retrospective training, the system terminal obtains the retrospective result, which is the performance of the model after optimization. In order to verify the validity of the retrospective result, a verification test is performed on it. Verification testing is an important step in evaluating model performance. The system terminal tests the model by inputting test inputs multiple times and compares them with real answers. It can understand the performance of the model in a real environment and ensure that it can stably and accurately answer power standard question and answer questions. After the verification test and confirming that the model performance meets the requirements, the system terminal finally outputs the power standard question and answer model. This model has undergone back-training and optimization, and has stronger power standard question-and-answer capabilities, and can provide users with accurate and efficient power standard question-and-answer services.

[0101] In summary, the embodiments of the present application have at least the following technical effects:

[0102] The embodiment of the present application collects information from various power fields from big data, including power questions, answers and standard clauses. Subsequently, a power standard question and answer database is constructed, and question-answer pairs are formed by matching and training power questions and answers. After that, the power questions and standard clauses are used for feature extraction, and the power data retrieval model is trained to capture complex semantic information. In the retrieval enhancement training stage, the initial retrieval results are optimized until convergence to improve the accuracy and efficiency of the retrieval. At the same time, the power data reply model is trained by traversing the power standard question and answer database. Then, joint training optimization is performed to map the interactive correlation factors of the retrieval model and the reply model, and the joint loss function is calculated, and the model is updated with the goal of minimizing the loss function. Finally, the updated model is used to construct the initial model of the power standard question and answer, and it is optimized through backtracking training, and finally an efficient and accurate power standard question and answer model is output. These technical effects jointly solve the problem that the existing power standard question and answer model adopts a rule-based or template-based approach, which leads to a lack of flexibility and generalization ability, making it difficult to cope with the complexity and diversity of power standard documents, and is prone to deviations or misunderstandings when understanding and parsing the documents, resulting in inaccurate answers to technical questions. It realizes the question and answer model based on the semantic similarity of the input text, which can accurately and efficiently match the power standard knowledge, thereby improving the accuracy, professionalism and reliability of the power standard question and answer model.

[0103] Embodiment 2

[0104] Based on the same inventive concept as the retrieval-enhanced power standard question-answering model training method in the aforementioned embodiment, Figure 2 As shown, the present application provides a power standard question-answering model training system based on retrieval enhancement, the system comprising:

[0105] Data acquisition module 1: the data acquisition module 1 is used to perform data acquisition based on big data to obtain a power standard document, wherein the power standard document includes a power question information set, a power answer information set, and a power standard clause information set;

[0106] Database construction module 2: the database construction module 2 is used to construct an electric power standard question and answer database, the electric power standard question and answer database is obtained by matching training based on the electric power question information set and the electric power answer information set;

[0107] Response model training module 3: the response model training module 3 is used to perform encoding based on the power standard question and answer database, and train and construct a power data response model;

[0108] Retrieval model training module 4: the retrieval model training module 4 is used to perform feature extraction based on the power problem information set and the power standard clause information set, and train and construct a power data retrieval model;

[0109] Joint training optimization module 5: the joint training optimization module 5 is used to perform joint training optimization on the power data retrieval model and the power data reply model to generate a joint optimization result;

[0110] Backtracking training module 6: The backtracking training module 6 is used to construct an initial model of electricity standard question and answer, backtrack the initial model of electricity standard question and answer based on the joint optimization result, and output the electricity standard question and answer model based on the backtracking result.

[0111] Furthermore, the database construction module 2 is also used to execute the following method:

[0112] Extracting question keywords of the power question information set and answer keywords of the power answer information set based on the text sentence structure;

[0113] Extracting the meanings of the question keywords and the answer keywords, performing keyword matching based on the meaning extraction results, and generating matching results;

[0114] Matching the power question information set with the power answer information set according to the matching result to obtain a plurality of question-answer pairs;

[0115] The power standard question-answer database is constructed based on the plurality of question-answer pairs.

[0116] Furthermore, the database construction module 2 is also used to execute the following method:

[0117] Retrieve the target question based on the power data retrieval model and construct a candidate answer set;

[0118] Traversing the power standard question-answer database, taking the multiple question-answer pairs as supervisory signals, and training the power data reply model;

[0119] Generating k-th answer data by randomly extracting based on the candidate answer set, wherein the k-th answer data has a k-th fitness;

[0120] Determine whether the kth fitness of the kth answer is greater than the k-1th fitness of the k-1th answer;

[0121] If yes, the priority of the kth answer is numerically increased; if no, the priority of the k-1th answer is numerically increased to generate an answer selection sequence;

[0122] updating the ranking of the candidate answer set based on the answer selection sequence, extracting the first order of the answer selection sequence, and determining the optimal answer data;

[0123] The optimal answer data is evaluated based on the target question, the model response structure is adjusted according to the evaluation result, and the power data response model is output according to the model adjustment structure.

[0124] Furthermore, the database construction module 2 is also used to execute the following method:

[0125] mapping an interactive correlation factor between the power data retrieval model and the power data reply model;

[0126] calculating a joint loss function of the power data retrieval model and the power data reply model, and setting a joint training target based on the interaction correlation factor;

[0127] Inputting the target question into the power data retrieval model to obtain a candidate list of power standard clauses;

[0128] Based on the candidate list, the target questions are sequentially input into the power data answer model according to power standard clauses, and an initial answer result is output;

[0129] Calculate the response loss data of the initial response result according to the joint training objective;

[0130] The loss gradient of the reply loss data is calculated by a back-propagation algorithm to obtain a minimized joint loss function, and the power data retrieval model and the power data reply model are respectively updated based on the minimized joint loss function to generate the joint optimization result.

[0131] Furthermore, the retrieval model training module 3 is also used to perform the following method:

[0132] Segmenting the power problem information set based on the power standard clause information set, matching the power problem information set with the power standard clause information set according to the segmentation result, and generating a plurality of question-clause pairs;

[0133] Extract features from the multiple question-clause pairs, and perform dimension conversion on the feature extraction results to obtain a first dimension vector;

[0134] Extracting context features of the power problem information set as additional features based on the power standard clause information;

[0135] Using the multiple question-clause pairs as supervisory signals, training the correlation between the first dimension vector and the additional feature, and capturing the complex semantic information of the power question information set and the power standard clause information set based on the correlation coefficient;

[0136] Based on the complex semantic information, the initial retrieval results are subjected to retrieval enhancement training until the training results converge, and the power data retrieval model is output.

[0137] Furthermore, the retrieval model training module 3 is also used to perform the following method:

[0138] Performing an automatic expansion query on the initial search results based on the complex semantic information to obtain an expanded vocabulary;

[0139] Calculating the retrieval loss data of the expanded vocabulary by using a loss function;

[0140] Rearrange the initial search results according to the search loss data to determine a re-arrangement sequence;

[0141] Performing search feedback on the initial search results according to the rearranged sequence, generating a search feedback score, and determining whether the search feedback score meets a preset score threshold;

[0142] When the search feedback score does not meet the preset score threshold, the initial search result is randomly searched and optimized by random search until the preset random search times are met;

[0143] When the search feedback score meets the preset score threshold, the initial search result is considered to be converged.

[0144] Furthermore, the backtracking training module 6 is also used to perform the following method:

[0145] Constructing the power standard question and answer initial model according to the updated power data retrieval model and the power data reply model;

[0146] Decomposing the joint optimization result to obtain clause ranking information of the power data retrieval model and reply ranking information of the power data reply model;

[0147] Matching the search results with the original questions using the clause ranking information and the answer ranking information to construct a backtracking data set;

[0148] Re-extracting features based on the retrospective data set, retrospectively training the initial model of the electric power standard question and answer, and generating a retrospective result;

[0149] The traceback results are verified and tested, and the power standard question-and-answer model is output.

[0150] Exemplary Storage Media

[0151] The memory medium may be a ROM or other type of static storage device that can store static information and instructions, a RAM or other type of dynamic storage device that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, an optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory may exist independently and be connected to the processor through a bus architecture. The memory may also be integrated with the processor.

[0152] It should be noted that the above-mentioned sequence of the embodiments of the present application is only for description and does not represent the advantages and disadvantages of the embodiments. And the above-mentioned specific embodiments of this specification are described. Other embodiments are within the scope of the attached claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order and continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0153] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

[0154] This specification and drawings are merely exemplary illustrations of the present application and are deemed to cover any and all modifications, variations, combinations or equivalents within the scope of the present application. Obviously, a person skilled in the art may make various modifications and variations to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the present application and its equivalents, the present application intends to include these modifications and variations.

Claims

1. A training method for a power standard question-answering model based on retrieval enhancement, characterized in that: The method comprises: Perform data collection based on big data to obtain an electric power standard document, wherein the electric power standard document includes an electric power question information set, an electric power answer information set, and an electric power standard clause information set; Constructing an electric power standard question-and-answer database, wherein the electric power standard question-and-answer database is obtained by matching and training the electric power question information set with the electric power answer information set; Encoding, training and constructing a power data response model based on the power standard question and answer database; Based on the power problem information set and the power standard clause information set, feature extraction is performed to train and construct a power data retrieval model; Performing joint training optimization on the power data retrieval model and the power data reply model to generate a joint optimization result; Constructing an initial model of electric power standard question and answer, performing backtracking training on the initial model of electric power standard question and answer based on the joint optimization result, and outputting the electric power standard question and answer model based on the backtracking result; The method includes: extracting features based on the power problem information set and the power standard clause information set, training and constructing a power data retrieval model. Segmenting the power problem information set based on the power standard clause information set, matching the power problem information set with the power standard clause information set according to the segmentation result, and generating a plurality of question-clause pairs; Extract features from the multiple question-clause pairs, and perform dimension conversion on the feature extraction results to obtain a first dimension vector; Extracting context features of the power problem information set as additional features based on the power standard clause information; Using the multiple question-clause pairs as supervisory signals, training the correlation between the first dimension vector and the additional feature, and capturing the complex semantic information of the power question information set and the power standard clause information set based on the correlation coefficient; Based on the complex semantic information, performing retrieval enhancement training on the initial retrieval results until the training results converge, and outputting the power data retrieval model; Wherein, based on the complex semantic information, the initial search results are subjected to search enhancement training until the training results converge, and the method includes: Performing an automatic expansion query on the initial search results based on the complex semantic information to obtain an expanded vocabulary; Calculating the retrieval loss data of the expanded vocabulary by using a loss function; Rearrange the initial search results according to the search loss data to determine a re-arrangement sequence; Performing search feedback on the initial search results according to the rearranged sequence, generating a search feedback score, and determining whether the search feedback score meets a preset score threshold; When the search feedback score does not meet the preset score threshold, the initial search result is randomly searched and optimized by random search until the preset random search times are met; When the search feedback score meets the preset score threshold, the initial search result is considered to be converged.

2. The method for training a power standard question-answering model based on retrieval enhancement according to claim 1, characterized in that: Based on the power question information set and the power answer information set, matching training is performed, and the method includes: Extracting question keywords of the power question information set and answer keywords of the power answer information set based on the text sentence structure; Extracting the meanings of the question keywords and the answer keywords, performing keyword matching based on the meaning extraction results, and generating matching results; Matching the power question information set with the power answer information set according to the matching result to obtain a plurality of question-answer pairs; The power standard question-answer database is constructed based on the plurality of question-answer pairs.

3. The method for training a power standard question-answering model based on retrieval enhancement according to claim 2, characterized in that: Encoding is performed based on the power standard question and answer database, and training and constructing a power data answer model, the method comprising: Retrieve the target question based on the power data retrieval model and construct a candidate answer set; Traversing the power standard question-answer database, taking the multiple question-answer pairs as supervisory signals, and training the power data reply model; Generating k-th answer data by randomly extracting based on the candidate answer set, wherein the k-th answer data has a k-th fitness; Determine whether the kth fitness of the kth answer is greater than the k-1th fitness of the k-1th answer; If yes, the priority of the kth answer is numerically increased; if no, the priority of the k-1th answer is numerically increased to generate an answer selection sequence; updating the ranking of the candidate answer set based on the answer selection sequence, extracting the first order of the answer selection sequence, and determining the optimal answer data; The optimal answer data is evaluated based on the target question, the model response structure is adjusted according to the evaluation result, and the power data response model is output according to the model adjustment structure.

4. The method for training the power standard question-answering model based on retrieval enhancement according to claim 3, characterized in that: The power data retrieval model and the power data reply model are jointly trained and optimized to generate a joint optimization result, the method comprising: mapping an interactive correlation factor between the power data retrieval model and the power data reply model; calculating a joint loss function of the power data retrieval model and the power data reply model, and setting a joint training target based on the interaction correlation factor; Inputting the target question into the power data retrieval model to obtain a candidate list of power standard clauses; Based on the candidate list, the target questions are sequentially input into the power data answer model according to power standard clauses, and an initial answer result is output; Calculate the response loss data of the initial response result according to the joint training objective; The loss gradient of the reply loss data is calculated by a back-propagation algorithm to obtain a minimized joint loss function, and the power data retrieval model and the power data reply model are respectively updated based on the minimized joint loss function to generate the joint optimization result.

5. The method for training a power standard question-answering model based on retrieval enhancement according to claim 1, characterized in that: Constructing an initial model of electric power standard question and answer, back-training the initial model of electric power standard question and answer based on the joint optimization result, and outputting the electric power standard question and answer model based on the back-tracing result, the method includes: Constructing the power standard question and answer initial model according to the updated power data retrieval model and the power data reply model; Decomposing the joint optimization result to obtain clause ranking information of the power data retrieval model and reply ranking information of the power data reply model; Matching the search results with the original questions using the clause ranking information and the answer ranking information to construct a backtracking data set; Re-extracting features based on the retrospective data set, retrospectively training the initial model of the electric power standard question and answer, and generating a retrospective result; The traceback results are verified and tested, and the power standard question-and-answer model is output.

6. The power standard question-answering model training system based on retrieval enhancement is characterized by: The method for implementing any one of the retrieval-enhanced power standard question-answering model training methods 1-5 comprises: A data collection module, used for collecting data based on big data to obtain a power standard document, wherein the power standard document includes a power question information set, a power answer information set, and a power standard clause information set; A database construction module, used to construct an electric power standard question and answer database, wherein the electric power standard question and answer database is obtained by matching and training the electric power question information set with the electric power answer information set; A reply model training module, used for encoding, training and constructing a power data reply model based on the power standard question and answer database; A retrieval model training module, used to perform feature extraction based on the power problem information set and the power standard clause information set, and train and construct a power data retrieval model; A joint training optimization module, used for performing joint training optimization on the power data retrieval model and the power data reply model to generate a joint optimization result; A backtracking training module, used for constructing an initial model of electric power standard question and answer, backtracking training the initial model of electric power standard question and answer based on the joint optimization result, and outputting the electric power standard question and answer model based on the backtracking result; Among them, the retrieval model training module also includes: Based on the power standard clause information set, the power problem information set is segmented, and the power problem information set is matched with the power standard clause information set according to the segmentation result to generate multiple question-clause pairs; the multiple question-clause pairs are subjected to feature extraction, and the feature extraction results are dimensionalized to obtain a first dimensional vector; based on the power standard clause information, context features of the power problem information set are extracted as additional features; using the multiple question-clause pairs as supervision signals, the correlation between the first dimensional vector and the additional features is trained, and the complex semantic information of the power problem information set and the power standard clause information set is captured based on the correlation coefficient; based on the complex semantic information, the initial retrieval results are subjected to retrieval enhancement training until the training results converge, and the power data retrieval model is output; Among them, the retrieval model training module also includes: Based on the complex semantic information, the initial search results are automatically expanded and queried to obtain expanded vocabulary; the retrieval loss data of the expanded vocabulary is calculated by a loss function; the initial search results are reordered according to the retrieval loss data to determine a reordered sequence; according to the reordered sequence, retrieval feedback is performed on the initial search results to generate a retrieval feedback score, and it is determined whether the retrieval feedback score meets a preset score threshold; when the retrieval feedback score does not meet the preset score threshold, random retrieval optimization is performed on the initial search results through random search until a preset number of random searches is met and the search is stopped; when the retrieval feedback score meets the preset score threshold, the initial search results are deemed to be converged.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the retrieval-enhanced power standard question-answering model training method as described in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Biomedicine literature retrieval method based on ranking learning algorithm

    CN108520038A

  • Efficient network retrieval enhanced answering method and system oriented to human preferences

    CN116501843A