Semantic tag generation method based on power grid engineering corpus

By parsing power grid engineering corpora, extracting event entities and dynamic causal chains, calculating equivalent traveling wave propagation delay, matching physical association paths of equipment, and generating hierarchical composite event labels, the problem of inaccurate composite event label systems in existing technologies is solved, thereby improving the reliability of power grid system fault analysis and risk prediction.

CN120910273APending Publication Date: 2025-11-07STATE GRID ECONOMIC TECH RES INST CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202511003635.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-21
Publication Date
2025-11-07

AI Technical Summary

Technical Problem

Existing semantic tag generation methods, when dealing with complex events in power grid systems, lack the ability to analyze the dynamic correlation and hierarchical structure of events. As a result, the generated tag system is difficult to accurately reflect the fault evolution logic and the interaction between multiple devices, which affects the practicality of fault analysis and risk prediction.

Method used

By parsing the corpus of power grid engineering, event entities and dynamic causal chains are extracted, the equivalent traveling wave propagation delay is calculated, the physical association path of equipment is matched, and a composite event label containing a hierarchical structure is generated. The label granularity confidence is dynamically adjusted through a gradient clustering algorithm, and a composite semantic label set containing dynamic causal chains, equivalent traveling wave propagation delay and physical association path of equipment is output.

Benefits of technology

It significantly improves the accuracy and practicality of semantic tags for composite events in power grid engineering, realizes physically interpretable modeling of the relationships between event entities, fully restores the propagation path of fault events in time, space and physical equipment dimensions, and provides a traceable and iterative power grid event knowledge base, providing a reliable data foundation for fault tracing and risk simulation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120910273A_ABST
    Figure CN120910273A_ABST
Patent Text Reader

Abstract

The invention discloses a semantic tag generation method based on a power grid engineering corpus, particularly relates to the technical field of power grid system fault analysis, and is used for solving the problem that the existing semantic tag technology cannot accurately represent dynamic association and physical propagation paths of composite events. Equivalent traveling wave propagation delay of an event entity is extracted based on an electromagnetic transient waveform, and a sequential relation graph is constructed to restore a fault dynamic evolution process; establishing a physically interpretable causal chain hierarchical structure through equipment topology path matching and wave impedance gradient difference analysis; a gradient clustering algorithm is adopted to adaptively adjust label granularity confidence, noise interference is eliminated, and a key propagation path is reserved; and finally outputting a versioned label set fusing the dynamic causal chain, the traveling wave propagation time delay and the equipment physical association path, and forming a closed-loop modeling mechanism of event space-time association and equipment topology linkage.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of power grid system fault analysis, and more particularly, to a semantic label generation method based on power grid engineering corpus. BACKGROUND

[0002] In the field of power grid engineering, device operation monitoring and fault analysis rely on semantic analysis and labeling processing of massive text corpus (such as operation and maintenance records, alarm logs). The current semantic label generation technology has achieved preliminary application in the labeling of single event description (such as device overload, line short circuit), which can assign labels to specific events based on keyword matching or statistical model. However, in the actual operation of the power grid system, there are generally composite events caused by multiple devices and multiple links, such as lightning causing insulator flashover and triggering relay protection misoperation. Such events need to be described by time sequence correlation and causal chain analysis to complete the fault mechanism.

[0003] The existing semantic label generation method lacks the ability to analyze the dynamic correlation and hierarchical structure of events when dealing with composite events, resulting in a label system that is difficult to accurately reflect the fault evolution logic and the interaction between multiple devices. Coarse or fine-grained labels will cause the loss of key semantic information, such as simplifying composite events into isolated labels (such as "lightning fault") or breaking them down into unrelated atomic labels (such as "insulator damage" and "protection action"), making it difficult for subsequent fault analysis, risk prediction, and other applications to restore the true event causal relationship from the labels, which seriously affects the practicality of semantic labels in complex power grid engineering scenarios. SUMMARY

[0004] In order to overcome the above-mentioned defects of the prior art, the embodiments of the present application provide a semantic label generation method based on power grid engineering corpus to solve the problems raised in the background art.

[0005] To achieve the above-mentioned purpose, the present application provides the following technical solutions:

[0006] The semantic label generation method based on power grid engineering corpus comprises the following steps:

[0007] S1, analyze the composite event description in the power grid engineering corpus, extract event entities and dynamic causal chains between event entities;

[0008] S2, calculate the equivalent traveling wave propagation time delay between adjacent event entities according to the electromagnetic transient waveform corresponding to the device fault mode in the dynamic causal chain, and generate an event chain time sequence graph based on time delay correlation analysis;

[0009] S3, match the device physical association path corresponding to the event entity based on the device connection relationship in the power grid system topology;

[0010] S4, fuse the event chain time sequence relationship diagram with the device physical association path to generate a composite event label containing a hierarchical structure;

[0011] S5, according to the gradient difference of the wave impedance mutation point corresponding to each level in the hierarchical structure of the composite event label, dynamically adjust the granularity confidence threshold of the composite event label through the gradient clustering algorithm;

[0012] S6, output the composite semantic label set containing the dynamic causal chain, the equivalent wave propagation delay and the device physical association path.

[0013] In a preferred embodiment, the composite event description in the power grid engineering corpus is parsed, and the event entities and the dynamic causal chain between the event entities are extracted, including:

[0014] The event entities are extracted from the composite event description of the power grid engineering corpus through dependency syntax analysis;

[0015] The dynamic causal chain between the event entities is generated according to the logical connection words of the event entities in the composite event description;

[0016] The time sequence correlation of the dynamic causal chain is corrected based on the timestamp sequence of the event entities in the composite event description.

[0017] In a preferred embodiment, the equivalent wave propagation delay between adjacent event entities is calculated according to the electromagnetic transient waveform corresponding to the device failure mode in the dynamic causal chain, and the event chain time sequence relationship diagram is generated based on the time delay correlation analysis, including:

[0018] The wave speed and the physical distance of the device are extracted from the electromagnetic transient waveform corresponding to the device failure mode in the dynamic causal chain, and the wave impedance mutation point parameters on the wave propagation path are obtained synchronously;

[0019] The equivalent wave propagation delay between adjacent event entities is calculated based on the wave speed, the physical distance of the device and the wave impedance mutation point parameters;

[0020] The initial time sequence relationship diagram is generated according to the equivalent wave propagation delay and the phase synchronization index corresponding to the failure mode;

[0021] The time sequence weight in the initial time sequence relationship diagram is dynamically corrected by the wave impedance mutation point parameters to generate the event chain time sequence relationship diagram.

[0022] In a preferred embodiment, the device physical association path corresponding to the event entity is matched based on the connection relationship of the devices in the power grid system topology, including:

[0023] The device connection graph is constructed based on the connection relationship of the devices in the power grid system topology;

[0024] Search for matching physical association paths of devices in the device connectivity graph based on event entities in the dynamic causal chain.

[0025] Adjust the path weight of the physical association path of the equipment by using the electrical parameters of the equipment in the equipment ledger database;

[0026] Based on path weight, the main path of the physical association path of the device is selected, and the physical association path of the device corresponding to the event entity is generated.

[0027] In a preferred embodiment, the event chain sequence diagram is fused with the device physical association path to generate a composite event tag with a hierarchical structure, including:

[0028] Perform topological alignment between event entities in the event chain sequence diagram and device nodes in the device physical association path;

[0029] The comprehensive association weight is calculated based on the time sequence weight of the event chain time sequence relationship graph and the path weight of the physical association path of the device.

[0030] Based on the comprehensive association weight, the event entities and device nodes are hierarchically clustered to generate a hierarchical structure containing root nodes, intermediate nodes, and leaf nodes.

