Automatic test system and method based on relay protection device

By generating scenario data units and constructing test path transition diagrams, and optimizing test sequences, the problem of the lack of state-based modeling in existing test methods is solved, and the continuity and accuracy of automated testing of relay protection devices are realized.

CN121899523APending Publication Date: 2026-04-21ZHEJIANG ZHENENG LANXI POWER GENERATION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-30
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing testing methods for relay protection devices lack effective state-based modeling and persistent knowledge representation, resulting in a lack of memory capacity in the testing process. This makes it impossible to accurately locate and reconstruct the test context at the moment of interruption, affecting the continuity and accuracy of the test.

Method used

By collecting electrical timing data and device status signals in real time, scenario data units are generated, a directed graph of test path transition is constructed, candidate sets for subsequent stages are predicted, test sequences are optimized, snapshots of breakpoint contexts at interruption moments are captured, and pattern matching recovery tests are performed using historical cases.

Benefits of technology

It achieves self-explanatory and easily searchable data storage for the testing process, improves the effectiveness of analysis and the success rate of follow-up testing, reduces manual intervention and waiting time, and ensures the continuity and accuracy of testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121899523A_ABST
    Figure CN121899523A_ABST
Patent Text Reader

Abstract

The invention discloses an automatic test system and method based on a relay protection device, and relates to the technical field of relay protection device analysis. In the relay protection test process, electrical time sequence data and device state signals in the test stage are collected in real time, data are processed, and a scene data unit capable of being independently stored and analyzed is generated; constructing a test path transfer directed graph; predicting a subsequent stage candidate set according to the test path transfer directed graph; forming a to-be-executed candidate list according to the predicted subsequent stage candidate set in combination with the current available resource set; analyzing a resource conflict relationship among the test items, and generating an optimized test sequence; when it is detected that the test process is abnormally interrupted, a continuous test execution instruction is generated by conducting mode matching on the context and a historical successful continuous test case, the test is recovered from the breakpoint, and meanwhile the interruption and recovery mode is stored in a historical continuous test case library. And the success rate and the safety of continuous testing are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of relay protection device analysis technology, specifically an automated testing system and method based on relay protection devices. Background Technology

[0002] In recent years, with the rapid improvement of people's living standards and the acceleration of industrial development, the demand for electricity has been increasing year by year. While promoting the rapid development of the power industry, it has also put forward higher requirements for it. Relay protection is not only an important guarantee for the normal operation of the power system, but also can promote the development of the power system towards modernization, intelligence and automation to a certain extent. It plays a vital role in protecting the safe and stable operation of the power system.

[0003] Existing methods typically treat testing as a continuous, black-box flow of instruction execution, with the massive amounts of data generated used only to generate transient test conclusions or for simple process recording. The testing process lacks effective state modeling and persistent knowledge representation. The system cannot deconstruct the test flow into discrete state units with clear electrical and logical meanings, and cannot structure and semantically associate them. This directly results in the test process itself lacking memory capacity; once interrupted, the system cannot accurately locate and reconstruct the complete test context corresponding to the interruption, making continued testing impossible.

[0004] Therefore, this invention discloses an automated testing system and method based on relay protection devices to solve the above problems. Summary of the Invention

[0005] The purpose of this invention is to provide an automated testing system and method based on relay protection devices to solve the problems raised in the prior art.

[0006] To achieve the above objectives, the present invention provides the following technical solution: an automated testing method based on a relay protection device, the method comprising the following steps: During relay protection testing, electrical timing data and device status signals of different test stages are collected in real time, scene data slices are encapsulated, and stage feature vectors within the scene data slices are analyzed to generate scene data units that can be independently stored and analyzed. Extract historical scenario data units from persistent storage to analyze the state stability indicators of each test phase, and construct a directed graph of test path transitions; analyze the compliance indicators of the current test behavior by analyzing the position and transition probability of the current test phase in the historical path, and predict the candidate set of subsequent phases. Based on the predicted candidate set for subsequent stages and the current available resource set, a list of candidate tests to be executed is generated; the resource conflict relationships between test items are analyzed, and an optimized test sequence is generated. When an abnormal interruption of the test process is detected, the system extracts the most recent complete scenario data slice and its context information before the interruption, and reconstructs the test context at the breakpoint. By matching the context with historical successful test continuation cases, a continuation test execution instruction is generated, and the test is resumed from the breakpoint. At the same time, the interruption and recovery patterns are stored in the historical test continuation case library.

