Dynamic priority-based relay protection automatic test sequence optimization method and system

By using a dynamic priority scheduling mechanism to monitor resource status in real time and calculate priority scores, the problems of low resource utilization and poor adaptability to dynamic environments in relay protection testing are solved, and efficient and flexible test sequence optimization is achieved.

CN122264358APending Publication Date: 2026-06-23HUBEI QINGJIANG HYDROPOWER DEV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUBEI QINGJIANG HYDROPOWER DEV
Filing Date
2026-02-24
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Existing relay protection testing technologies suffer from low resource utilization, static optimization failing to adapt to dynamic environmental changes, high computational overhead of complex algorithms, and lack of dynamic response to logical constraints, resulting in low testing efficiency.

Method used

A test sequence optimization method based on dynamic priority is adopted. By monitoring the resource status in real time, calculating the dynamic priority score, and dynamically scheduling test tasks, parallel execution of tasks and seamless resource integration are achieved.

Benefits of technology

It significantly improves testing efficiency and resource utilization, enhances the dynamic adaptability and robustness of the system, reduces computational complexity, and improves the versatility and platform compatibility of the method.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122264358A_ABST
    Figure CN122264358A_ABST
Patent Text Reader

Abstract

The application discloses a dynamic-priority-based relay protection automatic test sequence optimization method and system, and belongs to the technical field of power relay protection. n S1, test task modeling and parameterization; the test case to be executed is modeled into a task set, n the total number of tasks, and multi-dimensional feature parameters are defined for each task; S2, real-time monitoring of system resource state; in the test execution process, the resource state vector of the test platform is continuously acquired; S3, dynamic priority calculation and task selection; according to the current resource state and task parameters, the dynamic priority scores of the executable candidate set and each ready task are calculated, and the task with the highest score is selected for execution; S4, task execution and state updating; S5, loop iteration, steps S2 to S4 are repeated until all tasks are executed. By introducing the dynamic priority scheduling mechanism, the contradiction between the static preset of the test sequence and the dynamic change of the test resources is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power relay protection technology, specifically to a method and system for optimizing automatic test sequences for relay protection based on dynamic priority. Background Technology

[0002] Relay protection devices are the safety guardians of power systems, and their correct operation is crucial. Therefore, before commissioning and during regular maintenance, a relay protection tester must be used to perform comprehensive and rigorous functional logic verification. With the development of intelligent power plants, "one-click" automatic testing has become an industry trend, aiming to transform the traditional testing work, which relies on manual experience and takes several days, into a standardized process that is automatically completed by the testing system.

[0003] Currently, existing technologies in the field of automatic relay protection testing mainly focus on the automatic generation of test schemes and the application of specific optimization algorithms. Typical applications can be divided into the following categories: 1. Test schemes based on manual editing and fixed sequences (Shao Lei. Research on Intelligent Generation Technology of Test Schemes for Relay Protection Devices [D]. Southeast University, 2018.): Although this type of automatic test system for relay protection devices achieves automation of the testing process, the generation of its test schemes (test case sequences) heavily relies on manual labor. Testers need to manually edit and develop test schemes on a secondary development platform based on the functional configuration, protection principle, and testing principle of the protection device. The test sequences generated in this way are usually fixed and unchanging. The system strictly follows this preset order when executing tests and lacks the ability to dynamically adjust during execution. 2. Biomimetic test sequence optimization based on improved whale algorithm (Publication No. CN119064688A, On-site rapid testing method for protection devices based on improved whale algorithm): This patent technology proposes an on-site rapid testing method for protection devices based on an improved whale algorithm. This scheme extracts common features from multi-configuration protection tests, packages test sub-modules, and uses an improved whale optimization algorithm (introducing mutation operations) to globally optimize the execution order of the test packages, aiming to minimize test time. This method focuses on statically optimizing the entire test sequence in the cloud before testing begins. 3. An automatic testing method based on LSTM neural networks (Publication No. CN120722097A, Method and System for Automatic Testing of Substation Relay Protection Functions): This recently published patent technology relates to a method and system for automatic testing of substation relay protection functions. This technical solution utilizes a Long Short-Term Memory (LSTM) neural network to optimize and predict the internal action logic output results of the relay protection device under the influence of test signals, and integrates static detection and adaptive detection mechanisms to evaluate the stability of the function.