[0031] Composite event labels are generated based on the association weights of each node in the hierarchical structure.

[0032] In a preferred embodiment, the label format of the composite event label is root node-intermediate node-leaf node.

[0033] In a preferred embodiment, based on the gradient differences in the traveling wave impedance abrupt change points corresponding to each level in the hierarchical structure of the composite event tag, the granularity confidence threshold of the composite event tag is dynamically adjusted using a gradient clustering algorithm, including:

[0034] Extract the gradient difference of the traveling wave impedance abrupt change point corresponding to each level from the hierarchical structure of the composite event tag;

[0035] A high-dimensional feature space is constructed based on the gradient difference at the abrupt change point of traveling wave impedance. The dimension of the high-dimensional feature space is consistent with the hierarchical depth.

[0036] Gradient clustering algorithm is used to perform cluster analysis on data in high-dimensional feature space to generate clusters and cluster density distribution;

[0037] The granularity confidence threshold of the composite event label is dynamically adjusted based on the cluster density distribution.

[0038] Map the adjusted granularity confidence threshold to the hierarchical structure and update the hierarchical association weights of composite event labels.

[0039] In a preferred embodiment, the higher the cluster density, the lower the granularity confidence threshold.

[0040] In a preferred embodiment, the output includes a composite semantic label set containing dynamic causal chains, equivalent traveling wave propagation time delays, and device physical association paths, including:

[0041] The dynamic causal chains, equivalent traveling wave propagation time delays, and device physical association paths are stored in a hierarchical structure.

[0042] Based on the event entity name and the device node number, an association index of the dynamic causal chain and the device physical association path is generated.

[0043] The storage format of the composite semantic label set is defined, and the storage format includes the directed edge weight of the dynamic causal chain, the timestamp sequence of the equivalent traveling wave propagation time delay, and the topological connection relationship of the device physical association path.

[0044] According to the hierarchical association weight of the composite event label, version control is performed on the label set, and the difference in association weight before and after label update is recorded.

[0045] The composite semantic label set containing the dynamic causal chain, the equivalent traveling wave propagation time delay, the device physical association path, and the version control information is output.

[0046] Compared with the prior art, the present application has the following beneficial effects:

[0047] 1. Through multi-level technical integration, the accuracy and practicality of the power grid engineering composite event semantic label are significantly improved. Through the dual constraints of dynamic causal chain extraction and time sequence propagation analysis, the physical interpretable modeling of the association relationship between event entities is realized. When analyzing the composite event, not only the event chain is extracted according to the text logic, but also the traveling wave propagation time delay is calculated combined with the electromagnetic transient waveform characteristics, so that the time sequence relationship of the causal chain is deeply coupled with the transient response characteristics of the power grid system, effectively avoiding the time sequence misplacement problem caused by ignoring the electromagnetic wave propagation law in traditional methods. At the same time, through the topological matching of the device physical association path, the event entity described in the text is accurately anchored to the spatial position of the actual device in the power grid, forming a "event logic-time space propagation-device topology" trinity label generation basis, ensuring that the semantic label not only conforms to the text description but also has engineering physical verifiability.

[0048] 2、By fusing the time sequence graph and the device path across dimensions, a composite label system with a hierarchical structure is constructed, which can completely restore the propagation path of the fault event in the time, space and physical device dimensions; In particular, the confidence dynamic adjustment strategy based on the gradient difference of wave impedance mutation makes the label granularity adaptively optimized with the fault propagation strength; In the strong interference scene, the key path is automatically converged, and in the weak correlation scene, the necessary details are retained, which balances the integrity and noise resistance of the label; The finally output structured label set is stored through versioning, forming a traceable and iterative power grid event knowledge base, which provides a data basis with physical accuracy and semantic completeness for fault tracing, risk deduction and other depth analysis. BRIEF DESCRIPTION OF DRAWINGS

[0049] Figure 1 The flowchart of the semantic label generation method based on the power grid engineering corpus of the present application is shown. DETAILED DESCRIPTION

[0050] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.

[0051] Embodiment: Figure 1 The semantic label generation method based on the power grid engineering corpus of the present application is shown, which includes the following steps:

[0052] S1, parse the composite event description in the power grid engineering corpus, extract the event entity and the dynamic causal chain between the event entities;

[0053] S2, calculate the equivalent traveling wave propagation time delay between adjacent event entities according to the electromagnetic transient waveform corresponding to the device fault mode in the dynamic causal chain, and generate an event chain time sequence graph based on time delay correlation analysis;

[0054] S3, match the device physical association path corresponding to the event entity based on the device connection relationship in the power grid system topology;

[0055] S4, fuse the event chain time sequence graph and the device physical association path to generate a composite event label containing a hierarchical structure;

[0056] S5, according to the gradient difference of the wave impedance mutation point of each level in the hierarchical structure of the composite event label, dynamically adjust the granularity confidence threshold of the composite event label through the gradient clustering algorithm;

[0057] S6, output a composite semantic label set containing dynamic causal chains, equivalent line wave propagation delay, and device physical association path.

[0058] S1, parse the composite event description in the power grid engineering corpus, extract event entities and dynamic causal chains between event entities, the specific implementation is as follows:

[0059] The event entities in the composite event description text of the power grid engineering corpus are extracted by using the dependency syntax analysis technology. The dependency syntax analysis technology is realized by using a pre-trained model. The model is trained based on a general corpus and is further fine-tuned using a power grid engineering domain terminology library. The power grid engineering domain terminology library includes standard terms of device names, fault types, and environmental factors, and the terminology library is derived from power grid industry standard documents and device manufacturer technical manuals. When extracting event entities, only the nouns or verb phrases related to power grid devices, fault actions, and environmental factors are retained, and irrelevant words are filtered out through dependency relationships. For example, for the text “lightning strike causes insulator flashover and triggers relay protection misoperation”, the dependency syntax analysis identifies “lightning strike”, “insulator flashover”, and “relay protection misoperation” as event entities, and determines their syntactic structure based on subject-predicate and verb-object relationships.

[0060] The dynamic causal chains between event entities are generated according to the logical connectors of the event entities in the text. The logical connectors are words that represent causal relationships in the power grid engineering field, including “cause”, “trigger”, and “result in”, and a pre-set list is generated by counting high-frequency associated words in power grid engineering literature and fault reports. The construction rules of the dynamic causal chain are as follows: if there is a logical connector between two event entities, a directed edge from the cause event to the result event is established between them; for multiple event series scenarios, chain structures are generated in the order of logical connectors. For example, for the text “lightning strike causes insulator flashover and triggers relay protection misoperation”, the causal chain “lightning strike → insulator flashover → relay protection misoperation” is generated according to the two connectors “cause” and “trigger”. The initial weight of the dynamic causal chain is assigned according to the semantic strength of the logical connector, and the default strength is 0.5.

[0061] The temporal association of the dynamic causal chain is corrected based on the timestamp order of the event entities in the composite event description. The timestamp is extracted from the metadata of the power grid engineering corpus and converted to UTC time format. If the timestamp of the cause event is later than that of the result event, it is determined that there is a temporal conflict; for conflict scenarios, the causal direction is adjusted according to the logical connector, and if it cannot be adjusted, the causal chain is discarded. The temporal correction weight is calculated according to the time interval length, and the time interval is the difference between the timestamps of the cause event and the result event, with a unit of seconds. The time interval threshold is set according to the average response time of power grid fault propagation, and can be dynamically adjusted through a configuration file. For scenarios where the timestamp is missing in the corpus, the temporal information is supplemented according to the default occurrence order of the event entities, such as the recording order of the alarm log.

