Power inspection method for generating work ticket based on similarity calculation

By using a method of generating work tickets based on similarity calculation and large language models, the problems of low efficiency and insufficient accuracy in issuing work tickets during power inspections are solved, automated and flexible work ticket generation is achieved, and the efficiency of power grid operation and maintenance is improved.

CN120634774AInactive Publication Date: 2025-09-12STATE GRID SHANXI ELECTRIC POWER COMPANY TAIYUAN POWER SUPPLY COMPANY

Patent Information

Application Number
CN202511130671.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-13
Publication Date
2025-09-12
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing work ticket issuance system in power inspections is inefficient and has a low degree of automation. It relies on expert rules and lacks flexibility. It cannot adapt to complex real-world ticket issuance scenarios, resulting in insufficient inspection accuracy.

Method used

A similarity calculation-based method is used to generate work tickets through semantic embedding models and large language models. By combining text similarity and graph structure similarity, detailed work content and safety measures are automatically generated, reducing the workload of manual compilation.

Benefits of technology

The efficiency and accuracy of work ticket issuance have been improved, and the generated work ticket content is dynamic and flexible, which reduces the workload of manual compilation and improves the efficiency of power grid operation and maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120634774A_ABST
    Figure CN120634774A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of electric power inspection, and particularly provides an electric power inspection method for generating a work ticket based on similarity calculation, which comprises the following steps: receiving an operation description and a maintenance range input by an inspection terminal; and according to the text similarity with the operation description, carrying out primary sorting on the historical work tickets in a historical ticket database to obtain first alternative work tickets. And according to the text similarity and the graph structure similarity with the maintenance range, carrying out secondary sorting on the first alternative work ticket to obtain a second alternative work ticket. And sorting the second alternative work ticket for three times to obtain a reference template ticket. And generating a target work ticket according to the reference template ticket and the to-be-inspected equipment, and sending the target work ticket to an inspection terminal for power inspection. According to the method, a retrieval enhancement generation framework based on a large language model is adopted, the problem of intelligent generation of the work ticket is solved, the dependence on expert knowledge is reduced, the manual compiling workload is effectively reduced, and the operation and maintenance efficiency of a power grid is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electric power inspection, and in particular to an electric power inspection method for generating a work ticket based on similarity calculation. Background Art

[0002] When specific troubleshooting or maintenance plans are implemented, power operations and maintenance personnel must issue work tickets according to established procedures. The work ticket system is a crucial system for ensuring safe production and achieving process management in the power industry, and the content of the work ticket is the core basis for carrying out operations and maintenance.

[0003] Work tickets are issued according to a pre-planned work plan and rely on professionals to manually write them based on historical tickets. In the case of massive historical tickets, word-by-word retrieval and comparison are often inefficient, and it is difficult to ensure the comprehensiveness and accuracy of the compiled content. This leads to a low level of automation in the issuance of work tickets for power inspections. The existing automation system also lacks flexibility due to its reliance on expert rules and cannot be freed from the constraints of expert knowledge. The inspection work tickets issued are not accurate enough and cannot adapt to complex real-world ticketing scenarios. Summary of the Invention

[0004] The present invention provides an electric power inspection method for generating work tickets based on similarity calculation, which at least solves the problem of low efficiency in issuing work tickets during related electric power inspections and lack of accurate work ticket basis for executing inspections.

[0005] In a first aspect, the present invention provides a method for generating a work ticket based on similarity calculation, which includes the following steps: Receive operation description and maintenance scope input from inspection terminal; Sort the historical work tickets in the historical ticket database according to the text similarity with the operation description to obtain a first candidate work ticket; performing secondary sorting on the first candidate work ticket according to the text similarity and the graph structure similarity with the maintenance scope to obtain a second candidate work ticket; The second candidate work ticket is sorted three times by a rearranger of a semantic embedding model to obtain a reference template ticket; wherein the number of the historical work ticket, the first candidate work ticket, the second candidate work ticket, and the reference template ticket decreases in sequence; A target work ticket is generated based on the reference template ticket and the equipment to be inspected, and the target work ticket is sent to the inspection terminal for power inspection; wherein, the equipment to be inspected is obtained based on the maintenance scope.

[0006] The power inspection method for generating a work ticket based on similarity calculation provided by an embodiment of the present invention sorts historical work tickets in a historical ticket database according to text similarity with the operation description, and obtains a first candidate work ticket including: Encoding the operation description into a text vector through the semantic embedding model; Calculating a vector distance between the text vector and the vector index of the historical work ticket; wherein the vector index of the historical work ticket is obtained according to the historical work plan of the historical work ticket; Calculating the text similarity based on the vector distance and sorting the text similarity from high to low; A plurality of vector indexes with higher sorting positions are selected and set as first candidate indexes, and the first candidate work ticket is obtained according to the historical work tickets corresponding to the first candidate indexes.

[0007] The power inspection method for generating a work ticket based on similarity calculation provided by an embodiment of the present invention performs secondary sorting on the first candidate work ticket based on the text similarity and the graph structure similarity with the maintenance scope, and obtains a second candidate work ticket including: Obtaining a historical maintenance scope subgraph according to the first candidate work ticket, and obtaining a historical embedding representation corresponding to the historical maintenance scope subgraph; According to the target maintenance range subgraph of the maintenance range, obtaining a target embedded representation corresponding to the target maintenance range subgraph; wherein the target maintenance range subgraph is obtained based on the nodes of the equipment to be inspected in the power grid topology graph; Calculating the cosine similarity between the historical embedding representation and the target embedding representation to obtain the graph structure similarity; A comprehensive similarity is obtained by weighted summing of the text similarity and the graph structure similarity; wherein the sum of the weight coefficients of the text similarity and the graph structure similarity is 1; According to the sorting from high to low according to the comprehensive similarity, the second candidate work ticket is obtained through several results with the highest sorting ranking.

[0008] The power inspection method for generating a work ticket based on similarity calculation provided by an embodiment of the present invention obtains a historical maintenance range subgraph according to the first candidate work ticket, and obtains a historical embedded representation corresponding to the historical maintenance range subgraph, including: Mapping the names of key nodes of the historical maintenance range subgraph into initial embedding vectors; Perform a first round of information propagation and update the initial embedding vector, aggregating the first-order neighbors of the key node to obtain an intermediate embedding vector; Perform a second round of information propagation and update the intermediate embedding vector, aggregating the second-order neighbors of the key node to obtain the final embedding vector; Average pooling is performed on the final embedding vector to obtain the historical embedding representation.

[0009] The power inspection method for generating a work ticket based on similarity calculation provided by an embodiment of the present invention sorts the second candidate work ticket three times by a rearranger of a semantic embedding model to obtain a reference template ticket including: Inputting the operation description and the second candidate work ticket into the rearranger of the semantic embedding model, and outputting a three-way sorting result; wherein the three-way sorting result includes three-way sorting scores and a sorting outputted from high to low according to the three-way sorting scores; The second candidate work ticket corresponding to the result with a higher ranking is selected as the reference template ticket; wherein, the number of the reference template tickets is preset.