[0004] While the aforementioned existing technologies have advanced the automation of relay protection testing to some extent, they still suffer from the following inherent defects and shortcomings, which are the core problems that this invention aims to solve: 1. Fixed sequence testing mode leads to low resource utilization and efficiency bottlenecks: Because the real-time resource status (such as channel occupancy) during execution cannot be predicted when the test sequence is compiled, even if there are idle channels in the system, subsequent tasks cannot be inserted due to the fixed sequence. This is a static limitation stemming from the design concept, essentially a lack of perception and response capability to dynamic information during the testing process. Its optimization goal is the theoretical optimum under a single environment before testing, which cannot cope with dynamic disturbances in field testing, such as unexpected timeouts of individual tests or temporary failures of some channels. Therefore, its optimization results often fail in practical applications. 2. Static optimization algorithms cannot adapt to real-time changing testing environments: Although methods such as the improved whale algorithm optimize the sequence before testing, the optimization results are static and cannot be adjusted according to the actual system state once the test begins. The environment and equipment status at the testing site are dynamically changing. Static optimization sequences cannot respond to situations such as unexpected timeouts of test cases or temporary failures of some resources, resulting in poor flexibility and potentially significantly reduced optimization effectiveness in complex real-world application scenarios. 3. Complex algorithms have high computational overhead and rely on historical data: LSTM neural network-based solutions rely on a large amount of high-quality historical data for model training and prediction, leading to high data acquisition costs and limited universality in practical applications. Furthermore, the computational overhead of such complex models is significant, potentially unsuitable for field testing scenarios with high real-time requirements. More importantly, this technology primarily focuses on optimizing and evaluating the internal action logic of the device, without addressing the dynamic optimization of the test task execution sequence itself, which is crucial for improving testing efficiency. 4. Crucially, relay protection test tasks involve complex logical and temporal dependencies, far exceeding a simple "task list." For example, the verification of certain protection functions (such as the coordination logic test of "reclosing" and "overcurrent protection") requires that their sub-tests (such as "fault current application" and "voltage recovery") be performed continuously and without interval on the same group or specific channels to simulate real power system transient processes. Furthermore, the channel requirements of test tasks are not only "occupancy" but also involve "signal type coordination" requirements (e.g., a task requires simultaneous output of voltage and current channels of the same phase to simulate power direction protection). Existing static optimization or fixed sequence methods cannot perceive and respond to these deep-seated, dynamically changing logic and coordination constraints, resulting in either the inability to correctly complete logic verification or a large number of channels being idle and waiting to meet constraints, leading to inefficiency. Summary of the Invention

[0005] The technical problem to be solved by the present invention is to provide a method and system for optimizing automatic test sequences for relay protection based on dynamic priority, so as to solve the defects existing in the current relay protection test.

[0006] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: The method for optimizing automatic test sequences for relay protection based on dynamic priority includes the following steps: S1. Test Task Modeling and Parameterization: Modeling the test cases to be executed as a set of tasks. , n For the total number of tasks, and for each task Define multidimensional feature parameters, including estimated time. Resource demand vector and static priority and logical group identifier ; S2. Real-time monitoring of system resource status; continuously acquiring the resource status vector of the test platform during test execution. ,in Indicates the first Each tester output channel at time Available status, This indicates that the channel is idle. This indicates that the channel is occupied, and the resource status vector information provides a basis for dynamic scheduling decisions; S3. Dynamic Priority Calculation and Task Selection: Calculate the executable candidate set based on the current resource status and task parameters. and dynamic priority scores for each ready task And select the task with the highest score to execute; S4. Task Execution and Status Update: Execute the selected task and update the system resource status. S5: Iterate through the loop, repeating steps S2 to S4 until all tasks are completed.

[0007] The estimated time for step S1 above is [not specified]. The meaning is: Complete the task The estimated time required, in seconds (s). It can be preset based on historical test data or experience values; Resource demand vector The meaning is: Representation task The requirements for each output channel of the test platform can be expressed as: ,in This refers to the total number of channels managed by the system. Indicates task For the first The demand intensity of each channel is 0 if the channel is not needed, and can be defined as the rated output percentage or binary flag if it is needed. Static priority The meaning is: Based on the fixed priority weights pre-assigned according to the importance of relay protection functions, the value range is... A higher value indicates a more critical function; Logical group identifier Used to identify logical dependencies between tasks: If Indicates that the task is independent, if If it is greater than 0, it indicates a task. and Those belonging to the same logical group need to be scheduled and executed consecutively.