[0062] To verify the accuracy of dynamic causal chains, the extracted event entities are manually sampled and checked. If the error rate is higher than 10%, the dependency syntax model needs to be retrained or the terminology library needs to be expanded. The rationality of the causal chain is verified by the historical fault case library. Invalid causal chains are automatically marked and stored in the exception database for subsequent analysis. Timestamp exception processing includes automatic parsing of multiple time formats, and missing timestamps are referenced by log record order. The dependency syntax analysis model is implemented based on open tools, and the entity recognition is adjusted by importing the power grid engineering terminology library. The dependency relationship resolution weight is set to 1.5 times the domain-related parameter during fine-tuning. The list of logical conjunctions is generated by analyzing high-frequency words in power grid engineering documents, and the weight value range is defined by a configuration file. The threshold setting of the time interval correction weight is based on the statistical mean and standard deviation of the power grid fault propagation response time.

[0063] The weight calculation method of dynamic causal chain is to add the initial weight and the time sequence correction weight, and the sum is limited between 0 and 1. During timestamp parsing, different formats of time are converted to Unix millisecond timestamp. The error rate of event entity extraction is calculated by randomly sampling the corpus sample. When the number of error entities exceeds the threshold, the model retraining process is triggered. The rationality of the causal chain is evaluated according to the definition of causal relationship in the power grid industry standard. Invalid causal chains are automatically marked and stored in the exception database for subsequent analysis.

[0064] S2, according to the electromagnetic transient waveform corresponding to the device failure mode in the dynamic causal chain, the equivalent traveling wave propagation delay between adjacent event entities is calculated, and the event chain timing diagram is generated based on the time delay correlation analysis, the specific implementation method is as follows:

[0065] The traveling wave wave speed and the wave impedance mutation point parameters on the traveling wave propagation path are extracted from the electromagnetic transient waveform corresponding to the equipment failure mode in the dynamic causal chain. The traveling wave wave speed is obtained from a preset wave speed parameter table according to the type of the equipment, and the wave speed parameter table is derived from the technical manual provided by the equipment manufacturer. For example, the wave speed parameter range of an overhead transmission line is 280,000 km / s to 290,000 km / s, and the wave speed parameter range of a cable line is 110,000 km / s to 120,000 km / s. The physical distance of the equipment is extracted from a power grid system topology database, and the topology database stores the actual physical connection distance between the equipment, with the unit of distance being meters. The wave impedance mutation point parameters are obtained from the wave impedance distribution data in the equipment account library, which contains the design parameters of the transmission line section and records the location and gradient value of the wave impedance mutation point, with the unit of gradient value being ohm / m. For equipment without recorded wave impedance mutation points, the wave impedance mutation points are identified based on the voltage and current waveform mutation characteristics on the traveling wave propagation path. The identification method is as follows: the voltage reflection coefficient is calculated, and when the voltage reflection coefficient exceeds 20%, it is determined as a wave impedance mutation point. The calculation formula of the voltage reflection coefficient is the ratio of the reflected voltage amplitude to the incident voltage amplitude.

[0066] The equivalent traveling wave propagation time delay between adjacent event entities is calculated based on the traveling wave wave speed, the physical distance of the equipment, and the wave impedance mutation point parameters. The calculation process of the equivalent traveling wave propagation time delay is as follows: the physical distance of the equipment is divided by the traveling wave wave speed to obtain the basic propagation time delay, with the unit of the basic propagation time delay being seconds; the basic propagation time delay is multiplied by the attenuation coefficient corresponding to the wave impedance mutation point parameter to obtain the equivalent traveling wave propagation time delay, with the unit of the equivalent traveling wave propagation time delay being seconds. The attenuation coefficient is set according to the wave impedance mutation gradient value, and the attenuation coefficient value range is 0.5 to 1. For example, when the wave impedance mutation gradient value is 10 ohm / m, the attenuation coefficient is 0.9; when the wave impedance mutation gradient value is 50 ohm / m, the attenuation coefficient is 0.7. If there are multiple wave impedance mutation points on the traveling wave propagation path, the attenuation coefficients of the mutation points are multiplied in sequence to obtain the total attenuation coefficient. The product of the basic propagation time delay and the total attenuation coefficient is the equivalent traveling wave propagation time delay, and the calculation result unit is seconds.

[0067] The initial time sequence relationship diagram is generated according to the equivalent traveling wave propagation time delay and the phase synchronism index corresponding to the failure mode. The phase synchronism index is calculated by analyzing the phase difference of the voltage and current waveforms of adjacent event entities. The specific steps are as follows: the Hilbert transform is performed on the voltage and current waveforms to extract the instantaneous phase angle; the standard deviation of the phase angle difference of adjacent event entity waveforms is calculated, with the unit of the standard deviation being radians; the phase synchronism index is defined as the inverse of the standard deviation and is normalized to the range of 0 to 1. The generation method of the initial time sequence relationship diagram is as follows: the equivalent traveling wave propagation time delay is taken as the time sequence weight initial value, with the unit being seconds; the initial time sequence weight is obtained by multiplying the time sequence weight initial value by the phase synchronism index. In the initial time sequence relationship diagram, the nodes represent event entities, and the directed edge weight represents the initial time sequence weight.

[0068] The time sequence weight in the initial time sequence graph is dynamically corrected by the wave impedance mutation point parameter to generate the event chain time sequence graph. The dynamic correction method is: the weight decay ratio is set according to the gradient value of the wave impedance mutation point, the gradient value unit is ohm / meter, and the decay ratio value range is 0% to 50%. For example, when the wave impedance mutation gradient value is 10 ohm / meter, the decay ratio is 5%; when the gradient value is 50 ohm / meter, the decay ratio is 20%. If there are multiple wave impedance mutation points on the same row wave propagation path, the decay ratios of the points are accumulated to obtain the total decay ratio. The corrected time sequence weight calculation formula is: the corrected weight is equal to the initial time sequence weight multiplied by (1-total decay ratio), and the calculation result unit is second. The corrected time sequence weight is used to update the directed edge weight in the event chain time sequence graph.

[0069] To verify the accuracy of the equivalent traveling wave propagation time delay, the calculated time delay is compared with the measured time difference of traveling wave arrival time in the fault recording data. The measured time difference is calculated by the traveling wave head arrival time stamp recorded by the fault recording device, and the time difference unit is second. If the deviation of the calculated time delay and the measured time difference exceeds 1%, the wave velocity parameter table is recalibrated or the wave impedance mutation point identification logic is checked. The voltage reflection coefficient threshold of the wave impedance mutation point is dynamically set according to the device type, for example, the threshold of the cable line is set to 15%, and the threshold of the overhead line is set to 25%. The calculation of the phase synchronization index needs to exclude noise interference, and the preprocessing method is to perform wavelet denoising on the electromagnetic transient waveform, and to retain the signal components with a frequency in the range of 1000 Hz to 100000 Hz.

[0070] The wave velocity parameter table is updated regularly according to the technical documents published by the device manufacturer, for example, the provided cable wave velocity parameter table is updated once every quarter. The wave impedance distribution data in the device account library is maintained by the power grid system operation record, and the data update period is once a day. The decay ratio range of the time sequence weight dynamic correction is set by the configuration file, and the configuration file supports dynamically adjusting the parameters according to the actual operation data. The generation tool of the event chain time sequence graph is developed based on Python language, relies on NumPy library for numerical calculation and Matplotlib library for visualization output, and the wave velocity, device physical distance and wave impedance mutation point parameters in the code are stored in floating point number format.

