A method for automatically generating power grid work tickets, terminal equipment and storage medium

By combining multimodal data processing and a visual adapter, the limitations of information integration in the generation of power grid work orders are solved, enabling more efficient and accurate automatic generation of work orders that can adapt to complex power grid scenarios.

CN120450396BActive Publication Date: 2025-11-14XIAMEN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510953545.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-11
Publication Date
2025-11-14
Estimated Expiration
2045-07-11

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively integrate multimodal information in power grid work order generation, resulting in monotonous generated content that is difficult to adapt to complex power grid scenarios. Existing methods also have limitations in cross-data type reasoning and dynamic adaptability.

Method used

By employing multimodal data processing technology, combining text-to-graphic mapping and visual adapters, and using subgraph-assisted retrieval and caching models, text, image, and graphic topology data are integrated to generate work tickets.

Benefits of technology

It improves the automation level and accuracy of power grid work order generation, better adapts to complex power grid structures, and enhances the relevance of generated content to actual needs and generation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120450396B_ABST
    Figure CN120450396B_ABST
Patent Text Reader

Abstract

This invention relates to a method, terminal device, and storage medium for automatically generating power grid work orders. The method includes: constructing a weekly plan corresponding to the work order to be generated; extracting subgraphs of the weekly plan and each historical work order, and then calculating the subgraph similarity between the weekly plan and each historical work order; calculating a comprehensive similarity by combining semantic similarity, and extracting the historical work order with the highest comprehensive similarity; collecting K images of each type of equipment to form a training image set and recording the category labels; obtaining the visual feature matrix and one-hot encoded label matrix of the training image set; using the images in the weekly plan as test images and extracting visual features; constructing a visual adapter and predicting the category of each test image; and using the weekly plan, the extracted historical work orders, and the categories predicted by the visual adapter as query input to a large language model to obtain the work order corresponding to the weekly plan. This invention can effectively integrate information from different modalities to complete the work order generation task.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power grid technology, and in particular to a method for automatically generating power grid work tickets, a terminal device, and a storage medium. Background Technology

[0002] In power grid operation, work permits are crucial for guiding the inspection, maintenance, and construction of electrical equipment. However, traditional manual work permit issuance methods are inefficient, error-prone, and highly dependent on personnel expertise. To automate this process, researchers have explored Large Language Models (LLMs) and Retrieval Augmentation (RAG) techniques. Specifically, given input text, a retrieval engine extracts relevant documents from external storage, and a generator produces predictions based on the retrieved documents. However, these retrieval augmentation methods were initially designed for text, and extending them to multimodal environments remains a challenging open problem. Furthermore, these techniques still face challenges in cross-data type reasoning, limited document quality, and dynamic adaptability.

[0003] Over the years, the methods for generating power grid work tickets have undergone significant changes, mainly falling into two categories: rule-based generation and deep learning generation based on neural networks.

[0004] Rule-based generation relies on predefined rules and processes to create work tickets. Expert rules play a crucial role in this approach, drawing on the experience and knowledge of power system experts. For example, there have been expert systems designed to address network topology, knowledge bases, and inference mechanisms for power system dispatch operations. Furthermore, other rule-based methods propose building comprehensive knowledge bases, including applying association rule algorithms to mine historical ticketing information. However, these methods are cumbersome and highly specialized, often requiring adjustments for implementation in different environments.

[0005] Neural network-based generation automatically generates operation tickets using historical and online power grid data. This method employs big data analytics and deep learning techniques to improve the efficiency and accuracy of ticket generation. For example, one study introduced a real-time dispatching system integrating big data and artificial intelligence for automation and intelligence. Another study demonstrated the feasibility of generating dispatch operation tickets based on artificial intelligence by analyzing power system operation and monitoring processes. To improve the efficiency of operation ticket verification, researchers constructed a model based on the CNN-BiGRU attention mechanism. Recently, more research has focused on using graph-based deep learning and text generation models (such as GATv2 and ERNIE models) to generate power grid equipment startup procedures end-to-end. Although current neural network-based methods typically modify existing rules, no method has yet been able to generate operation tickets using other multimodal information from the power grid (such as images, equipment topology, and time-series data). The potential for end-to-end generation using historical and online multimodal data remains a promising research direction. Summary of the Invention