[0008] In step S3 above, the candidate set can be executed. The construction process is as follows: 1) The system first starts from the set of ready tasks. Filter out resource matching degree The tasks constitute an executable candidate set. : ; Resource matching degree function The calculation method is as follows: ; Among them, "a channel that meets the conditions" refers to a channel that is required by the task and is currently in an idle state; Specifically, traversing the resource demand vector Each element, if And the corresponding If a channel meets the condition, it is counted as a "satisfied" channel; ultimately, the matching degree is the sum of the number of channels that meet the condition and the task. The ratio of the total number of channels required; 2) Judgment and processing of candidate sets; if the candidate set If the value is empty, it indicates that there is no task that can be executed immediately. The system enters a waiting state until a task is completed and resources are released, at which point a new round of scheduling is triggered and the system returns to step S2. If candidate set Not empty, the system selects the candidate set Each task Calculate its dynamic priority score.

[0009] The above dynamic priority score The calculation model is as follows: ; in, :Task The dynamic priority score indicates that the higher the score, the higher the priority of executing the task in the current system state. These are the time consumption weight, resource matching weight, and static priority weight, respectively. This is the reciprocal of the estimated time.

[0010] In the preferred embodiment, the aforementioned dynamic priority score The calculation model is as follows: ; in, :Task The dynamic priority score indicates that the higher the score, the higher the priority of executing the task in the current system state. , , , These are weights for time consumption (greater than zero), resource matching, static priority, and logical continuity, respectively. This is the reciprocal of the estimated time. For a logical continuity function based on scheduling history, when the task The function returns a positive reward when the task belongs to the same logical group as the most recently completed task.

[0011] The above logical continuity function The implementation method is as follows: If task If it belongs to the same logical group as the most recently completed task, then ; otherwise, ;in, The continuous reward coefficient refers to the number of overlapping channels in a task. The number of intersections between the required channels and the channels released by the most recently completed task.

[0012] The above estimated time This is obtained through statistical analysis of historical execution data from similar test tasks or by pre-setting values ​​based on experience.

[0013] The above weights , , , These are adjustable parameters that can be configured according to actual testing needs.

[0014] The specific process of step S4 above includes: The system executes the selected task. During execution, based on the resource requirement vector of the task. The system marks the status of the corresponding channel as "occupied," that is, it marks the channel as "occupied." Set the element at the corresponding position in the middle to 1); after the task is completed, release all the channel resources it occupies, that is, reset the corresponding channel state to 0.

[0015] In step S4 above, the system resource state vector Updates can be performed at set intervals or triggered immediately when task start or end events occur.

[0016] The specific process of step S5 above is as follows: Return to step S2, based on the latest system resource status. And the remaining set of ready tasks, recalculate the dynamic priority score and select the next task, until all test tasks have been executed.

[0017] The system using the above-described dynamic priority-based automatic test sequence optimization method for relay protection includes the following components: The task modeling module is used to perform the test task modeling and parameterization steps. The status monitoring module is used to perform the real-time monitoring steps of the system resource status; The dynamic scheduling module is used to perform the dynamic priority calculation and task selection steps; The task execution module is used to execute the task execution and status update steps; The loop control module is used to control the loop iteration process.

[0018] The aforementioned dynamic scheduling module includes: Candidate set construction unit, used to build executable candidate sets; The score calculation unit is used to calculate the dynamic priority score of each task; The task selection unit is used to select the task with the highest score as the next task to be executed.

[0019] The present invention discloses a method and system for optimizing automatic test sequences for relay protection based on dynamic priority. By introducing a "dynamic priority scheduling mechanism," it resolves the contradiction between the static preset of test sequences and the dynamic changes in test resources. This is not simply applying a scheduling algorithm to a new field, but rather, for the specific scenario of fixed relay protection test resource channel types and strong channel dependence of tasks, a specific model integrating task time, real-time resource matching degree, and static priority is designed. It has the following beneficial effects: 1. Significantly improves testing efficiency and resource utilization. By monitoring system resource status in real time and calculating dynamic priorities, this invention can intelligently schedule test tasks, enabling multiple independent channels to be used in parallel or efficiently connected, avoiding channel idleness caused by resource conflicts in traditional fixed sequences. Through dynamic scheduling, parallel execution of test tasks and seamless resource connection are achieved. In the scenario shown in the embodiment, the total test time is reduced compared to the traditional fixed sequence.

[0020] 2. Enhanced dynamic adaptability and robustness of the testing system. This invention no longer relies on static, pre-optimized sequences, but can respond in real time to changes in system state, such as task timeouts and channel failures, during test execution. This dynamic scheduling mechanism gives the system good fault tolerance, automatically adjusting the execution sequence even when some resources are temporarily unavailable, ensuring the continuous progress of the test process.

