Method for constructing a security measure generation model based on graph theory and a large language model
By constructing a power grid knowledge graph and combining it with a large language model and topological feature training, the generated safety measure generation model can process image data, ensuring that the generated safety measures are accurate and compliant, thus solving the problems existing in the prior art.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-07
- Publication Date
- 2026-04-10
AI Technical Summary
Existing security measure generation models cannot process image data, and the generated security measures are prone to violating equipment operation safety requirements.
By constructing a power grid knowledge graph, embedding sequential and restrictive rules, and combining it with a large language model to generate initial work tickets, and using topological features and multimodal auxiliary data to train the model, a safety measure generation model is generated.
This solves the problem of the model being unable to process image data, improves the accuracy and compliance of the generated safety measures, and avoids violations of equipment operation safety requirements.
Smart Images

Figure CN121480737B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the technical field of power system safety measures, in particular to a safety measure generation model construction method based on graph theory and a large language model. BACKGROUND
[0002] Based on the demand for electric power safety production and the digital transformation background of work ticket management, it is urgent to realize the reliable generation of key content of work tickets through intelligent technology. The work ticket is a written basis for ensuring work and personal safety, listing the safety responsibilities of workers, and implementing the safety briefing of work shift personnel before work, to ensure that the safety measures of workers are implemented in place.
[0003] The fusion of a large language model and a knowledge graph becomes a breakthrough direction. The large language model generates safety measures relying on the structured knowledge of devices and rules provided by the knowledge graph. However, the large language model does not involve the correlation between spatial information such as screen position maps and plane maps and text measures in the multi-modal processing of the knowledge graph. At the same time, the large language model cannot understand the decisive influence of device connection relationships on safety measures, and the generated measures are prone to violate the safety requirements of device operation.
[0004] In view of the technical problems in the related art that the safety measure generation model cannot process image data, and the generated safety measures are prone to violate the safety requirements of device operation, no effective solutions have been proposed so far. SUMMARY
[0005] The safety measure generation model construction method based on graph theory and a large language model provided by the embodiments of the application at least solves the technical problems that the safety measure generation model cannot process image data, and the generated safety measures are prone to violate the safety requirements of device operation.
[0006] According to one aspect of the application, a safety measure generation model construction method based on graph theory and a large language model is provided, comprising the following steps: constructing a power grid knowledge graph according to a power grid topology graph, a sequential rule and a restrictive rule of device operation; wherein the sequential rule is a sequential rule for switching the state of a target device; and the restrictive rule is a limiting rule for unreasonable device states of the target device; inputting structured text instructions of the power grid knowledge graph into a large language model, and generating an initial work ticket through the large language model; generating a training sample according to a topology feature extracted from the power grid topology graph and the initial work ticket, and training the large language model to obtain a topology-aware enhanced model; generating a multi-modal feature vector according to multi-modal auxiliary data and the topology feature, and retraining the topology-aware enhanced model to obtain a safety measure generation model; wherein the multi-modal auxiliary data includes text data and image data of the target device.
[0007] As an optional solution, before constructing the power grid knowledge graph according to the power grid topology graph, the sequence rules and the restrictive rules of device operation, the method further comprises the following steps: according to the primary device wiring diagram of the power grid, each device is distinguished into an operable device and a non-operable device; wherein the operable device is an electrical device with an active state switching function; the non-operable device is an electrical device without an active state switching function; the electrical connection relationship and the hierarchical relationship between each non-operable device are taken as a static skeleton, and the operable device is connected with the corresponding node of the static skeleton as a dynamic switch to construct a power grid topology graph; according to historical work tickets, five-prevention rules and operation guidelines of the power system, the sequence rules and the restrictive rules of device operation are extracted; according to the device wiring diagram, the plan view and / or the screen position view, the text data and the image data of the target device are extracted to obtain multi-modal auxiliary data.
[0008] As an optional solution, according to historical work tickets, five-prevention rules and operation guidelines of the power system, the sequence rules of device operation are extracted, comprising the following steps: according to historical work tickets, five-prevention rules and operation guidelines of the power system, the switching sequence of the basic state of the target device is extracted; wherein the basic state includes: running state, hot standby state, cold standby state and maintenance state; the sequence rules of device operation are generated according to the switching sequence; wherein the sequence rules of device operation include: when the target device is in the running state, it must go through the hot standby state first, and then go through the cold standby state, before switching to the maintenance state.
[0009] As an optional solution, according to historical work tickets, five-prevention rules and operation guidelines of the power system, the restrictive rules are extracted, comprising the following steps: according to historical work tickets, five-prevention rules and operation guidelines of the power system, the unreasonable device state of the target device is determined; according to the unreasonable device state, the restrictive rules are generated.
[0010] As an optional solution, the structured text instructions of the power grid knowledge graph are input into a large language model, and an initial work ticket is generated through the large language model, comprising the following steps: according to the power grid knowledge graph, the structured text instructions are generated; wherein the structured text instructions include: device information, operation task and rule requirements of device operation; the structured text instructions are input into the large language model through the prompt method, and it is emphasized that the rule requirements must be cited when outputting; the initial work ticket is output through the large language model.
[0011] As an optional solution, a training sample is generated according to the extracted topological features in the power grid topology graph and the initial work ticket, and a large language model is trained to obtain a topologically aware enhanced model, including the following steps: generating an adjacency matrix or an adjacency list according to the power grid topology graph; generating topological features through the adjacency matrix or the adjacency list; wherein the topological features include: connection relationships and hierarchical relationships between devices; pairing the topological features with the initial work ticket to generate a training sample; training a large language model through the training sample to obtain a topologically aware enhanced model.
[0012] As an optional solution, a multi-modal feature vector is generated according to multi-modal auxiliary data and the topological features, and the topologically aware enhanced model is retrained to obtain a safety measure generation model, including the following steps: extracting visual features according to the multi-modal auxiliary data; the visual features include: pixel and color features, texture features, device symbol and type features, device connection relationship features, device spatial layout features, and / or device operation element features; fusing the visual features with the topological features to obtain a multi-modal feature vector; retraining the topologically aware enhanced model through the multi-modal feature vector to obtain a safety measure generation model.
[0013] As an optional solution, the visual features and the topological features are fused to obtain a multi-modal feature vector, including the following steps: matching the visual features and the topological features through text to obtain standardized visual feature data and topological feature data; associating the visual feature data with nodes in the power grid topology graph to obtain mapping pairs between visual-topological nodes; according to the mapping pairs between the visual-topological nodes, splicing each visual feature data with the corresponding topological feature data to obtain a multi-modal feature vector.
[0014] According to another aspect of the present application, there is also provided a method for generating security measures based on graph theory and a large language model, comprising the following steps: obtaining an operation task and target device information; the target device information comprises basic information, connection relationships and image information; inputting the operation task and the target device information into a security measure generation model; wherein the security measure generation model is obtained by training a topology-aware enhanced model using a multi-modal feature vector; the multi-modal feature vector is generated according to multi-modal auxiliary data and topology features; the multi-modal auxiliary data comprises text data and image data of the target device; the topology features comprise device connection relationships and hierarchical relationships extracted from a power grid topology graph; the topology-aware enhanced model is obtained by training a large language model according to training samples generated from the topology features and an initial work ticket; the initial work ticket is generated by inputting structured text instructions of a power grid knowledge graph into the large language model; the power grid knowledge graph is constructed according to a power grid topology graph, sequential rules and restrictive rules of device operation; the sequential rules are sequential rules for switching states of the target device; the restrictive rules are limiting rules for unreasonable device states of the target device; and outputting security measures through the security measure generation model.
[0015] According to another aspect of the present application, there is also provided an electronic device comprising a processor and a memory storing a program, the program comprising instructions which, when executed by the processor, cause the processor to perform the method for constructing a security measure generation model based on graph theory and a large language model according to any one of the preceding aspects.
[0016] The above technical solution of the present application has the following beneficial effects compared with the prior art: the method for constructing a security measure generation model based on graph theory and a large language model provided by the present application avoids generating illegal operations by a large language model from the source by embedding sequential rules and restrictive rules in a knowledge graph, thereby solving the problem that security measures generated by a traditional large language model are prone to violating device operation safety requirements. The large language model is further trained by using training samples to enable the model to learn the mapping relationship from topology features to work ticket optimization, further optimize the complex reasoning ability of the model, enhance the accuracy of the model in generating security measures, and obtain a topology-aware enhanced model. The topology-aware enhanced model and a multi-modal feature vector are fused to obtain a security measure generation model, the multi-modal feature vector includes image data, the image contains a lot of concrete information that cannot be expressed by text or a topology graph, and key visual features are extracted to increase the on-site perception of the model. Thus, the problem that the security measure generation model cannot process image data and the generated security measures are prone to violating device operation safety requirements is solved, and the technical effects of enabling the model to process images and generate accurate security measures are achieved. BRIEF DESCRIPTION OF DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required to be used in the embodiments or prior art description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other embodiments can also be obtained from these drawings without creative labor.
[0018] Figure 1 is a flow chart of a security measure generation model construction method based on graph theory and large language model of an embodiment of the present application.
[0019] Figure 2 is a flow chart of a security measure generation method based on graph theory and large language model of an embodiment of the present application.
[0020] Figure 3 is a structural schematic diagram of an electronic device of the present application. DETAILED DESCRIPTION
[0021] Embodiments of the present application will be described in more detail below with reference to the drawings. Although some embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms, and should not be interpreted as being limited to the embodiments described herein, but rather these embodiments are provided to more thoroughly and completely understand the present application. It should be understood that the drawings and embodiments of the present application are only for exemplary purposes, and are not intended to limit the scope of protection of the present application.
[0022] In order to solve the technical problems that the security measure generation model cannot process image data, and the generated security measures are easy to violate the safety requirements of device operation. Embodiments of the present application provide a security measure generation model construction method based on graph theory and large language model, as shown in Figure 1 The method comprises the following steps S101 to S104.
[0023] Step S101, constructing a power grid knowledge graph according to a power grid topology graph, a sequential rule and a restrictive rule of device operation; wherein the sequential rule is a sequential rule for switching the state of a target device; and the restrictive rule is a limiting rule for unreasonable device state of the target device.
[0024] Step S102, inputting the structured text instruction of the power grid knowledge graph into a large language model, and generating an initial work ticket through the large language model.
[0025] Step S103, generating a training sample according to the topological features extracted from the power grid topology graph and the initial work ticket, and training the large language model to obtain a topology-aware enhanced model.
[0026] In step S104, a multimodal feature vector is generated according to the multimodal auxiliary data and the topological features, the topological perception enhancement model is retrained, and a safety measure generation model is obtained; wherein the multimodal auxiliary data includes text data and image data of the target device.
[0027] In the above step S101, unstructured power grid professional knowledge and rules are converted into structured power grid knowledge graph that can be more clearly understood and processed, solving the problem of insufficient understanding of power grid topology association and rule constraints by the large language model.
[0028] The power grid topology graph is a graph theory model that abstracts substations and transformers, circuit breakers and other devices in the power grid as nodes and represents the electrical connection relationship between devices as edges, directly presenting the physical structure and connection logic of the power grid. It is a core basic tool for power grid analysis, operation and dispatching.
[0029] The large language model is an artificial intelligence model based on deep learning architecture and trained through massive text data. It can understand and generate language expressions that are close to human natural language habits in terms of expression form, logical structure, semantic coherence and communication intent, and complete text generation, translation, question answering, summarization and other tasks. The core is to learn language rules and semantic associations from data.
[0030] The large language model of the embodiment adopts a graph structure-based retrieval enhancement generation large language model, combines the method of power grid knowledge graph and retrieval enhancement generation technology, and is used to improve the performance of the large language model. The structured knowledge of the power grid knowledge graph is combined with the large language model, and the entity and its relationship are represented through the graph structure, to solve the problem that the safety measure generation model cannot process image data.
[0031] The sequential rule is the sequence that must be followed according to the safety operation instructions of the target device, and determines the safety sequence of the corresponding device state switching. For example, when power is off, the circuit breaker must be disconnected first, and then the disconnecting switch is opened. When power is on, the sequence is reversed. This ensures the safety of the operation and prevents the disconnecting switch from being closed with load.
[0032] The restrictive rule is a rule that limits the safety construction operation according to the constraints and limitations of the target device state. For example, when both ends of a line have grounding switches, neither of them is allowed to be closed, in order to prevent the risk of grounding short circuit. This type of rule defines unreasonable or dangerous device state combinations.
[0033] The power grid knowledge graph is a knowledge base containing device entities, attributes, and complex relationships between them. It integrates spatial structure information and logical rule information of operation in the power grid. Device entities, such as transformers, circuit breakers, disconnectors, and busbars. Device attributes, such as opening, closing, maintenance, and operation. Complex relationships between devices, such as connection relationships, sequence relationships, and constraint relationships.
[0034] In summary, by embedding sequential rules and constraint rules in the knowledge graph, we can avoid generating illegal operations from the source by large language models, and solve the problem that traditional large language models generate safety measures that easily violate the safety requirements of device operation.
[0035] The above step S102 converts the power grid knowledge graph constructed in step S101 into structured text instructions that can be effectively understood by the large language model, and then inputs it to the large language model.
[0036] The information of the power grid knowledge graph, for example, operation object: transformer T1; operation task: maintenance; constraint rule: first pull circuit breaker Q1, then pull disconnectors G1 and G2.
[0037] Convert to structured instructions that can be understood by the large language model, for example: Generate a maintenance work ticket based on the following power grid information: the operation object is a 10kV transformer T1, the operation task is the main body maintenance; Need to follow the sequential rules: first pull circuit breaker Q1, then pull disconnectors G1 and G2, constraint rules: prohibited to pull disconnectors with load. The work ticket needs to include three parts: operation steps, safety measures, and risk prompts.
[0038] Use the preliminary generation capability of the large language model to obtain an initial work ticket based on structured text instructions. The initial work ticket can meet the format compliance and text fluency.
[0039] The above step S103 further supplements the generated initial work ticket in details and some complex constraint rules, so that the large language model learns to understand the power grid topology, and the generated content conforms to the actual connection state of the power grid.
[0040] Topology features are features extracted from the power grid topology graph that can reflect the association between devices, including: structural features, such as the degree of a device (the number of circuit breakers connected to a bus), path length (the shortest connection path between two devices), and connected components (closed loops in a maintenance area); logical features, such as superior-inferior relationships (the subordinate relationship between a transformer and an outgoing switch), and protection associations (the protection device corresponding to a circuit breaker).
[0041] The training sample is composed of the topological features extracted from the power grid topology graph and the initial work ticket. For example, the device node embedding of the initial work ticket, the connectivity information of the graph, the adjacency matrix, and other topological features corresponding to the information in the initial work ticket and the power grid topology graph jointly constitute the training sample.
[0042] Through comparative learning or supervised fine-tuning, the model learns to correct the topological omissions in the initial work ticket when inputting specific topological features. For example: if the topological features show that "transformer T1 is connected to bus M1, and M1 is also connected to outgoing line L2", the model needs to learn to add the measure "pull the circuit breaker of outgoing line L2 to the open state" in the work ticket.
[0043] The topologically aware enhanced model enhances the model's ability to perceive the physical connection relationship between devices through topological feature enhancement, avoiding the omission of measures that only see single points and ignore associations (such as forgetting to turn off the associated bus when repairing the transformer).
[0044] The above step S104 further improves the accuracy, reliability, and scene adaptability of the model. By introducing more dimensions of information, the power grid structure, operation rules, device field conditions, and text specifications are comprehensively considered to generate a highly accurate, reliable, and compliant safety measure generation model.
[0045] The multi-modal feature vector uses a multi-modal encoder to encode the topological features and multi-modal auxiliary data into a unified feature vector. The multi-modal editor includes a text editor, an image editor, and a feature fusion module.
[0046] The multi-modal auxiliary data includes text data and image data of the target device. The text data includes device manuals (such as the operation torque requirement of disconnecting switch G1), historical defect records (such as transformer T1 tripped due to low oil level), safety procedure documents (such as GIS device maintenance requires vacuum pumping), etc.; the image data includes device field photos, wiring diagrams, and nameplate photos, etc.
[0047] The safety measure generation model supplements the individual characteristics and spatial details of the device through different modal data, making the generated safety measures more consistent with the actual situation on site rather than general templates, solving the technical problem that traditional safety measure generation models cannot handle image data.
[0048] The method for constructing a safety measure generation model based on graph theory and a large language model provided by the embodiment of the application avoids the generation of a large language model that violates rules from the source by embedding sequential rules and restrictive rules in a knowledge graph, and solves the problem that safety measures generated by a traditional large language model easily violate the safety requirements for device operation. The large language model is further trained by using training samples, so that the model learns the mapping relationship from topological features to work ticket optimization, further optimizes the complex reasoning capability of the model, enhances the accuracy of the safety measures generated by the model, and obtains a topological perception enhanced model. The topological perception enhanced model is fused with a multi-modal feature vector to obtain a safety measure generation model, and the multi-modal feature vector includes image data. The image contains a lot of concrete information that cannot be expressed by text or a topological graph, and key visual features are extracted to increase the on-site perception of the model. Thus, the problem that the safety measure generation model cannot process image data and the generated safety measures easily violate the safety requirements for device operation is solved, and the technical effect that the model can process images and generate accurate safety measures is achieved.
[0049] As an optional solution, before constructing the power grid knowledge graph according to the power grid topological graph, the sequential rules and the restrictive rules of device operation, the method further includes the following steps: according to the power grid primary device wiring diagram, the devices are divided into operable devices and inoperable devices; the operable device is an electrical device with an active state switching function; the inoperable device is an electrical device without an active state switching function; the electrical connection relationship and the hierarchical relationship between the inoperable devices are taken as a static skeleton, and the corresponding nodes of the operable devices and the static skeleton are connected as dynamic switches to construct the power grid topological graph; the device operation sequential rules and the restrictive rules are extracted according to the historical work tickets, the five-prevention rules of the power system, and the operation guide; the text data and the image data of the target device are extracted according to the device wiring diagram, the plan view and / or the screen position view to obtain multi-modal auxiliary data.
[0050] The operable device as the dynamic switch includes a switch, an isolation switch, a grounding switch and the like; the inoperable device as the static skeleton includes a main transformer, a bus, an arrester, a voltage transformer, a current transformer, a capacitor, a reactor and the like. Each specific node in the power grid topological graph corresponds to a unique device.
[0051] The power grid topological graph node construction sequentially numbers the devices in the wiring diagram in the substation, enters the double coding information (installation position and device identification) of the devices, enters the category of the devices, abstracts the devices into nodes with numbers as the basic units of the power grid topological graph, and identifies the specific device objects in the power grid. For example, the device number is “10kV-01”; the double coding information is “switch room 1-circuit breaker 1”; and the device category is a circuit breaker, a disconnector, a transformer, a bus, an arrester and the like.
[0052] The construction of edges in the power grid topology diagram records the electrical connection relationship and hierarchical relationship between devices, and is abstracted as edges connecting nodes, representing the connection relationship between devices, which is the core of analyzing the topology structure of the power grid. For example, if the circuit breaker "10kV-01" is directly connected to the disconnector "10kV-02", draw an edge between the two nodes. If the transformer "main transformer-01" is directly connected to the bus "10kV-bus A", draw an edge between the two nodes.
[0053] The electrical connection relationship and hierarchical relationship between each non-operable device are taken as a static skeleton. Specifically, non-operable devices such as transformers, buses, and cables are abstracted as static nodes, and static edges are drawn according to their actual electrical connection relationship, such as transformer outlet end connecting bus, bus connecting cable, to form a static skeleton that does not change with operation.
[0054] The corresponding nodes of the operable device and the static skeleton are connected as dynamic switches. Specifically, at key connection points of the static skeleton, such as between the bus and the cable, between the transformer and the bus, insert the operable device as a dynamic switch. For example, between "10kV bus" and "10kV outgoing cable", insert "10kV circuit breaker" to form a topology chain of "10kV bus to 10kV circuit breaker to 10kV outgoing cable"; when the circuit breaker is closed, the path is connected; when the circuit breaker is opened, the path is disconnected.
[0055] The static skeleton and dynamic switch together form a power grid topology diagram that is closer to the operation and maintenance scene, and can directly reflect the influence of operation on the power grid. The operation and maintenance personnel can directly judge the running topology of the power grid through the state change of the dynamic switch; and provide accurate support for the extraction of sequential rules and conditional rules and the generation of initial work tickets.
[0056] Sequential rules mine the sequence rules of operation steps from a large number of executed qualified historical work tickets, and clearly define the sequence requirements according to the operation guidelines of industry standards such as "Electric Safety Work Procedures" and "Substation Switching Operation Guidelines".
[0057] Specifically, sequence analysis is performed on the operation steps of the historical work tickets, such as discovering that there must be a step of pulling the circuit breaker before pulling the disconnector through the association rule algorithm. The natural language description in the operation guidelines is converted into structured rules. For example, "when power is off, first disconnect the load side circuit breaker, then disconnect the power side circuit breaker" is converted to "operation sequence: load side circuit breaker is opened, then power side circuit breaker is opened".
[0058] Conditional rules are based on the five-prevention rules (five-prevention rules for preventing electrical misoperation of power systems), including "preventing misoperation of circuit breakers, preventing pulling and closing disconnector with load, preventing hanging ground wire with live line, preventing closing with ground wire, and preventing entering live interval" of the power system, and historical accident cases, that is, extracting prohibited operations from accident analysis reports.
[0059] Specifically, the five-prevention rules are decomposed into structured forms of prohibited conditions and prohibited operations, the violation operations in the accident cases and the accident consequences are associated, and the restrictive rules are refined. For example, the prohibited condition is that there is a voltage difference on both sides of the disconnector (with load); the prohibited operation is to pull or close the disconnector.
[0060] The extracted text data includes: device parameters, model, rated voltage / current, manufacturer; operation requirements, pre-operation inspection items, post-operation confirmation items; spatial identification, installation location of the device in the screen cabinet / substation, etc. The text data provides device-specific measures for the safety measure generation model. For example, the SF6 gas pressure of the LW35 type circuit breaker needs to be checked before operation.
[0061] The extracted image data includes: spatial layout, relative position between devices, channel direction; physical features, appearance of the device, location of the operation component; wiring details, wiring method in the screen cabinet, terminal arrangement, etc. The image data provides visual spatial cognition for the model, which assists in identifying the device state. For example, whether the grounding switch is closed is determined by the image.
[0062] As an optional solution, according to the historical work tickets, the five-prevention rules of the power system, and the operation guide, the device operation sequence rules are extracted, including the following steps: according to the historical work tickets, the five-prevention rules of the power system, and the operation guide, the switching sequence of the basic state of the target device is extracted; wherein the basic state includes: running state, hot standby state, cold standby state and maintenance state; generating device operation sequence rules according to the switching sequence; wherein the device operation sequence rules include: when the target device is in the running state, it must first pass through the hot standby state, and then pass through the cold standby state, before switching to the maintenance state.
[0063] The running state refers to the state that the device is electrically connected with the power grid and has normal current-carrying capacity, and can work with load. For example, the circuit breaker is closed, the disconnector on both sides is closed, the device is connected to the power grid and carries load, and the control power supply and protection device are put into operation.
[0064] The hot standby state refers to the state that the device is electrically connected with the power grid, the main loop is not disconnected, but has exited the running state, and has the condition of quickly restoring the running state. For example, the circuit breaker is open, the disconnector on both sides is still closed, the device is connected with the power grid but has no current, and the control power supply and protection device are still put into operation.
[0065] The cold standby state refers to the state that the electrical connection between the device and the power grid is completely disconnected, the main loop and auxiliary loop are isolated, but no safety isolation measures are taken, and no quick recovery condition is provided. For example, the circuit breaker is open, the disconnector on both sides is open, the device is completely disconnected from the power grid, and the control power supply can be withdrawn.
[0066] The state of the maintenance equipment is completely isolated from the power grid, and safety measures have been taken to prevent sudden power-on, allowing personnel to perform maintenance work. On the basis of cold standby, the equipment is connected to the ground on both sides, a "no closing, human work" sign is hung, and a safety fence is set up.
[0067] All operations in the power system are essentially the orderly migration of devices in the state chain of "running, hot standby, cold standby, and maintenance." Historical work tickets, the five-prevention rules of the power system, and operation guidelines are constraints on this migration process.
[0068] Specifically, the historical work ticket provides a typical sequence in actual operation, verifying the applicability of the rules; the five-prevention rules provide safety constraints that prohibit skipping steps, clearly defining the rigid boundaries of the rules; and the operation guidelines provide standardized step definitions, ensuring the normativity and uniformity of the rules.
[0069] The switching of devices between the four states must follow a one-way progression logic, i.e., from running to maintenance, it must go through hot standby and cold standby in sequence and cannot skip steps; from maintenance to running, it must progress in reverse. Each state transition corresponds to a set of explicit operation steps, which is the direct basis for extracting sequential rules.
[0070] In summary, the dispersed operation steps and abstract safety specifications are transformed into structured rules for the sequential migration of the four states. This method not only ensures the safety, normativity, and practicality of the sequential rules, but also provides a clear set of rules for the construction of the subsequent power grid knowledge graph. The safety measures generated by the safety measures generation model strictly follow the underlying logic of state progression, avoiding safety risks caused by chaotic steps.
[0071] As an optional solution, according to the historical work ticket, the five-prevention rules of the power system, and the operation guidelines, the restrictive rules are extracted, including the following steps: determining the unreasonable device state of the target device according to the historical work ticket, the five-prevention rules of the power system, and the operation guidelines; generating restrictive rules based on the unreasonable device state.
[0072] Unreasonable device states refer to combinations of device states that may cause electrical short circuits, electric shock, equipment damage, or power grid accidents. Their determination requires consideration of physical laws, safety specifications, and historical lessons to ensure coverage of all potential risk scenarios.
[0073] Specifically, the physical law is the basic principle of electrical connection, the safety specification includes the states that violate the five-prevention rules and operation guidelines, and the historical lesson includes the state combinations that have caused accidents in past accident cases. Unreasonable device states can be selected and defined from unqualified items in historical work tickets, prohibited state descriptions in five-prevention rules, and direct causes of accident cases.
[0074] The generation of the restrictive rule is firstly associated with the operation of the triggering state, analyzes which specific operation causes the unreasonable device state, and clearly prohibits the object and content of the operation. Then the structured restrictive rule is generated, which combines the unreasonable device state and the prohibited operation into the rule form of "condition and prohibited action", to ensure that the large language model can be understood and executed.
[0075] The method of extracting restrictive rules based on unreasonable device states converts power safety specifications into structured constraints that can be calculated and verified. This method not only ensures the pertinence and executability of the restrictive rules, but also seamlessly integrates the restrictive rules into the power grid knowledge graph, providing a rule basis for the accuracy of model-generated safety measures.
[0076] As an optional solution, the structured text instructions of the power grid knowledge graph are input into the large language model to generate an initial work ticket, including the following steps: generating structured text instructions based on the power grid knowledge graph; wherein the structured text instructions include device information, operation tasks, and rule requirements for device operation; injecting the structured text instructions into the large language model through prompt (prompt word) and emphasizing that the rule requirements must be cited when outputting; outputting the initial work ticket through the large language model.
[0077] Structured text instructions integrate scattered device entities, operation tasks, and rule constraints in the power grid knowledge graph into natural language instructions that can be understood by the large language model.
[0078] Device information is extracted from device entities and attributes (number, type, state, etc.) in the power grid knowledge graph, which is used to clearly define the operation object and the associated devices of the device entity, and to provide the physical boundaries of the operation scene for the large language model.
[0079] Operation tasks are task entities in the power grid knowledge graph, such as maintenance and switching, which are used to clearly define the operation target and guide the large language model to generate operation steps that match the task.
[0080] The rule requirements for device operation include the sequence rules and restrictive rules in the power grid knowledge graph, which provide the safety red line for the operation of the large language model and ensure that the generated safety measures do not violate the safety requirements of device operation.
[0081] The structured text is injected into the large language model through the prompt (prompt word) method, which formats the structured text and clearly defines the structure framework of the work ticket, such as numbering the operation steps and dividing the safety measures, to avoid generating chaotic content by the large language model.
[0082] The rule requirements must be cited when emphasizing the output, and each operation must be associated with the rule basis to ensure that the content of the generated safety measures does not deviate from the rule constraints in the power grid knowledge graph. For example, each operation must be annotated with the followed rule at the end, such as "Q1 is closed (reference rule: R1- running to hot standby)". If any rule is violated, the step is considered invalid.
[0083] Finally, under the guidance of the prompt (prompt word) mode, the large language model generates an initial work ticket in the format containing operation steps, safety measures, and risk prompts based on the device information, operation tasks, and rule requirements of the structured instruction. The structured text instruction ensures the accuracy of the knowledge input, and the rule reference ensures the safety of the output content, laying a high-quality initial text foundation for subsequent topology-aware enhancement and multi-modal optimization.
[0084] As an optional solution, based on the topology features extracted from the power grid topology graph and the initial work ticket, training samples are generated, and the large language model is trained to obtain a topology-aware enhanced model, including the following steps: generating an adjacency matrix or adjacency list according to the power grid topology graph; generating topology features through the adjacency matrix or adjacency list; wherein the topology features include: the connection relationship and hierarchical relationship between devices; pairing the topology features with the initial work ticket to generate training samples; training the large language model through the training samples to obtain a topology-aware enhanced model.
[0085] The adjacency matrix is suitable for small-scale power grids, such as power grid topology graphs with less than 100 nodes. The adjacency matrix directly indexes the matrix elements, and the connection relationship is queried quickly. The construction of the adjacency matrix uses an n x n matrix A to represent the connection relationship of n nodes. If node i is directly connected to node j, then A[i][j]=1; otherwise A[i][j]=0 (in an undirected graph, A[i][j]=A[j][i]).
[0086] The adjacency list is suitable for large-scale power grids, such as power grid topology graphs with more than 100 nodes. The advantage of the adjacency list is to save storage space. The construction of the adjacency list establishes a connection list for each node to record all the nodes directly connected to it.
[0087] The connection relationship between devices reflects the direct or indirect connection, connection tightness, and other physical association attributes between devices. The connection relationship of the topology features is generated through the adjacency matrix or adjacency list. The methods for generating the connection relationship include: using the direct connection degree method, which is the number of connected nodes in the adjacency list of a certain node; using the indirect connection path method, which is the number of connection steps between two nodes calculated by the shortest path algorithm; using the connected component method, which identifies the set of mutually connected devices through the union-find set algorithm.
[0088] The hierarchical relationship between the devices reflects the functional hierarchy of the devices in the power grid, and the hierarchical relationship of the topological features is generated through an adjacency matrix or an adjacency table. The method for generating the hierarchical relationship includes: a power source tracing method, which takes a bus or a transformer as a root node and determines the hierarchy of the device through a breadth-first search, such as a bus being level 1, a disconnecting switch being level 2, and a circuit breaker being level 3; and a load direction method, which marks the upstream or downstream relationship of the device according to the flow direction of the power source, bus, circuit breaker, and outgoing line.
[0089] The topological features are structured and paired with the initial work ticket to generate training samples, with the device unique identifier, such as the device number and standardized name, as the core link to complete the basic association. The initial work ticket is disassembled into structured fields such as operation task, operation object, safety measure, and operation step, and the topological features are extracted into structured information such as device connection relationship and hierarchical relationship. By matching the work ticket operation object and the topological device identifier, it is ensured that both point to the same physical device in a single sample, avoiding object confusion.
[0090] On this basis, the mapping relationship between the topological features and the initial work ticket is constructed, with the connection relationship in the topology corresponding to the operation range of the initial work ticket and the hierarchical relationship corresponding to the operation step sequence. Finally, each training sample takes the topological feature vector and the initial work ticket text as input, takes the compliant work ticket optimized through topology checking as a label, realizes the structured pairing of the two, and generates training samples.
[0091] The constructed training samples are batch input into a large language model for training. The model learns the mapping rules of the topological features and the work ticket elements, gradually establishes the understanding ability of the power grid topology structure, and finally obtains a topology perception enhanced model.
[0092] As an optional scheme, according to the multi-modal auxiliary data and the topological features, a multi-modal feature vector is generated, and the topology perception enhanced model is retrained to obtain a safety measure generation model, including the following steps: extracting visual features according to multi-modal auxiliary data; the visual features include pixel and color features, texture features, device symbol and type features, device connection relationship features, device spatial layout features, and / or device operation element features; fusing the visual features and the topological features to obtain a multi-modal feature vector; retraining the topology perception enhanced model through the multi-modal feature vector to obtain the safety measure generation model.
[0093] The multi-modal auxiliary data includes image data, which contains many concrete information that cannot be expressed through text or topology, and key visual features can be extracted through computer vision technology to increase the on-site perception of the model.
[0094] Pixel and color features include color identification, brightness distribution, etc. of the device in the image, which can assist in identifying the charged state of the device. For example, the red area is the charged part, and the safety measures need to maintain a safe distance.
[0095] Texture features include texture patterns and material differences of the device surface, which can assist in distinguishing device types and ensuring correct operation objects. For example, by texture recognition, disconnecting switches and grounding switches can be distinguished.
[0096] Device symbol and type features include standardized device symbols and device appearance forms in drawings or images, which can be directly associated with device entities in the power grid knowledge graph. For example, detecting the QF symbol corresponds to the circuit breaker Q1 in the knowledge graph.
[0097] Device connection relationship features include the visual representation of physical connections between devices in the image, such as the direction of wires, the connection relationship of terminal rows, and the wiring path in the screen cabinet. Device connection relationship features can supplement the connection details not explicitly stated in the topology features. For example, the wire is drawn from the right terminal of Q1, and the safety measures need to note that "check the right terminal for no voltage".
[0098] Device spatial layout features include the relative position and spacing of devices in the substation or screen cabinet, which can generate space-related safety measures. For example, a fence is set up east of the device, and the operator needs to approach from the south side to avoid the north side of the live area.
[0099] Device operation element features include the position and form of the operation components on the device, which can generate operation detail guidance. For example, rotate the grounding switch handle clockwise to the "closed" position, i.e. press the red tripping button.
[0100] The distribution of visual features and topology features is different, and the two types of features can be mapped to the same semantic space; visual features and topology features express the same information, and through principal component analysis or autoencoder compression of redundant dimensions, it is ensured that when fused, the devices in the visual features and the nodes in the topology features correspond one by one. For example, the connecting wire in the visual features corresponds to the edge in the topology features; the position of the operation handle of Q1 in the visual features corresponds to the hierarchical relationship of Q1 in the topology features.
[0101] The multi-modal feature vector fuses visual features and topology features, enabling the model to make decisions based on both types of information. By retraining the topology perception enhancement model using the multi-modal feature vector, the model learns the details of the visual features and the structure of the topology features, thereby generating accurate safety measures and solving the technical problems of the safety measure generation model being unable to process image data and the generated safety measures violating the safety requirements of device operation.
[0102] As an optional solution, the visual feature and the topological feature are fused to obtain a multi-modal feature vector, including the following steps: the visual feature and the topological feature are matched through text to obtain standardized visual feature data and topological feature data; the visual feature data is associated with nodes in the power grid topology map to obtain a mapping pair between the visual-topological nodes; and the multi-modal feature vector is obtained by splicing each visual feature data and the corresponding topological feature data according to the mapping pair between the visual-topological nodes.
[0103] The visual feature can be a position description of the device in the image, and the topological feature is a numerical value of an adjacency matrix, which needs to be converted into standardized data in a unified semantic dimension through text matching.
[0104] Specifically, the unique device number is used as the matching key during text matching to avoid ambiguity caused by device type matching; if the device number identification in the visual feature is incomplete, the device position, symbol type and other auxiliary information can be combined for matching; a feature type standardization dictionary is established to avoid matching failure caused by differences in expression. For example, “connection degree” is uniformly written as “topological connection degree”, and “handle position” is uniformly written as “operation element_position”.
[0105] The essence of mapping is that the device corresponding to the visual feature is completely matched with the device corresponding to the node in the power grid topology map through text identification. After matching the device number, a one-to-one correspondence between the visual-topological nodes is formed.
[0106] For the same device node, the visual feature vector and the topological feature vector are spliced in a fixed order to ensure that the multi-modal feature vectors of different devices have consistent structures.
[0107] Specifically, the standardized visual feature and the topological feature in each mapping pair are converted into numerical vectors, and the visual feature vector is spliced in front of the topological feature vector in a fixed order to obtain the multi-modal feature vector.
[0108] In summary, through the three-step process of text matching, data standardization, mapping and splicing of visual features and topological features, the heterogeneous problem of visual and topological features in the power grid scene is efficiently solved. This method has the advantages of correlation, simplicity and interpretability, not only provides high-quality multi-modal feature vector input training for the safety measure generation model, but also meets the technical requirements of the power industry for safety, reliability and feasibility.
[0109] According to another aspect of the present application, a safety measure generation method based on graph theory and a large language model is also provided, as shown in Figure 2 The method includes the following steps S201 to S203.
[0110] In step S201, an operation task and target device information are acquired; the target device information includes basic information, connection relationship, and image information.
[0111] In step S202, the operation task and the target device information are input into a safety measure generation model; the safety measure generation model is obtained by training a topology-aware enhancement model using a multi-modal feature vector; the multi-modal feature vector is generated according to multi-modal auxiliary data and topology features; the multi-modal auxiliary data includes text data and image data of the target device; the topology features include device connection relationship and hierarchical relationship extracted from a power grid topology graph; the topology-aware enhancement model is obtained by training a large language model according to training samples generated from topology features and an initial work ticket; the initial work ticket is generated by inputting structured text instructions of a power grid knowledge graph into the large language model; the power grid knowledge graph is constructed according to the power grid topology graph, sequential rules, and restrictive rules of device operation; the sequential rules are sequential rules for switching states of the target device; the restrictive rules are rules for limiting unreasonable device states of the target device.
[0112] In step S203, safety measures are output by the safety measure generation model.
[0113] The safety measure generation method based on graph theory and a large language model provided in this embodiment takes a user-defined operation task as a target and multiple information of a target device as a basis, calls a pre-trained safety measure generation model, and finally outputs safety measures that conform to rule constraints, topology associations, and on-site adaptation.
[0114] The operation task is acquired, which specifies specific operation and maintenance operations to be performed by the user and needs to include operation types and task targets, to provide a generation direction for the model and ensure that the measures match the task. For example, the operation types are maintenance, switching operation, and test; and the task target is to convert a 10kV circuit breaker Q1 (number 10kV-01) from a running state to a maintenance state and perform a mechanical property test.
[0115] The target device information is acquired, which includes basic information, i.e., inherent properties of the device, used to identify the device type and characteristics; connection relationship, i.e., topology association of the device with other devices, used to generate associated measures; and image information, i.e., appearance and layout images of the device, used to generate on-site adaptation measures.
[0116] For example, the basic information is a model LW35-12, a rated current of 3150A, and a manufacturer XX; the connection relationship is to connect a 10kV bus A (upstream) and an outgoing line L1 (downstream) and associate disconnectors G1 / G2; and the image information is an appearance image of Q1 (operation handle on the right side) and a screen position image (located on the upper part of the No. 2 cabinet).
[0117] The operation task and the target device information can be manually input by an operation and maintenance personnel through a system interface, or the system can automatically pull basic information, connection relationships and image data from a power grid asset database, a topology system and an image library according to the device number, thereby reducing manual input cost.
[0118] Step S202 is a core execution link of the method, which converts the obtained operation task and target device information into a format understandable by the model, triggers multi-modal fusion reasoning of the model, and finally generates safety measures.
[0119] Specifically, the operation task triggers a task understanding module of a large language model, parses the task type, calls a maintenance scene template of a pre-trained safety measure generation model, and determines a basic framework of the safety measures.
[0120] The device basic information matches the corresponding operation rules according to the structured text of the power grid knowledge graph, so as to ensure that the measures meet the five-prevention rules and operation guidelines.
[0121] The device connection relationship generates associated device measures according to a topology perception enhancement model, so as to avoid missing topology association risks.
[0122] The device image information generates a safety measure generation model according to a multi-modal auxiliary vector and a topology perception enhancement model trained by the safety measure generation model, parses operation elements and spatial layouts in the image, and generates concrete operation details.
[0123] In step S203, the safety measures output by the safety measure generation model meet the standardized format of power grid operation and maintenance, so as to ensure that the operation and maintenance personnel can directly refer to and execute without secondary processing.
[0124] In summary, the safety measure generation method based on graph theory and a large language model provided in the embodiment automatically generates safety measures without manual reference to materials, greatly shortening the safety measure preparation period. The model matches multi-modal auxiliary data and topology characteristics to avoid human errors from the source. The model integrates historical work tickets, five-prevention rules and other knowledge to convert historical experience into model capabilities and realize efficient reuse of knowledge. The model output format is fixed and the terminology is unified, thereby realizing standardization of safety measures in all scenarios.
[0125] According to another aspect of the present application, an electronic device is also provided, which includes a processor and a memory storing a program, the program including instructions that, when executed by the processor, cause the processor to perform the safety measure generation model construction method based on graph theory and a large language model of any one of the above aspects
[0126] As Figure 3The diagram shown is a structural block diagram of an electronic device for a server or client according to an embodiment of the present invention, which is an example of a hardware device that can be applied to various aspects of the present invention. The electronic device is 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. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0127] like Figure 3 As shown, the electronic device includes a computing unit 501, which can perform various appropriate actions and processes based on a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. The RAM 503 may also store various programs and data required for the operation of the electronic device. The computing unit 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0128] Multiple components in the electronic device are connected to I / O interface 505, including: input unit 506, output unit 507, storage unit 508, and communication unit 509. Input unit 506 can be any type of device capable of inputting information into the electronic device. Input unit 506 can receive input digital or character information and generate key signal inputs related to user settings and / or function control of the electronic device. Output unit 507 can be any type of device capable of presenting information and may include, but is not limited to, a display, speaker, video / audio output terminal, vibrator, and / or printer. Storage unit 508 may include, but is not limited to, disks and optical discs. Communication unit 509 allows the electronic device to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, and / or wireless communication transceivers, such as Bluetooth devices, WiFi devices, WiMax devices, cellular communication devices, and / or the like.
[0129] The computing unit 501 can be various general and / or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, CPUs, graphics processing units (GPUs), various specialized artificial intelligence (AI) computing units, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, or the like. The computing unit 501 performs various methods and processes described above. For example, in some embodiments, the method embodiments of the present creation can be implemented as a computer program tangibly embodied in a machine-readable medium, such as the storage unit 508. In some embodiments, portions or all of the computer program can be loaded and / or installed onto the electronic device via the ROM 502 and / or the communication unit 509. In some embodiments, the computing unit 501 can be configured, by way of other any suitable means, such as by way of firmware, to perform the methods described above.
[0130] Computer programs used to implement methods of the present creation embodiments can be written in any combination of one or more programming languages. These computer programs can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer program, when executed, enables the functions / operations specified in the flow charts and / or block diagrams to be implemented. The computer program can be executed in whole on a machine, partially on a machine, partially on a machine as a stand-alone software package, partially on a machine and partially on a remote machine or entirely on a remote machine or server.
[0131] In the context of the present creation embodiments, a machine-readable medium can be a tangible medium that can contain or store the program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable signal medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, or infrared signals, or any suitable combination thereof. More specific examples of a machine-readable storage medium will include one or more lines of a program of instructions in a searchable database, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0132] It should be noted that the term "comprising" and its derivations, as used in the embodiments of the present invention, are intended to be open-ended. The term "comprising" and its derivations are used in the sense of "including but not limited to". The term "based on" is intended to mean "based, at least in part, on". The term "one embodiment" is intended to mean "at least one embodiment". The term "another embodiment" is intended to mean "at least one additional embodiment". The term "some embodiments" is intended to mean "at least some embodiments". The terms "a" and "an", as used in the embodiments of the present invention, are intended to be interpreted to mean "one or more" unless otherwise indicated. The terms "the" and "the" preceding article are intended to be interpreted to mean "the one and only one" unless otherwise indicated by context.
[0133] The user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data 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 the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions, and corresponding operation portals are provided for the user to choose authorization or rejection.
[0134] The steps described in the method embodiments provided by the embodiments of the present invention can be executed in different orders and / or in parallel. In addition, the method embodiments can include additional steps and / or omit the execution of the steps shown. The scope of protection of the present invention is not limited in this respect.
[0135] The word "embodiment" in the specification refers to the specific features, structures or characteristics described in connection with the embodiment can be included in at least one embodiment of the present invention. The presence of this phrase in various places in the specification does not necessarily mean the same embodiment, nor does it mean independence or alternative to other embodiments. Each embodiment in the specification is described in a relevant manner, and the same or similar parts between each embodiment are referred to each other. In particular, for device, equipment, system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and the relevant parts are referred to the part of the method embodiment.
[0136] The above-described embodiments only express several embodiments of the present invention, and the description is more specific and detailed, but it cannot be understood as a limitation on the scope of protection. It should be noted that for ordinary skilled persons in the art, without departing from the concept of the present invention, a number of modifications and improvements can be made, which are within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be subject to the appended claims.
Claims
1. A method for constructing a security measure generation model based on graph theory and a large language model, characterized by comprising: The method comprises the following steps: According to the power grid topology map, the order rule and the constraint rule of device operation, the power grid knowledge graph is constructed; wherein, the order rule is the order rule of the target device state switching; the constraint rule is the limit rule of the unreasonable device state of the target device; According to the power grid knowledge graph, a structured text instruction is generated; wherein, the structured text instruction includes: device information, operation task and rule requirement of device operation; The structured text instruction is injected into a large language model through a prompt method, and the rule requirement must be cited when outputting; An initial work ticket is output through the large language model; According to the power grid topology map, an adjacency matrix or an adjacency list is generated; Through the adjacency matrix or the adjacency list, topological features are generated; wherein, the topological features include: the connection relationship and the hierarchical relationship between devices; The topological features are paired with the initial work ticket to generate a training sample; Through the training sample, a large language model is trained to obtain a topological perception enhanced model; According to the multi-modal auxiliary data, visual features are extracted; wherein, the multi-modal auxiliary data includes: text data and image data of the target device; the visual features include: pixel and color features, texture features, device symbol and type features, device connection relationship features, device space layout features and / or device operation element features; The visual features are fused with the topological features to obtain a multi-modal feature vector; Through the multi-modal feature vector, the topological perception enhanced model is trained again to obtain a safety measure generation model.
2. The graph-based and large language model-based security measure generation model construction method of claim 1, wherein, Before constructing the power grid knowledge graph according to the power grid topology map, the order rule and the constraint rule of device operation, the method further comprises the following steps: According to the power grid primary device wiring diagram, each device is divided into operable devices and inoperable devices; wherein, the operable device is an electrical device with active state switching function; the inoperable device is an electrical device without active state switching function; The electrical connection relationship and the hierarchical relationship between each inoperable device are taken as a static skeleton, and the corresponding nodes of the operable device and the static skeleton are connected as dynamic switches to construct a power grid topology map; According to the historical work ticket, the five-prevention rules of the power system and the operation guide, the device operation order rule and the constraint rule are extracted; According to the device wiring diagram, the plan and / or screen position diagram, the text data and the image data of the target device are extracted to obtain multi-modal auxiliary data.
3. The graph-based and large language model-based security measure generation model construction method of claim 2, wherein, According to the historical work ticket, the five-prevention rules of the power system and the operation guide, the device operation order rule is extracted, comprising the following steps: According to the historical work ticket, the five-prevention rules of the power system and the operation guide, the switching order of the basic state of the target device is extracted; wherein, the basic state includes: running state, hot standby state, cold standby state and maintenance state; The device operation sequence generation device generates a device operation sequence rule according to the switching sequence; wherein the device operation sequence rule includes: when the target device is in a running state, it must go through the hot standby state first, and then go through the cold standby state, before switching to the maintenance state.
4. The graph-based and large language model-based security measure generation model construction method of claim 2, wherein, According to the historical work ticket, the five-prevention rules and the operation guide of the power system, the restrictive rules are extracted, including the following steps: According to the historical work ticket, the five-prevention rules and the operation guide of the power system, the unreasonable device state of the target device is determined; According to the unreasonable device state, the restrictive rules are generated.
5. The graph-based and large language model-based security measure generation model construction method of claim 1, wherein, The visual features and the topological features are fused to obtain a multi-modal feature vector, including the following steps: The visual features and the topological features are matched through text to obtain standardized visual feature data and topological feature data; The visual feature data is associated with the nodes in the power grid topology map to obtain a mapping pair between visual-topological nodes; According to the mapping pair between visual-topological nodes, each visual feature data and the corresponding topological feature data are spliced to obtain a multi-modal feature vector.
6. A method for generating security measures based on graph theory and large language models, using the method for constructing security measures based on graph theory and large language models according to any one of claims 1 to 5, characterized in that, Including the following steps: Obtain operation task and target device information; The target device information includes: basic information, connection relationship and image information; Input the operation task and the target device information into the safety measure generation model; wherein the safety measure generation model is obtained by training a topological perception enhanced model using a multi-modal feature vector; the multi-modal feature vector is generated according to multi-modal auxiliary data and topological features; the multi-modal auxiliary data includes: text data and image data of the target device; the topological features include: device connection relationship and hierarchical relationship extracted from the power grid topology map; the topological perception enhanced model is obtained by training a large language model according to training samples generated from the topological features and initial work tickets; the initial work ticket is generated by inputting the structured text instructions of the power grid knowledge graph into the large language model; the power grid knowledge graph is constructed according to the power grid topology map, the sequence rule and the restrictive rule of device operation; the sequence rule is the sequence rule of the target device state switching; the restrictive rule is the limiting rule of the unreasonable device state of the target device; Output safety measures through the safety measure generation model.
7. An electronic device comprising: A processor and a memory storing a program, characterized in that the program includes instructions that, when executed by the processor, cause the processor to perform the safety measure generation model construction method based on graph theory and large language models according to any one of claims 1-5.
Citation Information
Patent Citations
Power work ticket generation method and system based on relational graph convolutional neural network
CN116628220A
Safety measure generation method and system based on multi-task parallel work ticket of power distribution network
CN120931016A