[0006] To address the aforementioned problems, this invention proposes a method for automatically generating power grid work tickets, a terminal device, and a storage medium.

[0007] The specific plan is as follows:

[0008] A method for automatically generating power grid work tickets includes the following steps:

[0009] S1: Construct the weekly plan corresponding to the work order to be generated. The weekly plan includes a brief description of the work content, the power outage area, and a set of images of the equipment that needs to be maintained.

[0010] S2: Based on the power outage range of the weekly plan and the power outage range of each historical work order, extract the corresponding sub-graphs respectively, and then calculate the sub-graph similarity between the weekly plan and each historical work order based on the sub-graphs of the weekly plan and each historical work order.

[0011] S3: Based on the brief description of the weekly plan and the scope of the power outage, calculate the semantic similarity between the weekly plan and each historical work order;

[0012] S4: Weight the subgraph similarity and semantic similarity to obtain the comprehensive similarity between the weekly plan and each historical work order, and extract the historical work order with the highest comprehensive similarity.

[0013] S5: Collect K images from each type of device to form a training image set, and record the category label of each image in the training image set;

[0014] S6: Extract visual features from each image in the training image set to obtain a visual feature matrix composed of the visual features of each image. Simultaneously, one-hot encoding is performed on the category labels of each image in the training image set to obtain a one-hot encoded label matrix composed of the one-hot encodings of each image. ;

[0015] S7: Use each image in the weekly plan's image set as a test image and extract visual features to obtain the feature vector of each test image. ;

[0016] S8: Construct a visual adapter to adapt to the feature vector of the test image. Visual feature matrix of the training image set One-hot encoded tag matrix Predict the category of the test image using the following formula. :

[0017]

[0018]

[0019] in, This represents the weight of the module to which the visual feature extraction belongs; T represents the transpose of the matrix; Indicates the residual ratio; Represents the affinity matrix; γ represents the tuning hyperparameters; Represents an exponential function;

[0020] S9: By taking the weekly plan, the extracted historical work tickets, and the categories of each test image predicted by the visual adapter as the query input to the large language model, the work tickets corresponding to the weekly plan are obtained.

[0021] Furthermore, the subgraph extraction process includes:

[0022] Collect the wiring diagram of the main equipment and convert it into a heterogeneous undirected graph G;

[0023] Calculate the similarity between the power outage area and the name of each node in graph G, and extract all nodes in graph G with similarity greater than the similarity threshold as key nodes to form a key node set;

[0024] Extract a subgraph from the set of key nodes, such that each node in the subgraph is within two hops of any node in the set of key nodes, and that the node belongs to a different type than any node in the set of key nodes.

[0025] Furthermore, the subgraph similarity is a weighted sum of the degree similarity of key nodes, the similarity of node types, and the similarity of the number of nodes of the same type between subgraphs.

[0026] Furthermore, the method for calculating the degree similarity of key nodes is as follows:

[0027] Extract all key nodes in each subgraph and calculate the degree of each key node. Arrange the degree values ​​of all key nodes in each subgraph in a fixed order to form a numerical sequence as the degree vector of each subgraph.

[0028] The cosine similarity of the degree vectors of two subgraphs is used as the degree similarity of the key nodes between the two subgraphs.

[0029] Furthermore, the similarity of node types is calculated as the ratio of the number of node types contained in the intersection of the node type sets contained in the two subgraphs to the number of node types contained in the union of the node type sets contained in the two subgraphs.

[0030] Furthermore, the similarity in the number of nodes of the same type The calculation formula is as follows:

[0031]

[0032] in, and These represent the number of nodes of type i in the two subgraphs, respectively. This indicates taking the absolute value, where i represents the node type. This represents the collection of all node types.

[0033] Furthermore, visual feature extraction is performed using a pre-trained CLIP model.

[0034] Furthermore, it also includes the obtained visual feature matrix Fine-tuning is performed to minimize the difference between the predicted category of the test image output by the vision adapter and the true category of the test image.

[0035] A terminal device for automatically generating power grid work tickets includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the method described above in the embodiments of the present invention.

[0036] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method described above in the embodiments of the present invention.

[0037] The present invention adopts the above technical solution, which can effectively integrate information from different modalities to complete the work ticket generation task. Attached Figure Description

[0038] Figure 1 The diagram shown is a flowchart of a method according to an embodiment of the present invention. Detailed Implementation

[0039] To further illustrate the various embodiments, the present invention provides accompanying drawings. These drawings are part of the disclosure of the present invention, primarily used to illustrate the embodiments, and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these drawings, those skilled in the art should be able to understand other possible implementations and the advantages of the present invention.

[0040] The present invention will now be further described in conjunction with the accompanying drawings and specific embodiments.

[0041] Example 1:

[0042] This invention provides a method for automatically generating power grid work tickets, such as... Figure 1 As shown, the method includes the following steps:

[0043] S1: Construct the weekly plan corresponding to the work tickets to be generated.

[0044] To ensure the safe and reliable operation of power grid equipment while minimizing the impact on users' electricity consumption, the power grid develops a detailed weekly outage operation plan one week in advance. Each work order corresponds to a specific weekly plan. If we consider the weekly plan as a query and the corresponding work order as the answer, we can view the pairing of the weekly plan and the work order as a question-and-answer pair.

[0045] The weekly schedule query consists of three key parts: a brief description of the work content (D), the power outage area (B), and a set of images of the equipment requiring maintenance (I). Mathematically, this can be represented as:

[0046]

[0047] The process of responding to weekly planning inquiries involves staff creating work tickets, which can be systematically broken down into two key steps, which we call the Preliminary Ticket Drafting (PTD) stage and the On-Site Equipment Verification (OSEV) stage.

[0048] Preliminary work order drafting stage: Staff use equipment wiring diagrams to determine the location of the power outage area and search for similar work orders in historical records. These records serve as templates for drafting the preliminary work order. This step can be viewed as a text-graphic retrieval process, collecting relevant information from textual data and historical graphics.

[0049] On-site equipment verification phase: Based on the correlation between the equipment list and equipment images, as well as the experience of the staff, on-site visits are conducted. During this process, they identify the specific equipment names that need to be operated and maintained, and then use this information to finalize the details of the work order. This step involves an entity-image association process, matching physical equipment with corresponding images and data.

[0050] The problem can be formally defined as follows:

[0051] 1. PTD: Given a query Q representing a weekly schedule, which contains a work description D and an outage range B, and a set of historical work tickets. Each historical work ticket It also includes job descriptions and outage areas, allowing you to find the most similar historical work orders. H ∗ , so that:

[0052]

[0053] in, This indicates the work description in the weekly plan. D Job description in historical work orders The semantic similarity between them. The outage areas are obtained from historical work orders and are usually determined manually using wiring diagrams and experience.

[0054] 2. OSEV: Given a list of devices, each device is associated with an image {I} j} M j=1 and the corresponding device name {N j} M j=1 Related, and a set of field equipment images { I ref k} k k=1 The task is to identify images. k The most similar device. For each field image. I ref k Find the most similar device image I* j and their corresponding equipment names N* j , so that:

[0055]