[0010] The power inspection method for generating a work ticket based on similarity calculation provided by an embodiment of the present invention, wherein historical work tickets are sorted in a historical ticket database according to text similarity with the operation description, and before obtaining a first candidate work ticket, the power inspection method for generating a work ticket based on similarity calculation further includes: Converting the historical work ticket into a text format to obtain a historical work ticket text; Extracting the historical work ticket work content and historical work ticket security measures from the historical work ticket text and storing them in a format capable of data exchange; Extracting the start time and end time from the historical work ticket text, and matching the historical work plan corresponding to the historical work ticket in the work plan history table with the start time and end time; Storing the historical work plan in a format capable of data exchange, and encoding the historical work plan to obtain a vector index; The historical ticket database is established according to the storage content and the vector index; wherein the storage content includes the work content of the historical work ticket, the security measures of the historical work ticket and the historical work plan.

[0011] The power inspection method for generating a work ticket based on similarity calculation provided by an embodiment of the present invention further includes: before performing a secondary sorting of the first candidate work ticket based on the text similarity and the graph structure similarity with the maintenance scope, the power inspection method for generating a work ticket based on similarity calculation further includes: Extracting input device names from the maintenance scope, inputting the input device names into the semantic embedding model, and obtaining input device vectors; Inputting the standard device names in the device list into the semantic embedding model to obtain standard device vectors; wherein there are multiple standard device vectors, and they correspond one-to-one to the standard device names; The Euclidean distance between the input device vector and the standard device vector is calculated to obtain the device to be inspected corresponding to the input device in the inspection range.

[0012] The power inspection method for generating a work ticket based on similarity calculation provided by the embodiment of the present invention includes: generating a target work ticket based on the reference template ticket and the equipment to be inspected; Inputting the name of the device to be inspected, the reference template ticket and the preset prompt words into the large language model; Replacing the device information in the reference template ticket with the name of the device to be inspected to obtain a replacement result; The replacement result is processed according to the constraint of the prompt word, and the target work ticket work content is output by the large language model; Inputting the target work ticket work content into the large language model, and outputting the target work ticket security measures corresponding to the target work ticket work content; According to the work content and safety measures of the target work ticket, the target work ticket corresponding to the target work plan is obtained.

[0013] The power inspection method for generating a work ticket based on similarity calculation provided by the embodiment of the present invention also includes calculating a work ticket evaluation index; wherein the work ticket evaluation index includes a vocabulary level evaluation index, a full-text level evaluation index and a paragraph level evaluation index.

[0014] In a second aspect, the present invention provides an electronic device according to an embodiment, comprising: a processor, and a memory for storing a program, wherein the program comprises instructions, which, when executed by the processor, enable the processor to execute a power inspection method for generating a work ticket based on similarity calculation as described in any of the above embodiments.

[0015] The invention provides an electric power inspection method for generating work tickets based on similarity calculation, which is provided in an embodiment of the invention. A reference template ticket is selected based on an input target work plan, and a target work ticket is generated based on the reference template ticket in combination with the actual work content, equipment ledger, and the connection relationship between the equipment for electric power inspection. The invention makes use of the powerful language understanding ability of the large model without relying on expert knowledge; it adopts a generative large model method to obtain the content of the work ticket, taking into account the characteristics of each work plan, so that it can generate specific information according to the actual situation, so that the content of the work ticket obtained is dynamic, rather than relying solely on static historical information, and has high flexibility. It solves the problem of low efficiency in manually issuing work tickets, reduces the workload of manual compilation, and improves the efficiency of power grid operation and maintenance. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other embodiments can be obtained based on these drawings without inventive effort.

[0017] Figure 1 This is a flow chart of a method for generating a work ticket based on similarity calculation in an embodiment of the present invention.

[0018] Figure 2 It is a flow chart of a method for generating a work ticket based on similarity calculation in an embodiment of the present invention.

[0019] Figure 3 It is a flow chart of establishing a historical ticket database in an embodiment of the present invention.

[0020] Figure 4 It is a schematic diagram of information dissemination to key nodes in an embodiment of the present invention.

[0021] Figure 5 It is a flow chart of obtaining a reference template ticket from a historical ticket database in an embodiment of the present invention.

[0022] Figure 6 It is a schematic diagram of an implementation of a power inspection method for generating a work ticket based on similarity calculation in an embodiment of the present invention.

[0023] Figure 7 It is a structural diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0024] The following describes embodiments of the present invention in more detail with reference to the accompanying drawings. Although certain embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present invention. It should be understood that the drawings and embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of protection of the present invention.

[0025] The content of a work ticket is the core basis for conducting power inspections. It includes specific work content and corresponding safety measures to ensure personal safety. Before issuing a work ticket, power companies will develop a work plan in advance. They will issue a work ticket based on the work plan and the specific equipment wiring conditions, and then conduct power inspections based on the work ticket.

[0026] In traditional inspection tasks, the preparation and issuance of work tickets relies on experienced professionals manually drafting them based on historical work tickets. With massive amounts of historical tickets, searching and comparing them word for word is often inefficient and makes it difficult to ensure the comprehensiveness and accuracy of the content. Automated ticketing systems also rely on expert rules and lack flexibility.

[0027] Expert rules are a traditional method for generating work tickets. Some researchers have designed an expert system with a topological structure, knowledge base, and reasoning mechanism to adapt to power dispatch operations. Other researchers have adopted a similar approach, constructing the required operational content of a work ticket based on the issuance rules and graph topology. In recent years, with the development of artificial intelligence, neural network technology has become increasingly widely adopted in the field of work ticket generation. Some researchers use long-short-term memory networks to capture semantic information and construct a mapping relationship from a vocabulary to safety measures based on specific rules, thereby achieving intelligent generation of safety measures. These work ticket content generation methods often rely on pre-defined rules by experts and are essentially still based on artificial expert knowledge. This approach lacks sufficient flexibility in practical applications and is difficult to effectively cope with the complex and changing actual operation and maintenance scenarios.

[0028] Some researchers have used natural language processing techniques to leverage historical work ticket information. For example, they have employed an improved bag-of-words model to measure the similarity between historical work tickets and key equipment information using the cosine similarity between vocabulary vectors, and to search for text with high similarity in historical data as a reference description during the ticket issuance process. Some researchers have constructed a knowledge graph that includes both equipment information and work ticket information, and then extracted several reasoning paths using meta-path extraction. Finally, they have used advanced semantic matching models to filter the reasoning paths and fill in the work ticket based on this information. Other researchers have used word frequency-inverse document frequency to measure the similarity between historical tickets and current work tickets at the lexical level, retrieving records from historical tickets with a similarity above a certain threshold as the content of the current work ticket.

