Defect report generation method and device of relay protection equipment and storage medium

By constructing a fault knowledge graph and quantifying action deviation, a defect report for relay protection equipment is generated, which solves the problem of incomplete reporting in existing technologies, achieves comprehensive coverage and accurate location of complex fault scenarios, and improves the accuracy and comprehensiveness of the report.

CN121899529APending Publication Date: 2026-04-21STATE GRID BEIJING ELECTRIC POWER CO
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
STATE GRID BEIJING ELECTRIC POWER CO
Filing Date
2026-01-13
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

In existing technologies, the defect reports generated by relay protection equipment are incomplete and inaccurate, failing to fully cover complex hidden fault boundary scenarios, and lacking quantitative tools to accurately pinpoint the root causes of malfunctions or failures to operate.

Method used

By constructing a fault knowledge graph, high-risk test cases are identified, target test datasets are generated using the fault knowledge graph, action deviation is quantified, and defect reports are generated based on action deviation, thus achieving comprehensive testing and accurate qualitative analysis of relay protection equipment.

Benefits of technology

It improves the comprehensiveness and accuracy of defect reports for relay protection equipment, and can automatically identify complex fault propagation modes, especially cascading faults caused by the coupling of multiple factors, and generate more targeted and representative test scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121899529A_ABST
    Figure CN121899529A_ABST
Patent Text Reader

Abstract

The invention discloses a defect report generation method and device of relay protection equipment and a storage medium. The method comprises the following steps: determining a target test case of target relay protection equipment; based on the target test case, testing the target relay protection equipment to obtain a target test data set; based on the target test data set, an action deviation degree is determined, and the action deviation degree is used for quantifying the degree that the actual action value of the target relay protection equipment deviates from the corresponding protection action threshold interval; determining a target attribution result of the action deviation degree based on the action deviation degree; and generating a defect report of the target relay protection equipment based on the target attribution result. According to the invention, the technical problem that the generation result of the defect report of the relay protection equipment is incomplete and inaccurate in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of power systems, and more specifically, to a method, apparatus, and storage medium for generating defect reports for relay protection equipment. Background Technology

[0002] As a safety barrier for power networks, the reliability of relay protection equipment directly affects the stable operation of the power grid. When a power system fault occurs, relay protection equipment needs to operate accurately within milliseconds to isolate the fault area and prevent the accident from escalating. To ensure the reliability of relay protection equipment under various extreme operating conditions, systematic testing is required to simulate real fault scenarios and verify the operating logic and performance indicators of the relay protection equipment.

[0003] In related technologies, test cases are designed based on human experience and verified using standard test procedures to generate defect reports for relay protection equipment. On the one hand, relying on human experience to design test cases makes it difficult to fully cover the complex, latent fault boundary scenarios in power systems, especially cascading fault modes caused by multiple coupled factors. On the other hand, the generated defect reports are highly dependent on personal experience and lack quantitative tools to accurately pinpoint the root causes of malfunctions or failures to operate by relay protection equipment, resulting in insufficient accuracy. Therefore, related technologies suffer from incomplete and inaccurate defect report generation results for relay protection equipment.

[0004] There is currently no effective solution to the above problems. Summary of the Invention

[0005] This application provides a method, apparatus, and storage medium for generating defect reports for relay protection equipment, in order to at least solve the technical problems of incomplete and inaccurate defect report generation results for relay protection equipment in related technologies.

[0006] According to one aspect of the embodiments of this application, a method for generating a defect report of a relay protection device is provided, comprising: determining target test cases for the target relay protection device; testing the target relay protection device based on the target test cases to obtain a target test dataset; determining the action deviation degree based on the target test dataset, wherein the action deviation degree is used to quantify the degree to which the actual action value of the target relay protection device deviates from the corresponding protection action threshold range; determining the target attribution result of the action deviation degree based on the action deviation degree; and generating a defect report of the target relay protection device based on the target attribution result.

[0007] According to another aspect of the embodiments of this application, a defect report generation device for relay protection equipment is provided, comprising: a target test case determination module, configured to determine target test cases for the target relay protection equipment; a target test dataset determination module, configured to test the target relay protection equipment based on the target test cases to obtain a target test dataset; an action deviation determination module, configured to determine the action deviation based on the target test dataset, wherein the action deviation is used to quantify the degree to which the actual action value of the target relay protection equipment deviates from the corresponding protection action threshold range; a target attribution result determination module, configured to determine the target attribution result of the action deviation based on the action deviation; and a defect report generation module, configured to generate a defect report for the target relay protection equipment based on the target attribution result.

[0008] According to another aspect of the embodiments of this application, a non-volatile storage medium is provided, which stores a plurality of instructions adapted for a method for generating defect reports of relay protection devices, wherein any one of the instructions is loaded by a processor.

[0009] According to another aspect of the embodiments of this application, an electronic device is provided, including: one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement any one of the following methods for generating defect reports of relay protection devices.

[0010] According to another aspect of the embodiments of this application, a computer program product is provided, which, when executed on a data processing device, is adapted to perform the steps of a method for generating a defect report of a relay protection device.

[0011] In this embodiment, target test cases for the target relay protection device are determined; based on the target test cases, the target relay protection device is tested to obtain a target test dataset; based on the target test dataset, the action deviation is determined, whereby the action deviation is used to quantify the degree to which the actual action value of the target relay protection device deviates from the corresponding protection action threshold range; based on the action deviation, the target attribution result of the action deviation is determined; and based on the target attribution result, a defect report for the target relay protection device is generated. This achieves the goal of generating a defect report for the target relay protection device by using the determined target test cases and testing the target relay protection device with the target test cases, thereby improving the comprehensiveness and accuracy of the generated defect report for the target relay protection device and solving the technical problems of incomplete and inaccurate defect report generation results for relay protection devices in related technologies. Attached Figure Description

[0012] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments of this application and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0013] Figure 1 This is a flowchart of a method for generating defect reports for relay protection equipment according to an embodiment of this application;

[0014] Figure 2 This is a flowchart of an optional method for generating defect reports for relay protection equipment according to an embodiment of this application;

[0015] Figure 3 This is a flowchart of an optional defect report generation process provided according to an embodiment of this application;

[0016] Figure 4 This is a schematic diagram of an optional defect report generation device for relay protection equipment provided according to an embodiment of this application. Detailed Implementation

[0017] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0018] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0019] It should be noted that the information and data collected in this application (including but not limited to historical fault data, initial datasets, target test datasets, etc.) are information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of this data all comply with relevant laws, regulations, and standards, necessary confidentiality measures have been taken, and they do not violate public order and good morals. Corresponding operation entry points are provided for users to choose to authorize or refuse. For example, interfaces are set up between this system and relevant users or organizations, providing users with corresponding operation entry points to choose to agree to or refuse automated decision results; if the user chooses to refuse, the process proceeds to the expert decision-making stage.

[0020] For ease of description, the following explains some of the nouns or terms used in the embodiments of this application:

[0021] The IEC 60870-5-103 protocol is mainly used for data communication between relay protection equipment and background detection systems or other intelligent devices.

[0022] The Apriori algorithm is a data mining technique primarily used to discover frequent associations and correlations between items in a database. It is an algorithm for finding frequent itemsets and association rules in large-scale datasets.

[0023] According to an embodiment of this application, a method embodiment for generating defect reports of relay protection devices is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0024] Figure 1 This is a flowchart of a method for generating defect reports for relay protection equipment according to an embodiment of this application, such as... Figure 1 As shown, the method includes the following steps:

[0025] Step S102: Determine the target test cases for the target relay protection device;

[0026] It is understandable that by generating target test cases for target relay protection devices, the limitations of traditional testing methods based on subjective experience can be overcome, thus achieving comprehensiveness and accuracy in testing and generating high-quality defect reports.

[0027] In one optional embodiment, determining the target test cases for the target relay protection device includes: acquiring a fault knowledge graph of the target relay protection device, wherein the fault knowledge graph includes multiple entities and multiple connecting edges, the multiple entities include device entities, fault type entities, and protection action entities, and the connecting edges include the association relationship between corresponding two entities and the edge weight used to quantify the degree of association between the two entities; determining multiple initial paths based on the fault knowledge graph, wherein the initial paths at least include fault type entities, protection device entities, and protection action entities; determining the path risk values ​​corresponding to the multiple initial paths respectively; filtering out a target path from the multiple initial paths based on the path risk values ​​corresponding to the multiple initial paths and a preset risk threshold, wherein the path risk value of the target path is higher than the preset risk threshold; and determining the target test cases based on the target path.

[0028] The process involves constructing a fault knowledge graph for the target relay protection device and identifying multiple initial paths—potential fault propagation paths—by traversing this graph. The path risk value corresponding to each initial path is then determined, and a preset risk threshold is used to select target paths with risk values ​​exceeding this threshold. Based on these target paths, target test cases for the target relay protection device are generated. This high-risk target path selection mechanism avoids excessive focus on low-risk scenarios, ensuring that the selection of test scenarios is more targeted and representative, thereby improving the relevance of the testing process and the comprehensiveness and accuracy of the generated defect reports.

[0029] Optionally, the historical fault report texts and fault waveform files pre-stored in the database of the relay protection system (including the target relay protection equipment and other equipment closely related to the target relay protection equipment) can be processed to extract fault entity relationships and transient features and construct an association network to generate a fault knowledge graph with weighted edges (i.e., connection edges).

[0030] Optionally, pre-stored historical fault report texts and fault waveform files can be obtained from the relay protection system database via standardized interfaces. For historical fault report texts, the system accesses the power dispatch automation system, substation operation and maintenance management system, and the fault analysis document library provided by the target relay protection equipment manufacturer. Structured text is extracted using a database query protocol based on SQL (Structured Query Language), unstructured text is obtained via a file transfer protocol, and the authenticity of the text source is verified by checking the data signature. For fault waveform files, historical waveform files can be retrieved from the fault recorder via the IEC 60870-5-103 protocol, locally stored waveform files can be received via the Ethernet interface of the target relay protection equipment, and distributed storage waveform files can be downloaded via a cloud platform interface.

[0031] Optionally, integrity checks can be performed on the acquired historical fault report texts and fault waveform files, including removing damaged files and duplicate records, marking and completing texts with missing key fields, and verifying the consistency of key information such as timestamps and device identifiers through cross-system data comparison. The verified historical fault report texts and fault waveform files undergo structured processing. For historical fault report texts, natural language processing technology based on a BERT (Bidirectional Encoder Representations from Transformers) pre-trained model can be used. A named entity recognition module extracts entity information such as fault type entities, device entities, and protection action entities. Dependency parsing algorithms are then used to uncover causal relationships and other correlations between entities. For fault waveform files, a combination of wavelet transform and Fourier transform algorithms can be used to extract transient feature data, including peak voltage and current values ​​at the fault time, frequency mutation rate, harmonic distortion rate, transient component attenuation coefficient, and attenuated DC component characteristics. An appropriate sampling frequency is set to ensure the capture of microsecond-level features.

[0032] Optionally, entities and relationships extracted from historical fault report texts can be mapped to transient features in fault waveform files using a spatiotemporal correlation algorithm to construct a relational network with entities as nodes and relationships as edges. In the edge weight assignment stage, the analytic hierarchy process (AHP) is used to comprehensively consider indicators such as fault occurrence frequency, impact range, and handling difficulty. Matrix operations are then performed to generate corresponding edge weight values ​​for each relationship, resulting in the final fault knowledge graph comprising multiple entities and multiple edges.

[0033] Optionally, a fault knowledge graph can be constructed as follows: First, perform entity relationship parsing on the historical fault report texts pre-stored in the relay protection system database to identify the protection device model, fault type, protection action, and logical association, generating a set of fault entity relationship triples. Second, extract transient features from the fault waveform files pre-stored in the relay protection system database, calculate the amplitude and phase shift of the fundamental and harmonic components, and generate transient feature data containing harmonic distortion rate features and attenuated DC component features. Then, perform topological fusion on the set of fault entity relationship triples and the transient feature data to generate a structured fault feature matrix with topological weights. Finally, perform graph network modeling on the structured fault feature matrix, construct a node association network based on edge weights, and generate a fault knowledge graph with edge weights. The fault knowledge graph is used to indicate the device entities (i.e., protection device nodes), fault type entities (i.e., fault type nodes), and protection action entities of the target relay protection equipment, as well as the associations and edge weights between entities.