[0056] Where, sim v ( I j, I ref k () represents the device image in the device list. I j Compared with on-site reference images I ref k Visual similarity between them. The result should be a set. k The device name corresponding to the most similar device image { N* j1 , N* j2 , ..., N* jk}

[0057] S2: Based on the power outage range of the weekly plan and the power outage range of each historical work order, extract the corresponding subgraphs respectively, and then calculate the subgraph similarity between the weekly plan and each historical work order based on the subgraphs of the weekly plan and the subgraphs of each historical work order.

[0058] Each historical work order contains a textual description of the outage area, such as "#XXX (ID) switch circuit" or "#X busbar". The main equipment wiring diagram can be viewed as a large-scale electrical connection diagram, which can be converted into a heterogeneous undirected graph, denoted as... G = ( V, E) , where V is the set of nodes representing various devices (such as circuit breakers, busbars, transformers, etc.), and E is the set of edges representing the physical connections between these devices.

[0059] The goal of text-graph mapping is to extract a subgraph corresponding to the outage range described by each work record from the overall power grid diagram (i.e., the heterogeneous undirected graph corresponding to the main equipment wiring diagram). This process can be formalized as follows:

[0060] 1. Key Node Identification: For each historical work ticket H i and the associated power outage area We calculate The similarity between the name of the node and the name of each node in graph G. Let... Represents a node n ∈V and description The similarity between them. Then, we identify the set of key nodes. Defined as:

[0061]

[0062] in, This represents a predefined similarity threshold used to filter out irrelevant nodes.

[0063] 2. Subgraph extraction: from the set of key nodes Starting from this point, we extract a subgraph within a two-hop radius. ,in and .choose The nodes in, making them with Any node within a two-hop range, and with The types of nodes (such as circuit breakers, busbars, transformers, etc.) differ. Formally, we define:

[0064]

[0065]

[0066] Where dist(n, m) represents the shortest path distance between nodes n and m in graph G, and type(n) represents the type of node n. It indicates that it exists.

[0067] Using this text-graphic mapping method, each historical work ticket H i All are associated with a unique subgraph subG i Relatedly, this sub-map represents a specific area of ​​the power grid affected by the outage. This allows us to understand the extent of outages in complex power grid infrastructure more accurately and intuitively.

[0068] The sub-map extraction method for the weekly plan is the same as that for historical work orders, which is to extract the power outage area from the historical work orders described above. B i Simply replace it with the power outage range B of the weekly plan. All sub-diagrams use the same main equipment wiring diagram.

[0069] To enhance the retrieval process, in addition to comparing the similarity between weekly plans and historical work order texts, as well as the power outage area, subgraph similarity matching can be used as an auxiliary retrieval method. Specifically, given a weekly plan query, a text-graph mapping method is used to extract subgraphs. subG b Subgraph retrieval involves comparisons. subG b Corresponding sub-image in historical work tickets The similarity.

[0070] This embodiment evaluates subgraph similarity from three dimensions: degree similarity of key nodes, node type similarity, and the number similarity of nodes of the same type. By assigning appropriate weights to each dimension, a comprehensive evaluation of subgraph similarity is achieved. The degree of key nodes reflects their importance and connectivity in the power grid, the node type determines the functional characteristics of the power grid, and the number of nodes of the same type affects the scale and capacity of the power grid.

[0071] 1. Degree Similarity of Critical Nodes: In power systems, the connection status of critical nodes (such as buses and the high-voltage side of main transformers) directly affects grid stability. To quantitatively compare the connection similarity of critical nodes in two subgraphs (such as different regional power grids or topologies at different times), the following process needs to be performed: First, identify all predefined critical nodes (i.e., in the set of critical nodes) in the two subgraphs and count the number of devices connected to each node (i.e., degree); then, arrange the degree of the critical nodes in each subgraph in a fixed order (the order is pre-set according to the node type of the critical node, such as [bus, disconnector, transformer]), forming a numerical sequence (called a degree vector, such as subgraphs). Figure 1 The degree vector is =[3,2,4], Subgraph 2 is =[2,3,5], where the value at each position corresponds to the degree of a key node of the same type. If a key node of a certain type is missing in the subgraph, it is padded with 0. Finally, the similarity between the two degree vectors is calculated using the cosine similarity formula, and this is used as the degree similarity of the key nodes.

[0072]

[0073] in, and These are the degree vectors of the key nodes in the two subgraphs. Represents the magnitude of a vector.

[0074] 2. Node Type Similarity: The main wiring diagram contains various types of nodes, such as loads, grounding switches, disconnectors, and circuit breakers. Each node type plays a specific role in the power grid. We statistically analyze all node types contained in the two sub-diagrams and calculate the node type similarity using the following formula.

[0075]

[0076] in, T 1 and T 2 is a set of node types in two subgraphs. The modulus of the set.

[0077] 3. Similarity of the number of nodes of the same type: In addition to node type, the number of nodes of the same type also affects the characteristics of the power grid. We calculate the number of each type of node in the two subgraphs and use the similarity index to compare their similarity.

[0078]

[0079] in and These represent the number of nodes of type i in the two subgraphs, respectively. This indicates taking the absolute value, where i represents the node type. This represents the collection of all node types.

[0080] Finally, the three similarities are weighted and summed to obtain the subgraph similarity S between the two subgraphs:

[0081]

[0082] in, , , These are the weights for the degree similarity of key nodes, the similarity of node types, and the similarity of the number of nodes of the same type, respectively.

[0083] S3: Based on the brief description of the weekly plan and the scope of the power outage, calculate the semantic similarity between the weekly plan and each historical work order.

[0084] In this embodiment, semantic similarity is calculated using Sentence-BERT. The input includes the complete content of the weekly plan and historical work orders, including their respective brief descriptions and power outage ranges.

[0085] S4: Weight the subgraph similarity and semantic similarity to obtain the comprehensive similarity between the weekly plan and each historical work order, and extract the historical work order with the highest comprehensive similarity.

[0086] We use sim(Q, H) i ) represents the weekly schedule and historical work tickets H obtained using Sentence-BERT. i The semantic similarity score between them. Using S(subG) b subG i ) represents the weekly plan subgraph subG b With historical work ticket diagram subG i The similarity score between subgraphs is calculated. The formula for calculating the overall similarity is as follows:

[0087]

[0088] in, This indicates the weight given to semantic similarity. This indicates the weight of the subgraph similarity.

[0089] In our comprehensive approach to assessing subgraph similarity in power grids, we integrate several key factors to ensure accuracy and comprehensiveness. The specific similarity metrics and calculation methods employed can be adjusted and optimized according to actual needs. Key nodes (such as busbars and the high-voltage side of main transformers) are crucial for grid stability and have high connectivity; therefore, they are given significant weight in our assessment due to their direct impact on grid security and reliability. Furthermore, considering the diverse roles played by different node types in the main wiring diagram (including loads, grounding switches, disconnectors, and circuit breakers), node type similarity is considered a key factor determining subgraph similarity. In addition, we incorporate the similarity in the number of nodes of the same type as an important aspect of comparison, as variations in this number also affect grid characteristics and operational reliability. By comprehensively considering these factors, our method provides a holistic solution for assessing power grid similarity.

[0090] S5: Collect k images from each type of device to form a training image set, and record the category label of each image in the training image set.

[0091] In this embodiment, it is set I K This represents a set of images with N categories (K images for each category). L N This represents the corresponding label. Each image is associated with a truth label from one of the N categories.

[0092] S6: Extract visual features from each image in the training image set to obtain a visual feature matrix composed of the visual features of each image. Simultaneously, one-hot encoding is performed on the category labels of each image in the training image set to obtain a one-hot encoded label matrix composed of the one-hot encodings of each image. .