[0071] In an extreme scenario, for example, no clear wave impedance mutation point is recorded on the traveling wave propagation path, and the voltage reflection coefficient is less than 5%, the system defaults the attenuation coefficient to 1, and the equivalent traveling wave propagation delay is equal to the basic propagation delay. For event entity pairs with a phase synchronization index less than 0.2, the timing weight is forced to zero to avoid low correlation events interfering with the timing relationship diagram. The sampling frequency of fault recording data should not be less than 1 megahertz to ensure that the accuracy error of the traveling wave head timestamp is less than 0.1 microseconds. The calibration process of the wave velocity parameter table includes: selecting at least 10 sets of historical fault data, calculating the average wave velocity deviation, and updating the wave velocity parameter table if the deviation exceeds 1%.

[0072] Step S2 solves the timing correlation deviation problem in the existing semantic label method in composite event timing modeling by fusing power grid system physical characteristics and signal processing technology. Traditional methods usually only rely on text timestamps or simple statistical models, which cannot reflect the physical nature of fault propagation (such as traveling wave attenuation, wave impedance mutation), resulting in distorted label timing weights. Step S2 introduces traveling wave velocity, device physical distance, and wave impedance mutation point parameters, combined with phase synchronization analysis, to construct an equivalent propagation delay and dynamic correction mechanism, making the timing relationship diagram more consistent with the actual fault propagation law of the power grid engineering. Compared with the prior art, the electromagnetic transient waveform parameters and device physical characteristics are linked and modeled, effectively improving the credibility of the timing label in the causal chain level and the accuracy of the propagation path, providing a reliable data foundation for subsequent fault tracing and risk assessment.

[0073] S3, based on the device connection relationship in the power grid system topology structure, matches the device physical association path corresponding to the event entity, and the specific implementation manner is as follows:

[0074] A device connection graph is constructed based on the device connection relationship in the power grid system topology structure. The device connection graph takes the devices in the power grid system as nodes and the physical connection relationship between the devices as edges. The physical connection relationship includes the actual connection mode between the transmission lines, circuit breakers, transformers, and other devices. The device connection relationship is extracted from the power grid system topology structure database, which stores the connection type, connection distance, and connection state between devices. The connection distance is in meters. The device node attributes include device type, device number, and device location information, and the edge attributes include connection type and connection distance. For example, when the device is a transmission line, the connection type of the edge is marked as line connection, and the connection distance is the actual length of the line. The construction method of the device connection graph is: traverse all devices and connection relationships in the topology structure database, map the devices to graph nodes, and map the connection relationships to graph edges to generate a weighted undirected graph structure. The initial weight of the device connection graph is the inverse of the connection distance, and the shorter the connection distance, the higher the initial weight.

[0075] According to the event entity in the dynamic causal chain, search for the matching device physical association path in the device connection graph. The event entity in the dynamic causal chain includes the device name and the fault action, such as lightning corresponding to the power transmission line node, and the relay protection misoperation corresponding to the circuit breaker node. The search matching process is to locate the device node corresponding to the event entity from the device connection graph, and search all possible physical paths based on the connection relationship between the device nodes. The search method is to traverse the device connection graph by using the depth-first search algorithm, starting from the starting device node, traversing to the target device node along the connection edge, and recording all reachable paths. In the search process, duplicate node paths are excluded to avoid loops, and the path length is limited to no more than 10 connection relationship levels. For example, the event entity lightning corresponds to the power transmission line node A, and the relay protection misoperation corresponds to the circuit breaker node B, then all connection paths from node A to node B are searched, and the path length is limited to 10 node levels.

[0076] Adjust the path weight of the device physical association path through the device electrical parameter in the device account library. The device electrical parameters include the device impedance value, the rated current, and the rated voltage, which are extracted from the device account library, and the account library data is updated once a day. The adjustment method of the path weight is to accumulate the impedance values of each device in the path to obtain the total impedance of the path, and the unit of the total impedance of the path is ohm; the lower the total impedance of the path is, the higher the path weight is. For example, the path contains 3 sections of power transmission lines, and the impedance values are 5 ohms, 10 ohms, and 8 ohms respectively, then the total impedance of the path is 23 ohms, and the path weight calculation formula is that the path weight is equal to the reference weight divided by the total impedance of the path, and the default value of the reference weight is 1. If the path contains circuit breaker or transformer devices, then the impedance value is adjusted according to the ratio of the rated current to the current fault current, for example, the impedance value of the device with a rated current of 100 amperes is multiplied by 1.2 when the current fault current is 200 amperes.

[0077] According to the path weight, select the main path of the device physical association path, and generate the device physical association path corresponding to the event entity. The main path selection rule is to retain the paths with the top 20% path weights, and the path weight needs to be higher than the preset threshold value 0.1. If multiple paths have the same path weight, then the path with fewer connection levels is selected. For example, the path weights of two paths are both 0.5, one path contains 5 connection levels, and the other path contains 3 connection levels, then the path with 3 connection levels is selected. The selected main path is stored in the device physical association path set, and the path information includes the path device sequence, the connection relationship, and the path weight. The path device sequence is an ordered list of device node numbers, the connection relationship is the type and distance of the edge, and the path weight is the normalized value.

[0078] To verify the accuracy of the physical connection path of the equipment, the path equipment sequence is compared with the actual propagation path in the historical fault case. For example, if the propagation path of the lightning strike causing the flashover of the insulator B in the transmission line A in the historical case is matched with the search path, it is determined that the path is valid. If the path matching fails, check the construction logic of the equipment connection graph or adjust the path weight calculation formula. The electrical parameter update cycle in the equipment account library is once a day, ensuring that the parameters are consistent with the actual state of the equipment. If a loop or disconnected path is detected during the path search process, an exception is recorded and the topology database verification process is triggered. The verification process includes reloading the topology data and repairing the missing connection relationship.

[0079] The construction of the equipment connection graph depends on the power grid system topology database, which is updated every hour to ensure the real-time nature of the connection relationship. The reference weight value of the path weight calculation is set through the configuration file, which supports dynamic adjustment based on actual operation data. For example, when the system detects a high-frequency fault path, the reference weight can be adjusted to 2 to improve its priority. The impedance value of the equipment account library is derived from the technical parameter table provided by the equipment manufacturer, such as the circuit breaker impedance parameter table published by Siemens. The depth-first search algorithm for path search is based on the NetworkX library in Python, and the path length limit parameter is defined through the configuration file, with a default value of 10 layers of connection relationship.

[0080] In extreme scenarios, such as the existence of hidden connection relationships not recorded in the equipment connection graph, the system supplements the connection relationship based on the physical location information of the equipment. The physical location information of the equipment is obtained from the geographic information system, with coordinates in latitude and longitude. If the physical distance between two devices is less than 100 meters and there is no direct connection record, a temporary connection edge is automatically added, and the weight of the temporary connection edge is set to 0.5 times the standard weight. The upper limit of the number of main paths in the path weight screening is 5, to avoid excessive path interference in subsequent analysis. If the path search returns an empty result, the path length limit is expanded to 20 layers or the temporary connection edge is supplemented and searched again.

[0081] The initial weight calculation of the equipment connection graph relies on the inverse of the connection distance, with the unit of connection distance being meters, ensuring that the weight is dimensionless and comparable. The normalization method of path weight is to divide all path weights by the maximum weight value, scaling the weight range to 0 to 1. During the path weight adjustment process, if the equipment impedance value is 0 or negative, it is considered as abnormal data and automatically replaced with the latest valid value in the equipment account library. In the comparison and verification process of the historical fault case library, the path matching success condition is that the equipment sequence is completely consistent and the connection relationship conforms to the actual physical topology, and the matching successful cases are included in the training set to optimize the weight calculation formula.

[0082] S4, fuse the event chain time sequence relationship diagram with the device physical association path to generate a composite event label containing a hierarchical structure, and the specific implementation is as follows:

[0083] The event entities in the event chain time sequence relationship diagram are topologically aligned with the device nodes in the device physical association path. The alignment rule of the event entities and the device nodes is that the event entity name needs to be completely matched with the device node name, or the device number associated with the event entity in the device account library is consistent with the device node number. For example, the event entity "lightning strike" corresponds to the line node "Line-001", and the event entity "relay protection misoperation" corresponds to the circuit breaker node "CB-005". If there are multiple device nodes with the same name or number in the alignment process, the node with the shortest physical distance is selected. The physical distance is extracted from the device connection graph, and the distance unit is meter. After topological alignment, a mapping relationship table is generated, which records the correspondence between the event entity and the device node and the matching confidence. The matching confidence is calculated according to the name similarity and the physical distance, and the confidence threshold is set to 0.8. The nodes that fail to align are recorded as abnormal data and trigger the manual review process.

[0084] Based on the time sequence weight of the event chain time sequence relationship diagram and the path weight of the device physical association path, the comprehensive association weight is calculated. The time sequence weight comes from the directed edge weight in the event chain time sequence relationship diagram, and the unit is second; the path weight comes from the weight value of the device physical association path, and is dimensionless. The calculation formula of the comprehensive association weight is: the comprehensive association weight is equal to the time sequence weight multiplied by the time sequence weight coefficient plus the path weight multiplied by the path weight coefficient. The default values of the time sequence weight coefficient and the path weight coefficient are 0.5, which can be adjusted through the configuration file. For example, the time sequence weight is 10 seconds, the path weight is 0.8, and the comprehensive association weight is 10x0.5+0.8x0.5=5.4. If the units or dimensions of the time sequence weight and the path weight are incompatible, normalize them to make their numerical ranges 0 to 1 before calculation. The normalization method is: the normalized value of the time sequence weight is the original value divided by the maximum time sequence weight, and the normalized value of the path weight is the original value divided by the maximum path weight.

[0085] The event entities and device nodes are hierarchically clustered according to the comprehensive correlation weights to generate a hierarchical structure including root nodes, intermediate nodes and leaf nodes. The hierarchical clustering adopts a bottom-up hierarchical clustering algorithm, and the comprehensive correlation weights are used as the similarity measure in the clustering process. The clustering threshold is dynamically set according to the data distribution. For example, if the mean of all comprehensive correlation weights is 3.0 and the standard deviation is 1.5, the initial clustering threshold is set to the mean minus one standard deviation (1.5). In the clustering result, the root node is the event entity with the highest comprehensive correlation weight, the intermediate node is the key device node connecting the root node and the leaf node, and the leaf node is the terminal event or device node. The depth of the hierarchical structure is limited to 5 layers, and the part exceeding the limit is merged into the nearest neighbor intermediate node. If the number of nodes after clustering exceeds 100, the first 50 nodes are retained by truncating from high to low according to the comprehensive correlation weights.

[0086] Based on the correlation weights of each node in the hierarchical structure, a composite event label is generated, and the label format is root node-intermediate node-leaf node. The correlation weight is the normalized value of the comprehensive correlation weight of the node in the hierarchical structure, and the normalization method is to divide the node weight by the root node weight. For example, the root node weight is 5.4 and the leaf node weight is 2.7, so the normalized weight of the leaf node is 0.5. The label generation rule is to retain only the nodes with a normalized weight higher than 0.3, and to concatenate the node names in hierarchical order. When the node names conflict, a device number suffix is added, such as "Line-001-A" and "Line-001-B". For example, the root node "lightning strike", the intermediate node "Line-001", and the leaf node "CB-005" generate a label "lightning strike-Line-001-CB-005". If the leaf node has no valid correlation weight, the label is truncated to the previous level.

[0087] To verify the accuracy of the hierarchical structure and the label, the generated composite event label is compared with the standard label in the historical fault case. For example, the standard label of "lightning strike→insulator flashover→protection misoperation" in the historical case is "lightning strike-Line001-Insulator-CB005", and if the generated label matches it, it is determined to be valid. If the matching fails, adjust the clustering threshold or recalculate the comprehensive correlation weight coefficient. When the matching accuracy is less than 80%, trigger the weight coefficient optimization process: the time weight coefficient and the path weight coefficient are iteratively adjusted by 0.1 steps until the matching accuracy meets the standard. The abnormal handling of hierarchical clustering includes: when detecting an isolated node (no associated edge), automatically merging it into the nearest clustering cluster; when the clustering result is empty, reduce the clustering threshold to the mean minus 0.5 times the standard deviation.

[0088] The adjustment of time-series weight coefficients and path weight coefficients is based on the label matching accuracy of historical data. For example, when the accuracy is below 80%, the coefficients are adjusted to 0.6 and 0.4 respectively to increase the proportion of path weights. The dynamic threshold setting method for hierarchical clustering is as follows: calculate the mean and standard deviation of all comprehensive association weights, and set the initial threshold to the mean minus 1 standard deviation. If the clustering result contains more than 100 nodes, the threshold is adjusted to the mean minus 0.5 standard deviations. The normalized weight threshold for label generation is set through a configuration file, which supports dynamic optimization based on actual scenarios. The configuration file is in JSON format and includes parameters such as weight coefficients, clustering thresholds, and hierarchical depth limits.

[0089] In extreme scenarios, such as when an event entity and a device node cannot be matched (match confidence is below 0.8), the event entity is ignored and an exception log is recorded. If the label hierarchy exceeds 5 levels after hierarchical clustering, the terminal nodes are merged from low to high weight until the number of levels meets the requirements. For example, if the hierarchical structure is "A→B→C→D→E→F", terminal nodes E and F are merged into node D to generate "A→B→C→D". If node names conflict during label generation (e.g., multiple intermediate nodes with the same name), a device number suffix is ​​added for differentiation. The device number is extracted from the topology database and is in the format "device type-number", such as "Line-001".

[0090] The hierarchical clustering algorithm is implemented using Python's Scikit-learn library, relying on the AgglomerativeClustering module. Hardware requirements include at least 8GB of memory and support for multi-threaded computation to accelerate the clustering process. Normalized weight calculation and label generation are implemented using Python string manipulation to ensure cross-platform compatibility. In the comparative verification process using a historical fault case library, the standard label matching criteria are that the device sequences are completely identical and the hierarchical order conforms to the actual physical topology. Successfully matched cases are included in the training set to optimize the weight calculation formula; the training set is updated weekly.

[0091] S5. Based on the gradient differences in the traveling wave impedance abrupt change points corresponding to each level in the hierarchical structure of the composite event tag, the granularity confidence threshold of the composite event tag is dynamically adjusted using a gradient clustering algorithm. The specific implementation method is as follows:

[0092] The gradient difference of the traveling wave wave impedance mutation point corresponding to each level in the hierarchical structure of the composite event label is extracted. The gradient difference of the traveling wave wave impedance mutation point is derived from the wave impedance mutation point parameter calculated in step S2, and the gradient difference is defined as the wave impedance change rate of adjacent time points, with the unit of ohm / s. Each level in the hierarchical structure corresponds to a gradient difference value. For example, the root node level corresponds to the gradient difference of the initial stage of the fault, the intermediate node level corresponds to the gradient difference of the fault propagation stage, and the leaf node level corresponds to the gradient difference of the end stage of the fault. The calculation method of the gradient difference is: the wave impedance mutation point data of each level is divided according to the time window, and the difference between the maximum and minimum values of the wave impedance in the window is divided by the length of the window. The length of the time window is set to 1 second by default and can be adjusted through the configuration file. For example, the wave impedance of a certain level changes from 100 ohms to 150 ohms in 1 second, and the gradient difference is (150-100) / 1=50 ohm / s.