[0034] Optionally, entity relation parsing is performed on the historical fault report texts pre-stored in the relay protection system database. The historical fault report texts are retrieved through a text parsing interface. These texts cover types such as protection action records, fault handling reports, and operation and maintenance records of the target relay protection equipment. Natural language processing technology is used to identify entities within the historical fault report texts. First, the texts are segmented into sentences using a word segmentation tool, removing stop words and irrelevant symbols, and retaining meaningful lexical units. Then, a named entity recognition model is invoked to scan the processed historical fault report texts, identifying information such as equipment model (including the target relay protection equipment model, used to determine the corresponding equipment) and fault type. The equipment model includes the equipment manufacturer's identifier, series number, and function type identifier, while the fault type includes categories such as short-circuit fault, ground fault, and overload fault.

[0035] Optionally, in the entity relation extraction stage, a relation identification algorithm based on dependency parsing can be used to perform contextual semantic analysis on the identified entities, sorting out the logical relationships between entities, including causal relationships, accompanying relationships, triggering relationships, etc. The identified entities and their relationships are encapsulated into triples, forming triples in the form of [subject entity, relation, object entity], such as [equipment model, occurrence, short-circuit fault], [grounding fault, trigger, protection action], etc. The system performs consistency checks on the generated triple set, removing triples with semantic conflicts or missing information, and retaining unique triple records through a deduplication mechanism, ultimately forming a structured set of fault entity relation triples.

[0036] Transient processes typically refer to transient electrical phenomena that occur in a power system. When a fault occurs in a power system, such as a short circuit, open circuit, or overvoltage, electrical quantities will change rapidly near the fault point. This transition from a normal steady state to a fault state is called a transient process.

[0037] Optionally, transient features can be extracted from the fault recording files pre-stored in the relay protection system database. The fault recording files can be read via a file parsing module. These files contain raw waveform data showing the changes in electrical quantities such as voltage and current over time during a fault. Preprocessing of this raw waveform data can be performed, for example, by using digital filtering algorithms to remove high-frequency noise and baseline drift components, and by using interpolation algorithms to fill in missing segments of the raw waveform data to ensure its continuity and integrity.

[0038] Optionally, Fourier transform can be used to perform spectral analysis on the preprocessed waveform data to decompose the fundamental component and each harmonic component. The amplitude and phase shift of the fundamental component are calculated, and the amplitude and phase difference relative to the fundamental component of each harmonic component are also calculated. Based on the calculation results of the fundamental and harmonic components, the harmonic distortion rate characteristics are derived through formula derivation to reflect the overall distortion degree of harmonic components in the waveform data. For the DC component in the fault recording file, the system uses an exponential decay model to fit the DC component, extract the decay time constant and initial amplitude, and form the decay DC component characteristics. The peak voltage and current, frequency change rate, harmonic distortion rate, transient component decay coefficient, and decay DC component characteristics at the fault time are integrated and arranged in a structured manner according to time series or fault stage to generate transient feature data.

[0039] Optionally, topology fusion processing can be performed on the fault entity relationship triplet set and transient feature data to establish an entity mapping mechanism. This mechanism associates the equipment entities (including the equipment entities corresponding to the target relay protection device), fault type entities, and protection actions in the fault entity relationship triplet with the electrical quantity detection objects in the transient feature data, ensuring accurate matching between entities and corresponding transient features. For the electrical topology of the power grid, pre-stored power grid topology map data is retrieved. This data includes the physical connection relationships and electrical parameters of the target relay protection device, lines, busbars, and other equipment.

[0040] Optionally, the electrical connections in the electrical topology can be transformed into quantified topology weights. These weights are determined based on factors such as the tightness of the electrical connections, transmission capacity, and physical distance. Topology analysis algorithms convert these factors into computable weight parameters. An initial feature matrix is ​​constructed using entities in the fault entity relationship triplet as row indices and feature terms of transient features as column indices. The matrix elements are the feature values ​​of the transient features of the corresponding entities. The topology weights are embedded into the correlation dimensions between the rows and columns of the initial feature matrix. Matrix operations quantify the electrical connections into edge weights of the initial feature matrix, forming a structured fault feature matrix with topology weights. This matrix contains both the numerical correlation between entities and features and reflects the electrical topology relationships between entities through the topology weights.

[0041] Optionally, a graph network model can be performed on the structured fault feature matrix. The equipment entities, fault type entities, and protection actions corresponding to the row indices in the structured fault feature matrix are determined as nodes in the graph network. The node attributes include basic information of the entity (e.g., equipment model) and the corresponding transient feature data summary. Based on the topological weights in the fault feature matrix, edge weights representing the degree of association between entities are calculated. At the same time, the edge weights are modified by combining the logical association relationships in the fault entity relationship triples, forming weighted connection edges between nodes.

[0042] Optionally, a graph network construction algorithm can be used to combine nodes with weighted edges to form a node association network. In this network, device nodes and fault type nodes are connected by edges, with edge weights reflecting the electrical connection strength and correlation between them. The constructed node association network is then normalized by defining node identification rules, edge weight ranges, and network topology constraints to generate a fault knowledge graph. This fault knowledge graph clearly indicates device nodes, fault type nodes, and protection action nodes, as well as the electrical connection relationships between them.

[0043] In an optional embodiment, determining the path risk value corresponding to each of the multiple initial paths includes: for a target initial path among the multiple initial paths, determining the edge weights corresponding to each of the multiple connecting edges included in the target initial path based on a fault knowledge graph; determining the path risk value of the target initial path based on the edge weights corresponding to each of the multiple connecting edges included in the target initial path, the path length coefficient of the target initial path, and the preset fault time decay coefficient corresponding to each of the multiple connecting edges included in the target initial path, wherein the path length coefficient is used to quantify the influence of the number of connecting edges included in the target initial path on the fault propagation process corresponding to the target initial path, and the preset fault time decay coefficient is used to quantify the degree to which the influence of the corresponding connecting edge on the fault propagation process corresponding to the target initial path weakens over time; and determining the path risk value corresponding to each of the other initial paths among the multiple initial paths, excluding the target initial path, by using the method of determining the path risk value of the target initial path.

[0044] It is understandable that, based on the fault knowledge graph, the edge weights corresponding to the multiple connecting edges included in the target initial path are determined. Combined with the path length coefficient of the target initial path and the preset fault time attenuation coefficients corresponding to the multiple connecting edges included in the target initial path, the path risk value of the target initial path is calculated. By calculating the path risk value of the target initial path, the path risk values ​​corresponding to the other initial paths besides the target initial path are calculated, thus obtaining the path risk values ​​for each of the multiple initial paths. The aforementioned path length coefficient is usually inversely proportional to the path length of the target initial path (i.e., the number of connecting edges included in the target initial path), intended to reflect that the longer the path, the greater the attenuation effect experienced during fault propagation, meaning the strength of the fault signal may be weaker when it reaches the device at the end of the path. By constructing a fault knowledge graph, complex fault propagation patterns can be automatically identified, especially those chain reaction faults caused by the coupling of multiple factors. This ensures that the target test cases cover various high-risk fault scenarios that may be encountered, improving the comprehensiveness of the testing and thus improving the comprehensiveness of the generated defect reports.

[0045] Optionally, the path length coefficient can be determined using different attenuation functions based on the number of connecting edges in the path. For example, a base weight value can be set, and then the weight value decreases proportionally as the number of connecting edges increases. The preset fault time attenuation coefficient is used to quantify the degree to which the fault severity weakens over time, reflecting the natural weakening of the fault signal or impact over time. The preset fault time attenuation coefficient can be determined using an exponential attenuation function or other forms of attenuation models. For example, in the early stages of a fault (e.g., within milliseconds or seconds), the preset fault time attenuation coefficient can be close to 1, indicating that the fault signal has almost no attenuation; as time progresses, the attenuation coefficient gradually decreases, reflecting the gradual weakening of the signal.

[0046] Optionally, the fault knowledge graph can be processed to calculate the risk weight (i.e., path risk value) of the fault propagation path (i.e., the initial path) and filter out paths that exceed a preset risk threshold to generate a set of high-risk test paths (composed of multiple target paths).

[0047] Optionally, path analysis can be performed on the fault knowledge graph. An improved Dijkstra algorithm can be invoked to traverse all nodes (i.e., entities) in the fault knowledge graph, setting each fault type entity as the starting node. Reachable nodes are explored sequentially by connecting edges, recording all possible fault propagation paths. During the path risk weight calculation, the edge weights of each connecting edge in the fault propagation path are calculated with the corresponding fault time attenuation coefficient according to a preset rule (e.g., multiplication). The results of these calculations are then multiplied together, and finally, the result is multiplied by the path length coefficient of the fault propagation path to obtain the path risk value. The path length coefficient is inversely proportional to the number of connecting edges in the fault propagation path. The path length coefficient can also be dynamically adjusted according to the electrical topology of the power grid to adapt to different power grid structures based on preset rules. The preset risk threshold is determined through Monte Carlo simulation. Samples are extracted from historical fault data to generate multiple sets of random fault scenarios containing different fault types and equipment states. Simulation calculations are performed on each set of scenarios to statistically analyze the risk value when the target relay protection equipment malfunctions or fails to operate. After sorting the critical risk values, the lower limit of the corresponding confidence interval is taken as the preset risk threshold.

[0048] Optionally, a threshold comparison mechanism can be used to filter high-risk test paths, retaining fault propagation paths that exceed a preset risk threshold, thus identifying initial high-risk test paths. For the selected initial high-risk test paths, a redundancy processing procedure is initiated. Hash values ​​are calculated for each initial high-risk test path, and duplicate paths are identified and retained by comparing hash values. The node sequences contained in the initial high-risk test paths are analyzed, and omitting elusive nodes (i.e., nodes that play a minor role in fault propagation or have little impact on the test results) is removed, resulting in a set of high-risk test paths. The set of high-risk test paths is stored in a structured format, with each path containing a unique identifier, node sequence, and risk weight.

[0049] Optionally, a high-risk test path set can be generated as follows: First, the fault knowledge graph is traversed to search for all possible fault propagation path sequences, generating a path traversal result (i.e., a set of multiple initial paths); then, the path traversal result is quantified for risk, and the path risk value of each path is calculated by combining a preset fault time decay coefficient and the edge weights of the fault knowledge graph, generating a path risk value set; finally, the path risk value set is threshold-filtered to exclude low-risk paths with risk values ​​below a preset risk threshold and retain high-risk paths, generating a high-risk test path set.

[0050] Optionally, a path traversal operation is performed on the fault knowledge graph. The fault knowledge graph stored in the graph database is retrieved. This graph contains device nodes, fault type nodes, and protection action nodes, as well as weighted connecting edges. A graph traversal algorithm, such as Dijkstra's algorithm, can be used to systematically search all nodes in the fault knowledge graph. Starting with the fault type node, reachable nodes are explored sequentially based on the connecting edges between nodes. Each complete path sequence from the starting node to the ending node is recorded, thus obtaining the fault propagation path.

[0051] Optionally, during the traversal, each node is marked to avoid path loops caused by repeated visits, and the order of nodes and their corresponding edge weights are recorded. For nodes with branches, each branch is explored sequentially to ensure that all possible fault propagation paths are covered. After the traversal is complete, the obtained path sequence is organized, removing redundant nodes that have no substantial meaning (i.e., omitting nodes), and each fault propagation path is encapsulated in the form of a node identifier sequence and a corresponding edge weight sequence to form the path traversal result, which contains information on all possible fault propagation paths.

[0052] Optionally, the path traversal results are subjected to risk quantification processing. A fault time decay coefficient is retrieved from a preset parameter library. This coefficient is set based on the changing pattern of the impact of the fault on the propagation over time after the fault occurs. At the same time, the edge weight sequence of each fault propagation path in the path traversal results is extracted. The edge weights reflect the electrical connection strength and correlation between nodes.

