Lightning early warning response strategy generation method and system based on search enhanced large model
Patent Information
- Application Number
- CN202611129502.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-28
- Publication Date
- 2026-10-16
AI Technical Summary
[0008]鉴于上述的分析,本发明实施例旨在提供一种基于检索增强大模型的雷电预警响应策略生成方法及系统,用以解决现有技术中风险定位易出现漏报与盲区,策略生成存在幻觉、缺乏合规约束、无法实现预警-防御-应急多维层次化作战指令闭环的问题
[0019]与现有技术相比,本发明至少可实现如下有益效果之一:
Smart Images

Figure CN122925967A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of lightning warning technology, and in particular to a method and system for generating lightning warning response strategies based on a retrieval-enhanced large model. Background Technology
[0002] Against the backdrop of global climate change, extreme severe convective weather and localized severe thunderstorms are exhibiting a trend of increasing frequency, concurrency, and intensity. For ultra-high-voltage AC / DC hybrid power grids spanning vast geographical areas, lightning disasters are not only the direct physical cause of insulation breakdown in transmission lines and damage to critical equipment in substations, but also a core risk source triggering system-wide cascading trips and large-scale power outages. In the strategic system of safe production in the power industry, the key to building a proactive disaster prevention and mitigation mechanism lies not only in the advance prediction of thunderstorm trajectories, but also in the ability to quickly, accurately, and compliantly generate risk prevention and emergency response measures covering the entire process when an approaching thunderstorm is predicted. These response measures must penetrate the macro-level meteorological warnings, reaching the physical defenses at the equipment level and the on-site safety operation guidelines at the personnel level, to effectively support the power grid control center's second-level emergency response decisions to meteorological disasters, fundamentally improving the dynamic operational stability and resilient self-healing capabilities of the new power system under the impact of extreme disasters.
[0003] Currently, the mainstream lightning warning response and prevention decision-making system in the power industry mainly relies on traditional expert experience rule bases and statistical distribution-based auxiliary decision-making systems. In the execution logic of these systems, the potential disaster-stricken areas covered by thunderstorm clouds are first delineated on a two-dimensional geographic information system (GIS) interface by accessing orange or red thunderstorm warning signals issued by meteorological departments and real-time monitoring pulses from the power grid lightning location system (LLS). Subsequently, the system backend retrieves a list of transmission lines and substations falling into the area based on preset static thresholds and simple "If-Then" hard-coded conditional statements. In the generation of response strategies, existing technologies typically rely on manual review of offline "Power System Lightning Protection Operation Regulations" and various paper-based emergency response plans, or a generic macro warning pop-up window (e.g., "Pay attention to lightning protection, strengthen inspections"). The final specific defensive operations (such as adjusting protection settings and activating backup lightning protection devices) and emergency repair resource allocation (such as material and vehicle dispatching and on-site safety supervision) depend entirely on the personal professional experience and subjective judgment of dispatchers and maintenance personnel at all levels.
[0004] However, the aforementioned existing technologies have revealed the following limitations and shortcomings when dealing with complex and ever-changing thunderstorm disasters and increasingly large power grid topologies: First, risk identification is highly susceptible to "missed reports" and "blind spots." Existing early warning decision-making systems based on simple geographic location matching merely mechanically superimpose lightning density and equipment coordinates in a two-dimensional Euclidean space. This completely severs the deep mechanisms of the power system as a non-Euclidean physical topology map, lacking a deep logical deduction mechanism for the complex topological relationships of the power grid and the physical insulation characteristics of equipment. The propagation of lightning overvoltage in the power grid has a strong topological penetration effect. It is limited by the nonlinear variation curve of the grounding resistance of each tower, the historical cumulative degradation degree of different insulators, and the micro-topography and micro-meteorological conditions around the line. This results in early warning results remaining only on the surface of the area, unable to accurately pinpoint vulnerable nodes that are about to be struck by lightning.
[0005] Second, generative decision-making based on large language models carries a serious risk of domain knowledge "illusion" and "derailment" from safety procedures, lacking a real-time compliance constraint framework. In recent years, some research has attempted to introduce general large language models (LLMs) to automatically generate emergency plans. However, a general large model is essentially an autoregressive black-box system that fits to massive unsupervised corpora using maximum likelihood probability. Internally, it does not parameterize and store highly vertical and real-time updated "Lightning Protection Technical Standards" or "Emergency Repair Procedures for Power Grid Disasters" for the power industry. When faced with rare fault conditions induced by extreme thunderstorms, the lack of external deterministic physical knowledge injection makes the general large model prone to serious logical "illusions," spontaneously fabricating seemingly reasonable but actually seriously violating the laws of electrical physics and potentially causing electric shock or injury (e.g., requiring unauthorized live-line work in the thunderstorm center area).
[0006] Third, the output structure of the prevention and response strategy is flat and its semantic granularity is coarse, failing to form a multi-dimensional, hierarchical operational command loop covering the entire timeline of "early warning-defense-emergency response." Faced with the rapidly changing impact of thunderstorms, power grid disaster prevention is a multi-dimensional collaborative project involving multiple time slices before, during, and after the event, as well as multiple business departments such as control, operation and maintenance, and safety supervision. Existing early warning systems typically output flat, unstructured, isolated alarm texts, or are limited to a single-dimensional information display at the control end. This coarse-grained information delivery model cannot automatically decouple and reorganize preventative measures based on the event's development sequence and the different roles of the audience. This single-layer, coarse-grained command distribution prevents on-site personnel from receiving customized operational guidance for their specific task nodes, significantly hindering the response efficiency and execution accuracy of the cross-departmental joint disaster relief system.
[0007] Therefore, there is an urgent need for a method and approach to generate lightning warning response strategies based on a retrieval-enhanced large model. This approach uses a logically connected power grid relationship graph as a foundation, integrates retrieval enhancement technology to obtain matching procedural text fragments, generates lightning warning response strategies, improves the accuracy and robustness of risk positioning, eliminates the risk of strategy illusion, and realizes the automated generation of preventive measures across the entire timeline of warning, defense, and emergency response. Summary of the Invention
[0008] Based on the above analysis, the embodiments of the present invention aim to provide a method and system for generating lightning early warning response strategies based on a retrieval-enhanced large model, in order to solve the problems in the prior art where risk positioning is prone to missed reports and blind spots, strategy generation suffers from illusions, lacks compliance constraints, and cannot achieve a closed loop of multi-dimensional hierarchical combat instructions for early warning, defense, and emergency response.
[0009] On one hand, embodiments of the present invention provide a method for generating lightning warning response strategies for retrieval enhancement large models, including: Meteorological observation data and power grid spatiotemporal data are acquired, and the meteorological observation data and the power grid spatiotemporal data are aligned with coordinates to generate a corresponding power grid relationship map; wherein, the power grid relationship map includes the node base features corresponding to each device node; Based on the physical relationship constraints corresponding to the spatiotemporal data of the power grid, a multi-layer graph convolutional network is used to perform feature aggregation on the power grid relationship graph to generate node risk features corresponding to each of the equipment nodes. Based on the risk characteristics of each node, matching procedure text fragments are extracted from the power grid procedure vector library; Using a trained multi-head large language model, inference calculations are performed based on the risk characteristics of each node, the matched procedural text fragments, and the task instructions to generate a corresponding lightning warning response strategy; wherein the lightning warning response strategy includes at least one of lightning risk warning, defense instructions, and emergency plan.
[0010] Furthermore, the spatiotemporal data of the power grid includes the device coordinates, connection relationships, and device characteristic data corresponding to each device node; The meteorological observation data and the power grid spatiotemporal data are coordinate aligned to generate a corresponding power grid relationship map, including: The meteorological feature tensor corresponding to the meteorological observation data is obtained using a meteorological fluid model. Construct a corresponding device feature tensor based on the device feature data corresponding to each device node; Based on the device coordinates corresponding to each device node, the meteorological feature tensor and the device feature tensor are aligned to obtain the node basis feature corresponding to each device node; The power grid relationship map is constructed based on the node base characteristics and connection relationships corresponding to each of the device nodes.
[0011] Further, based on the device coordinates corresponding to each device node, the meteorological feature tensor and the device feature tensor are coordinate aligned to obtain the node basis features corresponding to each device node, including: Based on the device coordinates corresponding to each device node, the meteorological feature tensor is cross-sampled to obtain the node meteorological tensor corresponding to each device node. For each device node, the corresponding device feature tensor and the node meteorological tensor are concatenated to obtain the node basis features.
[0012] Furthermore, based on the physical relationship constraints corresponding to the spatiotemporal data of the power grid, a multi-layer graph convolutional network is used to aggregate features of the power grid relationship graph to generate node risk features corresponding to each of the device nodes. This process includes multiple aggregations and corrections, with the node aggregation feature after the last correction serving as the node risk feature. Each aggregation and correction includes the following steps: A multi-layer graph convolutional network is used to perform feature aggregation on the edge aggregation features and node aggregation features after the previous correction, so as to generate new edge aggregation features and new node aggregation features corresponding to each device node. Based on the physical relationship constraints, the new edge aggregation features and the new node aggregation features are corrected to obtain the new corrected edge aggregation features and the new corrected node aggregation features.
[0013] Furthermore, the newly generated node aggregation feature is represented as follows: In the formula, Represents a non-linear activation function. Indicates time Equipment Nodes The corresponding node basis features are after The node aggregation features after secondary aggregation and correction; Represents device node The corresponding one containing self-loops adjacency matrix of order, , The device nodes are represented sequentially. Equipment Nodes The corresponding degree, Represents device node With device nodes The corresponding edge basis features are passed through The edge aggregation features after secondary aggregation and correction; Indicates the first The convolutional kernel weights corresponding to the layer.
[0014] Furthermore, the power grid procedure vector library includes multiple procedure text fragments and corresponding procedure vectors; Based on the risk characteristics of each node, matching procedure text fragments are extracted from the power grid procedure vector library, including: Map the risk characteristics of each node to a query vector; Search the power grid procedure vector library for the procedure vector that matches the query vector; The procedure text fragment corresponding to the matched procedure vector is taken as the matched procedure text fragment.
[0015] Furthermore, the risk characteristics of each node are mapped to a query vector, including: The trained dual-tower DPR is used to map the risk features of each node into a query vector; The training method for the dual-tower DPR includes: Construct positive sample pairs based on sample risk characteristics and corresponding sample procedures; Negative sample pairs are constructed based on the risk characteristics of the samples and any text fragment of the regulations other than the sample regulations in the power grid regulations vector library; The dual-tower DPR is trained using the positive sample pairs and the negative sample pairs.
[0016] Furthermore, the multi-headed large language model includes an early warning assessment head, an equipment defense head, and an equipment emergency response head; Using a trained multi-head large language model, based on the risk characteristics of each node, the matched procedural text fragments, and task instructions, inferences and calculations are performed to generate corresponding lightning warning response strategies, including: Construct a corresponding contextual cue tensor based on the risk characteristics of each node, the matched procedural text fragments, and the task instructions; The contextual cue tensor is input into the early warning assessment head and / or the device defense head and / or the device emergency head for autoregressive decoding, and the lightning risk warning and / or the defense command and / or the emergency plan are output.
[0017] Furthermore, it also includes: The lightning warning response strategy is converted into a work order, and the work order is sent to the power grid management system corresponding to the power grid spatiotemporal data.
[0018] On the other hand, embodiments of the present invention provide a lightning warning response strategy system for retrieving and enhancing large-scale models, comprising: The power grid relationship construction module is used to acquire meteorological observation data and power grid spatiotemporal data, perform coordinate alignment on the meteorological observation data and the power grid spatiotemporal data, and generate a corresponding power grid relationship map; wherein, the power grid relationship map includes the node base features corresponding to each device node; The graph processing module is used to perform feature aggregation on the power grid relationship graph based on the physical relationship constraints corresponding to the spatiotemporal data of the power grid, and generate node risk features corresponding to each of the equipment nodes by using a multi-layer graph convolutional network. The procedure management module is used to extract matching procedure text fragments from the power grid procedure vector library based on the risk characteristics of each node. The large model inference and prediction module is used to generate corresponding lightning warning response strategies by using a trained multi-head large language model to perform inference calculations based on the risk characteristics of each node, the matched procedural text fragments, and the task instructions; wherein the lightning warning response strategy includes at least one of lightning risk warning, defense instructions, and emergency plan.
[0019] Compared with the prior art, the present invention can achieve at least one of the following beneficial effects: 1. Coordinate alignment is performed on meteorological observation data and power grid spatiotemporal data to generate a corresponding power grid relationship map. The power grid relationship map reflects the connection relationship of each equipment node and the node base characteristics corresponding to each equipment node. This is used to perform feature aggregation to generate node risk features. Based on this power grid relationship map, multimodal feature cross-domain alignment and vulnerability inference are completed. This achieves a paradigm shift from superficial geographical location overlap to deep physical mechanism penetration in early warning. It can significantly improve the accuracy and robustness of multi-head large language models in locating high-risk lightning nodes. It solves the problem that traditional lightning-assisted decision-making systems rely solely on simple two-dimensional latitude and longitude matching, which cannot quantify the transient propagation attenuation of lightning electromagnetic pulses in specific line corridors and the stress resistance differences between different equipment individuals, resulting in frequent large-scale invalid alarms or missed alarms at critical nodes. Furthermore, matching procedural text fragments obtained from the power grid procedural vector library are used as input components of the multi-headed large language model. This ensures that every defense instruction and emergency plan of the multi-headed large language model has a solid and tamper-proof document procedural traceability basis, transforming the uncontrollable black box of the large model into a reliable professional disaster prevention decision-making assistant, eliminating the risk of strategy illusion, and realizing the automated generation of prevention measures across the entire time axis of early warning, defense, and emergency response.
[0020] 2. Based on equipment coordinates, cross-sampling of meteorological feature tensors is performed to align the coordinates of meteorological feature tensors and equipment feature tensors, achieving bilinear fusion of meteorological environment tensors and discrete equipment ledgers. During feature aggregation, graph convolutional neural networks and primitive relationships (represented by physical relationship constraints) are introduced to perform implicit inference of traveling wave intrusion on non-Euclidean power grid physical topology. This mechanism enables feature aggregation to "see through" the weaknesses of the power grid like human lightning protection experts. In the iterative process of feature aggregation and correction, high-risk equipment that is not at the absolute center of the thunderstorm but is prone to cascading tripping due to severe grounding grid corrosion or being located at critical topological connection points is accurately identified, completely breaking the technical limitations of traditional methods that "emphasize meteorology and neglect physics".
[0021] 3. Node risk features are mapped to query vectors. Regulations text fragments are retrieved from the power grid regulation vector library to obtain matching fragments. These fragments, along with the node risk features, are input into a multi-headed large language model. Based on Retrieval Enhanced Generation (RAG), regulatory knowledge is forcibly injected, achieving a deep integration of the multi-headed large language model's generation capabilities with the power industry's safety and compliance. This eliminates the "illusion" risk of decision-making in complex industrial scenarios using artificial intelligence applications. It also addresses the problem that existing technologies using large language models for automated contingency plan generation are prone to fabricating seemingly coherent but seriously erroneous operational suggestions that violate the "Lightning Protection Operation Regulations." Such "illusions" are absolutely intolerable in power grid dispatching, where safety requirements are extremely high. The method provided in this application establishes an enterprise-level compliance vector library (i.e., a power grid procedure vector library) containing millions of entity entries. It uses high-dimensional similarity calculation to recall and anchor procedure text fragments in real time, which serve as the mandatory input for the multi-head large language model trained in this application before autoregressive decoding. This technical solution, which combines a deterministic hard retrieval library with a probabilistic soft generation model, ensures that every lightning arrester operation step and every grounding resistance measurement suggestion in the final output has a solid and tamper-proof document procedure traceability basis.
[0022] 4. The multi-head large language model employs a three-tiered structured automatic decoding mechanism with multi-head attention decoupling, achieving end-to-end automated generation of preventative measures across the entire timeline of "early warning-defense-emergency," completely streamlining the business closed-loop execution link from disaster assessment to multi-departmental collaborative operations. This application has made in-depth task fine-tuning to the decoding layer of existing large language models, enabling the trained multi-head large language model to output multiple independent-dimensional response strategies based on complex joint input feature tensors (represented by contextual cue tensors). For example, the lightning risk warning output by the early warning assessment head provides the control center with accurate spatiotemporal early warning boundary characterization; the defense instructions output by the equipment defense head provide the operation and maintenance department with specific relay protection setting adjustments and equipment physical isolation measures; and the emergency plan output by the equipment emergency head generates meter-accurate safety insulation distance guidelines and material transportation plans for on-site repair teams. This hierarchical and granular instruction architecture directly transforms abstract meteorological risks into standardized work orders that the production system can directly issue and execute. It compresses the emergency decision-making process, which originally required several hours of consultation among multiple departments, to the millisecond level, realizing truly intelligent business disaster prevention and control. It solves the problem that in the face of sudden severe convective weather, existing technologies can only send coarse alarm texts to the dispatch screen, which seriously lacks differentiated guidance for different business roles, resulting in extremely high communication costs and time delays in the allocation of disaster relief resources.
[0023] In this invention, the above-described technical solutions can be combined with each other to achieve more preferred combinations. Other features and advantages of this invention will be set forth in the following description, and some advantages may become apparent from the description or be learned by practicing the invention. The objects and other advantages of this invention can be realized and obtained from what is particularly pointed out in the description and drawings. Attached Figure Description
[0024] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts. Figure 1 This is a flowchart illustrating a lightning warning response strategy generation method based on a retrieval-enhanced large model, as described in an embodiment of the present invention. Figure 2 This is a schematic diagram of the main modules of a lightning warning response strategy generation system based on a retrieval-enhanced large model, as described in an embodiment of the present invention. Detailed Implementation
[0025] Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which form part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not intended to limit the scope of the present invention.
[0026] A specific embodiment of the present invention discloses a method for generating lightning warning response strategies based on a retrieval-enhanced large model, such as... Figure 1 As shown, it includes steps S1-S4.
[0027] Step S1: Acquire meteorological observation data and power grid spatiotemporal data, perform coordinate alignment on the meteorological observation data and the power grid spatiotemporal data, and generate a corresponding power grid relationship map; wherein, the power grid relationship map includes the node base features corresponding to each device node.
[0028] Meteorological observation data and power grid spatiotemporal data are acquired and aligned with coordinates to generate a corresponding power grid relationship map. The power grid relationship map includes the node base features corresponding to each equipment node. In this embodiment, the power grid spatiotemporal data includes the equipment coordinates, connection relationships, and equipment feature data corresponding to each equipment node. Raw observation streams from national meteorological satellites and local Doppler radar stations are accessed in real-time via API interfaces as meteorological observation data. Equipment feature data and connection relationships between equipment nodes are obtained from discrete ledgers in the power transmission lifecycle management system (PMS) through asynchronous tasks. Equipment coordinates corresponding to each equipment node are obtained from the power GIS (Geographic Information System) ledger and the BeiDou / GPS positioning system. The process of aligning the meteorological observation data and power grid spatiotemporal data to generate the corresponding power grid relationship map specifically includes steps S11-S13.
[0029] Step S11: Use the meteorological fluid model to obtain the meteorological feature tensor corresponding to the meteorological observation data.
[0030] In this embodiment, a meteorological fluid model is used to obtain meteorological feature tensors corresponding to meteorological observation data. The model employs a WRF numerical weather prediction model, inputting meteorological observation data from national meteorological satellites and local Doppler radar stations to obtain gridded meteorological forecast data within a preset forecast period. Predicted data corresponding to key meteorological indicators are extracted from this data and then encoded into tensors, which serve as the meteorological feature tensors. In other embodiments, the meteorological fluid model uses a data-driven spatiotemporal ConvLSTM network.
[0031] For example, a meteorological fluid model is run at the computing center of the power grid system. It receives meteorological observation data from national meteorological satellites and local Doppler radar stations. The data resolution is 5 minutes, meaning the meteorological observation data is updated every 5 minutes. The preset prediction period is 2 hours, and the prediction step size is consistent with the data resolution. The model outputs meteorological forecast data for the next 2 hours (e.g., NetCDF or GRIB format). Predictions for key meteorological indicators (e.g., lightning leader probability, cloud-to-ground discharge intensity, cloud top height) at multiple times are extracted from this data and concatenated along the time and feature channel dimensions to form a meteorological feature tensor. This can be understood as the meteorological forecast data being distributed on a two-dimensional geographic network. Each pixel on the grid represents meteorological information at its corresponding physical location, and the resulting meteorological feature tensor can characterize the meteorological information on the geographic network. It should be noted that if the spatial resolution of each key meteorological indicator in the forecast data is different, the prediction data at multiple times corresponding to each key meteorological indicator are resampled to a unified spatial resolution, for example, through linear interpolation sampling.
[0032] In this embodiment, the meteorological feature tensor is represented as: , This indicates a batch, representing meteorological observation data from different channels or different spatial power grid areas. For example, a meteorological feature tensor obtained based on meteorological observation data from the first power grid area (such as dividing power grid areas by city) or a meteorological feature tensor obtained based on meteorological observation data from the second power grid area. Representing the time dimension, based on the previous example, with a preset prediction period of 2 hours and a prediction step size of 5 minutes, then... This allows meteorological feature tensors to be used to characterize the time-varying sequence of forecast data within the same geographic region; The feature channel dimension corresponding to the meteorological feature tensor is determined based on the number of key meteorological indicators, as shown in the aforementioned example. ; This indicates the spatial dimension corresponding to the meteorological forecast data, such as the coverage area of the meteorological forecast data. Spatial resolution is The spatial dimension of the meteorological feature tensor .
[0033] It should be noted that the processing can be performed batch by batch, depending on the computing performance of the computer or other device executing the method of this embodiment, or multiple batches can be processed in parallel. The processing method for each batch is the same, and subsequent steps can be applied to any batch. No further special explanation is given for the batch dimension.
[0034] Step S12: Construct the corresponding device feature tensor based on the device feature data corresponding to each device node.
[0035] In this embodiment, the spatiotemporal data of the power grid includes equipment characteristic data of the power grid equipment. For example, for a certain power grid area, the discrete ledger in the existing transmission life cycle management system (PMS) of the power grid area is retrieved as equipment characteristic data. This includes static information such as insulator material, construction year, line, tower type, grounding resistance reference value, and insulator creepage distance of 1256 power grid equipment (e.g., physical towers, substations, insulators) in the power grid area, as well as detection data such as insulator pollution degree (e.g., equivalent salt density), lightning flashover history record, insulator leakage current monitoring data, historical tripping frequency, and measured resistance value of the grounding grid in the most recent major overhaul. The discrete ledger also includes the connection relationship between each power grid equipment.
[0036] Each power grid device is considered a device node. A device feature tensor is constructed based on the device feature data of all device nodes. The device feature data of each device node reflects its lightning resistance level, and the constructed device feature tensor characterizes the physical vulnerability of each device node. In this embodiment, one-hot encoding is performed on non-numerical device feature data (e.g., insulator material), and min-max normalization is performed on numerical device feature data to eliminate the influence of dimensional differences. The encoded or normalized data is then concatenated along the feature channel dimension to form the device feature tensor, represented as follows: ,in, This indicates the number of device nodes, based on the previous example. , This represents the feature channel dimension corresponding to the device feature tensor, based on the previous example.
[0037] Step S13: Align the meteorological feature tensor and the device feature tensor with coordinates according to the device coordinates corresponding to each device node to obtain the node basis feature corresponding to each device node.
[0038] Based on the device coordinates corresponding to each device node, the meteorological feature tensor and the device feature tensor are aligned to obtain the node basis features corresponding to each device node, specifically including steps S131-S132.
[0039] Step S131: Based on the device coordinates corresponding to each device node, cross-sample the meteorological feature tensor to obtain the node meteorological tensor corresponding to each device node.
[0040] In this embodiment, the device coordinates corresponding to each device node include precise geographical latitude and longitude coordinates and elevation coordinates.
[0041] Based on the device coordinates corresponding to each device node, the meteorological feature tensor is cross-sampled to obtain the node meteorological tensor corresponding to each device node. In this embodiment, the grid space interpolation algorithm is used to cross-sample the meteorological feature tensor to achieve coordinate alignment and eliminate dimensional barriers.
[0042] For example, the time dimension of the meteorological feature tensor is The meteorological feature tensor is divided into single-time meteorological feature tensors corresponding to each time point according to different time points. The corresponding hourly meteorological feature tensor is represented as: ; Coordinate alignment is performed using the precise geographic latitude and longitude of each device node, aligning the device nodes. The corresponding device coordinates are represented as Using grid space interpolation algorithms (such as bilinear interpolation functions) In a continuous meteorological grid composed of meteorological feature tensors, the meteorological feature data of the physical location of the device is precisely extracted and used as the nodal meteorological tensor corresponding to the device node, represented as follows: It is understandable that in the continuous meteorological grid composed of meteorological feature tensors, the coordinates of the grid pixels corresponding to each grid can correspond one-to-one with the geographical range, spatial resolution and real physical location covered by meteorological observation data or meteorological forecast data. By extracting the node meteorological tensor corresponding to each device node from the meteorological feature tensor, the digital perception of the physical state of each power grid device under the impact of thunderstorms is realized.
[0043] Step S132: For each device node, concatenate the corresponding device feature tensor and the node meteorological tensor to obtain the node basis features.
[0044] For each device node, the corresponding device feature tensor and node meteorological tensor are concatenated to obtain the node basis features corresponding to that device node. In this embodiment, a bilinear interpolation method is used to concatenate the device feature tensor and the node meteorological tensor, deeply fusing the extreme stress of the meteorological dimension (represented by the meteorological feature tensor) with the vulnerability of the power grid equipment (represented by the device feature tensor). The lightning in the sky (represented by the node meteorological tensor) and the towers on the ground (represented by the device feature tensor) are converted into computable high-dimensional continuous feature vectors, i.e., node basis features, providing a data foundation with consistent physical dimensions for subsequent inferences.
[0045] For example, the node basis features are represented as In the formula, This represents bilinear interpolation. Represents device node At any moment The corresponding nodal meteorological tensor, Represents the device characteristic tensor. , The learnable projection weight matrix can be obtained through joint training with a multi-head large language model, for example, by jointly training with a multi-head large language model and freezing the multi-head large language model during the joint training process. , The training process involves randomly assigning values to matrix elements based on a Gaussian distribution, calculating the loss gradient using historical real lightning strike fault samples through backpropagation, and iteratively updating the matrix to obtain new elements.
[0046] In other embodiments, the device feature tensor and the node meteorological tensor can be concatenated using dimensional concatenation and linear projection methods to determine a uniform-dimensional node basis feature for each device node, represented as follows: In the formula, This represents an activation function, such as the ReLU function; This represents the learnable projection weight matrix, which can be obtained as described above. , ; Represents device node At any moment The corresponding nodal meteorological tensor, Represents the device nodes in the device feature tensor The vector formed by the corresponding tensor elements; Indicates splicing; This represents the learnable projective weight bias, and... Acquired synchronously.
[0047] In other embodiments, an attention mechanism can be used to concatenate the device feature tensor and the node meteorological tensor. For example, for the device node... At any moment Corresponding nodal meteorological tensor Perform projection mapping to obtain the mapped nodal meteorological tensor. ,in, This represents the learnable projective weight matrix. Indicates the feature dimension after mapping. This represents the feature channel dimension corresponding to the meteorological feature tensor; and the device nodes in the device feature tensor. The vector formed by the corresponding tensor elements Perform projection mapping to obtain the mapped vector. ,in, This represents the learnable projective weight matrix. Indicates the feature dimension after mapping. Represents the feature channel dimension corresponding to the device feature tensor; calculates and The attention weights among the nodes are weighted and fused to output the node basis features corresponding to that device node, represented as follows: In the formula, , They represent , The transpose of . Where, , Acquisition Principle and , same.
[0048] By splicing the equipment feature tensor and the nodal meteorological tensor, the coupling point between external meteorological stress and the vulnerability of internal equipment in the power grid system can be found. By splicing through bilinear interpolation or attention mechanism, the nodal basis features can also learn where thunderstorms are strong and where the power grid equipment insulators are dirtiest / oldest. By integrating the features of both the sky and earth domains into the nodal basis features, the numerical value of the feature elements can be used to characterize the physical breakdown probability basis of the equipment node.
[0049] Step S14: Construct the power grid relationship map based on the node base features and connection relationships corresponding to each device node.
[0050] A power grid relationship graph is constructed based on the node base features and connection relationships corresponding to each device node. In this embodiment, power grid equipment is used as graph nodes (i.e., device nodes), the node base features corresponding to the device nodes are used as node attributes of the device nodes, and the actual power grid connection relationships of the power grid equipment are used to construct the edges between each device node, thus constructing a power grid relationship graph, including the node set composed of all device nodes and the edge set composed of all edges. For example, 500kV and above level power grid equipment (towers, substations, insulators, etc.) covering the target area are selected. Based on the actual transmission line connection relationships of each power grid equipment, if two towers are physically connected by the same circuit, then an undirected edge (or a directed edge considering the power flow direction) is established for these two nodes, thereby transforming the discrete device nodes into a power grid relationship graph, where each device node has a corresponding topology ID. It should be noted that a corresponding power grid relationship graph can be constructed separately for the node base features corresponding to each device node at each time, or a single power grid relationship graph can be constructed for the node base features corresponding to each device node at all times, with the node base features at each time being used as multiple node attributes of each device node.
[0051] Furthermore, to capture the complex nonlinear knowledge relationships between different device nodes (e.g., the failure probability of a specific type of insulator under a specific lightning strike amplitude) and construct the edge features between each device node, this embodiment performs one-hot encoding on the connection relationships between each device node to obtain the corresponding edge-based features. For example, connection relationships include no connection, directed electrical connection, and component inclusion; one-hot encoding is performed to obtain the corresponding edge-based features, represented as follows: Device Node With device nodes If there is no connection between them, the corresponding edge basis feature is represented as: If a directed electrical connection exists, the current flows from the device node. Flow to device nodes , represented as The corresponding edge basis features are represented as If there are connections involving components, the device node Includes device nodes , represented as The corresponding edge basis features are represented as .
[0052] Through steps S11-S14, tensor mapping and coordinate alignment are performed on continuous meteorological observation data, discrete equipment insulation ledgers, historical lightning trip records, and real-time power grid operation flow (represented by power grid spatiotemporal data) to construct a power grid relationship map with logical connectivity.
[0053] Step S2: Based on the physical relationship constraints corresponding to the spatiotemporal data of the power grid, use a multi-layer graph convolutional network to perform feature aggregation on the power grid relationship graph to generate node risk features corresponding to each of the device nodes.
[0054] Based on the physical relationship constraints corresponding to the spatiotemporal data of the power grid, a multi-layer graph convolutional network is used to aggregate features of the power grid relationship graph, simulating the nonlinear cascading effect of lightning overvoltage propagation along the line, and generating node risk features corresponding to each equipment node to identify topological weak points in the entire power grid relationship graph. For example, a three-layer spatial graph convolution (GCN) is used for feature aggregation to simulate the propagation of topological information. In this embodiment, step S2 includes multiple aggregations and corrections, with the node aggregation features after the last correction used as the node risk features. Each aggregation and correction includes steps S21-S22.
[0055] Step S21: Use a multi-layer graph convolutional network to perform feature aggregation on the edge aggregation features and node aggregation features after the previous correction, and generate new edge aggregation features and new node aggregation features corresponding to each device node.
[0056] A multi-layer graph convolutional network is used to aggregate the edge and node features after the previous correction, generating new edge and node aggregate features corresponding to each device node. In essence, inputting the power grid relationship graph into the multi-layer graph convolutional network for feature aggregation involves aggregating the edge-based features between device nodes and the node-based features of each device node. The first feature aggregation is based on the edge-based features between device nodes and the node-based features corresponding to each device node.
[0057] First, the edge aggregation features are updated based on the previously corrected node aggregation features to generate new edge aggregation features.
[0058] In this embodiment, the edge basis features of all device nodes at each time point are independently aggregated and corrected multiple times. The aggregation and correction methods are the same at different time points, with time as the basis. Equipment Nodes The corresponding node basis features are used for the first time. Taking secondary aggregation and correction as an example, device nodes With device nodes The corresponding new edge aggregation features Through formula Calculate, where, This represents a non-linear activation function; in this embodiment, the ReLU function is used. Indicates the first The convolution weights corresponding to the layers are determined based on training. Indicates the first The edge convolution bias corresponding to the layer, and Synchronous determination; , Representing time in sequence Device Node Equipment Nodes The corresponding node basis features are processed Sub-aggregation and corrected node aggregation features; Indicates time Device Node Equipment Nodes The corresponding edge basis features are passed through The edge aggregation features after secondary aggregation and correction can be understood as the device nodes at different times. Equipment Nodes The corresponding edge-based features can be the same, but they will differ after multiple aggregations and corrections. In other embodiments, before performing the feature aggregation for the first time, the edge-based features can be mapped to low-dimensional dense vectors (Embedding) before feature aggregation is performed.
[0059] Based on the same principle, time can be obtained. Equipment Nodes With device nodes The corresponding new edge aggregation features , represented as In the formula, Represents a non-linear activation function. Indicates the first The convolution weights of the edges corresponding to the layers, Indicates the first The edge convolution bias corresponding to the layer, , Representing time in sequence Device Node Equipment Nodes The corresponding node basis features are processed Sub-aggregation and corrected node aggregation features; Indicates time Device Node Equipment Nodes The corresponding edge basis features are passed through Sub-aggregation and corrected edge aggregation features.
[0060] in , Through training, it was determined that in this embodiment, the multi-layer graph convolutional network and the multi-head large language model are jointly trained. During the joint training process, the multi-head large language model is frozen, and the multi-layer graph convolutional network is trained, including determining... , First of all , Initialization is based on random values assigned by Gaussian distribution. The lightning risk warning error is calculated using historical real lightning strike fault samples as the loss gradient through backpropagation algorithm, and the values are continuously updated iteratively.
[0061] Secondly, the aggregation features of each node are updated based on the new edge aggregation features to generate new aggregation features for each node.
[0062] In this embodiment, the node basis features of all device nodes at each time point are independently aggregated and corrected multiple times. The aggregation and correction methods are the same at different time points, with time as the basis. Equipment Nodes The corresponding node basis features are used for the first time. Taking the second polymerization and correction as an example, let's take the first... The layered graph convolutional network performs feature aggregation, and the new node aggregated feature generated for this device node is represented as follows: In the formula, This represents a non-linear activation function; in this embodiment, the ReLU function is used. Indicates time Equipment Nodes The corresponding node basis features are processed Sub-aggregation and corrected node aggregation features; Represents device node The corresponding one containing self-loops adjacency matrix, device nodes for In this embodiment, any one of the device nodes, and The values are equal; , The device nodes are represented sequentially. Equipment Nodes The corresponding degree, i.e., the number of device nodes connected by an edge; Represents device node With device nodes The corresponding edge basis features are passed through Sub-aggregation and corrected edge aggregation features; Indicates the first The convolutional kernel weights corresponding to each layer are determined through training, and the determination principle is the same as... same.
[0063] Based on the same principle, device nodes can be calculated. No. After feature aggregation, the node aggregated features are performed again. In the formula, Represents a non-linear activation function. Indicates time Equipment Nodes The corresponding node basis features are processed Sub-aggregation and corrected node aggregation features; Represents device node The corresponding one containing self-loops adjacency matrix, device nodes for Any device node in the process; , The device nodes are represented sequentially. Equipment Nodes The corresponding degree, Represents device node With device nodes The corresponding edge basis features are passed through Sub-aggregation and corrected edge aggregation features; Indicates the first The convolutional kernel weights corresponding to the layer.
[0064] The propagation of lightning traveling waves in the power grid is refracted and reflected due to line bifurcation. By using multi-layer graph convolutional networks for feature aggregation, the physical process of lightning overvoltage energy attenuating and distributing to surrounding nodes along the power grid topology can be accurately simulated.
[0065] Step S22: Based on the physical relationship constraints, correct the new edge aggregation features and the new node aggregation features to obtain the new corrected edge aggregation features and the new corrected node aggregation features.
[0066] In this embodiment, in order to capture the complex nonlinear knowledge relationships between different equipment nodes (such as the fault stamp of a specific type of insulator under a specific lightning strike amplitude), and to use physical relationship constraints to characterize common sense of lightning protection engineering (such as: if two adjacent towers have a large elevation difference, the cross section is more susceptible to lightning strikes), the knowledge element learning TransE is used to construct physical constraint functions to correct the new aggregation features of each node, thereby obtaining new corrected node aggregation features.
[0067] First, the translational deviations between each device node are calculated based on physical relationship constraints.
[0068] Adjacent device nodes connected by an edge should satisfy the corresponding physical relationship constraints, expressed as a relation vector equation. In the formula, This represents the header entity features corresponding to adjacent device nodes. This represents the tail entity feature corresponding to adjacent device nodes. This represents the relational characteristics between adjacent device nodes. For example, it represents adjacent device nodes connected by directed edges. , will node The corresponding node aggregation features are used as head entity features, and the nodes are... The corresponding node aggregation features are used as tail entity features.
[0069] In this embodiment, for adjacent device nodes connected by edges, the corresponding translation deviation is calculated to correct the edge aggregation characteristics and node aggregation characteristics of that device node. (Based on time...) Directed edge medium equipment node The corresponding node basis feature Taking the correction of node aggregation features after secondary aggregation as an example, the calculation device node Equipment Nodes Corresponding translation deviation In the formula, Indicates time Device Node The corresponding node basis features are used for the first time. The node aggregation features are obtained by secondary feature aggregation. Indicates time Device Node The corresponding node basis features are used for the first time. The node aggregation features obtained from secondary feature aggregation are based on the direction of directed edges. As a head entity feature, As a characteristic of the tail entity, As a device node With device nodes Corresponding relational features.
[0070] In other embodiments, by or Calculate the translational deviation, where, Represents the L1 norm distance. This represents the L2 norm distance.
[0071] Secondly, based on each translation deviation, the edge aggregation features between each device node and the node aggregation features corresponding to each device node are corrected.
[0072] Based on each translation deviation, the new edge aggregation features and new node aggregation features obtained in step S21 are corrected to obtain new corrected edge aggregation features and new corrected node aggregation features.
[0073] time Device Node Corresponding edge aggregation features Node aggregation features For example, the corrected edge aggregation feature is represented as follows: The corrected node aggregation features are represented as follows: In the formula, This represents the correction factor, which can be set based on experience.
[0074] In other embodiments, the corrected edge aggregation features are represented as The corrected node aggregation features are represented as follows: .
[0075] It should be noted that if a device node corresponds to multiple translation deviations, the mean, minimum, maximum, or sum of the translation deviations can be used to correct the edge aggregation features and node aggregation features corresponding to that device node.
[0076] Based on physical relationship constraints, the knowledge element learning TransE is used to correct the node aggregation features obtained in step S21, and noise that does not conform to the physical rules of the power grid is eliminated. The correction goal is to minimize the translation deviation of the node aggregation features and edge aggregation features corresponding to all equipment nodes. The power grid relationship map is updated with the node aggregation features and edge aggregation features, and the updated power grid relationship map is urged to accurately capture the physical correlation between each equipment node.
[0077] In this embodiment, the first aggregation and correction uses a first-order adjacency matrix containing self-loops. The first-layer graph convolutional network enables each device node to exchange vulnerability information with its surrounding one-hop neighbor nodes. The deeper graph convolutional network can capture the cascading failure risk within the multi-hop range. After multiple iterations, the node aggregation features of each device node output by the last layer graph convolutional network are the high-order graph topology risk representation feature tensor that integrates global topology information. The corrected node aggregation features serve as the node risk features corresponding to each device node. The feature tensor composed of the node risk features corresponding to all device nodes can represent the logic vulnerability of the power grid.
[0078] Feature aggregation is performed based on power grid knowledge graph and physical relationship constraints. By making full use of deep representation learning and graph neural network reasoning technology based on knowledge graph paths, potential physical weak links in the propagation path of lightning intrusion waves can be calculated from the massive power grid equipment node connection relationships. These weak links include tension towers with severe grounding grid aging or terminal stations with insufficient insulation creepage distance. This improves the accuracy of subsequent multi-head large language model output of lightning risk warnings.
[0079] Furthermore, after obtaining the node risk characteristics corresponding to each device node, the following is also included: High-risk and vulnerable nodes are identified based on the node risk characteristics of each device node.
[0080] In this embodiment, the node risk features corresponding to each device node are mapped to corresponding risk probability values. Based on each risk probability value and a preset dynamic security threshold, high-risk and vulnerable nodes are identified. For example, the multi-layer graph convolutional network also includes a fully connected layer. The aggregated features of each node obtained from the last calibration (i.e., node risk features) are input into the fully connected layer, which maps each node risk feature to a risk probability value, for example, at time [time value missing]. Equipment Nodes Corresponding risk probability value In the formula, Indicates time Equipment Nodes Corresponding node risk characteristics , The weights and biases of the fully connected layer can be determined through training. The risk probability values for each device node are compared with a preset dynamic safety threshold. If the risk probability value of a device node exceeds the corresponding dynamic safety threshold, the device node is identified as a high-risk, vulnerable node. The dynamic safety threshold is set based on the statistical distribution of actual failures under similar historical thunderstorm conditions.
[0081] In other embodiments, high-risk vulnerable nodes are identified by comparing the node risk characteristics corresponding to each device node with a preset health baseline state. For example, the Euclidean distance between the node risk characteristics corresponding to each device node and the health baseline state vector is calculated. If the Euclidean distance for a device node exceeds a distance threshold, that device node is identified as a high-risk vulnerable node. The health baseline state vector is set based on the statistical distribution of node risk characteristics of device nodes under similar historical thunderstorm weather conditions, and the distance threshold is set empirically.
[0082] Step S3: Based on the risk characteristics of each node, extract matching procedure text fragments from the power grid procedure vector library.
[0083] In this embodiment, to ensure the professionalism and legality of the corresponding prevention measures, a power grid procedure vector library is established in advance. Based on the node risk characteristics corresponding to each high-risk and vulnerable node, matching procedure text fragments are extracted from the power grid procedure vector library. Specifically, the power grid procedure vector library is established through step S30, and step S3 is executed through steps S31-S33.
[0084] Step S30: Construct a power grid procedure vector library based on the standardized risk prevention corpus; wherein, the power grid procedure vector library includes multiple procedure text fragments and the procedure vector corresponding to each procedure text fragment.
[0085] First, collect standardized risk prevention data, including examples such as the "Technical Specification for Lightning Protection and Grounding", "Specification for Live Working on High Voltage Lines", "Safety Regulations for On-site Emergency Repair Operations of State Grid", and localized "Emergency Plans for Disaster Prevention and Repair".
[0086] Secondly, the risk prevention corpus is segmented into multiple procedural text fragments. In this embodiment, text segmentation can employ existing technologies, such as using embedding models (e.g., BERT, SimCSE) to encode sentences or paragraphs in the risk prevention corpus into vectors, and then using the semantic similarity of vectors of adjacent sentences or paragraphs to determine whether segmentation is necessary, thereby automatically finding natural semantic transition points and generating the final procedural text fragments; alternatively, the AntSK-FileChunk method or other existing technologies can be used for text segmentation, without limitation. Furthermore, the procedural text fragments obtained from text segmentation can be manually cleaned to further ensure the validity of each procedural text fragment in the power grid procedural vector library.
[0087] Then, each procedure text fragment is encoded into a corresponding procedure vector. In this embodiment, a trained Dense Passage Retriever (DPR) is used to encode all procedure text fragments into corresponding procedure vectors, forming a dense knowledge vector library containing millions of entries, namely the power grid procedure vector library, represented as follows: , among which, the The procedure vector corresponding to each procedure text fragment , The vector dimension representing the procedure vector, for example, 768 dimensions. Indicates the number of code text segments.
[0088] Step S31: Map the risk features of each node to a query vector.
[0089] In this embodiment, the node risk characteristics corresponding to high-risk and vulnerable nodes are mapped to query vectors.
[0090] In this embodiment, the trained dual-tower DPR is used to map the node risk features corresponding to high-risk vulnerable nodes into query vectors. The dual-tower DPR includes a query tower and a paragraph tower. The query tower performs the mapping of node risk features corresponding to high-risk vulnerable nodes into query vectors, while the paragraph tower performs the encoding of all procedure text fragments into corresponding procedure vectors in step S30. It is understood that the dense paragraph retrieval unit used in step S30 operates on the same principle as the paragraph tower.
[0091] In other embodiments, a fully connected projection layer is used to map the node risk features corresponding to high-risk and vulnerable nodes into query vectors. For example, the fully connected projection layer employs a multilayer perceptron to map the node risk features to the same semantic dimension space aligned with the power grid specification vector library, at any given time... High-risk and vulnerable nodes The corresponding query vector is represented as In the formula, Indicates time High-risk and vulnerable nodes Corresponding node risk characteristics This represents the projection weight matrix corresponding to the multilayer perceptron, which is obtained through training.
[0092] In this embodiment, the dual-tower DPR is obtained through training, and the training method includes steps a-c. In other embodiments, the fully connected projection layer can be a separate multilayer perceptron, or it can be used as a component of a multi-head large language model. The fully connected projection layer and the dense paragraph retrieval unit can be jointly trained. It is understood that the fully connected projection layer and the dense paragraph retrieval unit can be trained based on the same principle.
[0093] Step a: Construct positive sample pairs based on sample risk characteristics and corresponding sample procedures.
[0094] Historical power grid operation data, historical meteorological and lightning data are extracted as meteorological observation data and power grid spatiotemporal data. Referring to steps S1-S2, node risk characteristics corresponding to each historical moment for each equipment node are generated as sample risk characteristics. From the historical power grid operation data, the countermeasures taken by each equipment node when facing thunderstorm risks are extracted, and the procedural text fragments included in the countermeasures are obtained as sample procedures. Based on the node risk characteristics and the time information corresponding to the countermeasures, the sample risk characteristics and sample procedures are time-aligned, and the time-aligned sample risk characteristics and sample procedures are used as positive sample pairs. For example, equipment nodes... At a certain moment in history Corresponding sample risk characteristics The response measures taken by the device node at that moment include the first... A fragment of the procedure text ,Will and As positive sample pairs.
[0095] Step b: Construct negative sample pairs based on the sample risk characteristics and any of the procedure text fragments in the power grid procedure vector library other than the sample procedure.
[0096] Negative samples are constructed based on the sample risk characteristics and any text fragment of a regulation other than the sample regulation in the power grid regulation vector library. For example, ... and the ( (a fragment of a procedure text) As negative sample pairs.
[0097] Step c: Train the dual-tower DPR using the positive sample pairs and the negative sample pairs.
[0098] Based on the risk characteristics of multiple samples, multiple positive and negative sample pairs are constructed for training the dual-tower DPR. In this embodiment, the query tower and the segment tower are alternately frozen and alternately trained.
[0099] Taking the frozen query tower and training paragraph tower as examples, the process includes: using the paragraph tower to encode the procedure text fragments in the positive sample pair into corresponding sample procedure vectors; using the frozen query tower to map the sample risk features in the positive sample pair into sample query vectors; and forming a positive vector sample pair by combining the sample procedure vector and the sample query vector. Similarly, using the paragraph tower to encode the procedure text fragments in the negative sample pair into corresponding sample vectors; using the frozen query tower to map the sample risk features in the negative sample pair into sample query vectors; and forming a negative vector sample pair by combining the sample procedure vector and the sample query vector. The paragraph tower is then trained and updated using contrastive learning techniques, which will not be elaborated upon here.
[0100] By training the dual-tower DPR through contrastive learning, the high-dimensional query vectors of nodes (i.e., sample risk features and node risk features) and procedural text fragments are forced to be mapped to the same metric space (Latent Space), thereby ensuring absolute comparability when using cosine similarity calculation.
[0101] By using the fully connected projection layer obtained through the above training to map the node risk features corresponding to high-risk and vulnerable nodes into query vectors, the node risk features corresponding to high-risk and vulnerable nodes can be mapped into the same metric space (Latent Space) as the procedure vectors in the power grid procedure vector library. This ensures the comparability of query vectors and procedure vectors, and guarantees that the subsequent matched procedure vectors and recalled procedure text fragments (i.e., the procedure text fragments corresponding to the matched procedure vectors) can accurately adapt to the procedures corresponding to the node risk features of high-risk and vulnerable nodes, covering items such as surge arrester protection range calculation and prohibition of live work during thunderstorms.
[0102] Step S32: Search for a procedure vector that matches the query vector from the power grid procedure vector library.
[0103] The system searches for a matching procedure vector in the power grid procedure vector library. In this embodiment, cosine similarity is used to characterize the matching degree between the query vector and the procedure vector, thereby enabling the search within the power grid procedure vector library. In other embodiments, Euclidean distance or other methods of quantizing vector distance can also be used to characterize the matching degree between the query vector and the procedure vector; this is not a limitation here.
[0104] For example, calculating time High-risk and vulnerable nodes The cosine similarity between the corresponding query vector and the vectors of each regulation in the power grid regulation vector library. In the formula, Indicates time High-risk and vulnerable nodes Corresponding query vector The length of the mold, Indicates the first Each procedure vector The module length is based on the preset value. The phase procedure determines the matching procedure vector. For example, the top 5 procedure vectors are selected as the procedure vectors for query vector matching. Then, the procedure text fragments corresponding to the matching procedure vectors are obtained. This enables real-time matching and capture of procedure text fragments, including items such as the calculation of the protection range of specific surge arresters and the prohibition of live work during thunderstorms, for each high-risk and vulnerable node based on the corresponding node risk characteristics.
[0105] The pre-stored code text fragments and corresponding code vectors in the power grid code vector library are a collection of authoritative manuals that are professional, legal, and compliant. By searching for matching code vectors, the most semantically fitting code text fragments can be found for query vectors corresponding to high-risk and vulnerable nodes. For example, when a specific node feature vector (query vector) of "high altitude, high insulator leakage current, and facing strong lightning strikes" enters the code vector space for retrieval, the code fragment with the highest cosine similarity in high-dimensional space is bound to be the most semantically fitting for the disaster scenario (high-risk and vulnerable node). This allows for the precise retrieval of highly targeted emergency prevention items for the high-risk and vulnerable node, such as "corresponding surge arrester setting adjustment" or "live-line work prohibition".
[0106] Step S33: Use the procedure text fragment corresponding to the matched procedure vector as the matched procedure text fragment.
[0107] For each high-risk vulnerable node, the procedure text fragments corresponding to one or more procedure vectors matched are taken as the procedure text fragments matched for that high-risk vulnerable node. For example, the top similarity-ranked fragments are extracted. The procedure text fragment corresponding to the procedure vector is used as the procedure text fragment matched for the high-risk vulnerable node.
[0108] In this embodiment, steps S31-S32, using the Deep Integration Retrieval Enhanced Generation (RAG) technology, retrieve matching procedural text fragments from the power grid procedural vector library as input to the multi-headed large language model. This ensures that the subsequent input prompts for the multi-headed large language model are 100% directly derived from a rigorously reviewed, localized static power grid procedural vector library (such as the "Disaster Prevention and Emergency Repair Plan"). This allows the multi-headed large language model to effectively acquire enterprise standards and local plans when generating preventative measures. It injects immutable legal norms and physical common sense boundaries into the lightning warning response strategy generated by the multi-headed large language model, completely eliminating the risk of illusion caused by professional terminology in the large model, improving the compliance, timeliness, and security of the generated defense and emergency suggestions, and enabling the lightning warning response strategy generated by the multi-headed large language model to serve as the execution basis for high-reliability power grid dispatch.
[0109] Step S4: Using the trained multi-head large language model, perform inference calculations based on the risk characteristics of each node, the matched procedural text fragments, and the task instructions to generate a corresponding lightning warning response strategy; wherein the lightning warning response strategy includes at least one of lightning risk warning, defense instructions, and emergency plan.
[0110] Using the trained multi-head large language model, inference calculations are performed based on the risk characteristics of each node, the matched procedural text fragments, and the task instructions to generate corresponding lightning warning response strategies. The lightning warning response strategies include at least one of lightning risk warning, defense instructions, and emergency plans. In this embodiment, the multi-head large language model includes a hidden layer, a warning assessment head, an equipment defense head, and an equipment emergency head. Step S4 specifically includes steps S41-S42.
[0111] Step S41: Construct a corresponding contextual cue tensor based on the risk characteristics of each node, the matched procedural text fragments, and the task instructions.
[0112] In this embodiment, for each high-risk and vulnerable node, a structured Prompt word stream is constructed as a contextual prompt tensor based on the node risk characteristics corresponding to the high-risk and vulnerable node, the matched procedural text fragments, and the task instructions. This is then formally fed into the hidden layer of the multi-head large language model. The hidden layer is used to map the structured Prompt word stream into the contextual prompt tensor, forming a joint tensor that integrates high-dimensional physical computation and deterministic normative knowledge. This ensures that every decision suggestion generated subsequently has compliance and traceability.
[0113] In this embodiment, the multi-head large language model also includes a token segmenter, which inputs the matched procedure text fragments into the multi-head large language model. The token segmenter of the multi-head large language model converts the input procedure text fragments into a token sequence, which constitutes a compliance constraint tensor. The hidden layer of the multi-head large language model maps the structured Prompt prompt word stream composed of the node risk features corresponding to high-risk and vulnerable nodes, the compliance constraint tensor, and the task instructions into a context prompt tensor.
[0114] In other embodiments, a separate tokenizer can be used to convert the matched procedural text fragments into a token sequence, which is then used as a compliance constraint tensor and input into a multi-head large language model. The hidden layer of the multi-head large language model maps the structured Prompt word stream consisting of the node risk features corresponding to high-risk and vulnerable nodes, the compliance constraint tensor, and the task instructions into a contextual prompt tensor.
[0115] For example, time High-risk and vulnerable nodes The corresponding context hint tensor is represented as Used to characterize "[Physical Input: Node Risk Characteristics]" Knowledge Injection: RAG Compliance Constraints [Task Instructions:] 】".
[0116] In this embodiment, task instructions are represented by tokens. The task indicators corresponding to each high-risk vulnerable node include instruction fine-tuning tokens that guide the early warning assessment head and / or the equipment defense head and / or the equipment emergency response head in autoregressive decoding, such as `<early warning assessment>`, `<equipment defense>`, and `<emergency repair>`. These can be obtained through supervised fine-tuning (SFT), for example... To fine-tune the tokens corresponding to the instructions for "generating disaster mitigation measures covering three levels: early warning assessment, equipment defense, and emergency repair," a multi-headed large language model was trained and fine-tuned. During the training and fine-tuning phase, a dataset containing numerous standard power disaster prevention assessment reports was constructed, and these specific level-defining tokens were explicitly inserted into the dataset. Through autoregressive training, the multi-headed large language model learned that when encountering a specific token, the context must be switched to the corresponding professional dimension for content generation, thus achieving decoupled structured output.
[0117] Step S42: Input the contextual cue tensor into the early warning assessment head and / or the device defense head and / or the device emergency head for autoregressive decoding, and output the lightning risk warning and / or the defense command and / or the emergency plan.
[0118] The contextual cue tensor corresponding to the high-risk vulnerable node is input into the early warning assessment head and / or the equipment defense head and / or the equipment emergency head for autoregressive decoding, outputting a lightning risk early warning and / or defense command and / or emergency plan corresponding to the high-risk vulnerable node. In this embodiment, the early warning assessment head is used to output a lightning risk early warning, the equipment defense head is used to output a defense command, and the equipment emergency head is used to output an emergency plan. Step S42 executes one of steps S421, S422, and S423.
[0119] Taking the task instruction requiring the output of a three-level format lightning warning response strategy as an example, this is illustrated by using three parallel Task-Specific Attention Heads (TSHs) for decoding, which are then used to generate reports at three logically decoupled levels. It can be understood that if the task instruction requires the output of a lightning warning response strategy in one or two-level format, different attention heads can be invoked for execution.
[0120] Step S421: Input the context cue tensor into the early warning evaluation head for autoregressive decoding and output a lightning risk warning.
[0121] The contextual cue tensor is input into the early warning evaluation head for autoregressive decoding, and the lightning risk warning is output. In this embodiment, the lightning risk warning includes high-risk coordinates and breakdown risk probability.
[0122] If the task instruction includes the requirement to generate disaster mitigation measures at the early warning level, then the early warning assessment head will be activated to perform risk warning based on the contextual cue tensor and output the corresponding lightning risk warning.
[0123] In this embodiment, the risk probability value corresponding to the high-risk vulnerable node is used as the breakdown risk probability corresponding to that high-risk vulnerable node. In other embodiments, the early warning assessment head includes a fully connected layer, which is used to map the node risk characteristics corresponding to the high-risk vulnerable node to the breakdown risk probability. The principle is the same as the principle of calculating the risk probability value in the process of determining the high-risk vulnerable node, and will not be repeated here. The actual physical location (e.g., the line number, latitude and longitude) of the high-risk vulnerable node is obtained according to the topology ID corresponding to the high-risk vulnerable node, and is used as the high-risk coordinates.
[0124] In this embodiment, the early warning assessment head employs a deep Transformer network. Within the self-attention module of the deep Transformer network, dynamic value aggregation matrix operations are performed on features of each dimension. Based on the contextual cue tensor, the early warning assessment head performs multi-step autoregressive decoding. At each decoding time step, a rigorous maximum likelihood search is executed to output report terms until a terminator is reached. The token transformations corresponding to all report terms constitute a lightning risk warning.
[0125] For example, at each decoding time step, based on the context cue tensor and the already generated report tokens, the conditional probability distribution is calculated, a strict maximum likelihood search is performed, and the report token with the highest probability is selected for output, until a special identifier representing the end of the text (i.e., an end identifier, such as ``) is generated. <eos>The decoding and generation process terminates with the `Token`, converting all reported tokens into natural language to form a lightning risk warning.
[0126] With time High-risk and vulnerable nodes The corresponding number Taking a single decoding time step as an example, based on the contextual cue tensor that incorporates procedural knowledge... and the former The report tokens (in token form) generated at each decoding time step are processed using the self-attention module of a deep Transformer network for self-attention computation. The hidden layer state is then output from the last hidden layer of the deep Transformer network. ,Will Multiplying by the VocabularyProjection Matrix, the output is a Logits vector containing the log probabilities of all reported terms. After passing through the Softmax activation function, a conditional probability distribution is generated, represented as follows. The algorithm employs either a greedy search or top-p sampling strategy to select the reporting term with the highest probability (maximum likelihood) as the output for the current time step. This represents the softmax function. The word list weights corresponding to the early warning assessment heads can be determined through training.
[0127] For example, the lightning risk warning generated by the early warning assessment head is: "Within the next 30 minutes, the section of line #45-#55 will be cut by a thunderstorm cloud with a lightning intensity of 120kA, and the calculated probability of breakdown risk is 0.94."
[0128] Step S422: Perform autoregressive decoding on the context cue tensor input and output the defense command.
[0129] The context cue tensor input is autoregressively decoded to output defense instructions, which include power grid line adjustment suggestions.
[0130] If the task instruction includes requirements for generating disaster mitigation measures at the defense level, the device defense head will generate instructions based on the context prompt tensor and output the corresponding defense instructions.
[0131] In this embodiment, the device defense head uses the contextual cue tensor as the multimodal context condition and employs an autoregressive multi-step decoding method to iteratively generate report tokens. In each decoding step, the conditional probability distribution is calculated, and the report token with the highest probability is selected for output until a special identifier representing the end of the text is generated. The decoding and generation process then terminates, and all report tokens constitute the defense command. The principle of iteratively generating report tokens in each step is the same as that of the early warning assessment head, and will not be repeated here.
[0132] For example, the defense command generated by the equipment defense head is "Because this line has a history of backlash tripping, it is recommended that the control center immediately remotely change the standby lightning protection self-reclosing mode at tower #45 of the line to 'blocked reclosing' and adjust the distance II protection delay to 0.5s".
[0133] Step S423: Perform autoregressive decoding on the context hint tensor input device emergency header and output the emergency plan.
[0134] The context-sensitive tensor input device emergency header is autoregressively decoded to output an emergency plan, which includes the plan content and the corresponding plan code.
[0135] If the task instruction includes requirements for generating emergency response measures, the device emergency head will be activated to generate a contingency plan based on the contextual prompt tensor and output the corresponding emergency plan.
[0136] In this embodiment, the device emergency head uses the contextual cue tensor as the multimodal context condition and employs an autoregressive multi-step decoding method to iteratively generate report tokens. In each decoding step, the conditional probability distribution is calculated, and the report token with the highest probability is selected for output until a special identifier representing the end of the text is generated. The decoding and generation process then terminates, and all report tokens constitute the emergency plan. The principle of iteratively generating report tokens in each step is the same as that of the early warning assessment head, and will not be repeated here.
[0137] For example, the emergency plan generated by the equipment emergency head is "Prohibit all infrastructure construction work within 5 kilometers of Tower #45; dispatch the nearest mobile backup power vehicle to a certain substation for standby; plan matching code: AQ-2024-052".
[0138] Through parallel early warning assessment head, equipment defense head, and equipment emergency head, the trained multi-head large language model can automatically decode a complex decision tensor (contextual cue tensor) to generate the following: a "spatiotemporal early warning assessment layer" (i.e., lightning risk early warning) that can be used for macro-level command; a "relay protection and lightning protection defense layer" (i.e., defense command) that can be used for active equipment avoidance; and a "repair resource allocation and personal safety emergency layer" (i.e., emergency plan) that can be used for on-site physical intervention.
[0139] In this embodiment, historical power grid operation data, historical meteorological data, and lightning data are extracted as meteorological observation data and power grid spatiotemporal data. Following steps S1-S2, node risk features corresponding to each historical moment for each equipment node are generated as sample risk features. For each sample risk feature, the actual lightning disaster, defense instructions, and emergency measures occurring at the corresponding moment and for the corresponding equipment node are extracted from the historical power grid operation data, serving as the disaster label, defense label, and emergency label corresponding to that sample risk feature. A training sample set is constructed using all sample risk features and their corresponding disaster labels, defense labels, and emergency labels for training the multi-head large language model. The specific training process can employ existing model training methods, which will not be elaborated here.
[0140] In other embodiments, step S4 can also generate a comprehensive assessment report on the disaster situation of all high-risk vulnerable nodes based on the node risk characteristics corresponding to all high-risk vulnerable nodes and the matching procedural text fragments and a task instruction. That is, a lightning warning response strategy is generated for all high-risk vulnerable nodes. The comprehensive assessment report is segmented according to the attention mechanism included in the multi-head large language model, and a separate lightning warning response strategy is output for each high-risk vulnerable node or associated high-risk vulnerable node group, so as to avoid report redundancy and facilitate the overall coordination of disaster prevention and dispatch personnel.
[0141] In this embodiment, the RAG mechanism serves as a preliminary "physical barrier." During the recall of procedural text fragments, only "reading comprehension and logical integration" are performed. The underlying knowledge source is completely locked in a secure and compliant document library, fundamentally preventing the model from "fabricating" measures on its own. For key operational command parameters required for early warning and defense of high-risk vulnerable nodes (such as the specific safe distance in meters or the required grounding resistance in ohms), the basis for the multi-headed large language model to generate lightning warning response strategies is forcibly limited to the original text of the retrieved procedural text fragments. This prevents the multi-headed large language model from using potentially biased general knowledge learned during pre-training to substitute for these parameters, thereby ensuring that the professional vocabulary and data included in the generated lightning warning response strategies are free from illusions and tampering.
[0142] In other embodiments, the multi-headed large language model can be used as a security and compliance audit assistant by modifying the task instructions. For example, a structured Prompt prompt could be constructed: "You are a professional security and compliance audit assistant. Please analyze whether the [high-risk vulnerable node] has a risk of violating compliance constraints based on the following [compliance procedure fragment]. If so, please specify which procedure was violated and provide remediation suggestions."
[0143] [Compliance Procedure Fragment]: {Matched Top-K Procedure Text Fragment} [High-risk and vulnerable nodes]: {The risk characteristics of nodes corresponding to vulnerable nodes} Please output your audit conclusions:
[0144] Alternatively, construct a structured Prompt message: "Below is a piece of code containing a high-risk vulnerable node with security risks, along with relevant security procedure text obtained through retrieval. Please strictly follow the given security procedures to generate a compliant and binding remedial code for this node, and briefly explain the reasons for the modifications."
[0145] Procedure text: {Matching Top-K procedure text paragraphs} High-risk vulnerable node code: {Node risk characteristics corresponding to high-risk vulnerable nodes} Please provide the corrected code and explanation:
[0146] Furthermore, step S4 is followed by: Step S5: Convert the lightning warning response strategy into a business work ticket, and send the business work ticket to the power grid management system corresponding to the power grid spatiotemporal data.
[0147] The lightning warning response strategy, constructed using natural language, is converted into a work order, which is then sent to the power grid management system corresponding to the spatiotemporal data of the power grid. In this embodiment, the JobTicketDispatcher engine is used to convert the lightning warning response strategy, constructed using natural language, into a work order, which is then distributed to the dispatch center, inspection terminals, and emergency repair teams of the power grid management system. This achieves a fully intelligent leap from complex physical model calculations to precise operational responses. The work order refers to the written basis for executing the defense instructions or emergency plans in the lightning warning response strategy.
[0148] To address the issues of missing topology reasoning, model illusion, and flattened decision-making in existing early warning systems, this application's embodiments use a power grid relationship graph as a foundation and retrieval-enhanced matching of procedural text fragments. A multi-headed large language model is used to generate lightning early warning response strategies, achieving a closed-loop, multi-dimensional, hierarchical operational command structure encompassing early warning, defense, and emergency response. This completes multi-source feature access alignment, spatiotemporal graph weakness reasoning, RAG compliance alignment, and multi-level early warning report generation. It improves the accuracy and robustness of risk positioning, eliminates the risk of strategy illusion, and achieves automated generation of preventative measures across the entire timeline from early warning to defense and emergency response.
[0149] In the feature extraction and inference process, heterogeneous meteorological observation data and power grid spatiotemporal data are mapped into tensors, and a power grid relationship map is generated based on the power grid line topology to collaboratively assess the probability of thunderstorms and the hidden vulnerabilities of equipment during feature aggregation. Simultaneously, to suppress the illusion of a large model, the node risk features generated by feature aggregation are converted into retrieval vectors, and semantically matching lightning protection specifications and handling rules (represented by specification text fragments) are retrieved from the power grid specification vector library. Finally, the node risk features, the retrieved specification text fragments, and task instructions are used as input to a multi-head large language model to complete the joint input of physical topology, meteorological hazards, and external rules. Layered decoding is executed according to the task instructions to generate lightning warning response strategies. The warning assessment head delineates the spatiotemporal probability boundaries of high-risk areas, such as high-risk coordinates and breakdown risk probabilities; the equipment defense head generates defense instructions, such as hardware control instructions like relay protection adjustment and adaptive reclosing; and the equipment emergency head generates emergency plans, such as physical execution strategies like material allocation and on-site repair. The method described in this application can solve the problem that traditional methods can only provide one-way early warning, thereby improving the power grid's ability to prevent and respond to extreme lightning disasters and enhancing the system's resilience.
[0150] This invention provides a lightning warning response strategy generation system based on a retrieval-enhanced large model, such as... Figure 2 As shown, it includes: The power grid relationship construction module is used to acquire meteorological observation data and power grid spatiotemporal data, perform coordinate alignment on the meteorological observation data and the power grid spatiotemporal data, and generate a corresponding power grid relationship map; wherein, the power grid relationship map includes the node base features corresponding to each device node; The graph processing module is used to perform feature aggregation on the power grid relationship graph based on the physical relationship constraints corresponding to the spatiotemporal data of the power grid, and generate node risk features corresponding to each of the equipment nodes by using a multi-layer graph convolutional network. The procedure management module is used to extract matching procedure text fragments from the power grid procedure vector library based on the risk characteristics of each node. The large model inference and prediction module is used to generate corresponding lightning warning response strategies by using a trained multi-head large language model to perform inference calculations based on the risk characteristics of each node, the matched procedural text fragments, and the task instructions; wherein the lightning warning response strategy includes at least one of lightning risk warning, defense instructions, and emergency plan.
[0151] The above-described method and system embodiments are based on the same principles, and their related aspects can be referenced from each other to achieve the same technical effects. For specific implementation processes, please refer to the foregoing embodiments, which will not be repeated here.
[0152] In summary, the lightning warning response strategy generation method and system based on retrieval-enhanced large model of the present invention has at least one of the following beneficial effects: 1. Coordinate alignment is performed on meteorological observation data and power grid spatiotemporal data to generate a corresponding power grid relationship map. The power grid relationship map reflects the connection relationship of each equipment node and the node base characteristics corresponding to each equipment node. This is used to perform feature aggregation to generate node risk features. Based on this power grid relationship map, multimodal feature cross-domain alignment and vulnerability inference are completed. This achieves a paradigm shift from superficial geographical location overlap to deep physical mechanism penetration in early warning. It can significantly improve the accuracy and robustness of multi-head large language models in locating high-risk lightning nodes. It solves the problem that traditional lightning-assisted decision-making systems rely solely on simple two-dimensional latitude and longitude matching, which cannot quantify the transient propagation attenuation of lightning electromagnetic pulses in specific line corridors and the stress resistance differences between different equipment individuals, resulting in frequent large-scale invalid alarms or missed alarms at critical nodes. Furthermore, matching procedural text fragments obtained from the power grid procedural vector library are used as input components of the multi-headed large language model. This ensures that every defense instruction and emergency plan of the multi-headed large language model has a solid and tamper-proof document procedural traceability basis, transforming the uncontrollable black box of the large model into a reliable professional disaster prevention decision-making assistant, eliminating the risk of strategy illusion, and realizing the automated generation of prevention measures across the entire time axis of early warning, defense, and emergency response.
[0153] 2. Based on equipment coordinates, cross-sampling of meteorological feature tensors is performed to align the coordinates of meteorological feature tensors and equipment feature tensors, achieving bilinear fusion of meteorological environment tensors and discrete equipment ledgers. During feature aggregation, graph convolutional neural networks and primitive relationships (represented by physical relationship constraints) are introduced to perform implicit inference of traveling wave intrusion on non-Euclidean power grid physical topology. This mechanism enables feature aggregation to "see through" the weaknesses of the power grid like human lightning protection experts. In the iterative process of feature aggregation and correction, high-risk equipment that is not at the absolute center of the thunderstorm but is prone to cascading tripping due to severe grounding grid corrosion or being located at critical topological connection points is accurately identified, completely breaking the technical limitations of traditional methods that "emphasize meteorology and neglect physics".
[0154] 3. Node risk features are mapped to query vectors. Matching code text fragments are retrieved from the power grid code vector library and input along with node risk features into a multi-headed large language model. Based on Retrieval Enhanced Generation (RAG), mandatory injection of regulatory knowledge is achieved, deeply binding the multi-headed large language model's generation capabilities with the power industry's safety and compliance. This eliminates the "illusion" risk of decision-making in complex industrial scenarios using artificial intelligence applications. It also addresses the problem that existing technologies using large language models for automated contingency plan generation are prone to fabricating seemingly coherent but seriously erroneous operational suggestions that violate the "Lightning Protection Operation Regulations." "In power grid dispatching with extremely high security requirements, this is absolutely unacceptable. The method provided in this application establishes an enterprise-level compliance vector library (i.e., a power grid procedure vector library) containing millions of entity entries. It uses high-dimensional similarity calculation to anchor and recall matching procedure text fragments in real time, which serve as the mandatory input for the multi-head large language model trained in this application before autoregressive decoding. This technical solution, which combines a deterministic hard retrieval library with a probabilistic soft generation model, ensures that every lightning arrester operation step and every grounding resistance measurement suggestion in the final output has a solid and tamper-proof document procedure traceability basis."
[0155] 4. The multi-head large language model employs a three-tiered structured automatic decoding mechanism with multi-head attention decoupling, achieving end-to-end automated generation of preventative measures across the entire timeline of "early warning-defense-emergency," completely streamlining the business closed-loop execution link from disaster assessment to multi-departmental collaborative operations. This application has made in-depth task fine-tuning to the decoding layer of existing large language models, enabling the trained multi-head large language model to output multiple independent-dimensional response strategies based on complex joint input feature tensors (represented by contextual cue tensors). For example, the lightning risk warning output by the early warning assessment head provides the control center with accurate spatiotemporal early warning boundary characterization; the defense instructions output by the equipment defense head provide the operation and maintenance department with specific relay protection setting adjustments and equipment physical isolation measures; and the emergency plan output by the equipment emergency head generates meter-accurate safety insulation distance guidelines and material transportation plans for on-site repair teams. This hierarchical and granular instruction architecture directly transforms abstract meteorological risks into standardized work orders that the production system can directly issue and execute. It compresses the emergency decision-making process, which originally required several hours of consultation among multiple departments, to the millisecond level, realizing truly intelligent business disaster prevention and control. It solves the problem that in the face of sudden severe convective weather, existing technologies can only send coarse alarm texts to the dispatch screen, which seriously lacks differentiated guidance for different business roles, resulting in extremely high communication costs and time delays in the allocation of disaster relief resources.
[0156] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware, and the program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.
[0157] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.< / eos>
Claims
1. A method for generating lightning warning response strategies based on a retrieval-enhanced large model, characterized in that, include: Meteorological observation data and power grid spatiotemporal data are acquired, and the meteorological observation data and the power grid spatiotemporal data are aligned with coordinates to generate a corresponding power grid relationship map; wherein, the power grid relationship map includes the node base features corresponding to each device node; Based on the physical relationship constraints corresponding to the spatiotemporal data of the power grid, a multi-layer graph convolutional network is used to perform feature aggregation on the power grid relationship graph to generate node risk features corresponding to each of the equipment nodes. Based on the risk characteristics of each node, matching procedure text fragments are extracted from the power grid procedure vector library; Using a trained multi-head large language model, inference calculations are performed based on the risk characteristics of each node, the matched procedural text fragments, and the task instructions to generate a corresponding lightning warning response strategy; wherein, the lightning warning response strategy includes at least one of lightning risk warning, defense instructions, and emergency plan.
2. The method according to claim 1, characterized in that, The power grid spatiotemporal data includes the device coordinates, connection relationships, and device characteristic data corresponding to each device node; The meteorological observation data and the power grid spatiotemporal data are coordinate aligned to generate a corresponding power grid relationship map, including: The meteorological feature tensor corresponding to the meteorological observation data is obtained using a meteorological fluid model. Construct a corresponding device feature tensor based on the device feature data corresponding to each device node; Based on the device coordinates corresponding to each device node, the meteorological feature tensor and the device feature tensor are aligned to obtain the node basis feature corresponding to each device node; The power grid relationship map is constructed based on the node base characteristics and connection relationships corresponding to each of the device nodes.
3. The method according to claim 2, characterized in that, Based on the device coordinates corresponding to each device node, the meteorological feature tensor and the device feature tensor are aligned to obtain the node basis features corresponding to each device node, including: Based on the device coordinates corresponding to each device node, the meteorological feature tensor is cross-sampled to obtain the node meteorological tensor corresponding to each device node. For each device node, the corresponding device feature tensor and the node meteorological tensor are concatenated to obtain the node basis features.
4. The method according to claim 1, characterized in that, Based on the physical relationship constraints corresponding to the spatiotemporal data of the power grid, a multi-layer graph convolutional network is used to perform feature aggregation on the power grid relationship graph to generate node risk features corresponding to each of the equipment nodes. This process includes multiple aggregations and corrections, with the node risk feature obtained after the last correction being used as the node risk feature. Each aggregation and correction includes the following steps: A multi-layer graph convolutional network is used to perform feature aggregation on the edge aggregation features and node aggregation features after the previous correction, so as to generate new edge aggregation features and new node aggregation features corresponding to each device node. Based on the physical relationship constraints, the new edge aggregation features and the new node aggregation features are corrected to obtain the new corrected edge aggregation features and the new corrected node aggregation features.
5. The method according to claim 4, characterized in that, The newly generated node aggregation feature is represented as follows: In the formula, Represents a non-linear activation function. Indicates time Equipment Nodes The corresponding node base features are after The node aggregation features after secondary aggregation and correction; Represents device node The corresponding one containing self-loops adjacency matrix of order, , The device nodes are represented sequentially. Equipment Nodes The corresponding degree, Represents device node With device nodes The corresponding edge basis features are passed through The edge aggregation features after secondary aggregation and correction; Indicates the first The weights of the convolutional kernels corresponding to the layers.
6. The method according to claim 1, characterized in that, The power grid procedure vector library includes multiple procedure text fragments and corresponding procedure vectors; Based on the risk characteristics of each node, matching procedure text fragments are extracted from the power grid procedure vector library, including: Map the risk characteristics of each node to a query vector; Search the power grid procedure vector library for the procedure vector that matches the query vector; The procedure text fragment corresponding to the matched procedure vector is taken as the matched procedure text fragment.
7. The method according to claim 6, characterized in that, Mapping the risk characteristics of each node into a query vector includes: The trained dual-tower DPR is used to map the risk features of each node into a query vector; The training method for the dual-tower DPR includes: Construct positive sample pairs based on sample risk characteristics and corresponding sample procedures; Negative sample pairs are constructed based on the risk characteristics of the samples and any text fragment of the regulations other than the sample regulations in the power grid regulations vector library; The dual-tower DPR is trained using the positive sample pairs and the negative sample pairs.
8. The method according to claim 1, characterized in that, The multi-headed large language model includes an early warning assessment head, an equipment defense head, and an equipment emergency head; Using a trained multi-head large language model, based on the risk characteristics of each node, the matched procedural text fragments, and task instructions, inferences and calculations are performed to generate corresponding lightning warning response strategies, including: Construct a corresponding contextual cue tensor based on the risk characteristics of each node, the matched procedural text fragments, and the task instructions; The contextual cue tensor is input into the early warning assessment head and / or the device defense head and / or the device emergency head for autoregressive decoding, and the lightning risk warning and / or the defense command and / or the emergency plan are output.
9. The method according to claim 1, characterized in that, Also includes: The lightning warning response strategy is converted into a work order, and the work order is sent to the power grid management system corresponding to the power grid spatiotemporal data.
10. A lightning warning response strategy generation system based on a retrieval-enhanced large model, characterized in that, include: The power grid relationship construction module is used to acquire meteorological observation data and power grid spatiotemporal data, perform coordinate alignment on the meteorological observation data and the power grid spatiotemporal data, and generate a corresponding power grid relationship map; wherein, the power grid relationship map includes the node base features corresponding to each device node; The graph processing module is used to perform feature aggregation on the power grid relationship graph based on the physical relationship constraints corresponding to the spatiotemporal data of the power grid, and generate node risk features corresponding to each of the equipment nodes by using a multi-layer graph convolutional network. The procedure management module is used to extract matching procedure text fragments from the power grid procedure vector library based on the risk characteristics of each node. The large model inference and prediction module is used to generate corresponding lightning warning response strategies by using a trained multi-head large language model to perform inference calculations based on the risk characteristics of each node, the matched procedural text fragments, and task instructions; wherein, the lightning warning response strategy includes at least one of lightning risk warning, defense instructions, and emergency plan.