[0029] Invoicing methods based on historical work tickets offer certain advantages in flexibility and adaptability to complex real-world invoicing scenarios. However, these methods are not completely free from the constraints of expert knowledge, employ relatively primitive algorithms for measuring text similarity, and fail to fully account for potential discrepancies between actual conditions and historical records. When using work tickets generated using these methods for power inspections, issues such as incorrect equipment names, unclear inspection scope markings, and omitted safety measures can lead to increased on-site verification time for inspectors, delaying work progress. Misjudgments of inspection targets can even lead to missed or incorrect inspections, potentially leaving equipment vulnerable or causing serious safety incidents, disrupting power system operation and maintenance decisions.

[0030] To this end, a first embodiment of the present invention provides a method for generating work tickets based on similarity calculation. This method employs a retrieval augmented generation framework based on a large language model. Retrieval augmented generation (RAG) is a key technology for providing external knowledge to large language models. This method solves the problem of intelligently generating key information on work tickets, automatically generating detailed work content and safety measures, and reducing the workload of manual compilation.

[0031] Reference Figure 1 、 Figure 2 and Figure 6 As shown, the power inspection method for generating a work ticket based on similarity calculation provided by the first embodiment of the present invention includes the following steps.

[0032] Step S100 : receiving a target work plan Q inputted by an inspection terminal, from which an operation description C and an inspection scope B can be extracted.

[0033] The target work plan Q is set as the natural language query information input by the user. Since the natural language input by the user is often not completely standardized and usually mixes the operation description and the maintenance scope together, to solve this problem, step S100 extracts the operation description C and the maintenance scope from the target work plan Q through the Large Language Model (LLM). .

[0034] The maintenance scope B includes equipment names and / or descriptions containing equipment names, and does not only represent the physical area. B is represented as the set of input equipment names mentioned in the maintenance scope description in the target work plan Q. Corresponding to a single input device, 1≤n≤N.

[0035] As an example, refer to Figure 6As shown in the figure, "220kV Garden Substation: 110kV bypass No. 115 switch circuit, No. 1 main transformer body and three-side switch circuit" is taken as the maintenance scope B. The input names obtained after extraction are "Switch of No. 115 switch circuit, No. 1 main transformer" and the input devices respectively. .

[0036] As an implementation method, refer to Figure 6 As shown, operation description C is a brief work plan, for example, "220kV Huayuan substation: connect the CT of the 110kV bypass switch circuit No. 115 to the B protection device of the #1 main transformer and debug it; connect the protection device of the 110kV bypass switch circuit No. 115 to the A and B protection devices of the #1 main transformer after modification; fault information substation; automation and city and local dispatching coordination."

[0037] The power inspection method for generating work tickets based on similarity calculation is to query the reference template ticket closest to the target work plan Q in the historical ticket database according to the operation description C and maintenance scope B. , and then generated by the large language model. Before step S200, the power inspection method for generating a work ticket based on similarity calculation also includes a method based on historical work tickets. Establish a historical ticket database. Establishing a historical ticket database includes: Collect historical work tickets. Clean the collected historical work tickets. This includes but is not limited to removing duplicate, invalid, or incomplete work tickets, and correcting obvious spelling errors and formatting errors. After cleaning, the historical work tickets need to be formatted for easy reading and writing, and appropriate indexing needs to be constructed.

[0038] Reference Figure 3 As shown in the figure, taking the cleaned historical work ticket as an example, the process of processing it into a certain format and building an index is as follows: Convert the historical work tickets to text format to obtain the historical work ticket text. The historical work tickets are PDF files, which can be batch scanned and format converted using software tools such as PDFMiner and Adobe Acrobat DC. The obtained historical work ticket text is a plain text txt file.

[0039] The work content, safety measures, start time, and end time of the historical work tickets are extracted from the text of the historical work tickets. A variety of extraction methods can be applied to the text, such as keyword template matching, format template parsing, or natural language processing.

[0040] For the start time and end time extracted from the historical work ticket text, the start time and end time are used to match the historical work plan corresponding to the historical work ticket in the work plan history table.

[0041] On the one hand, the information in the matched historical work plan in the work plan history table is stored in a format that can be used for data exchange. At the same time, the extracted historical work ticket work content and historical work ticket safety measures are also stored in a format that can be used for data exchange.

[0042] The stored content of the historical ticket database includes, but is not limited to, the work content of historical work tickets, historical work ticket safety measures, historical work plan content, the compilation time of historical work plans, the start time of historical work plans, the end time of historical work plans, and the corresponding historical work tickets. In some embodiments, the stored content also includes power plant lines, power outage scope, historical work plan status, and historical work plan source extracted from the historical work ticket text.

[0043] On the other hand, for historical work plans matched in the work plan history table, a brief text of the historical work plan can be obtained as index information. This brief text of the historical work plan is encoded into a 1024-dimensional high-dimensional vector using the semantic embedding model (BAAI General Embedding, BGE) and used as the vector index of the historical ticket database.

[0044] A work plan may correspond to multiple work tickets at the same time. Therefore, in some embodiments, the storage content corresponding to the vector index obtained by encoding the work plan is a list consisting of at least two work tickets.

[0045] In the first embodiment of the present invention, the historical ticket database is set as the vector database ChromaDB. ChromaDB is a database used to store and manage high-dimensional vector data, supports fast vector similarity retrieval, and is suitable for scenarios such as large language model context retrieval, recommendation systems, and semantic search. ChromaDB can be used to store text information, maintaining a certain structure while facilitating subsequent information retrieval.

[0046] Next, the stored content in a format that can be used for data exchange is set to be in json format in the first embodiment of the present invention. The information is first stored in json format for each name and corresponding content, and then converted into a string that can be represented as text.

[0047] Finally, the stored content and vector index are inserted into the historical ticket database for persistent storage. The station and line names are also inserted as additional metadata attributes, allowing queries to specify the name for specific station and line work tickets. This completes the creation of the historical ticket database.

[0048] The historical ticket database includes vector index BGE (Index ( )) and the historical work tickets corresponding to the vector index ;Index( ) is a historical work ticket Index information, BGE (Index ( )) is the vector index encoded by the semantic embedding model BGE.

[0049] It should be noted that establishing a historical ticket database requires repeated processing or batch processing of a large number of historical work tickets, processing the historical work tickets into a certain readable and writable format and constructing the corresponding vector index. When generating the target work ticket, the established historical ticket database can be used directly. In order to improve the accuracy of generated work tickets, work tickets that have not been inserted into the historical ticket database can also be processed and inserted at any time to supplement and update the historical ticket database; the processing of work tickets is consistent with the processing of historical work tickets when establishing the historical ticket database, and will not be repeated here.