[0093] In this embodiment, a pre-trained CLIP (Contrastive Language-Image Pre-training) model is used for visual feature extraction. The extracted features are C-dimensional and L2 normalized. Simultaneously, the category labels are converted into N-dimensional one-hot vectors. The formal definition of this process is as follows:

[0094]

[0095]

[0096] in, It is a matrix containing the visual features of all N*K images, and It is the one-hot encoded label matrix corresponding to the N*K images. Each row in the vector corresponds to a C-dimensional feature vector, and Each row in the vector represents an N-dimensional one-hot vector indicating the category label.

[0097] Step S6 yields a key-value cache model that records images and their corresponding category labels.

[0098] S7: Use each image in the weekly plan's image set as a test image and extract visual features to obtain the feature vector of each test image. .

[0099] Step S7 uses the same method as step S6 for visual feature extraction, that is, it uses a pre-trained CLIP model, the extracted features are also C-dimensional, and L2 normalization is performed.

[0100] S8: Build a visual adapter and predict the category of each test image.

[0101] A visual adapter is used to provide an efficient adaptation mechanism. This mechanism is implemented through a combination of matrix-vector multiplication and fine-tuning. During the inference phase, the feature vectors of the test image are... ∈R 1×C As a query, relevant information is retrieved from the key-value cache. The similarity between the query and each key is calculated as follows:

[0102]

[0103] Where A∈R 1×NK Let represent the affinity matrix, and γ be the tuning hyperparameter. This corresponds to the cosine similarity between the features of the test image and the features of the training image. (Exponential function) This ensures a non-negative affinity value, while γ controls the clarity of the similarity measure. The predictions from the caching model are then used as a weighted sum of the cached values, i.e., ALtrain∈R1×N.

[0104] To combine the few-shot knowledge in the cache with the prior knowledge of the pre-trained CLIP model, we calculate the CLIP prediction result as follows: ∈R 1×N ,in This represents the weight assigned to the module responsible for visual feature extraction (i.e., the CLIP model). By fusing these predictions through residual connections, the final output class logits for the test image are:

[0105]

[0106] in, To represent the residual proportion, we define This formula combines two parts: one part is the adaptive aggregation of information from a small training set (…). The other part retains the prior knowledge encoded in the CLIP model. The balance between these two parts is determined by... Control. In practical applications, if there is a significant domain gap between the pre-training task and the downstream few-shot task, then it is necessary to rely more on the knowledge from the few-shot set. The value will be set to a relatively large value.

[0107] To further enhance the adaptation capability for power equipment images, we will cache the keys... The initial estimates of the learnable parameters are considered and optimized using stochastic gradient descent (SGD). Specifically, the fine-tuning process can be formalized as an optimization key. The optimization process aims to minimize the loss function L, which measures the difference between the predicted type logits and the true label. This optimization process maintains... , And with the CLIP model fixed:

[0108]

[0109] in, This represents the true category label of the test image, while Indicates the fine-tuning This fine-tuning step allows the visual adapter to better adapt to the specific features of the power equipment images, thereby improving the overall performance of the model. The underlying logic is that, through fine-tuning... This can improve affinity estimation, leading to more accurate cosine similarity calculations between test and training images. In contrast, the cached values ​​(representing the true labels) remain unchanged to preserve category information.

[0110] S9: By taking the weekly plan, the extracted historical work tickets, and the categories of each test image predicted by the visual adapter as the query input to the Large Language Model (LLM), the work tickets corresponding to the weekly plan are obtained.

[0111] This embodiment decomposes the process of designing multimodal data into two independent steps: indexing and retrieval, to simulate the workflow of work order issuance. Specifically, for PTD, we use text-graph mapping in the indexing stage and combine it with a subgraph-assisted retrieval method in the retrieval stage (corresponding to steps S2-S4). For OSEV, we use multimodal information indexing to build a caching model and apply a visual adapter with fine-tuning in the retrieval stage (corresponding to steps S5-S8).