[0053] Optionally, the path risk value is calculated using a corresponding computational model. The edge weights of each connecting edge in the fault propagation path are calculated with their corresponding fault time decay coefficients according to a preset rule (e.g., multiplication). The results of these calculations are then multiplied together, and finally, the multiplied result is multiplied by the path length coefficient of the fault propagation path to obtain the path risk value. During the calculation process, edge weights at different positions in the fault propagation path are assigned corresponding time decay effects (i.e., each connecting edge in the fault propagation path has a corresponding fault time decay coefficient) to ensure that the path risk value reflects the effect of time factors on fault propagation. After the calculation is completed, the identifier of each fault propagation path is associated with its corresponding path risk value to form a path risk value set (a set consisting of path risk values ​​corresponding to multiple initial paths), which is stored in a data table. Each record contains the identifier of the fault propagation path and its corresponding path risk value.

[0054] Optionally, the path risk value set is filtered by thresholds. A preset risk threshold is obtained from the configuration file. This threshold can be set based on power grid safety operation requirements and historical fault handling experience, or it can be determined based on Monte Carlo simulation. The path risk value of each fault propagation path in the path risk value set is compared with the preset risk threshold to determine the risk level of each fault propagation path.

[0055] Optionally, fault propagation paths with a risk value lower than or equal to a preset risk threshold are classified as low-risk paths and excluded; fault propagation paths with a risk value exceeding the preset risk threshold are classified as high-risk paths and retained. During the screening process, the comparison results between the path risk value and the preset risk threshold are recorded to ensure the traceability of the screening process. After screening, the retained high-risk paths are organized and sorted by path identifier to form a high-risk test path set. This set contains the node sequence, edge weight sequence, and corresponding path risk value of all high-risk paths.

[0056] In one optional embodiment, determining target test cases based on the target path includes: acquiring historical fault data of the target path; determining initial key parameter values ​​of key parameters of the target path based on the historical fault data; optimizing the initial key parameter values ​​to obtain target key parameter values; determining the protection action threshold range of protection action entities included in the target path; and determining target test cases based on the target key parameter values, the protection action threshold range, and the fault type entities included in the target path.

[0057] The process involves acquiring historical fault data related to the target path and determining initial key parameter values ​​for the target path based on this data, such as current waveforms, voltage waveforms, and fault duration. These initial key parameter values ​​are then optimized to obtain the target key parameter values ​​for the target path. The protection action threshold ranges for the protection entities included in the target path are determined. Combined with the target key parameter values ​​and the fault type entities included in the target path, target test cases are generated. By integrating historical fault data, target test cases covering various complex latent fault scenarios can be automatically generated, improving the comprehensiveness of the test scenarios. Simultaneously, the optimized initial key parameter values ​​and protection action threshold ranges make the tests more closely resemble actual operating conditions, enhancing the accuracy of the test results.

[0058] Optionally, the high-risk test path set is processed, and combined with the pre-stored historical action records, the simulated fault waveform parameter values ​​(i.e., the initial key parameter values ​​of the key parameters) are optimized and bound to the expected action threshold (i.e. the protection action threshold range), generating a set of implicit boundary test cases (a set of multiple target test cases) and sending it to the relay protection tester.

[0059] Optionally, a particle swarm optimization algorithm can be invoked to optimize the parameters of the high-risk test path set. Pre-stored historical action records can be imported as training samples, containing information such as the action time and response amplitude of the target relay protection device under different fault scenarios. The error between the action time deviation and the response amplitude is set as the optimization objective function. Through iterative computation using the particle swarm optimization algorithm, the initial key parameter values ​​of the simulated fault waveform are optimized, including current waveform parameters, voltage waveform parameters, abrupt change time, oscillation frequency, amplitude change rate, fault initiation angle, transition resistance, and decay time constant. In each iteration, the initial key parameter values ​​are adjusted based on the current particle position and the historical best position until the objective function converges, yielding the target key parameter values. The expected action threshold binding step involves converting the action settings of protection action types such as instantaneous overcurrent, overcurrent, and distance protection into a fuzzy rule base according to the target relay protection device setting procedure. The rule base contains protection action threshold intervals corresponding to different parameter ranges. The optimized target key parameter values ​​are input into the rule base for matching computation, generating an expected action threshold matrix containing indicators such as action time limit and return coefficient.

[0060] Optionally, based on the optimized target key parameter values, fault type entities, and expected action threshold matrix, a set of implicit boundary test cases is generated. Each implicit boundary test case includes an SV (Synchronous Voltage, sampled value) message template, a GOOSE (Generic Object Oriented Substation Event) control command, and expected action criteria. The SV message template is constructed according to relevant standard formats and includes voltage and current sampled values ​​simulating fault types; the GOOSE control command sets the pressure plate status and tripping logic of the target relay protection equipment; the expected action criteria specify the protection action time, response amplitude, and other requirements that the target relay protection equipment should meet. A communication connection is established with the relay protection tester through relevant services. After handshake verification confirms the connection validity, the set of implicit boundary test cases is transmitted according to standardized protocols, and the reception confirmation signal returned by the relay protection tester is received, completing the test task deployment.

[0061] Optionally, implicit boundary test cases refer to test cases used to detect those subtle, imperceptible events outside of normal operation or obvious boundary conditions that may lead to abnormal behavior or performance degradation of the target relay protection device. They help detect unexpected behaviors that the target relay protection device may exhibit under complex fault modes or multiple coupled factors. Implicit boundary test cases can be used to test the stability of the target relay protection device under multiple fault conditions; analyze the response capability of the target relay protection device in complex electromagnetic environments (such as under high-frequency interference); detect maloperation or failure to operate of the target relay protection device under conditions of equipment aging or parameter drift; and verify the performance changes of the target relay protection device under extreme climatic conditions (high temperature, high humidity).

[0062] Optionally, the implicit boundary test case set can be generated in the following manner. First, waveform features are extracted from the high-risk test path set, and key parameters of the transient process are obtained from the associated historical fault data of the fault knowledge graph to generate a set of key parameter values ​​for the transient process (a set consisting of initial key parameter values). Second, the key parameter set of the transient process is optimized by adjusting the set of key parameters based on the constraints of the electromagnetic transient theory of the power system to generate optimized waveform parameter values ​​(i.e., target key parameter values) that satisfy the electromagnetic transient constraints. Then, the historical action records stored in the relay protection system database are statistically analyzed to calculate the mean and standard deviation of the historical action values ​​of protection actions in the high-risk test path set, generating the expected action threshold (i.e., the protection action threshold range). Finally, the optimized waveform parameters, fault type entities, and expected action thresholds are encapsulated into test cases, bound with test case numbers and path identifiers, to generate the implicit boundary test case set and send it to the relay protection tester. The implicit boundary test case set is used to indicate the simulated fault type and expected action threshold executed by the relay protection tester.

[0063] Optionally, a set of high-risk test paths is loaded, and waveform features are extracted node-by-node for each high-risk test path, traversing the device nodes and fault type nodes within the high-risk test paths. Historical fault data for the corresponding nodes can be retrieved through the association interface of the fault knowledge graph. The historical fault data includes the current waveform, voltage waveform, and transient process duration records at the time of the fault occurrence. Wavelet packet decomposition is used to perform multi-scale decomposition on the waveform data in the historical fault data, extracting the initial key parameter values ​​of critical parameters such as the abrupt change time, oscillation frequency, amplitude change rate, fault initiation angle, transition resistance, and decay time constant during the transient process.

[0064] Optionally, for each high-risk test path, the extracted initial key parameter values ​​are sorted by time series, and after removing duplicates, a subset of transient process key parameters is formed. The transient process key parameter set is generated by summing up the transient process key parameter subsets of all high-risk test paths. This transient process key parameter set contains the key parameter change patterns of different fault types during the fault propagation process.

[0065] Optionally, a set of key parameters for the transient process is invoked, along with electromagnetic transient theoretical constraints of the power grid, including Kirchhoff's current law, Kirchhoff's voltage law, transient characteristic equations of inductor and capacitor elements, and power conservation equations. The initial key parameter values ​​from the set of key parameters for the transient process are used as initial inputs, and parameter optimization is performed using a particle swarm optimization algorithm.

[0066] Optionally, during the optimization process, the adjusted combination of target key parameter values ​​is verified in real time to ensure it meets electromagnetic transient constraints. If the adjusted combination violates the constraints, the adjusted combination is iteratively adjusted using a correction operator until it fully meets all constraints. After optimizing the initial key parameter value combinations for all high-risk test paths, the target key parameter value combinations that meet the constraints are categorized by fault type, generating optimized waveform parameter values ​​that satisfy electromagnetic transient constraints. These values ​​include the abrupt change time, oscillation frequency, amplitude change rate, fault initiation angle, transition resistance, and decay time constant under different fault scenarios.

[0067] Optionally, the relay protection system database can be accessed to retrieve historical action records of the target relay protection equipment related to the high-risk test path. These historical action records include data such as current waveform parameters, voltage waveform parameters, operating current at the time of the fault, operating time limit, and return coefficient. The historical action records can be preprocessed by using the Raida criterion to remove outlier data, i.e., data that deviates from the overall data distribution range.

[0068] Optionally, after preprocessing, mathematical statistics methods are applied to calculate the mean of historical action values ​​for protection actions in the high-risk test path set. The mean is calculated using the arithmetic mean method. Simultaneously, the standard deviation of the historical action values ​​is calculated to reflect the dispersion of the action values. The upper and lower limits of the expected action thresholds are determined by combining the mean and standard deviation. The range of expected action thresholds should cover the distribution interval of historical action values ​​to ensure the rationality and coverage of the determined results.

[0069] Optionally, the optimized waveform parameter values, fault type entities, and expected action thresholds are obtained, and test case numbers are generated according to preset rules. The number consists of a path identification code, a parameter type code, and a generation sequence code. The path identification code corresponds to the path number in the high-risk test path set, the parameter type code distinguishes different fault types, and the generation sequence code increases sequentially according to the encapsulation order.

[0070] Optionally, the optimized waveform parameter values ​​are matched with the corresponding expected action thresholds, with each key parameter field bound to the corresponding expected action threshold range. Simultaneously, the path identifier of the high-risk test path is associated, forming a complete data structure for a single implicit boundary test case. All single implicit boundary test cases are summarized, and their completeness and format correctness are checked through a data verification mechanism. After successful verification, a set of implicit boundary test cases is generated. This set is then sent to the relay protection tester via a TCP / IP (Transmission Control Protocol / Internet Protocol) communication link. Each implicit boundary test case in the set explicitly indicates the fault type the relay protection tester needs to simulate and the corresponding expected action threshold.

[0071] Step S104: Based on the target test cases, test the target relay protection device to obtain the target test dataset;

[0072] It is understandable that obtaining the target test dataset lays the foundation for the generation of subsequent defect reports.

[0073] In one optional embodiment, the target relay protection device is tested based on the target test cases to obtain a target test dataset, including: testing the target relay protection device based on the target test cases to obtain an initial dataset; determining a first time series of electrical detection values ​​based on the electrical detection values ​​in the initial dataset; determining a second time series of device status events based on the device status signals in the initial dataset; determining environmental noise spectral characteristics based on the environmental noise data in the initial dataset; and performing time alignment on the first time series data, the second time series data, and the environmental noise spectral characteristics to obtain the target test dataset.

[0074] Understandably, testing the target relay protection device based on the target test cases yields an initial dataset. Based on the electrical detection values ​​in the initial dataset, such as three-phase current and voltage, a first time-series data set of the electrical detection values ​​is determined. Based on the device status signals in the initial dataset, a second time-series data set of device status events is determined. Based on the environmental noise data in the initial dataset, the environmental noise spectral characteristics are determined. The first time-series data, the second time-series data, and the environmental noise spectral characteristics are then time-aligned to obtain the target test dataset. This time alignment mechanism ensures the accuracy of the target test dataset in the time dimension, facilitating the analysis of the relationship between the response behavior of the target relay protection device at a specific point in time and environmental variables, thus laying a rich data foundation for the generation of defect reports.

[0075] Optionally, the test process data (i.e., the initial dataset) fed back by the relay protection tester can be processed to integrate electrical detection values, equipment status signals and environmental noise data to generate a multi-dimensional test dataset (i.e., the target test dataset) with timestamps.