[0050] To address the issue of work tickets being too long and the semantic space differences between work plans and work tickets, this first embodiment uses a brief work plan as the index information for the corresponding work ticket, rather than the original content of the work ticket. Therefore, it is particularly important to process and extract the work ticket content and establish a corresponding relationship between historical work tickets and work plans. This first embodiment extracts the planned start and end times from historical work tickets to match the relationship between historical work plans and historical work tickets, and deletes historical work plans that do not meet the requirements, such as unexecuted plans.

[0051] After establishing or updating the historical ticket database, as an implementable method, this embodiment introduces the target maintenance range subgraph structural similarity as a supplementary evaluation criterion on the basis of the classic semantic similarity query framework, and uses it together with text similarity as the basis for template ticket retrieval. A three-step sorting and screening retrieval algorithm is set up: first, the historical ticket database is queried through semantic information to obtain several first candidate work ticket lists H' with the highest ranking, to achieve coarse-grained screening, and preliminarily filter out semantically similar content, thereby reducing the computational burden of subsequent sorting. Secondly, the first candidate work ticket list H' is mixedly sorted and screened in combination with graph structure similarity and text similarity to generate a new second candidate work ticket list H''. Finally, the BGE reranker is used to re-sort the second candidate work ticket list H'' to obtain the final list H''' as the reference template ticket list.

[0052] Specifically, step S200 includes, based on the text similarity with the operation description C, searching the historical work tickets in the history ticket database. Perform a sort and get the first alternative work ticket Among them, the first alternative work ticket The number of historical work tickets is less than .

[0053] As an implementable method, step S200 includes: The operation description C is encoded into a text vector BGE(C) through the semantic embedding model BGE. Figure 6 As shown, the operation description C is a brief work plan, for example, "220kV Huayuan Substation: Connect the CT of the 110kV bypass switch circuit No. 115 to the B protection device of the #1 main transformer and debug it; connect the protection device of the 110kV bypass switch circuit No. 115 to the A and B protection devices of the #1 main transformer after modification; fault information substation; automation and joint commissioning with the municipal and local dispatchers." The encoded text vector BGE(C) is schematically [-0.1, 0.12, 0.21…].

[0054] Calculate the text vector BGE (C) and the vector index BGE (Index ( )); where the vector distance is set to Euclidean distance or cosine distance.

[0055] Because the vector index contains the semantic information of the historical work plan, it forms a unified semantic space with the operation description C. Therefore, the semantic similarity between the texts can be compared using methods such as cosine similarity or Euclidean distance after encoding the operation description C into a vector using the same BGE model. Preferably, this first embodiment uses the default settings of the vector database ChromaDB, setting the vector distance to Euclidean distance, and measuring the semantic similarity between vectors using Euclidean distance.

[0056] The text similarity is calculated based on the vector distance according to the following formula; ; In the formula, the vector distance is set to Euclidean distance. The score of a ranking score is the text similarity S1. The higher the score, the better the vector index BGE (Index ( )) The higher the degree of match between the corresponding historical work ticket and operation description C.

[0057] Sort the text similarity S1 from high to low, select the top k1 vector indexes and set them as the first candidate indexes. The number k1 of the first candidate indexes is preset based on the computing resources and computing power of the model, the size of the historical ticket database, and other actual conditions. The number k1 of the first candidate indexes is less than the total number of vector indexes in the historical ticket database. The first candidate index is a part of the vector indexes selected from the historical ticket database. The first candidate work ticket is obtained based on the historical work ticket corresponding to the first candidate index. , first alternative work ticket The set is the first candidate work ticket list H'.

[0058] In step S200, the historical ticket database is queried using semantic information to initially filter out content that is semantically similar to the operation description C of the target work plan Q. This allows for coarse-grained screening and reduces the computational burden of subsequent sorting. The semantic-based sorting process in step S200 is similar to the classic vector-similarity-based retrieval enhancement generation (RAG) method. After encoding the operation description C, the historical ticket database is searched for the top k1 results with the highest textual similarity.

[0059] Related retrieval methods have problems of semantic loss and semantic gap. In the first embodiment of the present invention, the index information of the historical ticket database and the operation description C of the query performed in the historical ticket database belong to a unified semantic space, which can solve the semantic gap problem; when searching in the historical ticket database, the entire historical work ticket is used as a unit, avoiding the semantic loss caused by text segmentation.

[0060] Step S300: Based on the text similarity S1 and the graph structure similarity with the maintenance scope , for the first alternative work ticket Perform secondary sorting to obtain the second alternative work ticket .

[0061] Before step S300, the power inspection method for generating a work ticket based on similarity calculation further includes obtaining the equipment to be inspected according to the maintenance range B, and the target maintenance range subgraph corresponding to the maintenance range B. ,include: Enter the device name in the inspection range B Input semantic embedding model BGE to get input device vector .

[0062] Equipment List Standard device names in Input semantic embedding model BGE, 1≤m≤M, and get the standard device vector Among them, the standard device vector There are multiple and standard device names One to one correspondence.

[0063] For each input device vector , respectively calculate its vector with each standard device The Euclidean distance is as shown below: ; Where, Represents the Euclidean distance between two vectors; Represents the semantic vector generated by the semantic embedding model BGE. By controlling the similarity to be the largest when the Euclidean distance is the smallest, the name of each extracted input device is obtained. Corresponding equipment to be inspected .

[0064] Reference Figure 6 As shown, when entering the device name If the device name is consistent with the standard device name in the equipment list or the actual equipment record, the match is successful and it is used as the name of the device to be inspected. If the name of the equipment to be inspected is "switch of switch circuit No. 115, main transformer No. 1" and it is inconsistent with the standard equipment name in the equipment list or actual equipment ledger, the Euclidean distance calculation is used to select the best matching result to obtain the actual equipment name. The name is "Switch of switch circuit No. 115, main transformer No. 1".

[0065] After matching N input devices, the set of devices to be tested is obtained . A collection of equipment to be inspected is a subset of the device nodes V in the power grid topology, that is, .

[0066] According to the collection of equipment to be inspected Obtain the target maintenance range subgraph for the nodes in the power grid topology graph .

[0067] Specifically, the collection of devices to be inspected Equipment to be inspected is the target maintenance scope subgraph Key equipment in the target maintenance scope is also called key node. It is composed of key nodes and the connection relationship between key nodes and other related equipment. According to the power grid topology, starting from the key nodes, other affected nodes can be found along the connection relationship to help define the maintenance scope. These nodes together constitute the target maintenance scope subgraph. .

[0068] After obtaining the equipment to be inspected and the target maintenance range sub-map Then, as an implementation method, step S300 includes: Step S310: According to the first alternative work ticket Get the historical maintenance range subgraph , and obtain the historical maintenance range submap The historical embedding representation of .

[0069] Due to the first alternative work ticket The data in the data comes from the actual operation records of the power grid and the format is clear and standardized. The device name is usually mentioned directly, so the hard matching device name can be used to perform preliminary identification to obtain the first candidate work ticket. The names of the key nodes in the test are easier to obtain than the matching process of the device to be tested. According to the first alternative work ticket The extracted key nodes are used to obtain the historical maintenance range subgraph .

[0070] The historical inspection range submap The names of the key nodes in are mapped to the initial embedding vectors , where j is the historical maintenance range subgraph The index of the key node.

[0071] Perform the first round of information propagation and update the initial embedding vector , aggregate the first-order neighbors of the key nodes to obtain the intermediate embedding vector .

[0072] Perform a second round of information propagation and update the intermediate embedding vector , aggregate the second-order neighbors of the key nodes to obtain the final embedding vector By overhauling the scope subgraph in the history Two rounds of information propagation and update are performed in the process of propagating the neighbor embeddings within two hops of the key node to the key node and updating its embeddings. The rules for each update round are shown in the following formula: ; In the formula, the superscript l represents the information dissemination round, Indicates that the index is The set of neighbor nodes of the key node, is the aggregation function of neighbor node features. Drawing on the idea of ​​information propagation and aggregation from the Graph Neural Network (GNN), after two rounds of information propagation, the historical maintenance range subgraph is obtained. The final embedding vectors of all key nodes in = .

[0073] Get the history overhaul scope subgraph After embedding all nodes, repair the scope subgraph for history The key node set The final embedding vector is average pooled to obtain the historical embedding representation The average pooling process is shown in the following formula: ; Where, Represents the historical maintenance scope subgraph Key nodes The final embedding vector of .

[0074] Step S320: Obtain the target maintenance range submap The target embedding representation .

[0075] Step S320: target maintenance range sub-map Get embedded representation The process is the same as that in step S310 by the historical maintenance range sub-graph Get historical embedding representation First, define the target maintenance scope sub-graph. The key nodes included, that is, the set of equipment to be inspected Equipment to be inspected Then, the names of the key nodes are mapped to the initial embedding vectors for two rounds of information propagation and the embedding vectors are updated. The first-order neighbor information and second-order neighbor information of each key node are aggregated to obtain the final embedding vector. Through these two rounds of propagation, the embedding vector of each key node incorporates the information of its neighbors within two hops. After obtaining the final embedding vector, the final embedding vector of the key node set is average pooled to obtain the target embedding representation. , target embedding representation A submap that can reflect the target maintenance scope The topological structure and device association characteristics of the average pooling process are shown in the following formula: ; Where, Represents the target maintenance scope subgraph Key nodes The final embedding vector of . The two rounds of information propagation and update refer to Figure 4 As shown, the arrows indicate the direction of information propagation. Figure 4 middle Represents the target maintenance scope subgraph Key nodes The final embedding vector of Figure 4 middle Represents the target maintenance scope subgraph Key nodes The final embedding vector of .

[0076] Step S330: Calculate graph structure similarity According to the historical embedding representation obtained in step S310 and the target embedding representation obtained in step S320 The cosine similarity of the two graph structures is obtained. .

[0077] .

[0078] Step S340: Compare the text similarity S1 obtained in step S200 with the graph structure similarity obtained in step S330. The weighted sum is used to obtain the comprehensive similarity S2.

[0079] ; Where, is the weight parameter of text similarity S1, is the graph structure similarity The weight parameter satisfies the text similarity S1 and graph structure similarity. The sum of the weights is 1, .

[0080] Sort by comprehensive similarity S2 from high to low, and get the second candidate work ticket by sorting the top k2 results Second alternative work ticket The number k2 is less than the first alternative work ticket The number k1, the second alternative work ticket It is a part of the first candidate work ticket list H', the second candidate work ticket The set is the second alternative work ticket list H''.

[0081] Step S400: The second candidate work ticket is sorted by the semantic embedding model BGE reranker. Perform three sortings to obtain reference template tickets Step S400 includes: Operation Description C and the second alternative work ticket Index information Input the semantic embedding model BGE reranker and output the three-level ranking result. The three-level ranking result includes the three-level ranking score S3 and the ranking output from high to low according to the three-level ranking score S3. The calculation of the three-level ranking score S3 refers to the following formula: ; Where H'' is k2 second alternative work tickets List of second alternative work tickets. Second alternative work ticket Index information.

[0082] Next, according to the three ranking scores S3, the second candidate work ticket corresponding to the top k3 index information is selected. Template ticket for reference . Reference template ticket The number k3 is preset. In some embodiments, k3=1. In some embodiments, k3 can also be set according to other actual needs, and refer to the template ticket. The number of alternative work tickets is less than the second alternative work ticket , k3<k2. Step S400 queries the reference template ticket obtained The second candidate work ticket is screened out in step S300 Further screening was performed on the basis of .

[0083] On the basis of step S300, a stronger BGE reranker is further used to rerank the second candidate work ticket in the second candidate work ticket list H''. Perform more refined sorting. BGE reranker uses an end-to-end approach to directly output the three-level ranking score S3, which represents the similarity score between texts. After additional training, BGE reranker has a higher ability in measuring text similarity. Figure 5 As shown in Figure 2, the data accuracy of the three-order ranking score S3 is greater than the comprehensive similarity S2 of the second-order ranking. The collection is the reference template ticket list H''', the reference template ticket It will be used as important template information in the generation of target work tickets.