[0093] A high-dimensional feature space is constructed based on the gradient difference of the traveling wave wave impedance mutation point, and the dimension of the high-dimensional feature space is consistent with the hierarchical depth. For example, if the hierarchical depth of the composite event label is 3 layers (root node, intermediate node, and leaf node), the high-dimensional feature space is a three-dimensional space, and each dimension corresponds to the gradient difference value of a level. Each data point in the feature space is a gradient difference vector of the hierarchical structure of the composite event label. For example, the gradient difference vector of a certain label is 50 ohm / s for the root node level, 30 ohm / s for the intermediate node level, and 10 ohm / s for the leaf node level, and its coordinates in the three-dimensional feature space are (50, 30, 10). The construction of the feature space needs to exclude noise data with a gradient difference below 0.5 ohm / s, and the noise threshold is defined by the configuration file. The identification method of the noise data is: if the gradient difference of a certain level is below the threshold for three consecutive time windows, it is marked as noise and excluded.

[0094] The data in the high-dimensional feature space is analyzed by a gradient clustering algorithm to generate clustering clusters and cluster density distribution. The gradient clustering algorithm uses a density-based spatial clustering method, and the Euclidean distance is used as the similarity measure in the clustering process. The neighborhood radius is dynamically set according to the standard deviation of the feature space. For example, if the standard deviation of the feature space data is 20 ohm / s, the neighborhood radius is set to 1.5 times the standard deviation (30 ohm / s). The density of the clustering cluster is defined as the number of data points in the cluster divided by the space volume occupied by the cluster, with the unit of point number / cubic unit. For example, a certain cluster contains 100 data points and occupies a space volume of 1000 cubic units, and the density is 0.1 point number / cubic unit. In the clustering result, each cluster corresponds to a granularity confidence mode, such as a high-density cluster representing a similar fault propagation mode and a low-density cluster representing an abnormal or rare mode.

[0095] The granularity confidence threshold of the composite event label is dynamically adjusted according to the density distribution of the clustering cluster. The higher the density of the clustering cluster, the lower the granularity confidence threshold. The adjustment rule of the granularity confidence threshold is: for the top 10% of the density ranking of the clustering cluster, the threshold is set to 0.3; for the cluster with density ranking from 10% to 30%, the threshold is set to 0.5; and for the rest of the cluster, the threshold is set to 0.7. The basis for threshold adjustment is: the label pattern in high-density cluster has high repeatability, and the threshold needs to be reduced to merge similar labels; the label pattern in low-density cluster has strong specificity, and the threshold needs to be increased to retain details. For example, a high-density cluster has a density of 0.2 points per cubic unit, and its corresponding threshold is adjusted to 0.3. The label level below the threshold will be merged. During the threshold adjustment process, the system monitors the information loss rate after label merging in real time. If the loss rate exceeds 15%, stop adjusting and roll back to the previous version threshold.

[0096] The adjusted granularity confidence threshold is mapped to the hierarchical structure to update the hierarchical association weight of the composite event label. The mapping method is: filtering the nodes in the hierarchical structure according to the threshold, if the node association weight is lower than the threshold, it will be merged into the parent node. For example, an intermediate node has an association weight of 0.4, and the threshold is 0.5, then the node is merged into the root node, and its child nodes are directly mounted under the root node. The updated hierarchical association weight is normalized again. The normalization method is to divide the weight of the remaining nodes by the weight of the root node. For example, the root node weight is 1.0, and the weight of the merged intermediate node is 0.8, then the normalized intermediate node weight is 0.8 / 1.0=0.8. The updated composite event label is synchronized to the database, and the label format remains the "root node-intermediate node-leaf node" structure, but the hierarchical depth may be reduced due to the merging operation.

[0097] To verify the effectiveness of the threshold adjustment, the labels before and after the update are compared with the expert annotation results of the historical fault cases. For example, if the expert annotated label level depth is 3 layers, and if the adjusted label depth is 2 layers and the key node is retained, it is determined to be an effective merge; if the key node is lost, the threshold rollback mechanism is triggered to restore the threshold to the previous version. The matching accuracy of the comparison verification needs to reach more than 85%, if not, the clustering parameters need to be recalculated or the threshold grading rules need to be adjusted. The neighborhood radius and density calculation parameters of the clustering algorithm are optimized through grid search, and the optimization target is the matching accuracy of the label and the expert annotation. The grid search parameter range is neighborhood radius 1 to 50 ohms / second, step size 5 ohms / second; minimum sample size 1 to 10, step size 1.

[0098] The implementation of the gradient clustering algorithm is based on the Scikit-learn library in Python, using the DBSCAN module with a neighborhood radius of 30 ohms / second and a minimum sample size of 5. The preprocessing of the feature space data includes standardization, which scales the data in each dimension to a mean of 0 and a variance of 1. The hardware requirements are 16 GB of memory or more, supporting parallel computing to speed up the clustering process. The filtering logic for noise data is as follows: if the membership of a data point in all clusters is less than 0.1, it is marked as noise and a log is recorded. The log record format is a CSV file containing data point coordinates, gradient difference values, and timestamp.

[0099] In extreme scenarios, such as when the density of all clusters is less than 0.05 points per cubic unit, the system automatically switches to hierarchical clustering mode, forcing the generation of 3 clusters and applying the default threshold of 0.5. If an isolated node (with no parent or child nodes) appears after the hierarchy update, its associated weight is set to zero and an artificial review process is triggered. If a label hierarchy break is detected during threshold adjustment (such as a missing intermediate node causing the root node to directly connect to a leaf node), a virtual intermediate node is inserted with an average associated weight, and the virtual node is marked as pending review. The average associated weight of the virtual node is calculated as follows: take the average of the weights of the nodes before and after the break, for example, the weight of the previous node is 0.6 and the weight of the next node is 0.4, then the weight of the virtual node is 0.5.

[0100] The consistency check mechanism for the dimensionality of the feature space and the depth of the hierarchy is as follows: the system periodically scans the hierarchy database, and if a depth change (such as adding a new level or merging levels) is detected, it automatically triggers the feature space reconstruction process. The reconstruction process includes re-extracting gradient differences, filtering noise data, and standardization. The reconstruction period of the feature space is set to once a day to ensure real-time data. The historical versions of the threshold adjustment are saved in the version control system, supporting rollback to any historical state according to the timestamp.

[0101] The update results of the composite event label are notified to the downstream analysis through the message queue, with a JSON message format containing label ID, hierarchy, associated weight, and update timestamp. The analysis strategy is adjusted in real time according to the updated label, such as high confidence labels participating in fault reasoning first, and low confidence labels entering the artificial review queue.

[0102] Step S5 solves the problem of too coarse or too fine granularity of the existing semantic label method caused by fixed threshold by fusing the physical propagation characteristics of the power grid event and data clustering analysis. Traditional methods usually use static threshold or manually adjust the label granularity, which is difficult to adapt to complex and variable fault scenarios and is prone to lose key hierarchical correlation information. Step S5 constructs a feature space based on the gradient difference of the traveling wave wave impedance mutation, and divides the confidence threshold by density-driven dynamic clustering, so that the label granularity is adaptively adjusted according to the physical characteristics of the fault propagation mode (such as impedance mutation strength and hierarchical depth). Compared with the prior art, the combination of transient physical parameters (wave impedance gradient) of the power grid system and data distribution density replaces manual experience rules, making the merging and splitting of the label hierarchical structure more consistent with the actual fault evolution law, avoiding the loss of key path information caused by too coarse granularity, and preventing noise interference caused by too fine granularity, providing a high-credibility structured label system for subsequent fault tracing and risk assessment.