[0076] Optionally, the test process data fed back by the relay protection tester can be received through the interface, including electrical detection values, equipment status signals and environmental noise data. The electrical detection values ​​cover the instantaneous sampling values ​​and sampling frequency of three-phase current and three-phase voltage. The equipment status signals include the trip signal, closing signal and alarm signal of the target relay protection device. The environmental noise data involves temperature, humidity, electromagnetic interference intensity, etc.

[0077] Optionally, the received test process data can be processed to remove invalid data and outliers, and the electrical test values, equipment status signals and environmental noise data can be correlated and integrated in chronological order. The integrated data can be timestamped with the GPS (Global Positioning System) clock synchronization, with the timestamp accurate to the millisecond level, to generate a multidimensional test dataset with timestamps.

[0078] Optionally, the target test dataset can be obtained in the following manner. First, the test process data fed back by the relay protection tester is parsed and processed to separate electrical detection values, equipment status signals, and environmental noise data. Second, the electrical detection values ​​are processed to reconstruct the waveforms and time characteristics of electrical detection values ​​such as three-phase current and three-phase voltage, generating electrical waveform data with time series (i.e., first time series data). Then, the equipment status signals are processed to extract event features, identifying the start time of protection action, the point of change of return coefficient, and the equipment status switching flag, generating a sequence of equipment status events (i.e., second time series data). Next, the environmental noise data is processed to perform spectrum analysis, calculating the distribution characteristics of interference intensity in each frequency band, generating environmental noise spectrum features. Finally, the electrical waveform data, equipment status event sequence, and environmental noise spectrum features are timestamped to generate a multidimensional test dataset with timestamps. The multidimensional test dataset is used to indicate the complete response characteristics of the target relay protection device under implicit boundary test cases.

[0079] Optionally, the system receives test process data fed back from the relay protection tester. This test process data is transmitted in binary stream format, including a data header identifier, data type fields, and a payload (the main data or information content carried in the data packet). The data transmission protocol version is determined by parsing the data header identifier. The data type fields are parsed according to the protocol specifications to distinguish the data packets corresponding to electrical detection values, equipment status signals, and environmental noise data. The electrical detection value data packet contains instantaneous sampled values ​​of three-phase current and three-phase voltage, along with sampling frequency information. The equipment status signal data packet contains switch status codes, corresponding to the tripping, closing, and alarm states of the target relay protection device. The environmental noise data packet contains quantified values ​​of temperature, humidity, and electromagnetic interference intensity.

[0080] Optionally, each type of data packet is verified. The integrity of the data is verified by CRC (Cyclic Redundancy Check) check code. After the data packets that fail the verification are removed, the electrical detection value subset (i.e., the set of electrical detection values), the equipment status signal subset (i.e., the set of equipment status signals), and the environmental noise data subset (i.e., the set of environmental noise data) obtained by separating them according to data type are combined to form the original data component set. Each subset in the set retains the original time stamp at the time of data acquisition.

[0081] Optionally, waveform restoration processing is performed on the electrical detection values ​​in the original data component set to extract the three-phase current and three-phase voltage sampling data from the electrical detection values. Let the sampling sequence be x(n), where n is the sampling point index, taking values ​​of 0, 1, ..., N-1, and N is the total number of samples. Based on the sampling frequency... Generate a time series, where the timestamp of the nth sampling point can be... The following methods can be used to determine this:

[0082]

[0083] in, Indicates the sampling start time.

[0084] Optionally, the sampled data can be filtered using a finite impulse response filter, with the following filtering formula:

[0085]

[0086] in, The output after filtering is represented by h(k), where h(k) represents the filter coefficients and M represents the filter order. This formula is used to remove high-frequency noise from the sampled data.

[0087] Optionally, based on the filtered sampled data and time series, the three-phase current and three-phase voltage waveforms can be reconstructed. An interpolation algorithm can be used to supplement the data within the sampling interval. The interpolation formula is as follows:

[0088]

[0089] Where t represents any time point, x(t) represents the waveform value at that time point, and x(n) and x(n+1) represent the values ​​at the nth and (n-1)th sampling points, respectively. The reconstructed waveform is then associated with the time series to generate electrical waveform data with a time series.

[0090] Optionally, event feature extraction processing is performed on the device status signals in the original data component set to extract the device status signals. These signals are binary code streams, with each bit corresponding to a status variable. Let the state sequence be S(m), where m is the time index and S(m) is the status code at time m. Device status changes can be identified by comparing the status codes of adjacent time points. The formula for determining device status changes is:

[0091]

[0092] in, This represents the change in device state at time m. Represents the XOR operation, when This indicates a state change in the equipment. The change in equipment state is decoded to determine the changed state bit, generating a state change flag containing the state bit identifier, the values ​​before and after the change, and the occurrence time. For the state bit corresponding to the protection action signal of the target relay protection equipment, the moment it changes from 0 to 1 is identified as the start time of the protection action. Calculate the points of change in the returned coefficients. The calculation formula can be:

[0093]

[0094] in, Indicates the return current. This represents the protection operating current. When this value changes abruptly, the time of the change is recorded. The start time of the protection action, the point of change of the return coefficient, and the equipment status switching flag are arranged in chronological order to generate an equipment status event sequence.

[0095] Optionally, spectral analysis is performed on the environmental noise data in the original data component set to extract the noise amplitude data. Let the noise sequence be... Where p is the sampling index. The noise sequence is divided into time windows, each containing L sampling points. A Fourier transform is performed on the data in each time window, and the transform formula can be:

[0096]

[0097] in, Let represent the spectral value at the c-th frequency point, where j is the imaginary unit, and c = 0, 1, ..., L⁻¹. Calculate the power spectral density at each frequency point. The formula can be:

[0098]

[0099] in, Let represent the magnitude of the spectral value at the c-th frequency point. Divide the frequency axis into multiple frequency bands, calculate the sum of the power spectral densities within each band, and use this sum as the interference intensity for that band. The calculation formula can be:

[0100]

[0101] in, Let c represent the interference intensity of the b-th frequency band, where c∈b represents the frequency index of the b-th frequency band. Calculate the proportion of interference intensity in each frequency band to the total interference intensity, and generate environmental noise spectrum characteristics, including frequency band range, interference intensity, and proportion.

[0102] Optionally, timestamp alignment is performed on the electrical waveform data, equipment status event sequences, and ambient noise spectral characteristics. The time series of the electrical waveform data is used as the reference time axis, and the reference timestamp is set to... Where q is the base index. For each event in the device status event sequence, look up the event timestamp. The nearest baseline timestamp is used to determine the associated baseline index using the following formula. This binds the event to the baseline timestamp. The associated baseline index... The calculation formula can be:

[0103]

[0104] Optionally, for the environmental noise spectrum characteristics, each frequency band corresponds to a time window, and the center time of the time window can be calculated. The data is then linked to a reference timestamp q using the same method. By integrating the electrical waveform data corresponding to each reference timestamp, the associated equipment status events, and the environmental noise spectrum characteristics, a record containing multi-dimensional information is formed. All records are arranged in order of reference timestamps to generate a timestamped multi-dimensional test dataset. This multi-dimensional test dataset fully presents the response characteristics of the target relay protection device under implicit boundary test case scenarios.

[0105] Step S106: Based on the target test dataset, determine the action deviation, wherein the action deviation is used to quantify the degree to which the actual action value of the target relay protection device deviates from the corresponding protection action threshold range;

[0106] It is understandable that by determining the deviation of the action, the degree to which the actual action value corresponding to the protection action entity of the target relay protection device deviates from the corresponding protection action threshold range can be quantified, laying the basis for determining the target attribution result of the target relay protection device.

[0107] In one optional embodiment, determining the action deviation based on the target test dataset includes: determining the actual action value of the target protection action corresponding to the protection action entity included in the target path corresponding to the target test case based on the target test dataset; determining the upper limit value and lower limit value of the protection action threshold of the target protection action based on the protection action threshold range included in the target test case; and determining the action deviation based on the actual action value, the upper limit value of the protection action threshold, and the lower limit value of the protection action threshold.

[0108] Understandably, based on the target test dataset, the actual action values ​​of the target protection actions corresponding to the protection action entities included in the target path of the target test case are determined. Combined with the upper and lower limits of the protection action thresholds determined based on the protection action threshold ranges included in the target test case, the action deviation of the target protection action is calculated. The quantitative calculation of the action deviation can accurately assess the difference between the actual action value of the target protection action and the expected protection action threshold range, thereby effectively improving the comprehensiveness and accuracy of the generated defect reports for the target relay protection equipment.

[0109] Step S108: Based on the action deviation, determine the target attribution result of the action deviation.

[0110] Understandably, attribution analysis can accurately quantify and distinguish the contributions of different factors in action deviation, avoiding the subjectivity and inaccuracy of judgments based solely on experience or intuition, and ensuring the objectivity and reliability of defect reports.

[0111] In one optional embodiment, determining the target attribution result of the action deviation based on the action deviation includes: determining the contribution weights corresponding to multiple preset attribution results based on the action deviation, wherein the contribution weights are used to quantify the degree of contribution of the corresponding preset attribution results to the action deviation; and determining the preset attribution result corresponding to the maximum value among the multiple contribution weights as the target attribution result, wherein the multiple contribution weights correspond one-to-one with the multiple preset attribution results.

[0112] It is understandable that, based on the degree of action deviation, the contribution weights of multiple preset attribution results are determined using the least squares method, and the preset attribution result corresponding to the maximum value is determined as the target attribution result. When determining the target attribution result for action deviation, considering the contribution weights of multiple preset attribution results improves the comprehensiveness of the defect report. Furthermore, by quantifying the contribution weights of the preset attribution results, it is possible to accurately identify which preset attribution result has the greatest impact on the action deviation, avoiding subjective judgments based on experience and improving the accuracy of the defect report.

[0113] Optionally, the aforementioned multiple preset attribution results may include, but are not limited to, setting drift caused by component aging, transformer transmission error, and electromagnetic interference (i.e., multiple preset attribution results).

[0114] Step S110: Based on the target attribution results, generate a defect report for the target relay protection device.

[0115] It is understandable that by considering the attribution results of the target, the defect report generated avoids the subjectivity and uncertainty that may exist in the judgment based on experience, thereby improving the accuracy of the defect report.

[0116] In one optional embodiment, a defect report for the target relay protection device is generated based on the target attribution result, including: determining the defect location and defect handling recommendations for the target relay protection device based on the target attribution result; and generating a defect report according to a preset report template based on the action deviation, multiple contribution weights, the target attribution result, the defect location, and the defect handling recommendations, wherein the contribution weights are used to quantify the degree of contribution of the corresponding preset attribution result to the action deviation.

[0117] Understandably, based on the target attribution results, the defect location and handling recommendations for the target relay protection equipment are analyzed. The deviation of the action, multiple contribution weights, the target attribution results, the defect location, and the defect handling recommendations are then integrated into a defect report for the target relay protection equipment according to a pre-set report template. The defect report obtained through this method not only includes defect location and defect handling recommendations, but also the target attribution results for defect generation, as well as the basis for determining the target attribution results, thus improving the comprehensiveness of the defect report.

[0118] Optionally, the multidimensional test dataset is processed to analyze the reasons for deviations in action values ​​(i.e., target attribution results) and correlated with historical handling plans to generate a structured test report (i.e., defect report) containing defect location and defect handling suggestions.

[0119] Optionally, a multidimensional test dataset can be accessed, and a random forest algorithm can be used to analyze the data, comparing the actual action values ​​of the target relay protection device with the expected action thresholds to identify deviations in action values. Combining a fault knowledge graph and the internal logic circuit model of the target relay protection device, the causes of these deviations can be investigated. Possible causes include setting drift due to component aging, transformer transmission errors, and electromagnetic interference (i.e., multiple pre-defined attribution results).

[0120] Optionally, the Apriori association rule algorithm can be applied to associate the causes of action value deviations with historical handling solutions, such as associating component aging issues with corresponding component replacement solutions, and algorithm error issues with algorithm optimization solutions. Following a preset report template, the defect location results, action value deviation cause analysis, and corresponding defect handling suggestions are compiled to generate a structured test report containing text descriptions and data charts.