[0084] Compared with the method of calculating similarity by Euclidean distance, BGE reranker has a higher computational overhead. For example, when calculating the similarity between two texts in a paragraph, the method of calculating similarity by Euclidean distance requires calling the model a times, while using BGE reranker requires calling the model Therefore, to strike a balance between performance and overhead, the first embodiment of the present invention uses steps S200 and S300 to perform a two-step screening. First, a semantic coarse sorting is performed to significantly narrow the scope, and then a secondary sorting is performed in combination with graph structure similarity weighting. Finally, a tertiary sorting is performed using the BGE reranker to ensure that the computing resources of the high-performance model are concentrated on the core content.

[0085] Step S500: Based on the reference template ticket Generate a target work ticket for the equipment to be inspected, and send the target work ticket to the inspection terminal for power inspection.

[0086] As an implementable method, step S500 includes: The name of the device to be inspected, the reference template ticket obtained in step S400 The preset appropriate prompt word is input into the large language model (LLM). The large language model (LLM) can be set to GPT-4 Turbo, Wenxin Yiyan, etc. In addition, the associated device information involved in the operation description C is also provided to the large language model in the form of context information.

[0087] Using the deep semantic understanding capability of the large language model LLM, the reference template ticket The dynamic information such as the equipment information and operation location in the system is intelligently replaced with the name of the equipment to be inspected to obtain the replacement result.

[0088] The replacement results are processed according to the prompt word constraints. To address the problem of too long work ticket content, appropriate prompt words are designed and the large language model LLM is used to output the target work ticket content.

