Self-consistency enhanced large language model power equipment operation and maintenance method, system and equipment
By generating and processing inference paths in a large language model and combining the power operation and maintenance maintenance map, the problem that it is difficult for the large language model to deeply explore the root cause of the fault in the power equipment operation and maintenance maintenance is solved, and the accuracy and efficiency of operation and maintenance are improved.
Patent Information
- Application Number
- CN202510157109.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-13
- Publication Date
- 2025-03-14
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The large language model is difficult to effectively utilize professional knowledge in the field of power equipment operation, maintenance and maintenance, and deeply explore the root causes of equipment failures, resulting in inefficient maintenance.
By generating inference paths, dividing them into multiple clauses, and combining the power operation and maintenance maintenance map, the operation and maintenance maintenance entity is extracted, the relevant node sequence is obtained, the similarity score, implicit score and contradiction scores of the clause and node sequence are calculated, the scores and sorting are scored, and the operation and maintenance maintenance plan is finally obtained.
It improves the accuracy and efficiency of operation and maintenance, can consider all aspects of the problem more comprehensively, provide accurate decision-making support for operation and maintenance, reduces manual intervention, and improves work efficiency and accuracy.
Smart Images

Figure CN119624437A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of operation, maintenance and repair of main equipment in power grids, and in particular to a large language model operation, maintenance and repair method, system and equipment for power equipment with enhanced self-consistency. Background Art
[0002] With the continuous expansion and complexity of the power system, the operation and maintenance of main equipment (such as transformers, switchgear, generators, etc.) has become increasingly important. As the cornerstone of the power system, the operating status of these core components is directly related to the safety, stability and power supply quality of the entire system. In the context of the continuous expansion of the power grid, the failure of the main equipment may cause emergency power outages or power outages, causing serious impacts on residents' lives and industrial production. Therefore, improving the efficiency and accuracy of the operation and maintenance of the main equipment has become the key to ensuring the stable operation of the power system.
[0003] With the rapid development of artificial intelligence technology, especially the rise of knowledge-based power artificial intelligence technology, new solutions have been provided for the operation and maintenance of main equipment. Knowledge-based power artificial intelligence integrates a large amount of historical operation and maintenance data in the power system and uses advanced data analysis and mining technology to discover valuable information hidden behind the data and provide intelligent support for operation and maintenance work.
[0004] In the field of knowledge representation, knowledge graphs and large language models are two main technical paths. Knowledge graphs are based on graph structures and achieve accurate knowledge query and reasoning through the clear representation of entities and relationships between entities. Large language models, with their powerful natural language processing and emergence capabilities, simplify the complexity of knowledge query and achieve the convenience of human-computer interaction. However, although large language models have powerful natural language processing capabilities and extensive knowledge coverage, they often lack sufficient domain expertise and deep understanding when dealing with complex problems in specific fields (such as power equipment operation and maintenance), making it difficult to accurately locate the root cause of the fault, affecting maintenance efficiency and accuracy. Summary of the invention
[0005] To this end, the present invention aims to solve the key technical problems currently faced when applying large language models to the field of power equipment operation, maintenance and inspection: it is difficult to effectively use existing professional knowledge to deeply explore the root causes of equipment failures, which in turn leads to low maintenance efficiency.
[0006] In order to solve the above technical problems, the present invention provides a large language model power equipment operation and maintenance method with enhanced self-consistency, comprising the following steps: S1: Generate a reasoning path based on the question in the question-answer pair, and segment the reasoning path to obtain multiple clauses; S2: For each clause, extract the operation and maintenance entity, and obtain the node sequence related to it in the power operation and maintenance graph according to the operation and maintenance entity; S3: Filtering out the associated node sequence of the corresponding clause by calculating the similarity score between the clause and the node sequence, and calculating the implication score and the contradiction score between the associated node sequence and the corresponding clause; S4: Score the reasoning path according to the similarity score, the implication score and the contradiction score to obtain a reasoning path score, re-sort the reasoning path scores to obtain a final operation and maintenance plan.
[0007] In one embodiment of the present invention, the question-answer pair is a triple data structure consisting of a question, an option set, and an answer set. Q, O, A >; Among them, Q Indicates the power operation and maintenance problems raised by users. O ={ O 1 ,O 2 ,...,O n} represents an option set, n ≥1 for each option O i It's about the problem Q A candidate answer for A ⊆ O Represents the answer set, which is the option set O A collection of one or more options that are determined to be the correct answer.
[0008] In one embodiment of the present invention, in S1, the method for obtaining multiple clauses is: Q One or more reasoning paths including explanation text and candidate answers are generated, and the explanation text is segmented into a plurality of clauses according to punctuation marks or stop words.
[0009] In one embodiment of the present invention, in S2, the power operation and maintenance map is a directed graph with operation and maintenance entities as nodes and the relationships between operation and maintenance entities as edges; wherein the operation and maintenance entities include power equipment information, fault information and maintenance methods, and a probability value is assigned to each edge, and the probability value serves as the confidence level of the existence of the connection relationship between the operation and maintenance entities.
[0010] In one embodiment of the present invention, in S2, the method for obtaining the node sequence is: S21: extracting the operation and maintenance entity in each clause, and querying on the power operation and maintenance map based on the operation and maintenance entity, and taking each node found in the query as the starting node; S22: setting a random walk count for each starting node, starting from each starting node, randomly selecting the next node for walking according to the probability value of the edge in the power operation and maintenance graph; S23: During each walk, determine whether the length of the current walk path reaches the preset random walk sequence length: If not, return to S22; If so, all nodes on the walking path are recorded to form an initial node sequence, the initial node sequences corresponding to all starting nodes are merged, and duplicate nodes are eliminated through deduplication operation to obtain the final node sequence.
[0011] In one embodiment of the present invention, the calculation formula of the node sequence is: , in, Represents the obtained node sequence, represents the number of the reasoning path, Indicates the clause number obtained after the reasoning path is split. The number of the node sequence. Indicates the maintenance entity number extracted in the clause. Indicates the total number of operation and maintenance entities extracted in the clause; Represents a string concatenation function. represents the random walk algorithm, whose parameters Represents an entity, represents the operation and maintenance knowledge graph, represents the length of the random walk sequence; Represents a deduplication function, which is used to perform deduplication operations on repeated sequence parts.
[0012] In one embodiment of the present invention, in S3, the method for filtering out the associated node sequence of the corresponding clause is as follows: S31: convert each clause and multiple node sequences related thereto into clauses in the form of embedded vectors and node sequences in the form of embedded vectors respectively; S32: Calculate the cosine similarity scores between the clause in the embedded vector form and each node sequence in the embedded vector form respectively, and the calculation formula is: , in, For the pre-trained model M3E, For clauses, is one of the node sequences corresponding to the clause, is the cosine similarity function; S33: Sort the cosine similarity scores to obtain a sequence of associated nodes of the clauses, the calculation formula of which is: , in, is from Node sequence The sequence number of the associated node sequence selected from represents the number of the reasoning path, Indicates the clause number obtained after the reasoning path is split. The number of the node sequence. , P represents the total number of node sequences.
[0013] In one embodiment of the present invention, in S4, the method for obtaining the final operation and maintenance plan is: S41: Calculate the score of each clause in the explanation text of the reasoning path according to the similarity score, implication score and contradiction score of the clause. The calculation formula is expressed as follows: , in, represents the clause score threshold, represents the contradiction score between the associated node sequence and the corresponding clause, Represents the implication score between the associated node sequence and the corresponding clause; represents a sequence of associated nodes, Representation and The corresponding clause, represents the number of the reasoning path, Indicates the clause number obtained after the reasoning path is split. The number representing the sequence of associated nodes; S42: Accumulate and sum the scores of all clauses to obtain the score of the corresponding explanation text, that is, the score of the answer in the reasoning path; S43: The scores of all the answers are re-sorted, and the answers with scores lower than a preset threshold are eliminated to obtain the final answer, i.e., the operation and maintenance plan.
[0014] Based on the same inventive concept, the present invention also provides a large language model power equipment operation and maintenance system with enhanced self-consistency, which is used to implement the steps of the large language model power equipment operation and maintenance method with enhanced self-consistency, and the system includes the following modules: An inference path generation and segmentation module, wherein the inference path segmentation module is used to generate an inference path based on the questions in the question-answer pair, and segment the inference path to obtain a plurality of clauses; A node sequence acquisition module, the node sequence acquisition module is used to extract the operation and maintenance entity for each clause, and obtain the node sequence related to the operation and maintenance entity in the power operation and maintenance map according to the operation and maintenance entity; A score calculation module, the score calculation module is used to screen out the associated node sequence of the corresponding clause by calculating the similarity score between the clause and the node sequence, and calculate the implication score and contradiction score between the associated node sequence and the corresponding clause; An operation and maintenance plan acquisition module is used to score the reasoning path according to the similarity score, the implication score and the contradiction score to obtain a reasoning path score, re-sort the reasoning path score, and obtain a final operation and maintenance plan.
[0015] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps of the large language model power equipment operation, maintenance, and inspection method with enhanced self-consistency are implemented.
[0016] The above technical solution of the present invention has the following advantages compared with the prior art: 1. Accurate reasoning and decision support: By generating and processing reasoning paths, complex operation and maintenance problems are decomposed into multiple clauses, and in-depth analysis is performed in combination with power operation and maintenance maps, which improves the accuracy and scientificity of reasoning, can consider all aspects of the problem more comprehensively, and provide accurate decision support for operation and maintenance.
[0017] 2. Automation and intelligence: The present invention uses a large language model and a power operation and maintenance map to realize the automated processing of operation and maintenance problems. By intelligently analyzing question and answer pairs, it automatically generates reasoning paths and screens related node sequences, greatly reducing manual intervention and improving work efficiency and accuracy.
[0018] 3. Multi-dimensional scoring and optimization: By calculating the similarity score, implication score and contradiction score of the clause and node sequence, the reasoning path is scored in multiple dimensions and re-ordered to obtain the final operation and maintenance plan. This multi-dimensional scoring mechanism can comprehensively consider multiple factors and select the most reasonable and feasible operation and maintenance plan. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to make the content of the present invention more clearly understood, the present invention is further described in detail below according to specific embodiments of the present invention in conjunction with the accompanying drawings, wherein Figure 1 It is a flow chart of a large language model power equipment operation, maintenance and repair method with enhanced self-consistency provided in the first embodiment of the present invention; Figure 2 It is a specific implementation flow chart of a large language model power equipment operation and maintenance method with enhanced self-consistency provided in the first embodiment of the present invention; Figure 3 is a flow chart of a method for obtaining a node sequence provided in Embodiment 1 of the present invention; Figure 4 It is a schematic diagram of the results of generating completely correct answers using the original Self-Consistency framework (without adding the random walk strategy) and the improved ChatGLM3-6B large language model and ChatGPT3.5-turbo large language model proposed by the present invention using the Self-Consistency framework optimized by the knowledge graph (with adding the random walk strategy), where N is the number of reasoning paths; Figure 5 It is a schematic diagram of the results of generating partially correct answers using the original Self-Consistency framework (without adding the random walk strategy) and the improved ChatGLM3-6B large language model and ChatGPT3.5-turbo large language model proposed in the present invention using the Self-Consistency framework optimized by the knowledge graph (with adding the random walk strategy), where N is the number of reasoning paths; Figure 6 This is an architecture diagram of a large language model power equipment operation, maintenance and repair system with enhanced self-consistency provided in the second embodiment of the present invention; Description of the accompanying drawings in the specification: 100, reasoning path generation and segmentation module; 200, node sequence acquisition module; 300, score calculation module; 400, operation and maintenance plan acquisition module. DETAILED DESCRIPTION
[0020] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it, but the embodiments are not intended to limit the present invention. Embodiment 1
[0021] Reference Figure 1~2 As shown, the present invention provides a large language model power equipment operation and maintenance method with enhanced self-consistency, comprising the following steps: S1: Generate a reasoning path based on the question in the question-answer pair, and segment the reasoning path to obtain multiple clauses; S2: For each clause, extract the operation and maintenance entity, and obtain the node sequence related to it in the power operation and maintenance graph according to the operation and maintenance entity; S3: Filtering out the associated node sequence of the corresponding clause by calculating the similarity score between the clause and the node sequence, and calculating the implication score and the contradiction score between the associated node sequence and the corresponding clause; S4: Score the reasoning path according to the similarity score, the implication score and the contradiction score to obtain a reasoning path score, re-sort the reasoning path scores to obtain a final operation and maintenance plan.
[0022] In this embodiment, the question-answer pair is a triple data structure consisting of a question, an option set, and an answer set. Q, O, A >; Among them, Q Indicates the power operation and maintenance problems raised by users. O ={ O 1 ,O 2 ,...,O n} represents an option set, n ≥1 for each option O i It's about the problem Q A candidate answer for A ⊆ O Represents the answer set, which is the option set O A collection of one or more options that are determined to be the correct answer.
[0023] Furthermore, in S1, the method of obtaining multiple clauses is: Q One or more reasoning paths including explanation text and candidate answers are generated, and the explanation text is segmented into a plurality of clauses according to punctuation marks or stop words.
[0024] For example, the question Q for " What are the possible reasons for the transformer oil temperature to be too high? ” , option set O ={a. Cooling system failure, b. Insulation material aging, c. Transformer model mismatch, d. Ambient temperature is too low}, answer A={a, b}.
[0025] Reasoning path for option a: Explanation: The cooling system is a key part of the transformer's heat dissipation. If the cooling system fails, such as the fan stops working or the cooling medium does not flow smoothly, the heat generated inside the transformer cannot be effectively dissipated, causing the oil temperature to be too high. Therefore, option a is a possible reason for the transformer's oil temperature to be too high.
[0026] Answer choice: a Reasoning path for option b: Explanation: Insulation materials may age during long-term use, resulting in a decrease in their insulation performance. Aging of insulation materials may cause partial discharge or short circuit, which in turn generates additional heat and causes the oil temperature to rise. Therefore, option b is also a possible reason for the transformer oil temperature to be too high.
[0027] Answer choice: b Reasoning path for option c or d: Option C: After analysis, transformer model mismatch usually does not lead to excessive oil temperature, but may affect the operating efficiency or stability of the transformer. Therefore, option C is not the correct answer.
[0028] Option d: The low ambient temperature contradicts the high oil temperature because low ambient temperature usually helps dissipate heat. Therefore, option d is obviously not the correct answer.
[0029] Ultimately, the large language model will select a and b as the answers and output the reasoning paths of all options (including explanation text and answer choices).
[0030] In this embodiment, in S2, the power operation and maintenance map is a directed graph with operation and maintenance entities as nodes and the relationships between operation and maintenance entities as edges; wherein the operation and maintenance entities include power equipment information, fault information and maintenance methods, and a probability value is assigned to each edge, and the probability value serves as the confidence level of the existence of the connection relationship between the operation and maintenance entities.
[0031] like Figure 3 As shown, in step S2, for each clause, an operation and maintenance entity is extracted, and according to the operation and maintenance entity, a node sequence related to the operation and maintenance entity in the power operation and maintenance graph is obtained by a random walk algorithm, and the acquisition method includes the following steps: S21: extracting the operation and maintenance entities in each clause through the large language model, and querying on the power operation and maintenance graph based on the operation and maintenance entities, and taking each queried node as the starting node; S22: setting a random walk count for each starting node, starting from each starting node, randomly selecting the next node for walking according to the probability value of the edge in the power operation and maintenance graph; S23: During each walk, determine whether the length of the current walk path reaches the preset random walk sequence length: If not, return to S22; If so, all nodes on the walking path are recorded to form an initial node sequence, the initial node sequences corresponding to all starting nodes are merged, and duplicate nodes are eliminated through deduplication operation to obtain the final node sequence.
[0032] Further, in S21, the method of extracting the operation and maintenance entity in each clause through the large language model is: if the operation and maintenance entity exists, return the result in JSON format, the format is "{"entity":["e1","e2",...]}"; if the operation and maintenance entity does not exist, directly return {"entity":[]}.
[0033] Taking the explanation text "During transformer operation, high oil temperature may be caused by failure of the cooling system or aging of the insulation material." as an example, the explanation text is segmented according to punctuation marks or stop words, and the segmented clauses are: "during transformer operation", "high oil temperature", "may be caused by failure of the cooling system" and "or aging of the insulation material".
[0034] For the first clause "during transformer operation", since it is a general scenario description, no entity is returned; for the second clause "the oil temperature is too high", {"entity":["oil temperature"]} is returned; for the third clause "may be due to cooling system failure", {"entity":["cooling system","failure"]} is returned; for the fourth clause "or caused by aging of insulation materials", {"entity":["insulation materials","aging"]} is returned.
[0035] Furthermore, the calculation formula of the node sequence is: , in, Represents the obtained node sequence, represents the number of the reasoning path, Indicates the clause number obtained after the reasoning path is split. The number of the node sequence. Indicates the maintenance entity number extracted in the clause. Indicates the total number of operation and maintenance entities extracted in the clause; Represents a string concatenation function. represents the random walk algorithm, whose parameters Represents an entity, represents the operation and maintenance knowledge graph, represents the length of the random walk sequence; Represents a deduplication function, which is used to perform deduplication operations on repeated sequence parts.
[0036] In this embodiment, in S3, the method for filtering out the associated node sequence of the corresponding clause is as follows: S31: Each clause and multiple node sequences associated with it are converted into clauses in the form of embedded vectors and node sequences in the form of embedded vectors respectively through the sentence representation model M3E; M3E is a Chinese pre-trained sentence representation model, whose input is a text sequence and output is a 728-dimensional vector; S32: Calculate the cosine similarity scores between the clause in the embedded vector form and each node sequence in the embedded vector form respectively, and the calculation formula is: , in, For the pre-trained model M3E, For clauses, is one of the node sequences corresponding to the clause, is the cosine similarity function; S33: Sort the cosine similarity scores to obtain a sequence of associated nodes of the clauses, the calculation formula of which is: , in, is from Node sequence The sequence number of the associated node sequence selected from represents the number of the reasoning path, Indicates the clause number obtained after the reasoning path is split. The number of the node sequence. , P represents the total number of node sequences.
[0037] After obtaining the associated node sequences of multiple clauses using the above steps, the implication scores and contradiction scores between the clauses and the associated node sequences are calculated using the sentence pair implication contradiction model. The sentence pair implication contradiction model is a pre-trained model whose input is two sentence embeddings of the same dimension and whose output is two scores, namely, the implication score and the contradiction score.
[0038] Among them, the calculation formula of sentence implication and contradiction score is expressed as: , in, To pre-train the sentence pair implied contradiction model, represents the entailment score of the output, Represents the contradiction score of the output.
[0039] In this embodiment, in S4, the method for obtaining the final operation and maintenance plan is: S41: Calculate the score of each clause in the explanation text of the reasoning path according to the similarity score, implication score and contradiction score of the clause. The calculation formula is expressed as follows: , in, represents the clause score threshold, represents the contradiction score between the associated node sequence and the corresponding clause, Represents the implication score between the associated node sequence and the corresponding clause; represents a sequence of associated nodes, Representation and The corresponding clause, represents the number of the reasoning path, Indicates the clause number obtained after the reasoning path is split. The number representing the sequence of associated nodes; S42: Accumulate and sum the scores of all clauses to obtain the score of the corresponding explanation text, that is, the score of the answer in the reasoning path; S43: re-rank the scores of all answers, remove answers with scores lower than a preset threshold, and obtain the final answer, i.e., the operation and maintenance solution. Furthermore, the preset threshold in this embodiment is 0.45.
[0040] The above method was tested on the operation and maintenance question and answer dataset, which includes 1,844 high-quality question and answer pairs, including 994 single-choice questions and 850 multiple-choice questions. ChatGLM3-6B and ChatGPT3.5-turbo are two different large natural language processing models. The original Self-Consistency framework (without adding random walk strategy) and the knowledge graph optimized Self-Consistency framework proposed in the present invention (adding random walk strategy) were used to improve the ChatGLM3-6B large language model and the ChatGPT3.5-turbo large language model for comparative experiments, and the proportion of completely correct generated answers and partially correct generated answers was calculated.
[0041] exist Figure 4 and Figure 5 In the figure, the ChatGLM3-6B large language model and the ChatGPT3.5-turbo large language model based on the original Self-Consistency framework are abbreviated as SC+ChatGLM3-6B and SC+ChatGPT3.5-turbo, respectively, and the ChatGLM3-6B large language model and the ChatGPT3.5-turbo large language model optimized by the present invention are abbreviated as SCER+ChatGLM3-6B and SCER+ChatGPT3.5-turbo, respectively.
[0042] Depend on Figure 4 and Figure 5As shown in the test results, when the number of reasoning paths generated N=1, the large language model based on the original SC method and the large language model improved by the SC method (adding random walk) based on the knowledge graph optimization proposed in the present invention have equal proportions of completely correct generated answers and partially correct generated answers. At this time, the improved large language model of the present invention is equivalent to the unimproved natural language processing large model.
[0043] However, when the number of generated reasoning paths N=3, 5, and 10, the method of the present invention is significantly better than the original Self-Consistency framework. In particular, when the number of reasoning paths N=3, the method of the present invention can achieve the best effect of 34.54% in the proportion of completely correct answers generated, and when the number of reasoning paths N=10, the method of the present invention can achieve the best effect of 61.71% in the proportion of partially correct answers generated, both of which are better than the original Self-Consistency framework without integrating the operation and maintenance graph. This shows that by introducing a random walk strategy, when the number of reasoning paths is moderately increased, the model improved by the method of the present invention can more effectively explore the relevant information in the knowledge graph, thereby generating more accurate or more relevant answers for the operation and maintenance of power equipment. Embodiment 2
[0044] Based on the same inventive concept as that of the first embodiment, the present invention also provides a large language model power equipment operation and maintenance system with enhanced self-consistency, which is used to implement the steps of the large language model power equipment operation and maintenance method with enhanced self-consistency described in the first embodiment. Figure 6 As shown, the system includes the following modules: An inference path generation and segmentation module 100, wherein the inference path segmentation module 100 is used to generate an inference path based on the question in the question-answer pair, and segment the inference path to obtain a plurality of clauses; A node sequence acquisition module 200, wherein the node sequence acquisition module 200 is used to extract an operation and maintenance entity for each clause, and obtain a node sequence related to the operation and maintenance entity in the power operation and maintenance graph according to the operation and maintenance entity; A score calculation module 300, the score calculation module 300 is used to screen out the associated node sequence of the corresponding clause by calculating the similarity score between the clause and the node sequence, and calculate the implication score and the contradiction score between the associated node sequence and the corresponding clause; The operation and maintenance plan acquisition module 400 is used to score the reasoning path according to the similarity score, the implication score and the contradiction score to obtain the reasoning path score, re-sort the reasoning path score, and obtain the final operation and maintenance plan.
[0045] The present embodiment proposes a self-consistency enhanced large language model power equipment operation, maintenance and repair system, which is used to implement the aforementioned self-consistency enhanced large language model power equipment operation, maintenance and repair method. Therefore, the specific implementation method of the self-consistency enhanced large language model power equipment operation, maintenance and repair system can be seen from the embodiment part of the aforementioned self-consistency enhanced large language model power equipment operation, maintenance and repair method. For example, the reasoning path generation and segmentation module 100, the node sequence acquisition module 200, the score calculation module 300 and the operation and maintenance plan acquisition module 400 are respectively used to correspond to the steps S1, S2, S3 and S4 in the self-consistency enhanced large language model power equipment operation, maintenance and repair method in embodiment one. Therefore, its specific implementation method can refer to the description of the corresponding each part of the embodiment. In order to avoid redundancy, it will not be repeated here. Embodiment 3
[0046] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps of the large language model power equipment operation, maintenance, and inspection method with enhanced self-consistency described in Example 1 are implemented.
[0047] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0048] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0049] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0050] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0051] Obviously, the above embodiments are merely examples for clear explanation and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived from these are still within the protection scope of the invention.
Claims
1. A large language model power equipment operation and maintenance method with enhanced self-consistency, characterized in that: The following steps are involved: S1: Generate a reasoning path based on the question in the question-answer pair, and segment the reasoning path to obtain multiple clauses; S2: For each clause, extract the operation and maintenance entity, and obtain the node sequence related to it in the power operation and maintenance graph according to the operation and maintenance entity; S3: Filtering out the associated node sequence of the corresponding clause by calculating the similarity score between the clause and the node sequence, and calculating the implication score and the contradiction score between the associated node sequence and the corresponding clause; S4: Score the reasoning path according to the similarity score, the implication score and the contradiction score to obtain a reasoning path score, re-sort the reasoning path scores to obtain a final operation and maintenance plan.
2. The self-consistency enhanced large language model power equipment operation, maintenance and repair method according to claim 1 is characterized by: The question-answer pair is a triple data structure consisting of a question, an option set, and an answer set. Q, O, A >; Among them, Q Indicates the power operation and maintenance problems raised by users. O ={ O 1 ,O 2 ,...,O n } represents an option set, n ≥1 for each option O i It's about the problem Q A candidate answer for A ⊆ O Represents the answer set, which is the option set O A collection of one or more options that are determined to be the correct answer.
3. The self-consistency enhanced large language model power equipment operation, maintenance and repair method according to claim 2 is characterized by: In S1, the method to obtain multiple clauses is: Q One or more reasoning paths including explanation text and candidate answers are generated, and the explanation text is segmented into a plurality of clauses according to punctuation marks or stop words.
4. The self-consistency enhanced large language model power equipment operation, maintenance and repair method according to claim 1 is characterized by: In S2, the power operation and maintenance graph is a directed graph with operation and maintenance entities as nodes and the relationships between operation and maintenance entities as edges; wherein the operation and maintenance entities include power equipment information, fault information and maintenance methods, and a probability value is assigned to each edge, and the probability value serves as the confidence level of the connection relationship between the operation and maintenance entities.
5. The self-consistency enhanced large language model power equipment operation, maintenance and repair method according to claim 1 is characterized by: In S2, the method for obtaining the node sequence is: S21: extracting the operation and maintenance entity in each clause, and querying on the power operation and maintenance map based on the operation and maintenance entity, and taking each node found in the query as the starting node; S22: setting a random walk count for each starting node, starting from each starting node, randomly selecting the next node for walking according to the probability value of the edge in the power operation and maintenance graph; S23: During each walk, determine whether the length of the current walk path reaches the preset random walk sequence length: If not, return to S22; If so, all nodes on the walking path are recorded to form an initial node sequence, the initial node sequences corresponding to all starting nodes are merged, and duplicate nodes are eliminated through deduplication operation to obtain the final node sequence.
6. The self-consistency enhanced large language model power equipment operation, maintenance and repair method according to claim 5 is characterized by: The calculation formula of the node sequence is: , in, Represents the obtained node sequence, represents the number of the reasoning path, Indicates the clause number obtained after the reasoning path is split. The number of the node sequence. Indicates the maintenance entity number extracted in the clause. Indicates the total number of operation and maintenance entities extracted in the clause; Represents a string concatenation function. represents the random walk algorithm, whose parameters Represents an entity, represents the operation and maintenance knowledge graph, represents the length of the random walk sequence; Represents a deduplication function, which is used to perform deduplication operations on repeated sequence parts.
7. The self-consistency enhanced large language model power equipment operation, maintenance and repair method according to claim 1 is characterized by: In S3, the method for filtering out the associated node sequence of the corresponding clause is as follows: S31: convert each clause and multiple node sequences related thereto into clauses in the form of embedded vectors and node sequences in the form of embedded vectors respectively; S32: Calculate the cosine similarity scores between the clause in the embedded vector form and each node sequence in the embedded vector form respectively, and the calculation formula is: , in, For the pre-trained model M3E, For clauses, is one of the node sequences corresponding to the clause, is the cosine similarity function; S33: Sort the cosine similarity scores to obtain a sequence of associated nodes of the clauses, the calculation formula of which is: , in, is from Node sequence The sequence number of the associated node sequence selected from represents the number of the reasoning path, Indicates the clause number obtained after the reasoning path is split. The number of the node sequence. , P represents the total number of node sequences.
8. The self-consistency enhanced large language model power equipment operation, maintenance and repair method according to claim 1 is characterized by: In S4, the method for obtaining the final operation and maintenance plan is: S41: Calculate the score of each clause in the explanation text of the reasoning path according to the similarity score, implication score and contradiction score of the clause. The calculation formula is expressed as follows: , in, represents the clause score threshold, represents the contradiction score between the associated node sequence and the corresponding clause, Represents the implication score between the associated node sequence and the corresponding clause; represents a sequence of associated nodes, Representation and The corresponding clause, represents the number of the reasoning path, Indicates the clause number obtained after the reasoning path is split. The number representing the sequence of associated nodes; S42: Accumulate and sum the scores of all clauses to obtain the score of the corresponding explanation text, that is, the score of the answer in the reasoning path; S43: The scores of all the answers are re-sorted, and the answers with scores lower than a preset threshold are eliminated to obtain the final answer, i.e., the operation and maintenance plan.
9. A large language model power equipment operation and maintenance system with enhanced self-consistency, characterized in that: The steps for implementing the self-consistency enhanced large language model power equipment operation, maintenance and repair method as claimed in any one of claims 1 to 8, the system comprising the following modules: An inference path generation and segmentation module, wherein the inference path segmentation module is used to generate an inference path based on the questions in the question-answer pair, and segment the inference path to obtain a plurality of clauses; A node sequence acquisition module, the node sequence acquisition module is used to extract the operation and maintenance entity for each clause, and obtain the node sequence related to the operation and maintenance entity in the power operation and maintenance map according to the operation and maintenance entity; A score calculation module, the score calculation module is used to screen out the associated node sequence of the corresponding clause by calculating the similarity score between the clause and the node sequence, and calculate the implication score and contradiction score between the associated node sequence and the corresponding clause; An operation and maintenance plan acquisition module is used to score the reasoning path according to the similarity score, the implication score and the contradiction score to obtain a reasoning path score, re-sort the reasoning path score, and obtain a final operation and maintenance plan.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the large language model power equipment operation, maintenance and inspection method with enhanced self-consistency as described in any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Knowledge graph-based case retrieval method, device and equipment, and storage medium
CN111241241A
Target data search method based on medical knowledge graph and related equipment
CN112035511A
Multi-hop reasoning question and answer method based on cross-language knowledge graph
CN114780754A
NLP-based industry data analysis method and system
CN118070812A
Untoward drug reaction monitoring and early warning method
CN118280603A
Cited By
Text processing method and system based on large model, terminal and storage medium
CN120578765A