[0121] Optionally, a structured test report can be generated as follows: First, calculate the action deviation of the multidimensional test dataset, quantifying the percentage deviation between the actual action value and the protection action threshold range, and generate the action deviation. Second, perform multi-factor attribution processing on the action deviation, calculating the contribution weights corresponding to equipment setting drift, transformer transmission error, and electromagnetic interference, and generating a contribution weight distribution. Then, perform case matching processing on the contribution weight distribution, retrieving historical handling solutions from the fault knowledge graph that are similar to the factor with the largest contribution weight (i.e., the target attribution result), and generating a matching handling solution. Finally, perform report generation processing on the action deviation, contribution weight distribution, and matching handling solution to output a structured test report containing defect location and defect handling suggestions.

[0122] Optionally, the action deviation is calculated on the multidimensional test dataset, and the actual action value of the target relay protection device is extracted from the multidimensional test dataset, including parameters such as action time, action current, and action voltage. The actual action value is set as... Simultaneously, the generated expected action threshold is retrieved to obtain the upper limit of the expected action value. (i.e., the upper limit of the protection action threshold) and the lower limit (i.e., the lower limit of the protection action threshold) And calculate the median of the expected action. and movement deviation The calculation formula can be:

[0123]

[0124]

[0125] in, This represents the absolute deviation between the actual action value and the median of the expected action value. To define the expected action threshold range, this formula quantifies the deviation of the protection action as a percentage. This calculation is performed for each protection action in the multidimensional test dataset, generating a corresponding action deviation. Each action deviation is associated with the corresponding protection action type and timestamp.

[0126] Optionally, a multi-factor attribution process is performed on the deviation of the operation to identify factors that may affect the deviation, including device setting drift, transformer transmission error, and electromagnetic interference. Feature parameters for each factor are extracted from the multi-dimensional test dataset: the device setting drift feature parameter is the difference between the measured value and the set value of the internal setting of the target relay protection device. The characteristic parameter of the transformer transmission error is the deviation rate between the secondary output value and the actual value of the primary side of the transformer. Electromagnetic interference characteristic parameters are the interference intensity of the main frequency bands in the environmental noise spectrum characteristics. The contribution weights of each factor are calculated using a multiple linear regression model. The model formula is as follows:

[0127]

[0128] in, , , These are the contribution weights of equipment setpoint drift, transformer transmission error, and electromagnetic interference, respectively. This represents the error term. The model parameters are solved using the least squares method to obtain the contribution weights of each factor, and this satisfies... The obtained contribution weights are sorted by factor type to generate a contribution weight distribution.

[0129] Optionally, case matching is performed on the contribution weight distribution to identify the factor corresponding to the largest contribution weight from the contribution weight distribution. Let this factor be... Its contribution weight is .by To retrieve keywords, historical failure cases containing that factor are searched within the failure knowledge graph. These historical failure cases include the failure factor, the handling measures, and the handling effects. The similarity between the case to be matched and the historical failure cases is calculated. The formula for calculating the similarity D is:

[0130]

[0131] in, Factors in the case to be matched The a-th feature parameter, Let be the a-th characteristic parameter of the corresponding factor in historical failure cases. Let D be the weight of the feature parameters, and B be the total number of feature parameters. The smaller the similarity value D is, the higher the similarity. Select the top E historical fault cases with the highest similarity, extract their handling solutions, and make adaptive adjustments based on the specific parameters of the test scenario corresponding to the current implicit boundary test cases. For example, adjust the order of defect handling steps or supplement the operation details for the current target relay protection equipment model to generate a matching handling solution.

[0132] Optionally, reports are generated on action deviation, contribution weight distribution, and matching response plans. The action deviation of each protection action is extracted from the action deviation database, and the maximum, minimum, and average values ​​of action deviation are calculated by protection type to form action deviation statistics. The contribution weight distribution is converted into a visual chart in the form of a pie chart or bar chart to intuitively display the contribution ratio of each factor. The matching response plans are then structured and sorted by implementation priority. Each response plan includes a description of the measures, implementation steps, required tools, and expected results.

[0133] Optionally, the statistical results of action deviation, the visualization chart of contribution weight distribution, the matching disposal plan, and the key timestamp information of the multi-dimensional test dataset are integrated to generate a structured test report according to a preset report template. The structured test report is output in a standardized format, supports integration with the power operation and maintenance management system, and provides a basis for defect handling of the target relay protection equipment.

[0134] Through the above steps S102 to S110, the goal of using the target test cases of the determined target relay protection device to test the target relay protection device and generate a defect report of the target relay protection device can be achieved. This improves the comprehensiveness and accuracy of the generated defect report of the target relay protection device, thereby solving the technical problem of incomplete and inaccurate defect report generation results of relay protection devices in related technologies.

[0135] Based on the above embodiments and optional embodiments, this application proposes an implementation method for an optional method of generating defect reports for relay protection equipment. Figure 2 This is a flowchart of an optional method for generating defect reports for relay protection equipment according to an embodiment of this application, such as... Figure 2 As shown, an implementation method for generating defect reports for optional relay protection devices includes the following steps:

[0136] Step S1: Process the historical fault report text and fault waveform file stored in the database of the relay protection system (including the target relay protection equipment and other equipment closely related to the target relay protection equipment), extract the fault entity relationship and transient features, construct the association network, and generate a fault knowledge graph with weighted edges (i.e., connection edges).

[0137] Pre-stored historical fault report texts and fault waveform files are retrieved from the relay protection system database via a standardized interface. For historical fault report texts, the system accesses the power dispatch automation system, substation operation and maintenance management system, and fault analysis document library provided by the target relay protection equipment manufacturer. Structured text is extracted using a database query protocol based on SQL (Structured Query Language), unstructured text is obtained via a file transfer protocol, and the authenticity of the text source is verified by checking the data signature. For fault waveform files, historical waveform files can be retrieved from the fault recorder via the IEC 60870-5-103 protocol, locally stored waveform files can be received via the Ethernet interface of the target relay protection equipment, and distributed storage waveform files can be downloaded via the cloud platform interface.

[0138] Integrity checks are performed on the acquired historical fault report texts and fault waveform files, including removing damaged files and duplicate records, marking and completing missing key fields, and verifying the consistency of key information such as timestamps and equipment identifiers through cross-system data comparison. The verified historical fault report texts and fault waveform files undergo structured processing. For historical fault report texts, natural language processing technology based on a BERT (Bidirectional Encoder Representations from Transformers) pre-trained model is used. A named entity recognition module extracts entity information such as fault type entities, equipment entities, and protection action entities. Dependency parsing algorithms are then used to uncover causal relationships and other correlations between entities. For fault waveform files, a combination of wavelet transform and Fourier transform algorithms is used to extract transient feature data, including peak voltage and current values ​​at the fault time, frequency mutation rate, harmonic distortion rate, transient component attenuation coefficient, and attenuated DC component characteristics. An appropriate sampling frequency is set to ensure the capture of microsecond-level features.

[0139] The spatiotemporal correlation algorithm extracts entities and relationships from historical fault report texts and maps them to transient features in fault waveform files to construct a relational network with entities as nodes and relationships as edges. In the edge weight assignment stage, the analytic hierarchy process (AHP) is used to comprehensively consider indicators such as fault frequency, impact range, and handling difficulty. Matrix operations are then used to generate the corresponding edge weight values ​​for each relationship, resulting in the final fault knowledge graph comprising multiple entities and multiple edges.

[0140] Step S11: Perform entity relationship parsing on the historical fault report texts pre-stored in the relay protection system database, identify the protection device model, fault type, protection action and logical relationship, and generate a set of fault entity relationship triples.

[0141] Entity relation parsing is performed on the historical fault report texts pre-stored in the relay protection system database. Historical fault report texts are retrieved through a text parsing interface, covering types such as protection action records, fault handling reports, and operation and maintenance records of the target relay protection equipment. Natural language processing (NLP) technology is used to identify entities within the historical fault report texts. First, the historical fault report texts are segmented into sentences using a word segmentation tool, removing stop words and irrelevant symbols, and retaining meaningful lexical units. Then, a named entity recognition model is invoked to scan the processed historical fault report texts, identifying information such as equipment model (including the target relay protection equipment model, used to determine the corresponding equipment) and fault type. The equipment model includes the equipment manufacturer identifier, series number, and function type identifier, while the fault type includes categories such as short-circuit fault, ground fault, and overload fault.

[0142] In the entity relation extraction stage, a relation recognition algorithm based on dependency parsing is used to perform contextual semantic analysis on the identified entities, clarifying the logical relationships between entities, including causal relationships, accompanying relationships, and triggering relationships. The identified entities and their relationships are encapsulated into triples, forming triples in the form of [subject entity, relation, object entity], such as [equipment model, occurrence, short-circuit fault], [grounding fault, trigger, protection action], etc. The system performs consistency checks on the generated triple set, removing triples with semantic conflicts or missing information, and retaining unique triple records through a deduplication mechanism, ultimately forming a structured set of fault entity relation triples.

[0143] Step S12: Extract transient features from the fault recording files pre-stored in the relay protection system database, calculate the amplitude and phase shift of the fundamental and harmonic components, and generate transient feature data containing harmonic distortion rate features and attenuated DC component features.

[0144] Transient features are extracted from the fault waveform files pre-stored in the relay protection system database. The fault waveform files are read via a file parsing module. These files contain raw waveform data showing the changes in electrical quantities such as voltage and current over time during a fault. This raw waveform data is preprocessed, for example, by using digital filtering algorithms to remove high-frequency noise and baseline drift components, and by using interpolation algorithms to fill in missing segments to ensure the continuity and integrity of the raw waveform data.

[0145] Fourier transform is used to perform spectral analysis on the preprocessed waveform data, decomposing it into the fundamental component and each harmonic component. The amplitude and phase shift of the fundamental component are calculated, as well as the amplitude and phase difference relative to the fundamental component of each harmonic component. Based on the calculation results of the fundamental and harmonic components, the harmonic distortion rate characteristics are derived through formula derivation to reflect the overall distortion degree of harmonic components in the waveform data. For the DC component in the fault recording file, the system uses an exponential decay model to fit the DC component, extracting the decay time constant and initial amplitude to form the decay DC component characteristics. The peak voltage and current, frequency jump rate, harmonic distortion rate, transient component decay coefficient, and decay DC component characteristics at the fault time are integrated and arranged in a structured manner according to time series or fault stage to generate transient characteristic data.

[0146] Step S13: Perform topological fusion on the set of fault entity relationship triples and transient feature data to generate a structured fault feature matrix with topological weights.

[0147] A topology fusion process is performed on the fault entity relationship triplet set and transient feature data to establish an entity mapping mechanism. This mechanism associates the equipment entities (including the equipment entities corresponding to the target relay protection equipment), fault type entities, and protection actions in the fault entity relationship triplet with the electrical quantity detection objects in the transient feature data, ensuring accurate matching between entities and corresponding transient features. For the electrical topology of the power grid, pre-stored power grid topology map data is retrieved. This data includes the physical connection relationships and electrical parameters of the target relay protection equipment, lines, buses, and other equipment.

[0148] The electrical connections in the electrical topology are transformed into quantified topological weights. These weights are determined based on factors such as the tightness of the electrical connections, transmission capacity, and physical distance. A topology analysis algorithm converts these factors into computable weight parameters. An initial feature matrix is ​​constructed using entities in the fault entity relationship triplet as row indices and transient feature terms as column indices. The matrix elements are the eigenvalues ​​of the transient features of the corresponding entities. The topological weights are embedded into the correlation dimensions between the rows and columns of the initial feature matrix. Matrix operations quantify the electrical connections into edge weights of the initial feature matrix, forming a structured fault feature matrix with topological weights. This matrix contains both the numerical correlations between entities and features and reflects the electrical topological relationships between entities through the topological weights.

[0149] Step S14: Perform graph network modeling on the structured fault feature matrix, construct a node association network based on edge weights, and generate a fault knowledge graph with edge weights. The fault knowledge graph is used to indicate the equipment entities (i.e., protection device nodes), fault type entities (i.e., fault type nodes), and protection action entities of the target relay protection equipment, as well as the association relationships and edge weights between entities.