[0089] The target work order content is input into the large language model again, and the target work order safety measures corresponding to the target work order content are output in combination with the prompt words. The target work order content and safety measures are generated step by step.

[0090] A target work ticket is obtained based on the work content and safety measures of the target work ticket obtained step by step. The target work ticket is a work ticket generated by the power inspection method for generating a work ticket based on similarity calculation according to the target work plan Q provided in the first embodiment of the present invention. The target work ticket is sent to the inspection terminal for power inspection.

[0091] The power inspection method for generating a work ticket based on similarity calculation provided by the first embodiment of the present invention refers to the template ticket. Constraints on the names of the devices to be tested prevent the large language model (LLM) from outputting seemingly correct but actually incorrect "hallucination" answers. See the template ticket for details. It also provides guidance for the generation of target work tickets, enabling the large language model (LLM) to be better utilized in the power field.

[0092] The power inspection method for generating work tickets based on similarity calculation provided by the first embodiment of the present invention takes into account the characteristics of each work plan and can generate specific target work ticket information based on actual conditions. The content of the target work ticket obtained is dynamic, avoiding the low reliability of work ticket generation caused by using only static historical information. In addition, in the first embodiment of the present invention, both the index of the historical ticket database and the query used in the historical ticket database are work plans. The historical work plan and the target work plan C belong to a unified semantic space, which can solve the semantic gap problem; when searching in the historical ticket database, the entire historical work ticket is used as a unit, avoiding the semantic loss caused by text segmentation.

[0093] In the first embodiment of the present invention, the power inspection method for generating a work ticket based on similarity calculation further includes calculating a work ticket evaluation index, and evaluating the reliability of the work ticket generation result by using the work ticket evaluation index.

[0094] Specifically, the work ticket evaluation indicators include vocabulary level evaluation indicators, full text level evaluation indicators and paragraph level evaluation indicators.

[0095] It should be noted that the work ticket evaluation index is calculated based on the standard answer Y and the generated content X obtained by the work ticket generation method based on retrieval enhancement generation.

[0096] In some implementations, a portion of historical work tickets is used to establish a historical ticket database, while the remaining historical work tickets are not used to establish the historical ticket database, but are used to calculate work ticket evaluation indicators. In this case, the historical work tickets that were not included in the historical ticket database establishment are used as standard answer Y, and the work tickets generated using the method provided in Example 1 of the present invention from the historical work tickets that were not included in the historical ticket database establishment are used as generated content X.

[0097] In other embodiments, the target work ticket obtained in step S500 of Example 1 of the present invention is used as the generated content X, and the work ticket actually issued in Example 1 of the present invention according to the target work plan C in a manually compiled manner or other relevant existing methods is used as the standard answer Y.

[0098] Furthermore, the vocabulary level evaluation index uses Bertscore to measure the vocabulary level similarity between the standard answer Y and the generated content X. First, the generated content X and the standard answer Y are segmented, and the hidden layer representation of each word is obtained through the Bidirectional Encoder Representations from Transformers (BERT) model. Then, for each word in the generated content X, , calculate its difference with each word in the standard answer Y Cosine similarity of , take the maximum value as the matching score of the word, and finally take the average of the matching scores of all words to get the precision P of the word in the generated content X BERT , precision P BERT Refer to the following formula for calculation: .

[0099] For each word in the standard answer Y , calculate the average of the maximum similarity between it and all words in the generated content X, and get the recall rate R BERT , recall rate R BERT Refer to the following formula for calculation: .

[0100] Based on the accuracy P BERT and recall R BERT The final score of BertScore is calculated by the F1 score formula, as shown below: .

[0101] The F1 score is the harmonic mean of the precision P BERT and recall R BERT This fusion effectively balances the model's ability to identify correct results and its ability to cover all correct results. An F1 score closer to 1 indicates better performance, while accurately identifying correct results while also covering as many correct results as possible. A lower F1 score indicates deficiencies in recognition accuracy or result completeness, requiring further improvement through parameter adjustment and optimization of the historical ticket database.

[0102] For the full-text level evaluation index, the SentenceBERT model (Sentence Embeddings using Siamese and Triplet BERT Networks, SentenceBERT) is used to directly measure the similarity between the generated content X and the standard answer Y. The full-text level evaluation index is .

[0103] For paragraph-level evaluation indicators, since work content and safety measures are usually stated in segmented form, with each segment representing an independent operation or content, paragraph-level similarity assessment can more clearly reflect the structural and semantic consistency between the generated content X and the standard answer Y.

[0104] The SentenceBERT model is also used in the calculation of paragraph-level evaluation indicators. For each paragraph of generated content X and standard answer Y, the SentenceBERT model is used to calculate the cosine similarity between the two paragraphs, and the cosine similarity is obtained. .

[0105] Find the maximum similarity between each paragraph of the generated content X and the paragraph in the standard answer Y, take the average value, and calculate the paragraph-level accuracy P BERT '. At the same time, perform the same operation on each paragraph in the standard answer Y to obtain the recall rate R BERT '. Based on the accuracy P BERT ' and recall R BERT ', we can further use the F1 score to measure the comprehensive similarity at the paragraph level. Refer to the following formula: ; ; .

[0106] The closer the F1' value is to 1, the better the performance is, indicating that it can cover all correct content as much as possible while accurately identifying the correct results; conversely, it means that there are deficiencies in recognition accuracy or result completeness, and further improvement is needed by adjusting parameters, optimizing the historical ticket database, etc.

[0107] The effectiveness of the method proposed in this project can be objectively and comprehensively measured by calculating vocabulary-level evaluation indicators, full-text-level evaluation indicators, and paragraph-level evaluation indicators.

[0108] Table 1 below shows the calculation results of work ticket evaluation indicators for the power inspection method for generating work tickets based on similarity calculation and the related RAG method for generating work tickets provided in Example 1 of the present invention.

[0109] Table 1

[0110] As shown in Table 1, when evaluating the generation of work content, the vocabulary level evaluation index between the generated content X and the standard answer Y is W1, the full text level evaluation index is W2, and the paragraph level evaluation index is W3. When evaluating the generation of safety measures, the vocabulary level evaluation index between the generated content X and the standard answer Y is A1, the full text level evaluation index is A2, and the paragraph level evaluation index is A3. According to the power inspection method for generating work tickets based on similarity calculation in Example 1 of the present invention, the generated work content and safety measures have significantly improved evaluation indicators compared with the relevant RAG method, and the generated content is closer to the standard answer. The accuracy and reliability of work tickets issued by the method in Example 1 are higher.

[0111] The core of the RAG framework is the retrieval algorithm, which optimizes stored content and indexes before retrieval. RAG's classic information storage approach involves segmenting documents into fixed-size chunks and using the embedding vectors of the chunk's content as indexes. However, this can lead to issues such as semantic fragmentation and noise.