[0007] According to the above scheme, the generation of scene data units that can be independently stored and analyzed includes: The system monitors the automated testing process of relay protection in real time. When the process enters the preset test stage, it triggers test data acquisition and records the three-phase current, three-phase voltage, and all open contact status of the protection device under test within the time window from the start time to the end time of the test stage. The system synchronizes and binds the timing data of the three-phase current, three-phase voltage, and open contact status within the time window and encapsulates them into scene data slices. From the scene data slices, key feature quantities characterizing the test phase are extracted to form the feature vector corresponding to the test phase; wherein, the extracted key feature quantities include, but are not limited to: the three-phase current steady-state value obtained based on the end of the scene data slice or a preset steady-state point, the maximum transient current peak value identified by scanning the current waveform within the scene data slice, the protection action time identified and calculated based on the open contact state sequence, and the state change sequence obtained by encoding the open contact state change logic within the scene data slice. The scene data slices are associated with their corresponding feature vectors, and the test phase identifier and timestamp are marked and stored as scene data units.

[0008] By using "detecting entry into a preset stage" as a trigger condition, on-demand data collection is achieved, significantly reducing the data storage and processing burden compared to high-speed data collection throughout the entire timeframe. The extracted steady-state values, peak values, and action times are all key indicators for evaluating device performance in relay protection testing, enabling subsequent analysis to directly serve the testing objectives and improving the effectiveness of the analysis. By storing raw data, extracted features, stage identifiers, and timestamps in a correlated manner, self-explanatory and easily searchable data units are formed, laying a solid foundation for persistence, querying, and case matching.

[0009] According to the above scheme, the candidate set for predicting subsequent stages includes: Extract several scene data units with the same stage identifier in history; extract at least one key feature from the feature vector of the historical scene data unit, and statistically analyze the value distribution of the key feature; based on the value distribution of the feature, calculate the information entropy of the key feature for the corresponding test stage, and denot it as the state stability index. Traverse the historical test records and transform each complete test into a sequence of stages connected in the execution order of several test stages; based on all historical stage sequences, construct a directed graph of test path transitions, where nodes are different test stages and the weight of the directed edges is the frequency of transitions where another test stage is executed immediately after the completion of a test stage in history. In the current testing process, after generating a scenario data unit and its feature vector corresponding to the current testing phase, compliance indicator analysis and path prediction are performed. The compliance indicator analysis includes comparing the current feature vector with the average feature vector of the same testing phase in history, and calculating the feature deviation using Euclidean distance; Path prediction includes locating the node corresponding to the current test stage in the directed graph of test path transition, obtaining all directed edges originating from the node and their weight sets, and predicting and generating one or more subsequent test stages based on the weight sets, thus forming a candidate set of subsequent stages. The prediction methods include the highest weight method, the threshold screening method, or the probability ranking method; The highest weight method directly selects the subsequent test stage pointed to by the edge with the largest weight value in the weight set as the sole prediction result; the threshold screening method selects the subsequent test stages pointed to by all edges with weights greater than or equal to a preset frequency threshold to form a candidate set of subsequent stages; the probability ranking method normalizes the weights of each directed edge and records them as transition probabilities; and selects the one with the highest transition probability or the top several subsequent test stages arranged in descending order of probability to form a candidate set of subsequent stages.

[0010] This invention introduces "information entropy" as a state stability index, providing a quantifiable stability assessment standard for each test phase. This allows the system to distinguish which phases exhibit consistent behavior and which exhibit significant fluctuations, providing a scientific basis for subsequent predictions. The path prediction problem is transformed into a navigation problem on a graph structure, utilizing weights (transition frequencies) as the navigation basis. This makes the prediction process logically clear, computationally efficient, and easy to interpret. The system can select different strategies based on the rigor and real-time requirements of the test, enhancing the flexibility and practicality of the method. The highest weight method is suitable for routine tests that pursue maximum efficiency and have clearly defined paths. The threshold screening method is suitable for rigorous tests that need to ensure test coverage and avoid missing important branches. The probabilistic ranking method is suitable for complex tests that require comprehensive evaluation of probabilities and provide more options for subsequent optimization scheduling. The threshold and probabilistic methods allow the system to follow the mainstream path while retaining the possibility of exploring low-frequency but reasonable paths, avoiding getting trapped in local optima.