[0150] A graph network model is constructed for the structured fault feature matrix. The equipment entities, fault type entities, and protection actions corresponding to the row indices in the structured fault feature matrix are identified as nodes in the graph network. The node attributes include basic information about the entity (e.g., equipment model) and a summary of the corresponding transient feature data. Based on the topological weights in the fault feature matrix, edge weights representing the degree of association between entities are calculated. Simultaneously, the logical associations in the fault entity relationship triples are combined to adjust the edge weights, forming weighted connections between nodes.

[0151] A graph network construction algorithm is used to combine nodes with weighted edges to form a node association network. In this network, device nodes and fault type nodes are connected by edges, with edge weights reflecting the electrical connection strength and correlation between them. The constructed node association network is then normalized by defining node identification rules, edge weight ranges, and network topology constraints, generating a fault knowledge graph. This fault knowledge graph clearly indicates device nodes, fault type nodes, and protection action nodes, as well as the electrical connection relationships between them.

[0152] Step S2: Process the fault knowledge graph, calculate the risk weight (i.e., path risk value) of the fault propagation path (i.e., the initial path), and filter out paths that exceed the preset risk threshold to generate a set of high-risk test paths (composed of multiple target paths).

[0153] Path analysis is performed on the fault knowledge graph. An improved Dijkstra algorithm is invoked to traverse all nodes (entities) in the graph, setting each fault type entity as the starting node. Reachable nodes are explored sequentially by connecting edges, recording all possible fault propagation paths. During the risk weight calculation of the paths, the edge weights of each connecting edge in the fault propagation path are calculated with the corresponding fault time attenuation coefficient according to preset rules (e.g., multiplication). The results of these calculations are then multiplied together, and finally, the result is multiplied by the path length coefficient of the fault propagation path. The path length coefficient is inversely proportional to the number of connecting edges in the fault propagation path. The path length coefficient can also be dynamically adjusted according to the electrical topology of the power grid to adapt to different grid structures based on preset rules. The preset risk threshold is determined through Monte Carlo simulation. Samples are extracted from historical fault data to generate multiple sets of random fault scenarios containing different fault types and equipment states. Simulation calculations are performed on each set of scenarios to statistically analyze the risk value when the target relay protection equipment malfunctions or fails to operate. After sorting the critical risk values, the lower limit of the corresponding confidence interval is taken as the preset risk threshold.

[0154] A threshold comparison mechanism is used to screen high-risk test paths, retaining those that exceed a preset risk threshold to identify initial high-risk test paths. For these initial high-risk test paths, a redundancy processing procedure is initiated. Hash values ​​are calculated for each path, and duplicate paths are identified and retained by comparing hash values. The node sequences within these initial high-risk test paths are analyzed, and omitting elusive nodes (those with minimal impact on test results or little role in fault propagation) is removed, resulting in a set of high-risk test paths. This set is stored in a structured format, with each path containing a unique identifier, node sequence, and risk weight.

[0155] Step S21: Perform path traversal on the fault knowledge graph, search for all possible fault propagation path sequences in the fault knowledge graph, and generate path traversal results (i.e., a set formed by multiple initial paths).

[0156] A path traversal operation is performed on the fault knowledge graph. The fault knowledge graph, stored in a graph database, is retrieved. This graph contains device nodes, fault type nodes, and protection action nodes, as well as weighted edges. A graph traversal algorithm, such as Dijkstra's algorithm, can be used to systematically search all nodes in the fault knowledge graph. Starting with the fault type node, reachable nodes are explored sequentially based on the edges connecting the nodes. Each complete path sequence from the starting node to the ending node is recorded, yielding the fault propagation path.

[0157] During the traversal, each node is marked to avoid path loops caused by repeated visits, and the order of nodes and their corresponding edge weights are recorded. For nodes with branches, each branch is explored sequentially to ensure that all possible fault propagation paths are covered. After the traversal is complete, the obtained path sequence is organized, removing redundant nodes that have no substantial meaning (i.e., omitting nodes), and each fault propagation path is encapsulated in the form of a node identifier sequence and a corresponding edge weight sequence to form the path traversal result, which contains information on all possible fault propagation paths.

[0158] Step S22: Quantify the risk of the path traversal results, calculate the path risk value of each path by combining the preset failure time decay coefficient and the edge weight of the failure knowledge graph, and generate a set of path risk values.

[0159] The path traversal results are subjected to risk quantification processing. A fault time decay coefficient is retrieved from a preset parameter library. This coefficient is set based on the changing pattern of the impact of a fault on its propagation over time after the fault occurs. At the same time, the edge weight sequence of each fault propagation path in the path traversal results is extracted. The edge weights reflect the electrical connection strength and correlation between nodes.

[0160] The path risk value is calculated using a corresponding computational model. The edge weights of each connecting edge in the fault propagation path are calculated with their corresponding fault time decay coefficients according to preset rules (e.g., multiplication). The results of these calculations are then multiplied together, and finally, this multiplication is multiplied by the path length coefficient of the fault propagation path to obtain the path risk value. During the calculation, edge weights at different positions in the fault propagation path are assigned corresponding time decay effects (i.e., each connecting edge in the fault propagation path has a corresponding fault time decay coefficient) to ensure that the path risk value reflects the effect of time factors on fault propagation. After calculation, the identifier of each fault propagation path is associated with its corresponding path risk value, forming a path risk value set (a set of path risk values ​​corresponding to multiple initial paths), which is stored in a data table. Each record contains the identifier of the fault propagation path and its corresponding path risk value.

[0161] Step S23: Perform threshold filtering on the path risk value set, exclude low-risk paths whose risk values ​​are lower than the preset risk threshold and retain high-risk paths to generate a high-risk test path set.

[0162] Threshold filtering is performed on the path risk value set. Preset risk thresholds are obtained from the configuration file. These thresholds can be set based on power grid safety operation requirements and historical fault handling experience, or determined based on Monte Carlo simulation. The path risk value of each fault propagation path in the path risk value set is compared with the preset risk threshold to determine the risk level of each fault propagation path.

[0163] Fault propagation paths with a risk value lower than or equal to a preset risk threshold are classified as low-risk paths and excluded; fault propagation paths with a risk value exceeding the preset risk threshold are classified as high-risk paths and retained. During the screening process, the comparison results between the path risk value and the preset risk threshold are recorded to ensure the traceability of the screening process. After screening, the retained high-risk paths are organized and sorted by path identifier to form a high-risk test path set. This set contains the node sequence, edge weight sequence, and corresponding path risk value of all high-risk paths.

[0164] Step S3: Process the high-risk test path set, combine it with the pre-stored historical action records, optimize the simulated fault waveform parameter values ​​(i.e., the initial key parameter values ​​of the key parameters) and bind the expected action threshold (i.e. the protection action threshold range), generate the implicit boundary test case set (a set of multiple target test cases) and send it to the relay protection tester.

[0165] The particle swarm optimization algorithm can be used to optimize the parameters of a high-risk test path set. Pre-stored historical action records are imported as training samples, containing information such as the action time and response amplitude of the target relay protection device under different fault scenarios. The error between the action time deviation and the response amplitude is set as the optimization objective function. Through iterative computation using the particle swarm optimization algorithm, the initial key parameter values ​​of the simulated fault waveform are optimized, including current waveform parameters, voltage waveform parameters, abrupt change time, oscillation frequency, amplitude change rate, fault initiation angle, transition resistance, and decay time constant. In each iteration, the initial key parameter values ​​are adjusted based on the current particle position and the historical best position until the objective function converges, yielding the target key parameter values. The expected action threshold binding step involves converting the action settings of protection action types such as instantaneous overcurrent, overcurrent, and distance protection into a fuzzy rule base according to the target relay protection device setting procedure. The rule base contains protection action threshold intervals corresponding to different parameter ranges. The optimized target key parameter values ​​are input into the rule base for matching computation, generating an expected action threshold matrix containing indicators such as action time limit and return coefficient.

[0166] Based on the optimized target key parameter values, fault type entities, and expected action threshold matrix, a set of implicit boundary test cases is generated. Each implicit boundary test case includes an SV (Synchronous Voltage, Sample Value) message template, a GOOSE (Generic Object Oriented Substation Event) control command, and expected action criteria. The SV message template is constructed according to relevant standard formats and includes voltage and current sample values ​​simulating fault types; the GOOSE control command sets the pressure plate status and tripping logic of the target relay protection equipment; the expected action criteria specify the protection action time, response amplitude, and other requirements that the target relay protection equipment should meet. A communication connection is established with the relay protection tester through relevant services. After handshake verification confirms the connection validity, the set of implicit boundary test cases is transmitted according to standardized protocols, and the reception confirmation signal returned by the relay protection tester is received, completing the test task deployment.

[0167] Step S31: Extract waveform features from the set of high-risk test paths, obtain key parameters of transient processes from the associated historical fault data of the fault knowledge graph, and generate a set of key parameter values ​​of transient processes (a set consisting of initial key parameter values).

[0168] A set of high-risk test paths is loaded, and waveform features are extracted node-by-node for each high-risk test path, traversing the device nodes and fault type nodes within the high-risk test paths. Historical fault data for the corresponding nodes is retrieved through the association interface of the fault knowledge graph. This historical fault data includes current waveforms, voltage waveforms, and transient process duration records at the time of the fault occurrence. Wavelet packet decomposition is used to perform multi-scale decomposition of the waveform data in the historical fault data, extracting the initial key parameter values ​​for crucial parameters during the transient process, such as the abrupt change time, oscillation frequency, amplitude change rate, fault initiation angle, transition resistance, and decay time constant.

[0169] For each high-risk test path, the extracted initial key parameter values ​​are sorted by time series. After removing duplicates, a subset of transient process key parameters is formed. The transient process key parameter sets of all high-risk test paths are summarized to generate a set of transient process key parameters. This set of transient process key parameters contains the variation patterns of key parameters of different fault types during the fault propagation process.

[0170] Step S32: Optimize the set of key parameters for the transient process. Adjust the set of key parameters for the transient process based on the constraints of electromagnetic transient theory of power system to generate optimized waveform parameter values ​​(i.e. target key parameter values) that satisfy electromagnetic transient constraints.

[0171] The system calls upon a set of key parameters for the transient process, while simultaneously loading electromagnetic transient theoretical constraints of the power grid, including Kirchhoff's current law, Kirchhoff's voltage law, transient characteristic equations of inductor and capacitor elements, and power conservation equations. The initial combination of key parameter values ​​from the set of key parameters for the transient process is used as initial input, and parameter optimization is performed using a particle swarm optimization algorithm.

[0172] During the optimization process, it is verified in real time whether the adjusted combination of target key parameter values ​​meets the electromagnetic transient constraints. If the adjusted combination of target key parameter values ​​violates the constraints, the adjusted combination of target key parameter values ​​is iteratively adjusted using a correction operator until the adjusted combination of target key parameter values ​​fully meets all constraints. After optimizing the initial key parameter value combinations for all high-risk test paths, the target key parameter value combinations that meet the constraints are classified according to the fault type, generating optimized waveform parameter values ​​that meet the electromagnetic transient constraints, including the abrupt change time, oscillation frequency, amplitude change rate, fault initiation angle, transition resistance, decay time constant, etc., under different fault scenarios.

[0173] Step S33: Perform statistical analysis on the historical action records stored in the relay protection system database, calculate the mean and standard deviation of the historical action values ​​of protection actions in the high-risk test path set, and generate the expected action threshold (i.e., the protection action threshold range).

[0174] Access the relay protection system database and retrieve historical action records of the target relay protection equipment related to the high-risk test path. These records include data such as current waveform parameters, voltage waveform parameters, operating current at the time of the fault, operating time limit, and return coefficient. Preprocess the historical action records by using the Raida criterion to remove outlier data, i.e., data that deviates from the overall data distribution range.

[0175] After preprocessing, mathematical statistics methods are applied to calculate the mean of historical action values ​​for protection actions in the high-risk test path set. The mean is calculated using the arithmetic mean method. Simultaneously, the standard deviation of the historical action values ​​is calculated to reflect the dispersion of the action values. Combining the mean and standard deviation, the upper and lower limits of the expected action thresholds are determined. The range of expected action thresholds should cover the distribution interval of historical action values ​​to ensure the rationality and comprehensiveness of the determined results.