[0112] Sarthi et al. proposed a Raptor method that constructs text structures into a tree-like index, enabling hierarchical search and, to a certain extent, abstraction and summarization. Gutiérrez et al. proposed a retrieval framework called HippoRAG, which mimics the memory mechanism of the human hippocampus to construct a knowledge graph for documents. The graph structure and related entities appearing in the document serve as another measure of similarity between documents and queries. The Microsoft team proposed the GraphRAG method, which constructs the original document into a knowledge graph to remove redundant information. By dividing the original document into subgraphs and using the content of each subgraph to answer questions, the large model's answers have a certain "global" perspective.

[0113] Optimization of information queries is also one of the important optimization directions of RAG technology, and one of the ideas is to optimize the quality of queries. Gao et al. proposed a method called HyDE, which generates a hypothetical answer to the query and uses it as a new query to reduce the semantic differences between the data and the question. Peng et al. proposed the BEQUE framework, which allows the large language model to generate a query based on the original query for subsequent retrieval to solve the semantic matching problem of long-tail queries in e-commerce searches and improve retrieval results. When faced with complex problems, Shao et al. proposed the ITER-RETGEN method, which uses a multi-round retrieval generation iterative method to continuously optimize the query quality. After each round, the newly generated text and query are merged to form a new query, and new semantics are continuously added to the query in the hope that the query will get closer and closer to the semantics of the query.

[0114] Although retrieval-enhanced RAG generation has been explored in different directions, in the work ticket generation task in the field of power inspection, using retrieval-enhanced RAG generation to assist in work ticket generation may split the overly long work ticket text, resulting in semantic loss and single query results. When issuing a work ticket based on the work plan, there is a semantic gap between the semantics of the work plan and the work content on the work ticket, which is difficult to resolve.

[0115] The power inspection method for generating work tickets based on similarity calculation provided in the first embodiment of the present invention solves the problems of semantic loss and semantic gap in existing automation methods. The index information of the historical ticket database and the target work plan of the query performed in the historical ticket database are both work plans, belonging to a unified semantic space, which can solve the semantic gap problem; when searching in the historical ticket database, the entire historical work ticket is used as a unit, avoiding the semantic loss caused by text segmentation.

[0116] The power inspection method for generating work tickets based on similarity calculation provided in the first embodiment of the present invention selects a reference template ticket based on an input target work plan according to appropriate standards, and generates actual work ticket content including work content and safety measures information based on the reference template ticket in combination with the actual work content, equipment ledger and the connection relationship between the equipment. This method, with the help of the powerful language understanding ability given by the massive parameters of the large model, can generate the current work ticket content based on the template information and the actual situation, without the need to query the vast amount of expert knowledge, thereby reducing the dependence on expert knowledge. At the same time, the generative large model method is used to obtain the work ticket content, taking into account the characteristics of each work plan, so that it can generate specific information based on the actual situation, so that the obtained work ticket content is dynamic, rather than relying solely on static historical information, and has high flexibility. Moreover, since historical tickets are used as templates, and equipment ledgers, topology maps and other information are used in the template retrieval and content generation process, full exploration and utilization of information in the power field are achieved.

[0117] A second embodiment of the present invention provides a non-transitory machine-readable medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the power inspection method for generating a work ticket based on similarity calculation according to the above-mentioned embodiment one.

[0118] The third embodiment of the present invention provides an electronic device, comprising: a processor, and a memory for storing a program, wherein the program comprises instructions, which, when executed by the processor, enable the processor to execute the power inspection method for generating a work ticket based on similarity calculation according to the above-mentioned embodiment one.

[0119] refer to Figure 7 Shown are examples of hardware devices that can be applied to various aspects of the present invention. Electronic devices are intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0120] like Figure 7As shown, the electronic device includes a computing unit 101, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 102 or a computer program loaded from a storage unit 108 into a random access memory (RAM) 103. RAM 103 may also store various programs and data required for the operation of the electronic device. Computing unit 101, ROM 102, and RAM 103 are interconnected via a bus 104. An input / output (I / O) interface 105 is also connected to bus 104.

[0121] Multiple components in the electronic device are connected to the I / O interface 105, including: an input unit 106, an output unit 107, a storage unit 108, and a communication unit 109. The input unit 106 can be any type of device capable of inputting information into the electronic device. The input unit 106 can receive input digital or character information and generate key signal inputs related to user settings and / or function control of the electronic device. The output unit 107 can be any type of device capable of presenting information and can include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 108 can include, but is not limited to, a magnetic disk and an optical disk. The communication unit 109 allows the electronic device to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks, and can include, but is not limited to, a modem, a network card, an infrared communication device, and / or a wireless communication transceiver, such as a Bluetooth device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.

[0122] The computing unit 101 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the computing unit 101 include, but are not limited to, a CPU, a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing units, various computing units that run machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 101 performs the various methods and processes described above. For example, in some embodiments, the method embodiments of the present invention may be implemented as a computer program tangibly embodied in a machine-readable medium, such as a storage unit 108. In some embodiments, part or all of the computer program may be loaded and / or installed onto the electronic device via the ROM 102 and / or the communication unit 109. In some embodiments, the computing unit 101 may be configured to perform the above-described methods by any other suitable means (e.g., via firmware).

[0123] The computer programs for implementing the methods of the embodiments of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0124] In the context of the present invention, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable signal medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, or infrared system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fibers, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0125] It should be noted that the term "including" and its variations used in the embodiments of the present invention are open inclusions, that is, "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments". The modifications of "one" and "multiple" mentioned in the embodiments of the present invention are illustrative and not restrictive. Those skilled in the art should understand that unless the context clearly indicates otherwise, they should be understood as "one or more".

[0126] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the embodiments of the present invention are all information and data authorized by the user or fully authorized by all parties, and corresponding operation entrances are provided for the user to choose to authorize or reject.

[0127] The various steps described in the method implementation methods provided by the embodiments of the present invention may be performed in different orders and / or in parallel. In addition, the method implementation methods may include additional steps and / or omit the steps shown. The scope of protection of the present invention is not limited in this respect.

[0128] The term "embodiment" in this specification refers to specific features, structures or characteristics described in conjunction with the embodiment that can be included in at least one embodiment of the present invention. The appearance of this phrase in various places in the specification does not necessarily mean the same embodiment, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. The various embodiments in this specification are described in a related manner, and the same or similar parts between the various embodiments are referenced to each other. In particular, for the device, equipment, and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts refer to the partial description of the method embodiment.

[0129] The above-described embodiments merely represent several implementation methods of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of protection. It should be noted that a person of ordinary skill in the art would be able to make various modifications and improvements without departing from the scope of the present invention, all of which fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be determined by the appended claims.

Claims