[0021] 3. A good balance is achieved between optimization effect and computational complexity. The dynamic priority calculation model adopted in this invention has a clear structure and adjustable parameters, and its computational overhead is far lower than that of schemes based on complex neural networks such as LSTM. This lightweight algorithm does not rely on massive historical data, is easy to deploy and implement in field testing environments, and reduces the technical threshold and application cost.

[0022] 4. Improved method versatility and platform compatibility. This invention, through standardized parametric modeling of test tasks and scheduling decisions based on universal resource state vectors, enables the method to be adapted to relay protection testers and protection devices from different manufacturers and of different models, demonstrating good prospects for promotion and industry application value.

[0023] Due to the adoption of a real-time resource matching degree The system's scheduling strategy allows it to proactively select the task best suited to the currently available idle channel for execution, significantly reducing the time tasks are blocked while waiting for resources and improving channel utilization. These technical effects, particularly the improved resource utilization and adaptability to dynamic environments, are unattainable by existing techniques using static optimization or fixed sequences. Attached Figure Description

[0024] The present invention will be further described below with reference to the accompanying drawings and embodiments: Figure 1 This is a flowchart illustrating the automatic test sequence optimization method for relay protection based on dynamic priority according to the present invention. Detailed Implementation

[0025] To better understand the purpose, system architecture, and functional implementation of this embodiment, the embodiments and features in the embodiments of this application can be combined with each other without conflict. The exemplary embodiments disclosed in this application will be described below with reference to the accompanying drawings, which include specific technical details disclosed in this embodiment to aid understanding; however, these details should be considered exemplary rather than restrictive. Therefore, those skilled in the art should understand that various improvements and adjustments can be made to the embodiments described herein without departing from the scope and core ideas of the invention. Similarly, for clarity, detailed descriptions of well-known technologies, functions, and structures (such as standard image processing algorithms and common communication protocols) are omitted in the following description.

[0026] The method for optimizing automatic test sequences for relay protection based on dynamic priority includes the following steps: S1. Test Task Modeling and Parameterization: Modeling the test cases to be executed as a set of tasks. , n For the total number of tasks, and for each task Define multidimensional feature parameters, including estimated time. Resource demand vector and static priority and logical group identifier ; S2. Real-time monitoring of system resource status; continuously acquiring the resource status vector of the test platform during test execution. ,in Indicates the first Each tester output channel at time Available status, This indicates that the channel is idle. This indicates that the channel is occupied, and the resource status vector information provides a basis for dynamic scheduling decisions; S3. Dynamic Priority Calculation and Task Selection: Calculate the executable candidate set based on the current resource status and task parameters. and dynamic priority scores for each ready task And select the task with the highest score to execute; S4. Task Execution and Status Update: Execute the selected task and update the system resource status. S5: Iterate through the loop, repeating steps S2 to S4 until all tasks are completed.

[0027] The estimated time for step S1 above is [not specified]. The meaning is: Complete the task The estimated time required, in seconds (s). It can be preset based on historical test data or experience values; Resource demand vector The meaning is: Representation task The requirements for each output channel of the test platform can be expressed as: ,in The total number of channels managed by the system (including voltage channels and current channels); Indicates task For the first The demand intensity of each channel is 0 if the channel is not needed, and can be defined as the rated output percentage or binary flag (0 / 1) if it is needed. Static priority The meaning is: Based on the fixed priority weights pre-assigned according to the importance of relay protection functions, the value range is... A higher value indicates a more critical function.

[0028] In step S3 above, the candidate set can be executed. The construction process is as follows: 1) The system first starts from the set of ready tasks. Filter out resource matching degree The tasks constitute an executable candidate set. : ; Resource matching degree function The calculation method is as follows: ; Among them, "a channel that meets the conditions" refers to a channel that is required by the task and is currently in an idle state; Specifically, traversing the resource demand vector Each element, if (This indicates that the task requires this channel) and the corresponding If a channel is currently idle, it is counted as a "satisfied" channel. Ultimately, the matching degree is calculated as the number of channels that meet the conditions and the number of tasks. Total number of channels required (i.e.) The ratio of the number of non-zero elements in the resource pool; this function ensures that the task whose resource demand best matches the current available resources will receive higher priority, thereby effectively utilizing the hardware and reducing resource conflicts and waiting.

[0029] 2) Judgment and processing of candidate sets; if the candidate set If the value is empty, it indicates that there is no task that can be executed immediately (all ready tasks are blocked due to insufficient resources). The system enters a waiting state until a task is completed and releases resources, then a new round of scheduling is triggered and the system returns to step S2. If candidate set Not empty, the system selects the candidate set Each task Calculate its dynamic priority score.