[0176] Step S34: Encapsulate the optimized waveform parameters, fault type entities, and expected action thresholds into test cases, bind the test case number and path identifier, generate a set of implicit boundary test cases, and send it to the relay protection tester. The set of implicit boundary test cases is used to indicate the simulated fault type and expected action threshold to be executed by the relay protection tester.

[0177] Obtain optimized waveform parameter values, fault type entities, and expected action thresholds. Generate test case numbers according to preset rules. The number consists of a path identifier code, a parameter type code, and a generation sequence code. The path identifier code corresponds to the path number in the high-risk test path set, the parameter type code distinguishes different fault types, and the generation sequence code increases sequentially according to the encapsulation order.

[0178] The optimized waveform parameter values ​​are matched with the corresponding expected action thresholds, with each key parameter field bound to the corresponding expected action threshold range. Simultaneously, the path identifier of the high-risk test path is associated, forming a complete data structure for a single implicit boundary test case. All single implicit boundary test cases are summarized, and their completeness and format correctness are checked through a data verification mechanism. After successful verification, a set of implicit boundary test cases is generated. This set of implicit boundary test cases is sent to the relay protection tester via a TCP / IP (Transmission Control Protocol / Internet Protocol) communication link. Each implicit boundary test case in the set explicitly indicates the fault type that the relay protection tester needs to simulate and the corresponding expected action threshold.

[0179] Step S4: Process the test process data (i.e., the initial dataset) fed back by the relay protection tester, integrate electrical detection values, equipment status signals and environmental noise data, and generate a multi-dimensional test dataset with timestamps (i.e., the target test dataset).

[0180] The system receives test process data from the relay protection tester via an interface, including electrical detection values, equipment status signals, and environmental noise data. The electrical detection values ​​cover the instantaneous sampling values ​​and sampling frequency of three-phase current and three-phase voltage. The equipment status signals include the tripping signal, closing signal, and alarm signal of the target relay protection device. The environmental noise data includes temperature, humidity, and electromagnetic interference intensity.

[0181] The received test process data is processed to remove invalid data and outliers. Electrical test values, equipment status signals and environmental noise data are correlated and integrated in chronological order. The integrated data is then timestamped to the millisecond level using a GPS (Global Positioning System) synchronized clock, generating a multidimensional test dataset with timestamps.

[0182] Step S41: Analyze and process the test process data fed back by the relay protection tester to separate electrical detection values, equipment status signals and environmental noise data;

[0183] The system receives test process data from the relay protection tester. This data is transmitted in binary stream format, including a header identifier, data type fields, and a payload (the main data or information content carried in the data packet). The data transmission protocol version is determined by parsing the header identifier. The data type fields are then parsed according to the protocol specifications to distinguish between data packets corresponding to electrical detection values, equipment status signals, and environmental noise data. Electrical detection value data packets contain instantaneous sampled values ​​of three-phase current and three-phase voltage, along with sampling frequency information. Equipment status signal data packets contain switch status codes, corresponding to the tripping, closing, and alarm states of the target relay protection device. Environmental noise data packets contain quantified values ​​of temperature, humidity, and electromagnetic interference intensity.

[0184] Each type of data packet is verified. The integrity of the data is verified by CRC (Cyclic Redundancy Check) check code. After the data packets that fail the verification are removed, the electrical detection value subset (i.e., the set of electrical detection values), the equipment status signal subset (i.e., the set of equipment status signals), and the environmental noise data subset (i.e., the set of environmental noise data) are separated according to the data type. The three subsets together form the original data component set. Each subset in the set retains the original time stamp of the data acquisition.

[0185] Step S42: Perform waveform restoration processing on the electrical detection values ​​to reconstruct the waveforms and time characteristics of the three-phase current, three-phase voltage, and other electrical detection values, and generate electrical waveform data with time series (i.e., first time series data).

[0186] The waveforms of the electrical detection values ​​in the original data component set are restored, and the three-phase current and three-phase voltage sampling data are extracted from the electrical detection values. Let the sampling sequence be x(n), where n is the sampling point index, taking values ​​of 0, 1, ..., N-1, and N is the total number of samples. Based on the sampling frequency... Generate a time series, where the timestamp of the nth sampling point is... The following method is used to determine:

[0187]

[0188] in, This indicates the sampling start time. The sampled data is then filtered using a finite impulse response filter; the filtering formula is as follows:

[0189]

[0190] in, Let h(k) represent the filtered output, h(k) represent the filter coefficients, and M represent the filter order. This formula is used to remove high-frequency noise from the sampled data. Based on the filtered sampled data and time series, the three-phase current and three-phase voltage waveforms are reconstructed. An interpolation algorithm is used to supplement the data within the sampling interval. The interpolation formula is:

[0191]

[0192] Where t represents any time point, x(t) represents the waveform value at that time point, and x(n) and x(n+1) represent the values ​​at the nth and (n-1)th sampling points, respectively. The reconstructed waveform is then associated with the time series to generate electrical waveform data with a time series.

[0193] Step S43: Perform event feature extraction processing on the equipment status signal, identify the start time of the protection action, the change point of the return coefficient and the equipment status switching flag, and generate the equipment status event sequence (i.e., the second time series data).

[0194] Event feature extraction processing is performed on the device status signals in the original data component set to extract the device status signals. These signals are binary code streams, with each bit corresponding to a status variable. Let the state sequence be S(m), where m is the time index and S(m) is the status code at time m. By comparing the status codes of adjacent time points, changes in device status are identified. The formula for determining device status changes is:

[0195]

[0196] in, This represents the change in device state at time m. Represents the XOR operation, when This indicates a state change in the equipment. The change in equipment state is decoded to determine the changed state bit, generating a state change flag containing the state bit identifier, the values ​​before and after the change, and the occurrence time. For the state bit corresponding to the protection action signal of the target relay protection equipment, the moment it changes from 0 to 1 is identified as the start time of the protection action. Calculate the points of change in the returned coefficients. The calculation formula is:

[0197]

[0198] in, Indicates the return current. This represents the protection operating current. When this value changes abruptly, the time of the change is recorded. The start time of the protection action, the point of change of the return coefficient, and the equipment status switching flag are arranged in chronological order to generate an equipment status event sequence.

[0199] Step S44: Perform spectrum analysis on the environmental noise data, calculate the interference intensity distribution characteristics of each frequency band, and generate environmental noise spectrum characteristics.

[0200] Spectral analysis is performed on the environmental noise data in the original data component set to extract the noise amplitude data. Let the noise sequence be... Where p is the sampling index. The noise sequence is divided into time windows, each containing L sampling points. A Fourier transform is performed on the data in each time window, and the transform formula is:

[0201]

[0202] in, Let represent the spectral value at the c-th frequency point, where j is the imaginary unit, and c = 0, 1, ..., L⁻¹. Calculate the power spectral density at each frequency point. The formula is:

[0203]

[0204] in, Let represent the magnitude of the spectral value at the c-th frequency point. Divide the frequency axis into multiple frequency bands, calculate the sum of the power spectral densities within each band, and use this sum as the interference intensity for that band. The calculation formula is:

[0205]

[0206] in, Let c represent the interference intensity of the b-th frequency band, where c∈b represents the frequency index of the b-th frequency band. Calculate the proportion of interference intensity in each frequency band to the total interference intensity, and generate environmental noise spectrum characteristics, including frequency band range, interference intensity, and proportion.

[0207] Step S45: Perform timestamp alignment processing on electrical waveform data, equipment status event sequence and environmental noise spectrum characteristics to generate a timestamped multidimensional test dataset. The multidimensional test dataset is used to indicate the complete response characteristics of the target relay protection device under implicit boundary test cases.

[0208] Timestamp alignment is performed on electrical waveform data, equipment status event sequences, and environmental noise spectrum characteristics. The time series of the electrical waveform data is used as the reference time axis, and the reference timestamp is set to [value missing]. Where q is the base index. For each event in the device status event sequence, look up the event timestamp. The nearest baseline timestamp is used to determine the associated baseline index using the following formula. This binds the event to the baseline timestamp. The associated baseline index... The calculation formula is:

[0209]

[0210] For the environmental noise spectrum characteristics, each frequency band corresponds to a time window. The center time of the time window is calculated. The data is then linked to a reference timestamp q using the same method. By integrating the electrical waveform data corresponding to each reference timestamp, the associated equipment status events, and the environmental noise spectrum characteristics, a record containing multi-dimensional information is formed. All records are arranged in order of reference timestamps to generate a timestamped multi-dimensional test dataset. This multi-dimensional test dataset fully presents the response characteristics of the target relay protection device under implicit boundary test case scenarios.

[0211] Step S5: Process the multidimensional test dataset, analyze the reasons for deviations in action values ​​(i.e., target attribution results), and associate them with historical handling plans to generate a structured test report (i.e., defect report) containing defect location and defect handling suggestions.

[0212] By utilizing a multidimensional test dataset and employing a random forest algorithm to analyze the data, the actual action values ​​of the target relay protection device are compared with the expected action thresholds to identify deviations in action values. Combining a fault knowledge graph and the internal logic circuit model of the target relay protection device, the causes of these deviations are investigated. Possible causes include setting drift due to component aging, transformer transmission errors, and electromagnetic interference (i.e., multiple pre-defined attribution results).

[0213] The Apriori association rule algorithm can be applied to link the causes of action value deviations with historical handling solutions, such as associating component aging issues with corresponding component replacement solutions, and algorithm error issues with algorithm optimization solutions. Following a preset report template, the system compiles defect location results, analysis of the causes of action value deviations, and corresponding defect handling suggestions, generating a structured test report containing text descriptions and data charts.

[0214] Figure 3 This is a flowchart of an optional defect report generation process provided according to an embodiment of this application, such as... Figure 3 As shown, the steps in the defect report generation process include:

[0215] Step S51: Calculate the action deviation of the multidimensional test dataset, quantify the percentage deviation between the actual action value and the protection action threshold range, and generate the action deviation.

[0216] The deviation of the action is calculated on the multidimensional test dataset. The actual action value of the target relay protection device is extracted from the multidimensional test dataset, including parameters such as action time, action current, and action voltage. Let the actual action value be... Simultaneously, the generated expected action threshold is retrieved to obtain the upper limit of the expected action value. (i.e., the upper limit of the protection action threshold) and the lower limit (i.e., the lower limit of the protection action threshold) And calculate the median of the expected action. and movement deviation The calculation formula is:

[0217]

[0218]

[0219] in, This represents the absolute deviation between the actual action value and the median of the expected action value. To define the expected action threshold range, this formula quantifies the deviation of the protection action as a percentage. This calculation is performed for each protection action in the multidimensional test dataset, generating a corresponding action deviation. Each action deviation is associated with the corresponding protection action type and timestamp.

[0220] Step S52: Perform multi-factor attribution processing on the deviation of the action, calculate the contribution weights corresponding to equipment setpoint drift, transformer transmission error and electromagnetic interference, and generate contribution weight distribution.

[0221] Multi-factor attribution analysis was performed on the deviation of the operation to identify potential factors affecting the deviation, including device setting drift, transformer transmission error, and electromagnetic interference. Characteristic parameters for each factor were extracted from the multi-dimensional test dataset: the device setting drift characteristic parameter is the difference between the measured value and the set value of the internal setting of the target relay protection device. The characteristic parameter of the transformer transmission error is the deviation rate between the secondary output value and the actual value of the primary side of the transformer. Electromagnetic interference characteristic parameters are the interference intensity of the main frequency bands in the environmental noise spectrum characteristics. The contribution weights of each factor are calculated using a multiple linear regression model. The model formula is as follows:

[0222]

[0223] in, , , These are the contribution weights of equipment setpoint drift, transformer transmission error, and electromagnetic interference, respectively. This represents the error term. The model parameters are solved using the least squares method to obtain the contribution weights of each factor, and this satisfies... The obtained contribution weights are sorted by factor type to generate a contribution weight distribution.

[0224] Step S53: Perform case matching processing on the contribution weight distribution, retrieve historical handling plans for historical fault cases similar to the largest contribution weight factor (i.e., the target attribution result) from the fault knowledge graph, and generate matching handling plans.