[0011] According to the above scheme, the generation of optimized test sequences includes: A pre-built test project library, in which each test project is defined with: a set of pre-test stages or conditions that must be met to execute the test project, and a set of hardware and logic resources that must be used to execute the test project; The required hardware includes, but is not limited to, test instrument entities, instrument channels, switch matrix ports, physical wiring terminals, and communication interfaces. The logical resources include, but are not limited to, device setting area, device operation mode, and tester output mode; The device setting zone indicates the setting zone number where the tested protection device is currently active and running. Many test items must be performed under a specific setting zone. The device operation mode includes normal operation mode, debugging mode and maintenance status. The tester output mode indicates the waveform type or status configured by the tester, including steady-state power output mode and transient fault simulation sequence playback mode. If the logical resources are not compatible, switching logical states needs to be treated as a time-consuming and planned action and incorporated into the optimized test sequence. This includes scheduling tests requiring the same device setpoint area together for consecutive execution during the sequencing process, reducing unnecessary setpoint area switching and thus optimizing test time.

[0012] Obtain the candidate set for subsequent stages and the set of currently available resources monitored in real time; based on the test project library, filter out all test projects that meet the conditions; wherein the conditions are that the prerequisite for the test project is a subset of the candidate set for subsequent stages and all resources required by the test project are currently available; summarize all test projects that meet the conditions to form a candidate list to be executed; Analyze the resource mutual exclusion relationships between different test items in the candidate list to be executed, and identify test item pairs that cannot be executed in parallel or require resource reconfiguration; with the optimization objective of minimizing the estimated total test time, use a heuristic scheduling algorithm to sort the test items in the candidate list to be executed, and insert necessary resource reconfiguration instructions between the test items in the sorted sequence; generate an optimized test sequence and its corresponding instrument parameter set.

[0013] This invention identifies resource mutual exclusion relationships and inserts reconfiguration instructions, enabling the system to automatically resolve resource contention and achieve smooth execution of the test process, reducing manual intervention and waiting time. A heuristic scheduling algorithm is used to sort the tests with the goal of minimizing the total test time, making the test execution sequence not only "executable" but also nearly optimal, directly improving test throughput.

[0014] According to the above plan, the storage of recovery test and historical test cases includes: When the system detects an abnormal interruption in the test process, it captures and saves the system state at the moment of interruption and generates a breakpoint context snapshot. The breakpoint context snapshot includes at least: the last scene data slice that has been fully generated before the interruption, the current test stage identifier at the time of interruption, all test stage sequences that have been successfully executed from the start of the test to the time of interruption, and the optimized test sequence that has been planned but not yet completed before the interruption. The breakpoint context snapshot is matched and retrieved with the historical test continuation case library. The matching criteria include the consistency of the current test phase identifier and the similarity between the feature vector of the scene data slice and the feature vector of the interrupted slice in the historical case is higher than the similarity threshold. If a historical case that meets the conditions is matched, the test continuation execution instruction that has been successfully verified in the corresponding historical case is directly adopted. If no historical case is matched, the test continuation execution instruction is generated based on the optimized test sequence, starting from the first unexecuted test item after the breakpoint. According to the determined continuation test instruction, the system restores the communication connection with the test instrument, loads the corresponding instrument parameter set, and continues to execute the test process from the breakpoint. The continuation test case, which is assembled from the snapshot of the breakpoint context and the subsequent successfully restored and completed continuation test process, is stored in the historical continuation test case library.

[0015] By capturing and saving complete "breakpoint context snapshots," the system ensures accurate reconstruction of the interruption scenario during recovery, avoiding recovery failures or errors due to missing information. By matching historical successful cases, the system can employ validated and effective recovery strategies, significantly improving the success rate and security of continued testing. Coarse screening using "stage identifiers" followed by fine screening using "feature vector similarity" ensures that matched cases are highly similar to the current interruption scenario at the electrical behavior level, thus guaranteeing the applicability of the continued testing strategy. A "similarity threshold" parameter allows for balancing matching strictness and recall according to actual needs, enhancing the system's configurability.

[0016] Another aspect of this application provides an automated testing system based on a relay protection device. The system is applied to the above-mentioned automated testing method based on a relay protection device. The system includes a data slicing fusion module, a test path transfer prediction module, a test item optimization module, and a context reconstruction iteration module. During relay protection testing, the data slicing and fusion module collects electrical timing data and device status signals in real time for different testing stages, processes the data to generate scene data units that can be independently stored and analyzed. The test path transition prediction module is used to extract historical scene data units from persistent storage to construct a directed graph of test path transitions; and to predict the candidate set for subsequent stages based on the directed graph of test path transitions. The test project optimization module generates a list of candidate projects to be executed based on the predicted candidate set for subsequent stages and the currently available resource set; it analyzes the resource conflict relationships between test projects and generates an optimized test sequence. The context reconstruction iteration module is used to extract the most recent complete scene data slice and its context information before the interruption when an abnormal interruption of the test process is detected, and reconstruct the test context at the breakpoint. By matching the context with historical successful test continuation cases, a test continuation execution instruction is generated, and the test is resumed from the breakpoint. At the same time, the interruption and recovery patterns are stored in the historical test continuation case library.