[0030] The above dynamic priority score The calculation model is as follows: ; in, :Task The dynamic priority score indicates that the higher the score, the higher the priority of executing the task in the current system state. These are the time consumption weight, resource matching weight, and static priority weight, respectively. This is the reciprocal of the estimated time.

[0031] In the preferred embodiment, the aforementioned dynamic priority score The calculation model is as follows: ; in, :Task The dynamic priority score indicates that the higher the score, the higher the priority of executing the task in the current system state. , , , These are weights for time consumption (greater than zero), resource matching, static priority, and logical continuity, respectively. This is the reciprocal of the estimated time. For a logical continuity function based on scheduling history, when the task The function returns a positive reward when the task belongs to the same logical group as the most recently completed task.

[0032] These weighting coefficients are adjustable parameters with a value greater than zero, used to balance the importance of different optimization objectives, and can be configured according to actual testing needs. For example, if the testing environment prioritizes completing a large number of tests quickly, the weighting of time consumption can be appropriately increased. (e.g., set to 0.6); If the test platform channel resources are scarce and resource utilization needs to be maximized, the resource matching weight can be increased. (e.g., set to 0.5); if the protection device under test has a clear core function that needs to be prioritized, the static priority weight should be increased. . This is the reciprocal of the estimated execution time. This design aims to award higher scores to tasks with shorter execution times, thus prioritizing their execution and helping to quickly complete smaller tasks, thereby improving system throughput.

[0033] The above logical continuity function The implementation method is as follows: If task If it belongs to the same logical group as the most recently completed task, then ; otherwise, ;in, The continuous reward coefficient refers to the number of overlapping channels in a task. The number of intersections between the required channels and the channels released by the most recently completed task.

[0034] The above estimated time This is obtained through statistical analysis of historical execution data from similar test tasks or by pre-setting values ​​based on experience.

[0035] The above weights , , , These are adjustable parameters that can be configured according to actual testing needs.

[0036] The specific process of step S4 above includes: The system executes the selected task. During execution, based on the resource requirement vector of the task. The system marks the status of the corresponding channel as "occupied," that is, it marks the channel as "occupied." Set the element at the corresponding position in the middle to 1); after the task is completed, release all the channel resources it occupies, that is, reset the corresponding channel state to 0.

[0037] In step S4 above, the system resource state vector Updates can be performed at set intervals or triggered immediately when task start or end events occur.

[0038] The specific process of step S5 above is as follows: Return to step S2, based on the latest system resource status. And the remaining set of ready tasks, recalculate the dynamic priority score and select the next task, until all test tasks have been executed.

[0039] The system using the above-described dynamic priority-based automatic test sequence optimization method for relay protection includes the following components: The task modeling module is used to perform the test task modeling and parameterization steps. The status monitoring module is used to perform the real-time monitoring steps of the system resource status; The dynamic scheduling module is used to perform the dynamic priority calculation and task selection steps; The task execution module is used to execute the task execution and status update steps; The loop control module is used to control the loop iteration process.

[0040] The aforementioned dynamic scheduling module includes: Candidate set construction unit, used to build executable candidate sets; The score calculation unit is used to calculate the dynamic priority score of each task; The task selection unit is used to select the task with the highest score as the next task to be executed.

[0041] Example 1: This embodiment uses the periodic maintenance of the generator-transformer unit protection system of a hydropower plant as an example, and takes common protection function tests as examples to specifically illustrate the implementation process of the method of the present invention. This generator-transformer unit protection system needs to complete a series of relay protection tests. The following description uses the tests of four core functions—differential protection, overcurrent protection, overvoltage protection, and overload protection—as examples. The executing entity of the method (such as a host computer) interacts with the relay protection tester through specific communication protocols such as IEC 61850 and Modbus to exchange commands and data, thereby controlling the output of the voltage / current channels of the tester and obtaining the status information of the channels.

[0042] Detailed Explanation of Protection Types and Channel Requirements In relay protection testing, different protection principles determine the type and number of analog signal channels that the testing instruments need to provide. Taking four common types of protection as examples: ① Differential protection: This compares the vector sum of the currents on each side of the protected equipment. It is the main protection and has a fast operating speed. It requires at least two current channels to simulate the currents on both sides of the protected equipment.

[0043] ② Overcurrent protection: This protection activates when the current exceeds a set value and serves as a backup protection. Typically, only one current path is needed to simulate the fault current.

[0044] ③ Overvoltage protection: Activates when the voltage exceeds a set value. A voltage channel is required to simulate abnormal voltage conditions.

[0045] ④ Overload protection: Monitors power To prevent overheating, it typically features inverse-time characteristics. Since both voltage and current need to be measured simultaneously, at least one voltage channel is required. and a current channel .