[0112] The embodiments of the present invention significantly improve the automation level and accuracy of power grid work ticket generation by innovatively integrating multimodal data processing, subgraph-assisted retrieval, visual adapters and caching models, and solve the limitations of existing technologies in handling complex power grid scenarios.

[0113] To address the limitations of traditional methods that rely solely on text data, resulting in limited content generation and difficulty adapting to multimodal scenarios, this embodiment addresses the issue of processing multimodal data, including text, images, and graphical topology. By extracting sub-graphs from wiring diagrams using text-graphics mapping technology and combining this with a vision adapter for device image matching, the method achieves efficient integration and utilization of multimodal data, thereby generating work orders that better meet actual needs.

[0114] During the retrieval process, this embodiment introduces a subgraph-assisted retrieval mechanism. By extracting subgraphs related to the power outage area from the wiring diagram and retrieving similar subgraphs from historical work orders, the similarity of subgraphs is evaluated from three dimensions: degree similarity of key nodes, similarity of node types, and similarity of the number of nodes of the same type. This significantly enhances the accuracy and efficiency of the retrieval, especially when dealing with complex power grid structures, and effectively solves the limitations of existing RAG methods in cross-data type reasoning.

[0115] Furthermore, to address the insufficient adaptability of existing few-shot classification methods in specific domains, this embodiment proposes a CLIP-based visual adapter and constructs a caching model to adapt to the few-shot classification task of power equipment. By fine-tuning the key-value pairs in the cache, the model's adaptability to power equipment images is further optimized, enabling more effective use of limited training data and improving the accuracy and robustness of image classification.

[0116] This embodiment also constructs a multimodal work order dataset, which includes data in multiple modalities such as text, images, and graphical topology. This dataset can comprehensively reflect the characteristics of power grid work orders, providing richer data support for model training and evaluation, and significantly improving the model's generalization ability and practicality.

[0117] Example 2:

[0118] The present invention also provides an automatic power grid work order generation terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps in the method embodiment described above in Embodiment 1 of the present invention.

[0119] Furthermore, as an executable solution, the automatic power grid work order generation terminal device can be a computing device such as a desktop computer, laptop, handheld computer, or cloud server. The automatic power grid work order generation terminal device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that the above-described structure of the automatic power grid work order generation terminal device is merely an example and does not constitute a limitation on the device. It may include more or fewer components, or combine certain components, or different components. For example, the automatic power grid work order generation terminal device may also include input / output devices, network access devices, buses, etc., and this embodiment of the invention does not limit this.

[0120] Furthermore, as an executable solution, the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices. The general-purpose processor can be a microprocessor or any conventional processor. This processor is the control center of the automatic power grid work ticket generation terminal equipment, connecting all parts of the equipment via various interfaces and lines.

[0121] The memory can be used to store the computer programs and / or modules. The processor, by running or executing the computer programs and / or modules stored in the memory and calling the data stored in the memory, realizes various functions of the power grid work ticket automatic generation terminal device. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a function; the data storage area may store data created based on the use of the mobile phone, etc. In addition, the memory may include high-speed random access memory and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0122] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the method described in the embodiments of the present invention.

[0123] If the module / unit integrated into the power grid work order automatic generation terminal equipment is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), and a software distribution medium, etc.

[0124] Although the invention has been specifically shown and described in conjunction with preferred embodiments, those skilled in the art should understand that various changes in form and detail may be made to the invention without departing from the spirit and scope of the invention as defined in the appended claims, all of which shall be within the scope of protection of the invention.

Claims