[0017] According to the above scheme, the data slice fusion module includes a data encapsulation unit, a stage feature analysis unit, and a slice storage unit; The data encapsulation unit is used to monitor the test process entering the preset test stage, record the three-phase current, voltage and the open contact status of the protection device within the test stage time window, and encapsulate them into scene data slices. The stage feature analysis unit is used to extract key feature quantities that characterize the test stage from the scene data slices, and to form the feature vector corresponding to the test stage. The slice storage unit is used to associate scene data slices with their corresponding feature vectors, mark the test phase identifier and timestamp, and store them as scene data units.

[0018] According to the above scheme, the test path transition prediction module includes a stability feature analysis unit, a test path transition directed graph construction unit, and an evaluation prediction unit; The stability feature analysis unit is used to calculate the state stability index of key feature quantities in the feature vector for several slice samples of the same period in the historical database. The test path transition directed graph construction unit is used to traverse historical test records and transform each complete test into a phase sequence consisting of several test phases connected in execution order; based on all historical phase sequences, a test path transition directed graph is constructed. The evaluation and prediction unit is used to compare the current feature vector with the average feature vector of the same test stage in history, calculate the deviation, and combine the edge weights of the current node in the directed graph of the test path transition to predict the candidate set of the subsequent stage.

[0019] According to the above scheme, the test item optimization module includes a list filtering unit and a sequence optimization unit; The list filtering unit is used to obtain the candidate set for subsequent stages and the set of currently available resources monitored in real time; based on the test project library, all test projects that meet the conditions are filtered out. The sequence optimization unit is used to analyze the resource mutual exclusion relationship between different test items in the candidate list to be executed, identify test item pairs that cannot be executed in parallel or require resource reconfiguration; with minimizing the estimated total test time as the optimization objective, a heuristic scheduling algorithm is used to sort the test items in the candidate list to be executed.

[0020] According to the above scheme, the context reconstruction iteration module includes a breakpoint context snapshot analysis unit and a context matching unit; The breakpoint context snapshot analysis unit is used to capture and save the system state at the moment of interruption when the system detects an abnormal interruption in the test process, and generate a breakpoint context snapshot. The context matching unit is used to match and retrieve the breakpoint context snapshot with the historical test continuation case library. The matching criteria include the consistency of the current test phase identifier and the similarity between the feature vector of the scene data slice and the feature vector of the interrupted slice in the historical case being higher than the similarity threshold. If a historical case that meets the conditions is matched, the test continuation execution instruction that has been successfully verified in the corresponding historical case is directly adopted. If no historical case is matched, the test continuation execution instruction is generated based on the optimized test sequence, starting from the first unexecuted test item after the breakpoint.

[0021] Compared with existing technologies, the beneficial effects of this invention are as follows: By using "detecting entry into a preset stage" as a trigger condition, on-demand data acquisition is achieved, significantly reducing the data storage and processing burden compared to high-speed acquisition throughout the entire period. The extracted steady-state values, peak values, and action times are all key indicators for evaluating device performance in relay protection testing, enabling subsequent analysis to directly serve the test objectives and improving the effectiveness of the analysis. The raw data, extracted features, stage identifiers, and timestamps are stored together to form self-explanatory and easily retrieved data units, laying a solid foundation for persistence, querying, and case matching. This invention introduces "information entropy" as a state stability indicator, providing a quantifiable stability evaluation standard for each test stage, enabling the system to distinguish which stages exhibit consistent behavior and which stages fluctuate significantly, providing a scientific basis for subsequent predictions. The path prediction problem is transformed into a navigation problem on a graph structure, using weights as the navigation basis, making the prediction process logically clear, computationally efficient, and easy to interpret. The system can select different strategies according to the rigor and real-time requirements of the test, enhancing the flexibility and practicality of the method. The highest weight method is suitable for routine tests that pursue maximum efficiency and have clearly defined paths. Threshold screening: Suitable for rigorous tests that require ensuring test coverage and avoiding omissions of important branches. Probabilistic ranking: Suitable for complex tests that require comprehensive evaluation of probabilities and provide more options for subsequent optimization scheduling. Thresholding and probabilistic methods allow the system to retain the possibility of exploring low-frequency but reasonable paths while following the mainstream path, avoiding getting trapped in local optima. This invention, by identifying resource mutual exclusion relationships and inserting reconfiguration instructions, enables the system to automatically resolve resource contention, achieve smooth execution of the test process, and reduce manual intervention and waiting time. Employing a heuristic scheduling algorithm to prioritize minimizing total test time ensures that the test execution sequence is not only "executable" but also nearly optimal, directly improving test throughput. By capturing and saving complete "breakpoint context snapshots," the system ensures accurate reconstruction of the interruption situation during recovery, avoiding recovery failures or errors due to missing information. By matching historical successful cases, the system can use verified effective strategies for recovery, greatly improving the success rate and security of continued testing. The system employs a coarse screening method using "stage identifiers" followed by a fine screening using "feature vector similarity" to ensure that matched cases are highly similar to the current interruption scenario in terms of electrical behavior, thus guaranteeing the applicability of the continuation testing strategy. A "similarity threshold" parameter allows for a balance between matching strictness and recall based on actual needs, enhancing the system's configurability. Attached Figure Description