[0103] S6, output the composite semantic label set containing the dynamic causal chain, the equivalent traveling wave propagation delay and the device physical correlation path, and the specific implementation is as follows:

[0104] The dynamic causal chain, the equivalent traveling wave propagation delay and the device physical correlation path are stored in a hierarchical structure. The hierarchical structure is derived from the hierarchical relationship of the composite event label generated in step S4, and the storage mode is a tree table structure in a relational database. Each row of the tree table corresponds to a hierarchical node, and the node attributes include the event entity name of the dynamic causal chain, the equivalent traveling wave propagation delay value and the device node number of the device physical correlation path. The unit of the equivalent traveling wave propagation delay value is second, which is derived from the calculation result of step S2, and the device node number is extracted from the device account library. For example, the root node is stored as “lightning-stroke-equivalent delay 10 seconds-path Line-001”, and the child node is stored as “insulator flashover-equivalent delay 8 seconds-path Line-001-Insulator”. The storage depth of the hierarchical structure is limited to 5 layers, and the parts exceeding the limit are merged into the parent node from low to high according to the correlation weight. The merging rule is: if the correlation weight of the child node is lower than 0.3, the attributes of the child node are migrated to the parent node and the child node is deleted.

[0105] Based on the event entity name and the device node number, the association index of the dynamic causal chain and the device physical correlation path is generated. The generation rule of the association index is: the event entity name and the device node number are SHA-256 hashed to generate a 128-bit hexadecimal hash key; the event entity hash key in the dynamic causal chain and the device node hash key in the device physical correlation path are bidirectionally mapped to establish a one-to-one correspondence. For example, the hash key of the event entity “lightning” is “a1b2c3”, the hash key of the device node “Line-001” is “d4e5f6”, and the index entry is The index data is stored in the Redis in-memory database, and the expiration time of the key-value pair is set to 30 days, and it will be automatically regenerated after expiration. The index update trigger condition is the change of the label set content or the update of the device account library data.

[0106] The storage format of the composite semantic label set is defined, which includes the directed edge weight of the dynamic causal chain, the timestamp sequence of the equivalent traveling wave propagation delay, and the topological connection relationship of the device physical associated path. The directed edge weight is derived from the delay correlation analysis result of step S2 and is stored as a floating-point number with a value range of 0 to 1; the timestamp sequence of the equivalent traveling wave propagation delay is stored as an array of Unix millisecond timestamps in the order of event occurrence, with a timestamp accuracy error of less than 1 millisecond; the topological connection relationship of the device physical associated path is stored as an ordered list of device node numbers, and the connection relationship between nodes is marked as "line connection" or "breaker connection". For example, a record of the label set is: directed edge weight 0.8, equivalent delay sequence [1620000000000, 1620000005000], topological path [Line-001, CB-005, Transformer-002]. The storage format is defined by JSON Schema, and the field mandatory check rules include that the dynamic causal chain and the device physical associated path must exist and be non-empty.

[0107] According to the hierarchical association weight of the composite event label, the version control of the label set is performed, and the difference of the association weight before and after the label update is recorded. The implementation method of version control is: an incremental version number (such as v1.0→v1.1) is generated each time the label set is updated, and the difference matrix of the association weight between the current version and the previous version is recorded. The difference matrix is calculated by: the difference value of the association weight of the same node in the new and old versions, if the absolute value of the difference value exceeds 0.1, it is marked as a major change and a notification process is triggered. For example, the weight of node "Line-001" changes from 0.8 to 0.6, the difference value is -0.2, which is marked as a major change. The version history data is stored in a separate history table, which supports rolling back to any historical state according to the time range or version number. The rollback operation is to copy the corresponding version data from the history table to overwrite the main table, and record the rollback event in the version log.

[0108] The composite semantic label set containing dynamic causal chain, equivalent traveling wave propagation delay, device physical associated path and version control information is output. The output data format is JSON file, and the JSON structure contains the following fields:

[0109] causal_chain: event entity list and directed edge weight of dynamic causal chain;

[0110] wave_delay: equivalent traveling wave propagation delay value and its corresponding Unix millisecond timestamp sequence;

[0111] device_path: Topology connection relationship list of device physical association path;

[0112] version_log: Version control information, including version number, change time and weight difference matrix.

[0113] The generation rule of the JSON file is: traversing the database main table in the order of label ID, converting each record into a JSON object in the predefined format, and finally merging into an array structure. For example, a record of the output file is:

[0114]

[0115]

[0116] To verify the integrity and consistency of the label set, data checking is performed on the output JSON file. The checking rules include: the event entities of the dynamic causal chain must all exist in the device physical association path; the equivalent line wave propagation delay values must be consistent with the timestamp sequence length; the weight difference in the version control information must match the actual change record. The checking tool is implemented based on JSON Schema, and detailed error reports are generated when the checking fails and the data repair process is triggered. The repair process is: recovering the last valid data from the historical version, regenerating the label set, and recording the repair log. If the repair still fails, it is marked as an unrepairable error and the system administrator is notified.

[0117] The database table design for structured storage is: the main table stores the current version of the label set, and the historical table stores all historical version data. The main table and the historical table are associated through the version number field, and the combined index is based on the version number and the label ID. The weight difference matrix in the version control is stored by difference algorithm compression, and the compression method is to store only the non-zero difference value to reduce the storage space. The output JSON file is distributed to the downstream analysis through the Kafka message queue, and the message format includes the label ID, version number and JSON file path. The consumer subscription strategy is to filter messages by label type (such as "lightning fault" and "device overload") to ensure efficient distribution.

[0118] In extreme scenarios, such as when the database storage space is insufficient, the system automatically cleans up the earliest historical version data and retains the last 10 versions. The cleaning rule is: delete the earliest version in ascending order of version number until the remaining version number meets the standard. If the size of the output JSON file exceeds 1GB, the sharding storage mechanism is enabled, and the file is split into multiple sub-files according to the hash value of the label ID, with each sub-file size limited to 100MB. The sharded file is stored through the HDFS distributed file system, and the number of replicas is set to 3 to ensure high availability.

[0119] The exception handling mechanism of the data repair process is: if the historical version data is damaged or missing, the latest backup is recovered from the backup system. The backup cycle is set to once a day, and the backup data retention period is 30 days. The repair log is recorded in CSV format, including repair time, repair tag ID, repair operation type and operation result, and the log file is stored in a separate log server for auditing.

[0120] The embodiment solves the label distortion problem in traditional semantic label method in composite event analysis caused by the separation of event logic, device topology and time sequence propagation by deeply combining power grid system transient physical characteristics with multi-modal data modeling. The prior art usually extracts event features or statically maps device associations in isolation, which cannot capture the physical nature of fault dynamic propagation (such as the influence of traveling wave attenuation and wave impedance mutation on time sequence), and it is also difficult to adaptively adjust the label granularity to balance information integrity and noise suppression. The embodiment constructs a cross-level fusion framework: in the event analysis stage, the text semantics is mapped to the physical space-time relationship of electromagnetic transient waveform representation through the linkage of dynamic causal chain extraction and traveling wave propagation time delay analysis; in the path matching stage, based on the physical connection constraint of device topology and the dynamic correction mechanism of electrical parameters, the physical explainable association of event chain and device entity is ensured; in the label generation stage, the wave impedance gradient difference driven density clustering algorithm is introduced to replace the artificial rules or fixed threshold, realizing the physical-data double-driven adjustment of label granularity; finally, the versioned label set integrates multi-dimensional parameters to provide a closed-loop data basis for fault tracing with time sequence deduction, path restoration and confidence evaluation. The data flow between each step is tightly coupled, for example, the dynamic causal chain provides event logic constraints for traveling wave time delay analysis, and the device path weight provides physical attenuation prior for hierarchical clustering. The embodiment realizes the cross-domain collaboration of power grid engineering exclusive characteristics (traveling wave propagation, impedance mutation) and data technology (clustering, indexing).