[0046] The specific steps are as follows: 1. Test Task Modeling and Parameterization Let the set of test tasks be These correspond to differential protection, overcurrent protection, overvoltage protection, and overload current testing, respectively. The test platform has four independent channels: two current channels ( , ) and 2 voltage channels ( , ).

[0047] The parameter configurations for each task are as follows: ① Differential protection : Estimated time: Second; Resource demand vector: It requires current channels C1 and C2; Static priority: ; Logical group identifier: This is an independent task with no logical dependencies; ② Overcurrent protection

[0048] Estimated time: Second; Resource demand vector: Only the C1 current path is required; Static priority: ; Logical group identifier: This is an independent task with no logical dependencies; ③ Overvoltage protection

[0049] Estimated time: Second; Resource demand vector: V1 and V2 voltage channels are required; Static priority: ; Logical group identifier: This is an independent task with no logical dependencies; ④ Overload protection

[0050] Estimated time: Second; Resource demand vector: It requires a C2 current path and a V2 voltage path; Static priority: ; Logical group identifier: This is an independent task with no logical dependencies; 2. Weighting coefficient configuration Based on power plant testing experience, and considering that the test tasks in this embodiment are independent of each other, the weighting coefficients are configured as follows: Weighting coefficient configuration Time consumption weight: ; Resource matching weight: ; Static priority weights: ; Logical continuity weight: , or because All values ​​are 0, so this item does not affect the scheduling result.

[0051] 3. Dynamic scheduling process Initial state: All channels are idle; system state vector ; Formula Explanation: The fraction calculation in Example 1 is based on the complete formula. This is a special case where the test tasks in this embodiment are independent of each other.

[0052] First round of scheduling: Executable candidate set at this stage If the set is not empty, calculate the dynamic priority score for each task.

[0053] ① Differential protection Fraction calculation: ; ② Overcurrent protection Fraction calculation: ; ③ Overvoltage protection Fraction calculation:

[0054]

[0055] ; ④ Overload protection Fraction calculation:

[0056]

[0057] ; Select the differential protection with the highest score. Execute and update system status ; Second round of scheduling: Differential protection During execution, system status At this point, the candidate set can be executed. Not an empty set (overvoltage protection) Overload protection (If the resource matching requirement is met), calculate the score for the remaining tasks.

[0058] ① Overcurrent protection Fraction calculation: ;

[0059]

[0060] ; ② Overvoltage protection Fraction calculation: ;

[0061]

[0062] ; ③ Overload protection Fraction calculation: ;

[0063]

[0064] ; Select the overvoltage protection with the highest score. Execute and update system status ; Third round of dispatch: Overvoltage protection Complete the process (after 150 seconds), then release the voltage channel. System status updated to ; Due to differential protection Still running and occupying all current channels, overcurrent protection activated. and overload protection If the resource matching degree is still 0, the candidate set can be executed. The system is empty and awaits differential protection. Finish.

[0065] Fourth round of dispatch: Differential protection Complete (after 300 seconds), release all current channels; System status updated to At this point, the candidate set can be executed. Not an empty set, overcurrent protection Overload protection The resource matching degree meets the requirements; Overcurrent protection : ; Overload protection : ; Select overload protection with a higher score. implement; Fifth round of dispatching: Overload protection After completion (420 seconds later), execute the final overcurrent protection. (Overcurrent protection).

[0066] Final execution sequence:

[0067] Indicates that Parallel execution, specifically, and Execution starts in parallel from time 0. Completed in 150 seconds. Completed in 300 seconds, then executed sequentially. and .

[0068] Traditional fixed sequences: ; Comparison of effects: Total time for traditional sequence: 300 + 180 + 150 + 120 = 750 seconds; The total time taken by this method is: 300 + 120 + 180 = 600 seconds. (parallel execution) Efficiency improvement: (750 - 600) / 750 = 20%; It should be noted that in actual maintenance work, the number of protections that need to be tested and verified is far greater than the four types mentioned above (including but not limited to stator grounding protection, rotor grounding protection, excitation circuit single-point grounding, two-point grounding protection, transformer zero-sequence protection, generator out-of-step protection, generator inter-turn protection, generator reverse power protection, and generator loss of excitation protection). The test platform also often has more independent channels (current or voltage channels). For example, in the relay protection test project being carried out at a hydropower station in Central China, the test platform can be easily configured with 18 voltage channels, 30 current channels, or more, and can be expanded to 128 voltage channels and 128 current channels. The example only illustrates a relatively simple case of 4 channels. The specific situation will be more complex, but the principle is similar.