[0225] Case matching is performed on the contribution weight distribution to identify the factor corresponding to the largest contribution weight. Let this factor be... Its contribution weight is .by To retrieve keywords, historical failure cases containing that factor are searched in the failure knowledge graph. These historical failure cases include the failure factor, the corresponding handling measures, and the handling effects. The similarity between the case to be matched and the historical failure cases is calculated using the formula:

[0226]

[0227] in, Factors in the case to be matched The a-th feature parameter, Let be the a-th characteristic parameter of the corresponding factor in historical failure cases. Let D be the weight of the feature parameters, and B be the total number of feature parameters. The smaller the similarity value D is, the higher the similarity. Select the top E historical fault cases with the highest similarity, extract their handling solutions, and make adaptive adjustments based on the specific parameters of the test scenario corresponding to the current implicit boundary test cases. For example, adjust the order of defect handling steps or supplement the operation details for the current target relay protection equipment model to generate a matching handling solution.

[0228] Step S54: Perform report generation processing on the action deviation, contribution weight distribution and matching handling plan, and output a structured test report containing defect location and defect handling suggestions.

[0229] Reports are generated on action deviation, contribution weight distribution, and matching response plans. Action deviation for each protection action is extracted from the action deviation database, and the maximum, minimum, and average values ​​of action deviation are calculated by protection type to form action deviation statistics. The contribution weight distribution is converted into visual charts in the form of pie charts or bar charts to intuitively display the contribution ratio of each factor. Matching response plans are structured and sorted by implementation priority. Each response plan includes a description of the measures, implementation steps, required tools, and expected results.

[0230] The system integrates statistical results of action deviation, visualization charts of contribution weight distribution, matching handling plans, and key timestamp information from multidimensional test datasets to generate a structured test report according to a preset report template. The structured test report is output in a standardized format, supports integration with power operation and maintenance management systems, and provides a basis for handling defects in target relay protection equipment.

[0231] The above-mentioned optional implementation methods achieve at least the following effects: Constructing a fault knowledge graph of the target relay protection equipment enables quantitative risk assessment of fault propagation paths and automatic identification of high-risk test paths, thereby generating target test cases covering complex hidden fault modes; during the test execution phase, by aligning electrical quantity waveform data, equipment state event sequences, and environmental noise spectrum characteristics with millisecond-level timestamps, a panoramic record of the target relay protection equipment's response characteristics under extreme operating conditions can be achieved; during the analysis phase, multi-factor attribution technology is used to decouple the causes of action deviations, accurately determining the contribution weights of core defect factors such as equipment setting drift, transformer transmission errors, and electromagnetic interference; and the final generated structured test report, by associating with historical handling schemes, provides quantifiable decision-making basis for defect repair and parameter optimization of the target relay protection equipment.

[0232] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0233] This embodiment also provides a defect report generation device for relay protection equipment. This device is used to implement the above embodiments and preferred embodiments, and will not be repeated for details already described. As used below, the terms "module" and "device" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0234] According to an embodiment of this application, an apparatus embodiment for implementing a method for generating defect reports of relay protection equipment is also provided. Figure 4 This is a schematic diagram of a defect report generation device for relay protection equipment according to an embodiment of this application, as shown below. Figure 4 As shown, the defect report generation device for the aforementioned relay protection equipment includes a target test case determination module 402, a target test dataset determination module 404, an action deviation determination module 406, a target attribution result determination module 408, and a defect report generation module 410. The device will be described below.

[0235] The target test case determination module 402 is used to determine the target test cases for the target relay protection device.

[0236] The target test dataset determination module 404 is connected to the target test case determination module 402 and is used to test the target relay protection device based on the target test cases to obtain the target test dataset.

[0237] Action deviation determination module 406 is connected to target test dataset determination module 404 and is used to determine action deviation based on target test dataset. Action deviation is used to quantify the degree to which the actual action value of the target relay protection device deviates from the corresponding protection action threshold range.

[0238] The target attribution result determination module 408 is connected to the action deviation determination module 406 and is used to determine the target attribution result of the action deviation based on the action deviation.

[0239] The defect report generation module 410 is connected to the target attribution result determination module 408 and is used to generate a defect report of the target relay protection device based on the target attribution result.

[0240] This application provides a defect report generation device for relay protection equipment. By setting a target test case determination module 402, a target test dataset determination module 404, an action deviation determination module 406, a target attribution result determination module 408, and a defect report generation module 410, the device achieves the purpose of generating a defect report for the target relay protection equipment by determining the target test cases for the target relay protection equipment and using these test cases to test the target relay protection equipment. This improves the comprehensiveness and accuracy of the generated defect report, thereby solving the technical problems of incomplete and inaccurate defect report generation results for relay protection equipment in related technologies.

[0241] It should be noted that the above modules can be implemented by software or hardware. For example, for the latter, it can be implemented in the following ways: the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.

[0242] It should be noted that the target test case determination module 402, target test dataset determination module 404, action deviation determination module 406, target attribution result determination module 408, and defect report generation module 410 mentioned above correspond to steps S102 to S110 in the embodiments. The instances and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the content disclosed in the above embodiments. It should be noted that the above modules, as part of the device, can run on a computer terminal.

[0243] It should be noted that the optional or preferred implementation methods of this embodiment can be found in the relevant descriptions in the embodiments, and will not be repeated here.

[0244] The aforementioned defect report generation device for relay protection equipment may also include a processor and a memory. The target test case determination module 402, the target test dataset determination module 404, the action deviation determination module 406, the target attribution result determination module 408, and the defect report generation module 410 are all stored as program units in the memory, and the processor executes the aforementioned program units stored in the memory to realize the corresponding functions.

[0245] The processor contains a core that retrieves the corresponding program unit from memory. One or more cores may be configured. Memory may include non-persistent memory in computer-readable media, random access memory (RAM), and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory includes at least one memory chip.

[0246] This application provides a non-volatile storage medium storing a program that, when executed by a processor, implements a method for generating defect reports for relay protection devices.

[0247] This application provides an electronic device including a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it performs the following steps: determining target test cases for a target relay protection device; testing the target relay protection device based on the target test cases to obtain a target test dataset; determining the action deviation degree based on the target test dataset, wherein the action deviation degree quantifies the degree to which the actual action value of the target relay protection device deviates from the corresponding protection action threshold range; determining the target attribution result of the action deviation degree based on the action deviation degree; and generating a defect report for the target relay protection device based on the target attribution result. The device in this document can be a server, PC, etc.

[0248] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program having the following method steps: determining target test cases for a target relay protection device; testing the target relay protection device based on the target test cases to obtain a target test dataset; determining the action deviation degree based on the target test dataset, wherein the action deviation degree is used to quantify the degree to which the actual action value of the target relay protection device deviates from the corresponding protection action threshold range; determining the target attribution result of the action deviation degree based on the action deviation degree; and generating a defect report for the target relay protection device based on the target attribution result.

[0249] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0250] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0251] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0252] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0253] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0254] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0255] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0256] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0257] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0258] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A method for generating defect reports for relay protection equipment, characterized in that, include: Determine the target test cases for the target relay protection equipment; Based on the target test cases, the target relay protection device is tested to obtain the target test dataset; Based on the target test dataset, the action deviation is determined, wherein the action deviation is used to quantify the degree to which the actual action value of the target relay protection device deviates from the corresponding protection action threshold range; Based on the action deviation, determine the target attribution result of the action deviation; Based on the target attribution results, a defect report for the target relay protection device is generated.

2. The method according to claim 1, characterized in that, The target test cases for determining the target relay protection equipment include: Obtain the fault knowledge graph of the target relay protection device, wherein the fault knowledge graph includes multiple entities and multiple connecting edges. The multiple entities include equipment entities, fault type entities and protection action entities. The connecting edges include the association relationship between two corresponding entities and the edge weight used to quantify the degree of association between two entities. Based on the fault knowledge graph, multiple initial paths are determined, wherein each initial path includes at least a fault type entity, a protection device entity, and a protection action entity. Determine the path risk value corresponding to each of the multiple initial paths; Based on the path risk values ​​corresponding to the multiple initial paths and a preset risk threshold, a target path is selected from the multiple initial paths, wherein the path risk value of the target path is higher than the preset risk threshold. Based on the target path, the target test cases are determined.

3. The method according to claim 2, characterized in that, Determining the path risk value corresponding to each of the plurality of initial paths includes: For the target initial path among the multiple initial paths, the edge weights corresponding to the multiple connecting edges included in the target initial path are determined based on the fault knowledge graph. Based on the edge weights corresponding to the multiple connecting edges included in the target initial path, the path length coefficient of the target initial path, and the preset fault time decay coefficients corresponding to the multiple connecting edges included in the target initial path, the path risk value of the target initial path is determined. The path length coefficient is used to quantify the influence of the number of connecting edges included in the target initial path on the fault propagation process corresponding to the target initial path. The preset fault time decay coefficient is used to quantify the degree to which the influence of the corresponding connecting edge on the fault propagation process corresponding to the target initial path decreases over time. The path risk value of each initial path other than the target initial path is determined by using the method of determining the path risk value of the target initial path.

4. The method according to claim 2, characterized in that, The step of determining the target test case based on the target path includes: Obtain historical fault data for the target path; Based on the historical fault data, the initial key parameter values ​​of the key parameters of the target path are determined; The initial key parameter values ​​are optimized to obtain the target key parameter values; Determine the protection action threshold range of the protection action entities included in the target path; Based on the target key parameter values, the protection action threshold range, and the fault type entities included in the target path, the target test cases are determined.

5. The method according to claim 1, characterized in that, The step of testing the target relay protection device based on the target test cases to obtain a target test dataset includes: Based on the target test cases, the target relay protection device is tested to obtain an initial dataset; Based on the electrical detection values ​​in the initial dataset, determine the first time series data of the electrical detection values; Based on the device status signals in the initial dataset, determine the second time series data of the device status events; Based on the environmental noise data in the initial dataset, determine the spectral characteristics of the environmental noise; The first time series data, the second time series data, and the environmental noise spectral characteristics are time-aligned to obtain the target test dataset.

6. The method according to claim 1, characterized in that, The determination of action deviation based on the target test dataset includes: Based on the target test dataset, determine the actual action value of the target protection action corresponding to the protection action entity included in the target path of the target test case; Based on the protection action threshold range included in the target test case, determine the upper limit and lower limit of the protection action threshold for the target protection action; The deviation of the action is determined based on the actual action value, the upper limit of the protection action threshold, and the lower limit of the protection action threshold.

7. The method according to claim 1, characterized in that, The determination of the target attribution result of the action deviation based on the action deviation includes: Based on the action deviation, a contribution weight is determined for each of the multiple preset attribution results, wherein the contribution weight is used to quantify the degree of contribution of the corresponding preset attribution result to the action deviation. The preset attribution result corresponding to the maximum value among multiple contribution weights is determined as the target attribution result, wherein the multiple contribution weights correspond one-to-one with the multiple preset attribution results.

8. The method according to any one of claims 1 to 7, characterized in that, The step of generating a defect report for the target relay protection device based on the target attribution results includes: Based on the target attribution results, the defect location and defect handling recommendations for the target relay protection equipment are determined; Based on the action deviation, multiple contribution weights, the target attribution result, the defect location, and the defect handling suggestion, a defect report is generated according to a preset report template. The contribution weights are used to quantify the degree of contribution of the corresponding preset attribution result to the action deviation.

9. A defect report generation device for relay protection equipment, characterized in that, include: The target test case determination module is used to determine the target test cases for the target relay protection device. The target test dataset determination module is used to test the target relay protection device based on the target test cases to obtain the target test dataset; The action deviation determination module is used to determine the action deviation based on the target test dataset, wherein the action deviation is used to quantify the degree to which the actual action value of the target relay protection device deviates from the corresponding protection action threshold range; The target attribution result determination module is used to determine the target attribution result of the action deviation based on the action deviation. The defect report generation module is used to generate a defect report for the target relay protection device based on the target attribution results.

10. A non-volatile storage medium, characterized in that, The non-volatile storage medium stores multiple instructions, which are adapted to be loaded by a processor and executed by the defect report generation method for relay protection equipment according to any one of claims 1 to 8.