1. A method for automatically generating power grid work tickets, characterized in that, Includes the following steps: S1: Construct the weekly plan corresponding to the work order to be generated. The weekly plan includes a brief description of the work content, the power outage area, and a set of images of the equipment that needs to be maintained. S2: Based on the power outage range of the weekly plan and the power outage range of each historical work order, extract the corresponding sub-graphs respectively, and then calculate the sub-graph similarity between the weekly plan and each historical work order based on the sub-graphs of the weekly plan and each historical work order. S3: Based on the brief description of the weekly plan and the scope of the power outage, calculate the semantic similarity between the weekly plan and each historical work order; S4: Weight the subgraph similarity and semantic similarity to obtain the comprehensive similarity between the weekly plan and each historical work order, and extract the historical work order with the highest comprehensive similarity. S5: Collect K images from each type of device to form a training image set, and record the category label of each image in the training image set; S6: Extract visual features from each image in the training image set to obtain a visual feature matrix composed of the visual features of each image. Simultaneously, one-hot encoding is performed on the category labels of each image in the training image set to obtain a one-hot encoded label matrix composed of the one-hot encodings of each image. ; S7: Use each image in the weekly plan's image set as a test image and extract visual features to obtain the feature vector of each test image. ; S8: Construct a visual adapter to adapt to the feature vector of the test image. Visual feature matrix of the training image set One-hot encoded tag matrix Predict the category of the test image using the following formula. : in, This indicates the weight assigned to the module responsible for visual feature extraction; The superscript T denotes the transpose of a matrix; Indicates the residual ratio; Represents the affinity matrix; γ represents the tuning hyperparameters; Represents an exponential function; S9: By taking the weekly plan, the extracted historical work tickets, and the categories of each test image predicted by the visual adapter as the query input to the large language model, the work tickets corresponding to the weekly plan are obtained.

2. The method for automatically generating power grid work tickets according to claim 1, characterized in that: The subgraph extraction process includes: Collect the wiring diagram of the main equipment and convert it into a heterogeneous undirected graph G; Calculate the similarity between the power outage area and the name of each node in graph G, and extract all nodes in graph G with similarity greater than the similarity threshold as key nodes to form a key node set; Extract a subgraph from the set of key nodes, such that each node in the subgraph is within two hops of any node in the set of key nodes, and that the node belongs to a different type than any node in the set of key nodes.

3. The method for automatically generating power grid work tickets according to claim 1, characterized in that: Subgraph similarity is a weighted sum of the degree similarity of key nodes, the similarity of node types, and the similarity of the number of nodes of the same type between subgraphs.

4. The method for automatically generating power grid work tickets according to claim 3, characterized in that: The method for calculating the degree similarity of key nodes is as follows: Extract all key nodes in each subgraph and calculate the degree of each key node. Arrange the degree values ​​of all key nodes in each subgraph in a fixed order to form a numerical sequence as the degree vector of each subgraph. The cosine similarity of the degree vectors of two subgraphs is used as the degree similarity of the key nodes between the two subgraphs.

5. The method for automatically generating power grid work tickets according to claim 3, characterized in that: The similarity of node types is calculated as the ratio of the number of node types contained in the intersection of the node type sets contained in two subgraphs to the number of node types contained in the union of the node type sets contained in the two subgraphs.

6. The method for automatically generating power grid work tickets according to claim 3, characterized in that: Similarity in the number of nodes of the same type The calculation formula is as follows: in, and These represent the number of nodes of type i in the two subgraphs, respectively. This indicates taking the absolute value, where i represents the node type. This represents the collection of all node types.

7. The method for automatically generating power grid work tickets according to claim 1, characterized in that: Visual feature extraction is performed using a pre-trained CLIP model.

8. The method for automatically generating power grid work tickets according to claim 1, characterized in that: It also includes the obtained visual feature matrix Fine-tuning is performed to minimize the difference between the predicted category of the test image output by the vision adapter and the true category of the test image.

9. A terminal device for automatically generating power grid work tickets, characterized in that: It includes a processor, a memory, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program to implement the steps of the method as described in any one of claims 1 to 8.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Electric power work ticket verification method based on semantic recognition and related equipment

    CN117831040A

  • Visual language navigation planning method and equipment based on topological semantic map prompt

    CN118999554A