[0069] It should be noted that this embodiment demonstrates when all test tasks are independent of each other. When =0, the method of this invention optimizes resource utilization and improves testing efficiency through dynamic priority scheduling, demonstrating its fundamental principle and significant effect. When a task group with logical dependencies exists as described in Example 2, by setting... and This invention can further ensure the continuity of test logic.

[0070] Example 2: ( , ) and 2 voltage channels ( , ).

[0071] 1. Scene Description Test the coordination logic between the "reclosing" and "post-acceleration overcurrent protection" of a certain line protection system. This logic needs to simulate the complete process of a permanent line fault. ①Step A (Fault): Simulate a permanent line fault by applying a fault current (current path required). ).

[0072] ② Step B (Trip and Reclosing): After the protection trips, simulate the circuit breaker reclosing (this step mainly involves logic judgment, requiring only a small voltage signal to verify the continuity of the channel, thus occupying the voltage channel). (Extremely short time).

[0073] ③ Step C (Post-acceleration fault): Simulate overlap with the permanent fault and apply the fault current again (to ensure logic continuity, the current should be in phase with that in step A; ideally, the same current path should be used). ).

[0074] The problem with traditional testing methods: a fixed sequence might be listed as A → B → C. If A is completed, When the channel is idle, the system executes B (occupied) according to a fixed sequence. At this point, even Even when idle, C cannot execute because it must wait for the preceding step B in the same logic group to complete. This creates a channel. The idle time while waiting for B to complete is longer if B is interrupted by other long tasks.

[0075] 2. Task Modeling (Method of this Invention)

[0076] Note: Resource demand vectors are arranged according to... The system is calculated based on the sequence of having two current channels and two voltage channels.

[0077] 3. Weighting coefficient configuration Time consumption weight:

[0078] Resource matching weight:

[0079] Static priority weights:

[0080] Logical continuity weight:

[0081] Continuous reward coefficient:

[0082] 4. Dynamic scheduling process Initial state: All channels are idle; system state vector Tasks A, B, and C are all in the ready state, with A and C belonging to the same logical group. ).

[0083] First round of scheduling: All tasks have a resource matching degree of 1. Calculate the dynamic priority score:

[0084]

[0085]

[0086]

[0087] Second round of scheduling (after A is completed): Complete, release channel System status Ready tasks include... and Calculate the score:

[0088]

[0089] Key points: Received a continuity bonus of 0.4 (because of the one just completed) Same logic group, and requires the same channel This makes .

[0090] The system selects the highest score. Execution, implementation and Using the same channel continuously This perfectly maintains electrical continuity.

[0091] Third round of scheduling (after C is completed): Complete, release channel Execute the final .

[0092] Final execution sequence:

[0093] Total time: 60 + 45 + 5 = 110 seconds (of which It can run in parallel with other tasks, but for simplicity, it is executed sequentially here.

Claims

1. A method for optimizing automatic test sequences for relay protection based on dynamic priority, characterized in that, Includes the following steps: S1. Test Task Modeling and Parameterization: Modeling the test cases to be executed as a set of tasks. , n For the total number of tasks, and for each task Define multidimensional feature parameters, including estimated time. Resource demand vector and static priority and logical group identifier ; S2. Real-time monitoring of system resource status; continuously acquiring the resource status vector of the test platform during test execution. ,in Indicates the first Each tester output channel at time Available status, This indicates that the channel is idle. This indicates that the channel is occupied, and the resource status vector information provides a basis for dynamic scheduling decisions; S3. Dynamic Priority Calculation and Task Selection: Calculate the executable candidate set based on the current resource status and task parameters. and dynamic priority scores for each ready task And select the task with the highest score to execute; S4. Task Execution and Status Update: Execute the selected task and update the system resource status. S5: Iterate through the loop, repeating steps S2 to S4 until all tasks are completed.

2. The method for optimizing automatic test sequences for relay protection based on dynamic priority according to claim 1, characterized in that, In step S1, the estimated time is... The meaning is: Complete the task The estimated time required, in seconds (s). It can be preset based on historical test data or experience values; Resource demand vector The meaning is: Representation task The requirements for each output channel of the test platform can be expressed as: ,in This refers to the total number of channels managed by the system. Indicates task For the first The demand intensity of each channel is 0 if the channel is not needed, and can be defined as the rated output percentage or binary flag if it is needed. Static priority The meaning is: Based on the fixed priority weights pre-assigned according to the importance of relay protection functions, the value range is... A higher value indicates a more critical function; Logical group identifier Used to identify logical dependencies between tasks: If Indicates that the task is independent, if If it is greater than 0, it indicates a task. and Those belonging to the same logical group need to be scheduled and executed consecutively.

3. The method for optimizing automatic test sequences for relay protection based on dynamic priority according to claim 2, characterized in that, In step S3, the executable candidate set The construction process is as follows: 1) The system first starts from the set of ready tasks. Filter out resource matching degree The tasks constitute an executable candidate set. : ; Resource matching degree function The calculation method is as follows: ; Among them, "a channel that meets the conditions" refers to a channel that is required by the task and is currently in an idle state; Specifically, traversing the resource demand vector Each element, if And the corresponding If a channel meets the condition, it is counted as a "satisfied" channel; ultimately, the matching degree is the sum of the number of channels that meet the condition and the task. The ratio of the total number of channels required; 2) Judgment and processing of candidate sets; if the candidate set If the value is empty, it indicates that there is no task that can be executed immediately. The system enters a waiting state until a task is completed and resources are released, at which point a new round of scheduling is triggered and the system returns to step S2. If candidate set Not empty, the system selects the candidate set Each task Calculate its dynamic priority score.