[0022] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1This is a flowchart illustrating an automated testing method based on a relay protection device according to the present invention. Figure 2 This is a schematic diagram of the structure of an automated testing system based on a relay protection device according to the present invention. Detailed Implementation

[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0024] Please see Figure 1 The present invention provides a technical solution: an automated testing method based on a relay protection device, the method comprising the following steps: During relay protection testing, electrical timing data and device status signals of different test stages are collected in real time, scene data slices are encapsulated, and stage feature vectors within the scene data slices are analyzed to generate scene data units that can be independently stored and analyzed. The generated scene data units that can be independently stored and analyzed include: Real-time monitoring of the relay protection automated test process. When the process enters the preset test stage, test data acquisition is triggered, recording the three-phase current, three-phase voltage, and all open contact status of the tested protection device within the time window from the start time to the end time of the test stage; the timing data of the three-phase current, three-phase voltage, and open contact status within the time window are synchronized, aligned, and bound, and encapsulated into scene data slices. From the scene data slices, key feature quantities characterizing the test phase are extracted to form the feature vector corresponding to the test phase. Among them, the extracted key feature quantities include, but are not limited to: the three-phase current steady-state value obtained based on the end of the scene data slice or the preset steady-state point, the maximum transient current peak value identified by scanning the current waveform in the scene data slice, the protection action time identified and calculated based on the open contact state sequence, and the state change sequence obtained by encoding the open contact state change logic in the scene data slice. The scene data slices are associated with their corresponding feature vectors, and the test phase identifier and timestamp are marked and stored as scene data units.

[0025] Extract historical scenario data units from persistent storage to analyze the state stability indicators of each test phase, and construct a directed graph of test path transitions; analyze the compliance indicators of the current test behavior by analyzing the position and transition probability of the current test phase in the historical path, and predict the candidate set of subsequent phases. The candidate set for predicting subsequent stages includes: Extract several scene data units with the same stage identifier in history; extract at least one key feature from the feature vector of the historical scene data unit, and statistically analyze the value distribution of the key feature; based on the value distribution of the feature, calculate the information entropy of the key feature for the corresponding test stage, and denote it as the state stability index. Traverse the historical test records and transform each complete test into a sequence of stages connected in the execution order of several test stages; based on all historical stage sequences, construct a directed graph of test path transitions, where nodes are different test stages and the weight of the directed edges is the frequency of transitions where another test stage is executed immediately after the completion of a test stage in history. In the current testing process, after generating a scenario data unit and its feature vector corresponding to the current testing phase, compliance indicator analysis and path prediction are performed. The compliance indicator analysis includes comparing the current feature vector with the average feature vector of the same testing phase in history, and calculating the feature deviation using Euclidean distance; Path prediction includes locating the node corresponding to the current test stage in the directed graph of test path transition, obtaining all directed edges originating from the node and their weight sets, and predicting one or more subsequent test stages based on the weight sets, thus forming a candidate set of subsequent stages. The prediction methods include the highest weight method, the threshold screening method, or the probability ranking method; The highest weight method directly selects the subsequent test stage pointed to by the edge with the largest weight value in the weight set as the sole prediction result; the threshold screening method selects the subsequent test stages pointed to by all edges with weights greater than or equal to a preset frequency threshold to form a candidate set of subsequent stages; the probability ranking method normalizes the weights of each directed edge and records them as transition probabilities; and selects the one with the highest transition probability or the top several subsequent test stages arranged in descending order of probability to form a candidate set of subsequent stages.