1. A method for generating a work ticket based on similarity calculation for electric power inspection, characterized in that: The following steps are involved: Receive operation description and maintenance scope input from inspection terminal; Sort the historical work tickets in the historical ticket database according to the text similarity with the operation description to obtain a first candidate work ticket; performing secondary sorting on the first candidate work ticket according to the text similarity and the graph structure similarity with the maintenance scope to obtain a second candidate work ticket; The second candidate work ticket is sorted three times by a rearranger of a semantic embedding model to obtain a reference template ticket; wherein the number of the historical work ticket, the first candidate work ticket, the second candidate work ticket, and the reference template ticket decreases in sequence; A target work ticket is generated based on the reference template ticket and the equipment to be inspected, and the target work ticket is sent to the inspection terminal for power inspection; wherein, the equipment to be inspected is obtained based on the maintenance scope.

2. The power inspection method for generating a work ticket based on similarity calculation according to claim 1, characterized in that: According to the text similarity with the operation description, the historical work tickets are sorted in the historical ticket database, and the first candidate work tickets are obtained, including: Encoding the operation description into a text vector through the semantic embedding model; Calculating a vector distance between the text vector and the vector index of the historical work ticket; wherein the vector index of the historical work ticket is obtained according to the historical work plan of the historical work ticket; Calculating the text similarity based on the vector distance and sorting the text similarity from high to low; A plurality of vector indexes with higher sorting positions are selected and set as first candidate indexes, and the first candidate work ticket is obtained according to the historical work tickets corresponding to the first candidate indexes.

3. The power inspection method for generating a work ticket based on similarity calculation according to claim 1, characterized in that: The first candidate work tickets are sorted again based on the text similarity and the graph structure similarity with the maintenance scope to obtain a second candidate work ticket including: Obtaining a historical maintenance scope subgraph according to the first candidate work ticket, and obtaining a historical embedding representation corresponding to the historical maintenance scope subgraph; According to the target maintenance range subgraph of the maintenance range, obtaining a target embedded representation corresponding to the target maintenance range subgraph; wherein the target maintenance range subgraph is obtained based on the nodes of the equipment to be inspected in the power grid topology graph; Calculating the cosine similarity between the historical embedding representation and the target embedding representation to obtain the graph structure similarity; A comprehensive similarity is obtained by weighted summing of the text similarity and the graph structure similarity; wherein the sum of the weight coefficients of the text similarity and the graph structure similarity is 1; According to the sorting from high to low according to the comprehensive similarity, the second candidate work ticket is obtained through several results with the highest sorting ranking.

4. The power inspection method for generating a work ticket based on similarity calculation according to claim 3, characterized in that: Obtaining a historical maintenance scope subgraph according to the first candidate work ticket, and obtaining a historical embedded representation corresponding to the historical maintenance scope subgraph includes: Mapping the names of key nodes of the historical maintenance range subgraph into initial embedding vectors; Perform a first round of information propagation and update the initial embedding vector, aggregating the first-order neighbors of the key node to obtain an intermediate embedding vector; Perform a second round of information propagation and update the intermediate embedding vector, aggregating the second-order neighbors of the key node to obtain the final embedding vector; Average pooling is performed on the final embedding vector to obtain the historical embedding representation.

5. The power inspection method for generating a work ticket based on similarity calculation according to claim 1, characterized in that: The second candidate work ticket is sorted three times by the rearranger of the semantic embedding model, and the reference template ticket obtained includes: Inputting the operation description and the second candidate work ticket into the rearranger of the semantic embedding model, and outputting a three-way sorting result; wherein the three-way sorting result includes three-way sorting scores and a sorting outputted from high to low according to the three-way sorting scores; The second candidate work ticket corresponding to the result with a higher ranking is selected as the reference template ticket; wherein, the number of the reference template tickets is preset.

6. The power inspection method for generating a work ticket based on similarity calculation according to claim 1, characterized in that: According to the text similarity with the operation description, the historical work tickets are sorted in the history ticket database to obtain the first candidate work ticket. The power inspection method for generating the work ticket based on similarity calculation further includes: Converting the historical work ticket into a text format to obtain a historical work ticket text; Extracting the historical work ticket work content and historical work ticket security measures from the historical work ticket text and storing them in a format capable of data exchange; Extracting the start time and end time from the historical work ticket text, and matching the historical work plan corresponding to the historical work ticket in the work plan history table with the start time and end time; Storing the historical work plan in a format capable of data exchange, and encoding the historical work plan to obtain a vector index; The historical ticket database is established according to the storage content and the vector index; wherein the storage content includes the work content of the historical work ticket, the security measures of the historical work ticket and the historical work plan.

7. The power inspection method for generating a work ticket based on similarity calculation according to claim 1, characterized in that: Before performing secondary sorting on the first candidate work tickets based on the text similarity and the graph structure similarity with the maintenance scope, the power inspection method for generating work tickets based on similarity calculation further includes: Extracting input device names from the maintenance scope, inputting the input device names into the semantic embedding model, and obtaining input device vectors; Inputting the standard device names in the device list into the semantic embedding model to obtain standard device vectors; wherein there are multiple standard device vectors, and they correspond one-to-one to the standard device names; The Euclidean distance between the input device vector and the standard device vector is calculated to obtain the device to be inspected corresponding to the input device in the inspection range.

8. The power inspection method for generating a work ticket based on similarity calculation according to claim 1, characterized in that: Generating a target work ticket based on the reference template ticket and the equipment to be inspected includes: Inputting the name of the device to be inspected, the reference template ticket and the preset prompt words into the large language model; Replacing the device information in the reference template ticket with the name of the device to be inspected to obtain a replacement result; The replacement result is processed according to the constraint of the prompt word, and the target work ticket work content is output by the large language model; Inputting the target work ticket work content into the large language model, and outputting the target work ticket security measures corresponding to the target work ticket work content; According to the work content and safety measures of the target work ticket, the target work ticket corresponding to the target work plan is obtained.

9. The power inspection method for generating a work ticket based on similarity calculation according to claim 1, characterized in that: It also includes calculating work ticket evaluation indicators; wherein the work ticket evaluation indicators include vocabulary level evaluation indicators, full text level evaluation indicators and paragraph level evaluation indicators.

10. An electronic device comprising: A processor and a memory storing a program, characterized in that the program includes instructions, which, when executed by the processor, enable the processor to execute the power inspection method for generating a work ticket based on similarity calculation according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Similarity matching method and device for work tickets

    CN110399463A

  • Electric power safety measure ticket checking method and related device

    CN118070798A

  • Knowledge question-answering system based on large language model

    CN119396975A

  • Power grid work ticket automatic generation method, terminal device and storage medium

    CN120450396A

Cited By

  • Electrical work ticket intelligent generation method and device, medium and equipment

    CN120911429A

  • Intelligent generation method of power grid maintenance work ticket and electronic equipment

    CN121366058A