4. The method for optimizing automatic test sequences for relay protection based on dynamic priority according to claim 3, characterized in that, The dynamic priority score The calculation model is as follows: ; in, :Task The dynamic priority score indicates that the higher the score, the higher the priority of executing the task in the current system state. These are the time consumption weight, resource matching weight, and static priority weight, respectively. This is the reciprocal of the estimated time.

5. The method for optimizing automatic test sequences for relay protection based on dynamic priority according to claim 3, characterized in that, The dynamic priority score The calculation model is as follows: ; in, :Task The dynamic priority score indicates that the higher the score, the higher the priority of executing the task in the current system state. , , , These are weights for time consumption (greater than zero), resource matching, static priority, and logical continuity, respectively. This is the reciprocal of the estimated time. For a logical continuity function based on scheduling history, when the task The function returns a positive reward when the task belongs to the same logical group as the most recently completed task.

6. The method for optimizing automatic test sequences for relay protection based on dynamic priority according to claim 5, characterized in that, The aforementioned logical continuity function The implementation method is as follows: If task If it belongs to the same logical group as the most recently completed task, then ; otherwise, ;in, The continuous reward coefficient refers to the number of overlapping channels in a task. The number of intersections between the required channels and the channels released by the most recently completed task.

7. The method for optimizing automatic test sequences for relay protection based on dynamic priority according to claim 1, characterized in that, The estimated time This is obtained through statistical analysis of historical execution data from similar test tasks or by pre-setting values ​​based on experience.

8. The method for optimizing automatic test sequences for relay protection based on dynamic priority according to claim 1, characterized in that, The specific process of step S4 includes: The system executes the selected task. During execution, based on the resource requirement vector of the task. The system marks the status of the corresponding channel as "occupied," that is, it marks the channel as "occupied." Set the element at the corresponding position in the middle to 1); after the task is completed, release all the channel resources it occupies, that is, reset the corresponding channel state to 0.

9. The method for optimizing automatic test sequences for relay protection based on dynamic priority according to claim 8, characterized in that, In step S4, the system resource state vector Updates can be performed at set intervals or triggered immediately when task start or end events occur.

10. The method for optimizing automatic test sequences for relay protection based on dynamic priority according to claim 1, characterized in that, The specific process of step S5 is as follows: Return to step S2, based on the latest system resource status. And the remaining set of ready tasks, recalculate the dynamic priority score and select the next task, until all test tasks have been executed.

11. A system using the automatic test sequence optimization method for relay protection based on dynamic priority as described in any one of claims 1-10, wherein the system is used to execute the automatic test sequence optimization method for relay protection based on dynamic priority, characterized in that the system include: The task modeling module is used to perform the test task modeling and parameterization steps. The status monitoring module is used to perform the real-time monitoring steps of the system resource status; The dynamic scheduling module is used to perform the dynamic priority calculation and task selection steps; The task execution module is used to execute the task execution and status update steps; The loop control module is used to control the loop iteration process.

12. The automatic test sequence optimization system for relay protection based on dynamic priority according to claim 11, characterized in that, The dynamic scheduling module includes: Candidate set building unit, used to build executable candidate sets. ; The score calculation unit is used to calculate the dynamic priority score for each task. ; The task selection unit is used to select the task with the highest score as the next task to be executed.

Citation Information

Patent Citations

  • Protection device on-site rapid test method based on improved whale algorithm

    CN119064688A

  • Method and system for automatically testing relay protection function of transformer substation

    CN120722097A