[0026] Based on the predicted candidate set for subsequent stages and the current available resource set, a list of candidate tests to be executed is generated; the resource conflict relationships between test items are analyzed, and an optimized test sequence is generated. The generated optimization tests include: A pre-built test project library, in which each test project is defined with: a set of pre-test stages or conditions that must be met to execute the test project, and a set of hardware and logic resources that must be used to execute the test project; Obtain the candidate set for subsequent stages and the set of currently available resources monitored in real time; based on the test project library, filter out all test projects that meet the conditions; the conditions are that the prerequisite for the test project is that it is a subset of the candidate set for subsequent stages and all resources required by the test project are currently available; summarize all test projects that meet the conditions to form a list of candidates to be executed. Analyze the resource mutual exclusion relationships between different test items in the candidate list to be executed, and identify test item pairs that cannot be executed in parallel or require resource reconfiguration; with the optimization objective of minimizing the estimated total test time, use a heuristic scheduling algorithm to sort the test items in the candidate list to be executed, and insert necessary resource reconfiguration instructions between the test items in the sorted sequence; generate an optimized test sequence and its corresponding instrument parameter set.

[0027] Example 1: In this example, necessary resource reconfiguration instructions are inserted between test items, including but not limited to inserting control commands such as "switch the tester output mode from current source to voltage source" or "control the matrix switch to switch the output line from terminal 1 to terminal 2" between two test items.

[0028] When an abnormal interruption of the test process is detected, the system extracts the most recent complete scenario data slice and its context information before the interruption, and reconstructs the test context at the breakpoint. By matching the context with historical successful test continuation cases, a continuation test execution instruction is generated, and the test is resumed from the breakpoint. At the same time, the interruption and recovery patterns are stored in the historical test continuation case library.

[0029] The storage of recovery test and historical test cases includes: When the system detects an abnormal interruption in the test process, it captures and saves the system state at the moment of interruption and generates a breakpoint context snapshot. The breakpoint context snapshot includes at least: the last scene data slice that has been fully generated before the interruption, the current test phase identifier at the time of interruption, all test phase sequences that have been successfully executed from the start of the test to the time of interruption, and the optimized test sequence that has been planned but not yet completed before the interruption. The breakpoint context snapshot is matched and retrieved against the historical test continuation case library. The matching criteria include the consistency of the current test phase identifier and the similarity between the feature vector of the scene data slice and the feature vector of the interrupted slice in the historical case being higher than the similarity threshold. If a historical case that meets the conditions is matched, the test continuation execution instruction that has been successfully verified in the corresponding historical case is directly adopted. If no historical case is matched, the test continuation execution instruction is generated based on the optimized test sequence, starting from the first unexecuted test item after the breakpoint. According to the determined continuation test instruction, the system restores the communication connection with the test instrument, loads the corresponding instrument parameter set, and continues to execute the test process from the breakpoint. The continuation test case, which is assembled from the snapshot of the breakpoint context and the subsequent successfully restored and completed continuation test process, is stored in the historical continuation test case library.

[0030] Please see Figure 2 The present invention provides a technical solution: an automated testing system based on a relay protection device, the system comprising a data slicing fusion module, a test path transfer prediction module, a test item optimization module, and a context reconstruction iteration module; During relay protection testing, the data slicing and fusion module collects electrical timing data and device status signals in real time for different testing stages, processes the data to generate scene data units that can be independently stored and analyzed. The test path transition prediction module is used to extract historical scenario data units from persistent storage to construct a directed graph of test path transitions; and to predict the candidate set for subsequent stages based on the directed graph of test path transitions. The test project optimization module generates a list of candidate projects to be executed based on the predicted candidate set for subsequent stages and the current available resource set; it analyzes the resource conflict relationships between test projects and generates an optimized test sequence. The context reconstruction iteration module is used to extract the most recent complete scene data slice and its context information before the interruption when an abnormal interruption of the test process is detected, and reconstruct the test context at the breakpoint. By matching the context with historical successful test continuation cases, a continuation test execution instruction is generated, and the test is resumed from the breakpoint. At the same time, the interruption and recovery patterns are stored in the historical test continuation case library.

[0031] The data slicing and fusion module includes a data encapsulation unit, a stage feature analysis unit, and a slice storage unit; The data encapsulation unit is used to monitor the test process as it enters the preset test phase, record the three-phase current, voltage and the status of the open contacts of the protection device within the test phase time window, and encapsulate them into scene data slices. The stage feature analysis unit is used to extract key feature quantities that characterize the test stage from scene data slices, and form the feature vector corresponding to the test stage. The slice storage unit is used to associate scene data slices with their corresponding feature vectors, mark them with test phase identifiers and timestamps, and store them as scene data units.

[0032] The test path transition prediction module includes a stability feature analysis unit, a test path transition directed graph construction unit, and an evaluation prediction unit; The stability feature analysis unit is used to calculate the state stability index of key feature quantities in the feature vector for several slice samples of the same period in the historical database. The test path transition directed graph construction unit is used to traverse historical test records, transforming each complete test into a sequence of stages connected in execution order; based on all historical stage sequences, a test path transition directed graph is constructed. The evaluation prediction unit is used to compare the current feature vector with the average feature vector of the same test stage in history and calculate the deviation; combined with the edge weights of the current node in the directed graph of the test path transition, it predicts the candidate set of the subsequent stage.