[0121] The calculations involved in the embodiment are dimensionless numerical calculations. The preset parameters and threshold values in the calculations are set by those skilled in the art according to actual conditions.

[0122] It should be noted that the application can be deployed on the device itself to realize embedded application, or run on PC or other terminals with user interface, thereby meeting various hardware environments and use requirements.

[0123] The above-described embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented by software, the above-described embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the processes or functions described in the embodiments of the present application are wholly or partially generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center through a wired (for example, infrared, wireless, microwave, etc.) manner. The computer-readable storage medium can be any available medium accessible by a computer or a data storage device such as a server, data center, etc. containing a set of one or more available media. The available media can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state disk.

[0124] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described system, device and module can refer to the corresponding processes in the foregoing method embodiments, which will not be described here.

[0125] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the above-described device embodiments are only schematic, for example, the division of the modules is only a logical function division, and actual implementation can have another division manner, for example, a plurality of modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed each other can be indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.

[0126] The modules described as separate components can or can not be physically separated, and the components displayed as modules can or can not be physical modules, which can be located in one place or distributed on a plurality of network modules. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiments.

[0127] In addition, each functional module in the various embodiments of the present application can be integrated in one processing module, or each module can exist physically independently, or two or more modules can be integrated in one module.

[0128] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to make a computer device (which can be a personal computer, a server or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0129] The above is merely specific embodiments of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

[0130] Finally: the above is merely preferred embodiments of the present application, and is not used to limit the present application, and any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A method for generating semantic tags based on a power grid engineering corpus, characterized in that, The method comprises the following steps: S1, analyzing the composite event description in the power grid engineering corpus, extracting event entities and dynamic causal chains between event entities; S2, calculating the equivalent traveling wave propagation time delay between adjacent event entities according to the electromagnetic transient waveform corresponding to the device fault mode in the dynamic causal chain, and generating an event chain timing relationship graph based on the time delay correlation analysis; S3, matching the device physical association path corresponding to the event entity based on the device connection relationship in the power grid system topology structure; S4, fusing the event chain timing relationship graph and the device physical association path to generate a composite event label containing a hierarchical structure; S5, dynamically adjusting the granularity confidence threshold of the composite event label according to the gradient difference of the wave impedance mutation point corresponding to each level in the hierarchical structure of the composite event label through the gradient clustering algorithm; S6, outputting a composite semantic label set containing dynamic causal chains, equivalent traveling wave propagation time delays and device physical association paths. 2.The grid engineering corpus based semantic tag generation method of claim 1, wherein, Analyzing the composite event description in the power grid engineering corpus, extracting event entities and dynamic causal chains between event entities, comprising: extracting event entities from the composite event description of the power grid engineering corpus through dependency syntax analysis; generating dynamic causal chains between event entities according to the logical connection words of event entities in the composite event description; correcting the timing correlation of the dynamic causal chain based on the timestamp sequence of the event entity in the composite event description. 3.The grid engineering corpus based semantic tag generation method of claim 1, wherein, According to the electromagnetic transient waveform corresponding to the device fault mode in the dynamic causal chain, the equivalent traveling wave propagation time delay between adjacent event entities is calculated, and the event chain timing relationship graph is generated based on the time delay correlation analysis, comprising: extracting the wave speed and the physical distance of the device from the electromagnetic transient waveform corresponding to the device fault mode in the dynamic causal chain, and synchronously acquiring the wave impedance mutation point parameters on the traveling wave propagation path; calculating the equivalent traveling wave propagation time delay between adjacent event entities based on the wave speed, the physical distance of the device and the wave impedance mutation point parameters; generating an initial timing relationship graph according to the equivalent traveling wave propagation time delay and the phase synchronism index corresponding to the fault mode; dynamically correcting the timing weight in the initial timing relationship graph through the wave impedance mutation point parameters to generate the event chain timing relationship graph. 4.The grid engineering corpus based semantic tag generation method of claim 1, wherein, Based on the device connection relationship in the power grid system topology structure, the device physical association path corresponding to the event entity is matched, comprising: constructing a device connection graph based on the device connection relationship in the power grid system topology structure; searching for a matched device physical association path in the device connection graph according to the event entity in the dynamic causal chain; adjusting the path weight of the device physical association path through the device electrical parameters in the device account library; selecting the main path of the device physical association path according to the path weight, and generating the device physical association path corresponding to the event entity. 5.The grid engineering corpus based semantic tag generation method of claim 1, wherein, Fusing the event chain timing relationship graph and the device physical association path to generate a composite event label containing a hierarchical structure, comprising: topologically aligning the event entities in the event chain timing relationship graph with the device nodes in the device physical association path; calculating the comprehensive association weight based on the timing weight of the event chain timing relationship graph and the path weight of the device physical association path; According to the comprehensive correlation weight, the event entity and the device node are hierarchically clustered to generate a hierarchical structure including root nodes, intermediate nodes and leaf nodes; Based on the correlation weight of each node in the hierarchical structure, a composite event label is generated. 6.The grid engineering corpus based semantic tag generation method of claim 5, wherein, The label format of the composite event label is root node-intermediate node-leaf node. 7.The grid engineering corpus based semantic tag generation method of claim 1, wherein, According to the gradient difference of the traveling wave wave impedance mutation point corresponding to each level in the hierarchical structure of the composite event label, the granularity confidence threshold of the composite event label is dynamically adjusted through a gradient clustering algorithm, including: Extract the gradient difference of the traveling wave wave impedance mutation point corresponding to each level from the hierarchical structure of the composite event label; Based on the gradient difference of the traveling wave wave impedance mutation point, a high-dimensional feature space is constructed, and the dimension of the high-dimensional feature space is consistent with the hierarchical depth; Through the gradient clustering algorithm, the data in the high-dimensional feature space is clustered and analyzed to generate a cluster and a cluster density distribution; According to the cluster density distribution, the granularity confidence threshold of the composite event label is dynamically adjusted; Map the adjusted granularity confidence threshold to the hierarchical structure to update the hierarchical correlation weight of the composite event label. 8.The grid engineering corpus based semantic tag generation method of claim 7, wherein, The higher the cluster density is, the lower the granularity confidence threshold is. 9.The grid engineering corpus based semantic tag generation method of claim 1, wherein, Output a composite semantic label set containing a dynamic causal chain, an equivalent traveling wave propagation time delay and a device physical association path, including: Structurally store the dynamic causal chain, the equivalent traveling wave propagation time delay and the device physical association path according to the hierarchical structure; Based on the event entity name and the device node number, generate an association index of the dynamic causal chain and the device physical association path; Define the storage format of the composite semantic label set, and the storage format includes the directed edge weight of the dynamic causal chain, the timestamp sequence of the equivalent traveling wave propagation time delay and the topological connection relationship of the device physical association path; According to the hierarchical correlation weight of the composite event label, the label set is version controlled to record the correlation weight difference before and after the label is updated; Output the composite semantic label set containing the dynamic causal chain, the equivalent traveling wave propagation time delay, the device physical association path and the version control information.

Citation Information

Cited By

  • Roadbed slope automatic monitoring data processing method and system

    CN121881745A

  • Frequency control data transmission system and method for extra-high voltage direct current sending end

    CN122204900A

  • A frequency control data transmission system and method for an ultra-high voltage direct current sending end

    CN122204900B