[0033] The test item optimization module includes a list filtering unit and a sequence optimization unit; The list filtering unit is used to obtain the candidate set for subsequent stages and the set of currently available resources monitored in real time; based on the test project library, it filters out all test projects that meet the conditions; The sequence optimization unit is used to analyze the resource mutual exclusion relationships between different test items in the candidate list to be executed, and to identify test item pairs that cannot be executed in parallel or require resource reconfiguration; with the goal of minimizing the estimated total test time, a heuristic scheduling algorithm is used to sort the test items in the candidate list to be executed.

[0034] The context reconstruction iteration module includes a breakpoint context snapshot analysis unit and a context matching unit; The breakpoint context snapshot analysis unit is used to capture and save the system state at the moment of interruption when the system detects an abnormal interruption in the test process, and generate a breakpoint context snapshot. The context matching unit is used to match and retrieve the breakpoint context snapshot with the historical test continuation case library. The matching criteria include the consistency of the current test phase identifier and the similarity between the feature vector of the scene data slice and the feature vector of the interrupted slice in the historical case is higher than the similarity threshold. If a historical case that meets the conditions is matched, the test continuation execution instruction that has been successfully verified in the corresponding historical case is directly adopted. If no historical case is matched, the test continuation execution instruction is generated based on the optimized test sequence, starting from the first unexecuted test item after the breakpoint.

[0035] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, 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.

[0036] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.

Claims

1. An automated testing method based on relay protection devices, characterized in that, The method includes the following steps: During relay protection testing, electrical timing data and device status signals are collected in real time for different testing stages, and the data is processed to generate scenario data units that can be independently stored and analyzed. Extract historical scenario data units from persistent storage to construct a directed graph for test path transitions; Predict the candidate set for subsequent stages based on the directed graph of the test path transition; Based on the predicted candidate set for subsequent stages and the current available resource set, a list of candidate tests to be executed is generated; the resource conflict relationships between test items are analyzed, and an optimized test sequence is generated. When an abnormal interruption of the test process is detected, the system extracts the most recent complete scene data slice and its context information before the interruption time, and reconstructs the test context at the breakpoint. By matching the context with historical successful test cases, a test continuation execution instruction is generated, and the test is resumed from the breakpoint. At the same time, the interruption and resumption pattern is stored in the historical test case library.

2. The automated testing method based on relay protection devices according to claim 1, characterized in that: The candidate set for predicting subsequent stages includes: Extract several scene data units with the same stage identifier in history; extract at least one key feature from the feature vector of the historical scene data unit, and statistically analyze the value distribution of the key feature; based on the value distribution of the feature, calculate the information entropy of the key feature for the corresponding test stage, and denot it as the state stability index. Traverse the historical test records and transform each complete test into a sequence of stages connected in the execution order of several test stages; based on all historical stage sequences, construct a directed graph of test path transitions, where nodes are different test stages and the weight of the directed edges is the frequency of transitions where another test stage is executed immediately after the completion of a test stage in history. In the current testing process, whenever a scenario data unit and its feature vector corresponding to the current testing stage are generated, compliance indicator analysis and path prediction are performed to form a candidate set for the subsequent stages.

3. The automated testing method based on relay protection devices according to claim 2, characterized in that: The compliance indicator analysis and path prediction include: The current feature vector is compared with the average feature vector of the same testing phase in history, and the feature deviation is calculated by Euclidean distance. In the directed graph of the test path transition, locate the node corresponding to the current test stage, obtain all directed edges originating from the node and their weight sets, and based on the weight sets, predict and generate one or more subsequent test stages to form a candidate set of subsequent stages.

4. The automated testing method based on relay protection devices according to claim 3, characterized in that: The prediction generates one or more subsequent test phases using the highest weight method, threshold screening method, or probability ranking method; The highest weight method directly selects the subsequent test stage pointed to by the edge with the largest weight value in the weight set as the only prediction result; the threshold screening method selects the subsequent test stages pointed to by all edges with weights greater than or equal to a preset frequency threshold to form a candidate set of subsequent stages; the probability ranking method normalizes the weights of each directed edge and denoted as the transition probability. Select the one with the highest transition probability or the top several subsequent test stages arranged in descending order of probability to form a candidate set for subsequent stages.

5. The automated testing method based on relay protection devices according to claim 1, characterized in that: The generated optimized test sequence includes: A pre-built test project library, in which each test project is defined with: a set of pre-test stages or conditions that must be met to execute the test project, and a set of hardware and logic resources that must be used to execute the test project; Obtain the candidate set for subsequent stages and the set of currently available resources monitored in real time; based on the test project library, filter out all test projects that meet the conditions; wherein the conditions are that the prerequisite for the test project is a subset of the candidate set for subsequent stages and all resources required by the test project are currently available; summarize all test projects that meet the conditions to form a candidate list to be executed; Analyze the resource mutual exclusion relationships between different test items in the candidate list to be executed, and identify test item pairs that cannot be executed in parallel or require resource reconfiguration; with the optimization objective of minimizing the estimated total test time, use a heuristic scheduling algorithm to sort the test items in the candidate list to be executed, and insert necessary resource reconfiguration instructions between the test items in the sorted sequence; generate an optimized test sequence and its corresponding instrument parameter set.

6. The automated testing method based on relay protection devices according to claim 1, characterized in that: The storage of recovery test and historical test cases includes: When the system detects an abnormal interruption in the test process, it captures and saves the system state at the moment of the interruption and generates a breakpoint context snapshot. The breakpoint context snapshot is matched and retrieved with the historical test case library; if a matching historical case is found, the test execution instruction that has been successfully verified in the corresponding historical case is directly adopted; if no matching historical case is found, the test execution instruction is generated based on the optimized test sequence, starting from the first unexecuted test item after the breakpoint. According to the determined continuation test instruction, the system restores the communication connection with the test instrument, loads the corresponding instrument parameter set, and continues to execute the test process from the breakpoint. The continuation test case, which is assembled from the snapshot of the breakpoint context and the subsequent successfully restored and completed continuation test process, is stored in the historical continuation test case library.

7. The automated testing method based on a relay protection device according to claim 6, characterized in that: The breakpoint context snapshot includes at least: the last scene data slice that was fully generated before the interruption, the current test phase identifier at the time of the interruption, all test phase sequences that were successfully executed from the start of the test to the time of the interruption, and the optimized test sequences that were planned but not yet completed before the interruption.

8. The automated testing method based on relay protection devices according to claim 1, characterized in that: The matching criteria include the consistency of the current test phase identifier and the similarity between the feature vector of the scene data slice and the feature vector of the interrupted slice in historical cases being higher than the similarity threshold.

9. The automated testing method based on relay protection devices according to claim 1, characterized in that: The generated scene data units that can be independently stored and analyzed include: The system monitors the automated testing process of relay protection in real time. When the process enters the preset test stage, it triggers test data acquisition and records the three-phase current, three-phase voltage, and all open contact status of the protection device under test within the time window from the start time to the end time of the test stage. The system synchronizes and binds the timing data of the three-phase current, three-phase voltage, and open contact status within the time window and encapsulates them into scene data slices. From the scene data slices, key feature quantities characterizing the test phase are extracted to form the feature vector corresponding to the test phase; wherein, the extracted key feature quantities include, but are not limited to: the three-phase current steady-state value obtained based on the end of the scene data slice or a preset steady-state point, the maximum transient current peak value identified by scanning the current waveform within the scene data slice, the protection action time identified and calculated based on the open contact state sequence, and the state change sequence obtained by encoding the open contact state change logic within the scene data slice. The scene data slices are associated with their corresponding feature vectors, and the test phase identifier and timestamp are marked and stored as scene data units.

10. An automated testing system based on a relay protection device, wherein the system is applied to the automated testing method based on a relay protection device as described in any one of claims 1-9, characterized in that, The system includes a data slicing and fusion module, a test path transition prediction module, a test item optimization module, and a context reconstruction and iteration module; During relay protection testing, the data slicing and fusion module collects electrical timing data and device status signals in real time for different testing stages, processes the data to generate scene data units that can be independently stored and analyzed. The test path transition prediction module is used to extract historical scene data units from persistent storage to construct a directed graph of test path transitions; Predict the candidate set for subsequent stages based on the directed graph of the test path transition; The test project optimization module generates a list of candidate projects to be executed based on the predicted candidate set for subsequent stages and the currently available resource set; it analyzes the resource conflict relationships between test projects and generates an optimized test sequence. The context reconstruction iteration module is used to extract the most recent complete scene data slice and its context information before the interruption when an abnormal interruption of the test process is detected, and reconstruct the test context at the breakpoint. By matching the context with historical successful test continuation cases, a test continuation execution instruction is generated, and the test is resumed from the breakpoint. At the same time, the interruption and recovery patterns are stored in the historical test continuation case library.