Method and system for testing of misoperation prevention logic and storage medium

By automatically generating test case sets and automatically executing anti-misoperation logic acceptance, the problem of large workload and low accuracy in on-site acceptance of substation secondary anti-misoperation functions has been solved, achieving efficient and accurate test results.

CN115309619BActive Publication Date: 2026-07-21ZHUHAI UNITECH POWER TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHUHAI UNITECH POWER TECHNOLOGY CO LTD
Filing Date
2021-05-07
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

The on-site acceptance of the secondary anti-misoperation function of substations is a large and complex task, and manual acceptance is difficult to guarantee coverage, resulting in low test accuracy.

Method used

By utilizing the substation data model and the error prevention verification engine, test case sets are automatically generated, error prevention system logic acceptance is automatically executed, and test reports are generated.

Benefits of technology

It has automated the error prevention testing process, reduced manual workload, and improved test accuracy and coverage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115309619B_ABST
    Figure CN115309619B_ABST
Patent Text Reader

Abstract

The application discloses a kind of anti-error logic test method and system and storage medium.The method comprises: initialization substation data model and anti-error checking engine, substation data model is obtained from microcomputer anti-error system, and substation data model includes primary model file and secondary point table file, and anti-error checking engine obtains anti-error logic rule from anti-error rule base;According to the generation rule of use case, anti-error checking engine is sent to generate anti-error use case test task, to automatically generate test case set;According to test case set, send the checking instruction of target operating equipment for testing to anti-error system;In the case where anti-error system responds checking instruction, the checking result returned by anti-error system is received;Based on the received checking result, the test conclusion of automatically generated target test case is generated.The application solves the technical problem that the test case provided by the related art is complex, the workload of executing use case is large and is easy to miss, thereby leading to lower test accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of substations, and more specifically, to a method and system for preventing logical errors in testing, as well as a storage medium. Background Technology

[0002] During the on-site acceptance of the secondary anti-malfunction function of the substation, due to the large number of devices involved in the secondary anti-malfunction and the complexity of the logic, the workload of manual acceptance is large, and it is difficult to guarantee the coverage of the acceptance.

[0003] Currently, the method for on-site acceptance of secondary anti-misoperation functions is as follows: First, analyze the anti-misoperation logic of the primary and secondary equipment in the substation and write acceptance test cases; then, based on the test cases, operate the equipment through the anti-misoperation system's interface by manually setting equipment status and simulating invoicing to perform secondary anti-misoperation verification, checking whether the verification results meet the expected logical constraints. Due to the large number of primary and secondary equipment in a substation and the complex cross-constraints between them, the acceptance test cases are enormous, making their writing and execution difficult. For example, a 100% coverage test at the 500kV Fuzhou substation requires 3599 test cases with a total of 177536 operational details. Using the current acceptance method requires highly skilled personnel, is extremely time-consuming, and prone to omissions.

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

[0005] This invention provides a method, system, and storage medium for error-proof logic testing, which at least solves the technical problems of low test accuracy caused by the complexity of test case generation, the large workload of test case execution, and the ease with which omissions occur in related technologies.

[0006] According to one aspect of the present invention, a method for testing anti-misoperation logic is provided, comprising: initializing a substation data model and an anti-misoperation verification engine, wherein the substation data model is obtained from a microcomputer anti-misoperation system, the substation data model includes a primary model file and a secondary point table file, and the anti-misoperation verification engine is an anti-misoperation logic rule obtained from an anti-misoperation rule base; sending an anti-misoperation test case task to the anti-misoperation verification engine according to the test case generation rules to automatically generate a test case set; sending a verification instruction for testing a target operating device to the anti-misoperation system according to the test case set; receiving a verification result returned by the anti-misoperation system when the anti-misoperation system responds to the verification instruction; and displaying the test result of the automatically generated target test case based on the received verification result.

[0007] According to another aspect of the present invention, a fault prevention logic testing system is also provided, comprising: an initialization processing unit for initializing a substation data model and a fault prevention verification engine, wherein the substation data model is obtained from a microcomputer fault prevention system, the substation data model includes a primary model file and a secondary point table file, and the fault prevention verification engine is fault prevention logic rules obtained from a fault prevention rule base; a generation unit for sending fault prevention test case tasks to the fault prevention verification engine according to test case generation rules to automatically generate a test case set; a sending unit for sending a verification instruction for testing target test cases to the fault prevention system according to the test case set; a receiving unit for receiving the verification result returned by the fault prevention system when the fault prevention system responds to the verification instruction; and a display unit for displaying the test result of the automatically generated target test cases based on the received verification result.

[0008] According to another aspect of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer program, wherein the computer program is configured to execute the above-described error prevention logic test method at runtime.

[0009] In this embodiment of the invention, a substation data model is utilized, based on the primary system topology and a comprehensive anti-misoperation logic verification expert knowledge base. This automatically adapts to and matches the equipment operation logic, automatically generates acceptance test cases, automatically executes the anti-misoperation system logic acceptance, and automatically generates an anti-misoperation logic test report. This achieves automated completion of the anti-misoperation testing process, thereby solving the technical problems of complex test case generation, heavy workload in test case execution, and the potential for omissions in related technologies, leading to low test accuracy. Attached Figure Description

[0010] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0011] Figure 1 This is a flowchart of an optional error-proofing logic testing method according to an embodiment of the present invention;

[0012] Figure 2 This is a schematic diagram of the application environment of an optional error-proofing logic testing method according to an embodiment of the present invention;

[0013] Figure 3 This is a flowchart of another optional error-proofing logic testing method according to an embodiment of the present invention;

[0014] Figure 4 This is a schematic diagram of the operation interface of another optional anti-misoperation logic testing method according to an embodiment of the present invention;

[0015] Figure 5 This is a schematic diagram showing the results of another optional error-proofing logic test method according to an embodiment of the present invention;

[0016] Figure 6 This is a communication diagram illustrating an optional error-proofing logic testing method according to an embodiment of the present invention;

[0017] Figure 7 This is a schematic diagram of an optional error-proofing logic testing system according to an embodiment of the present invention. Detailed Implementation

[0018] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. 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 should fall within the scope of protection of the present invention.

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

[0020] According to one aspect of the present invention, a method for preventing errors in logic testing is provided, such as... Figure 1 As shown, the method includes:

[0021] S102, Initialize the substation data model and the anti-misoperation verification engine. The substation data model is obtained from the microcomputer anti-misoperation system. The substation data model includes a primary model file and a secondary point table file. The anti-misoperation verification engine obtains anti-misoperation logic rules from the anti-misoperation rule base.

[0022] S104, Based on the test case generation rules, send the error prevention test case task to the error prevention verification engine to automatically generate a test case set;

[0023] S106, Send a verification instruction to the error prevention system to test the target test cases according to the test case set;

[0024] S108, when the anti-misoperation system responds to the verification command, receive the verification result returned by the anti-misoperation system;

[0025] S110, based on the received verification results, displays the test results of the automatically generated target test cases.

[0026] Optionally, in this embodiment, the secondary anti-misoperation logic function can be implemented, but is not limited to, by utilizing the substation data model, based on the primary system topology and the expert knowledge base for full anti-misoperation logic verification, automatically adapting to and matching equipment operation logic, automatically generating acceptance test cases, automatically executing anti-misoperation system logic acceptance, and automatically generating anti-misoperation logic test reports. This achieves automated completion of the anti-misoperation testing process, thereby avoiding the problem of low test accuracy caused by missing data when the test project is large.

[0027] Optionally, in this embodiment, the above method may be applied, but is not limited to, to... Figure 2 The error prevention testing system shown includes an automatic error prevention logic testing system and a microcomputer error prevention system. The automatic error prevention logic testing system includes a communication module, a data management module, a verification module, an error prevention verification engine, a UI module, and a report module, while the microcomputer error prevention system includes an error prevention module and a storage module.

[0028] Optionally, in this embodiment, before initializing the substation data model and the anti-misoperation verification engine, it is also necessary to establish a communication link between the anti-misoperation logic automatic test system and the microcomputer anti-misoperation system. Through a three-way handshake communication method, the anti-misoperation logic automatic test system can obtain substation configuration data from the microcomputer anti-misoperation system to achieve automatic testing.

[0029] Specific combination Figures 2-3 The process shown will be explained below:

[0030] S302, configure the communication link to obtain substation configuration data from the anti-misoperation system via the communication module. The substation configuration data includes a primary model file and a secondary point table file. The obtained substation configuration data is stored in the data management module.

[0031] S304, Initialize the data model. Initializing the data model includes initializing the primary model file using the topology and obtaining secondary device and secondary equipment data from the secondary point table file;

[0032] S306, Initialize the error prevention verification engine. The error prevention verification engine is initialized by reading error prevention logic rules from the error prevention rule base stored in the data management module.

[0033] S308 automatically generates test cases based on the test case generation rules. Test case generation includes traversing all operable devices in the data model. The error prevention and verification engine generates a primary device operation test case set (secondary constraint primary), a secondary device operation test case set (primary constraint secondary, secondary constraint secondary), and a remotely controllable status calculation test case set based on the device operation scenario.

[0034] S310 sends verification commands to the error prevention system based on the test cases selected by the user. It sends verification commands through the communication interface with the error prevention system, receives verification results, verifies the result data, and summarizes the results on the UI interface, outputting test conclusions and automatically generating a logical acceptance report using the report module.

[0035] As an optional approach, initializing the substation data model includes:

[0036] S1, topology initialization, the connection relationships of devices recorded in the model file at one time;

[0037] S2, through topological boundary search, parses the device attribute information in a primary model file within a primary model;

[0038] S3, retrieve secondary device data and secondary equipment data from the secondary point table file.

[0039] Optionally, in this embodiment, topology initialization includes parsing the device attribute information of the primary device by searching the topology boundary based on the connection relationship of the primary model. This includes information such as the device type, voltage level, device attribute value, and connection point of the primary device.

[0040] As an optional solution, initializing the error prevention verification engine includes:

[0041] S1. Read the error prevention logic rules from the error prevention rule base. The error prevention logic rules include first-level rules, second-level rules and third-level rules. The third-level rules include the device attribute information of the secondary equipment participating in the error prevention logic and the device attribute information of the secondary device. The second-level rules include the logical constraints and rule association information between the third-level rules. The first-level rules include the logical constraints and information of the operating equipment in the current operating scenario.

[0042] It should be noted that the error prevention logic rules can be, but are not limited to, the logical constraints between primary and secondary devices, the logical constraints between secondary devices and primary devices, and the logical constraints between secondary devices in the secondary error prevention function, which are obtained by abstracting and modeling.

[0043] The aforementioned level three rules may include, but are not limited to, abstracting the secondary devices involved in the error prevention logic from the perspectives of secondary device type, secondary device function type, and device status. The aforementioned level two rules may include, but are not limited to, abstracting the logical constraints, set attributes, rule levels, prompt information, and association constraints between the level three rules. The aforementioned level one rules may include, but are not limited to, abstracting the logical constraints between level two rules from the perspectives of operational scenarios such as voltage level, applicable occasions, interval states, device type, and operation type, based on the logical constraints between primary device operation and secondary device operation, the logical constraints between secondary device operation and primary device operation, and the logical constraints between secondary device operations. These level one rules can be divided into primary device operation rules, secondary device operation rules, and remotely controllable status calculation rules.

[0044] As an optional approach, based on the test case generation rules determined from the substation data model, the test case set can be automatically generated, including:

[0045] S1. Traverse all operating devices in the substation data model. The anti-misoperation verification engine generates a test case set based on the operating scenarios of each operating device. The test case set includes a first type of test case for indicating that the object under test simultaneously meets the logical blocking condition and the alarm condition, a second type of test case for indicating that the object under test meets the logical blocking condition or the alarm condition, and a third type of test case for indicating that the above-mentioned object under test has not met the logical blocking condition or the alarm condition.

[0046] Optionally, in this embodiment, the anti-misoperation verification engine traverses all operating devices in the substation data model and generates a test case set based on the operating scenarios of each operating device, including:

[0047] S11, In the anti-misoperation verification engine, based on the device of each operating device, calculate the operating scenario of the target device and obtain the device set within the scenario. The device set includes: primary device set, secondary device set, and secondary equipment set.

[0048] S12, Determine the test constraint conditions based on the logical constraint fields parsed from the error prevention logic rules;

[0049] S13 outputs a test case set according to the test constraints. This test case set includes: a primary equipment operation test case set, a secondary equipment operation test case set, and a remote control status test case set. The verification engine parses the error prevention logic rules layer by layer, filtering and selecting the primary equipment set, secondary equipment set, and secondary device set based on the logical constraint fields in the rules to obtain the test case set.

[0050] Optionally, in this embodiment, the above-mentioned use case generation rules may include, but are not limited to, typical use cases and random use cases: Typical use cases may include: no prohibition, no alarm (all passed), i.e., the operation object's logical locking condition and alarm condition are not satisfied; first set of prohibition and second set of prohibition (single set passed), i.e., the operation object's logical locking condition and alarm condition are not satisfied in one set, but the other set's locking condition and alarm condition are met (taking two sets as an example, hence two use cases here); prohibition: i.e., the operation object's logical locking condition is fully satisfied, but the alarm condition is not satisfied; alarm: i.e., the operation object's logical locking condition is not satisfied, but the alarm condition is satisfied; prohibition plus alarm: i.e., the operation object's logical locking condition and alarm condition are both satisfied. For example, such as... Figure 4 As shown, the configuration results of a typical use case are that primary device operation, secondary device operation, and remote control status calculation are all configured to "all checked".

[0051] Furthermore, the random test cases here can be, but are not limited to, obtained according to a user-configured random ratio, with the system automatically generating a certain number and type of latching or alarm test cases within the logical conditions. For example, such as... Figure 4 As shown, the configuration results of the random test cases are primary device operation, secondary device operation, and remote control status calculation, all configured as "Percentage: 10%".

[0052] Optionally, in this embodiment, the test cases described above organize the test data in the form of test case sets and test case details: Test cases include the test case number, operation object name, device ID, operation type, test case type, start and end time, and verification conclusion corresponding to each operating device; details include the device ID, device name, device name, preset state, expected result, return result, and conclusion of the primary and secondary devices corresponding to the operation logic rules of the test object in the test case. For example, test cases can be configured as follows: Figure 5 The effect shown.

[0053] The automatic generation process will be illustrated with the following example:

[0054] When automatically generating logical verification test cases, the user interface sends a request to the verification module to generate verification test cases based on the user-configured test case type. The verification module traverses all devices (primary and secondary devices) in the data model according to the test case generation rules and issues tasks to the error prevention verification engine. The verification engine obtains the primary device set, secondary device set, and secondary device set from the data model based on the operation scenario of each device, and parses the logical constraint fields of the first-level rules in the error prevention logic rules to obtain the logical constraint conditions of the second-level rules. Then, based on the logical constraint conditions of the second-level rules in the error prevention rules (such as protection dual-set attributes, secondary device type, secondary device type, associated primary device, etc.), it filters the secondary device set, generates the corresponding level of second-level logic according to the rule level (prohibition or alarm), and parses the logical constraint fields of the second-level rules to obtain the logical constraint conditions of the third-level rules. Finally, based on the above-mentioned third-level rule logical constraint conditions, it obtains the device type, secondary device type, and constraints in the rules, filters the secondary device set, and sets the test case level, secondary device status value, and rule ID, thereby generating the error prevention operation logic test case for the device.

[0055] As an optional solution, before initializing the substation data model and the error prevention verification engine, the following is also included:

[0056] S1, establish a communication link with the error prevention system;

[0057] S2, obtains substation configuration data configured in the anti-misoperation system based on the communication link.

[0058] Optionally, in this embodiment, after the communication link is successfully established, the anti-misoperation logic automatic testing system (hereinafter referred to as "this system") will obtain substation configuration data, namely primary model files and secondary point table files, from the anti-misoperation system. The communication link uses a custom standard communication protocol adapted to various anti-misoperation systems. The protocol defines that the communication between this system and the microcomputer anti-misoperation system uses TCP, with the microcomputer anti-misoperation system acting as the TCP server and this system acting as the TCP client. This system actively connects to the anti-misoperation system and communicates in a question-and-answer manner.

[0059] For example, such as Figure 6 As shown, the TCP client and TCP server obtain the primary model file and the secondary point table file; and send a verification command to obtain the verification results. The primary model file is a CIM model defined in E file format, the secondary equipment model is defined in EXCEL, and the verification command is an E language format file.

[0060] As an optional approach, displaying the test results of the target test cases generated based on the verification results includes:

[0061] S1. Based on the verification results received from the error prevention system through the communication link, the verification results are compared with the expected results corresponding to the local logical verification test cases to obtain the comparison results.

[0062] S2 automatically generates a logic verification report based on the comparison results. This report includes test results, statistical analysis information, test start and end times, and detailed test information.

[0063] Optionally, in this embodiment, when the selected test cases are those to be verified by checking the test cases on the user interface, the following operations can be supported for the selected test cases: search, select all, clear all, select multiple, and deselect. At the same time, one-click verification is supported (i.e., automatic generation of test cases + automatic verification of all test cases). Furthermore, during verification, the verification module organizes verification commands according to the test case details, sends the verification commands to the error prevention system one by one, and compares the return results of the error prevention system with the expected results of the logic verification test cases to obtain the comparison results. Then, based on the comparison results, a logic verification report (carrying the test results) is automatically generated and displayed on the interface.

[0064] For example, when the above verification results are displayed on the interface, the conclusion of a single detail can be determined by comparing it with the expected results in the use case details, and then the detailed conclusions in each use case can be analyzed to determine whether the verification conclusion of a single use case is qualified or unqualified.

[0065] Optionally, in this embodiment, the aforementioned logic verification report can, but is not limited to, use multi-threaded asynchronous distributed processing, employing a method of verifying and generating the report simultaneously. Once the verification is complete, the test report is also generated, thereby achieving rapid generation of test report documents for massive amounts of data. The test report supports A4 paper printing and manual approval, including a cover, a summary of verification data, a summary of logic verification results, and detailed verification results. The data summary provides multi-dimensional statistical analysis of the data and uses charts to present the overall verification results. The result summary summarizes the test case set and supports navigation between the summary and the detailed pages.

[0066] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the present invention is not limited to the described order of actions, because according to the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.

[0067] According to another aspect of the present invention, a fault-proofing logic testing system for implementing the above-described fault-proofing logic testing method is also provided. For example... Figure 7As shown, the system includes:

[0068] The initialization processing unit 702 is used to initialize the substation data model and the anti-misoperation verification engine. The substation data model is obtained from the microcomputer anti-misoperation system and includes a primary model file and a secondary point table file. The anti-misoperation verification engine is the anti-misoperation logic rules obtained from the anti-misoperation rule base.

[0069] The generation unit 704 is used to send error prevention test case tasks to the error prevention verification engine according to the test case generation rules in order to automatically generate test case sets;

[0070] The sending unit 706 is used to send a verification instruction for testing the target test cases to the error prevention system according to the test case set;

[0071] The receiving unit 708 is used to receive the verification result returned by the anti-misoperation system when the anti-misoperation system responds to the verification command;

[0072] Display unit 710 is used to display the test results of automatically generated target test cases based on the received verification results.

[0073] Optionally, in this embodiment, the initialization processing unit initializes the substation data model through the following steps: topology initialization of the connection relationships of primary devices recorded in the primary model file; parsing the device attribute information of primary devices in the primary model file through topology boundary search; obtaining secondary device data and secondary device data from the secondary point table file; the initialization processing unit initializes the anti-misoperation verification engine through the following steps: reading anti-misoperation logic rules from the anti-misoperation rule base, wherein the anti-misoperation logic rules include first-level rules, second-level rules and third-level rules, the third-level rules include the device attribute information of the secondary devices participating in the anti-misoperation logic and the device attribute information of the secondary devices, the second-level rules include the logical constraints and rule association information between the third-level rules, and the first-level rules include the logical constraints and information of the operating equipment in the current operating scenario.

[0074] For specific implementation methods, please refer to the above method embodiments, which will not be repeated here.

[0075] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the aforementioned error-proofing logic testing method. The computer program is configured to execute the steps of any of the above method embodiments at runtime.

[0076] Optionally, in this embodiment, the computer-readable storage medium described above may be configured to store a computer program for performing the following steps:

[0077] S1, Initialize the substation data model and the anti-misoperation verification engine. The substation data model is obtained from the microcomputer anti-misoperation system. The substation data model includes the primary model and the secondary point table file. The anti-misoperation verification engine obtains the anti-misoperation logic rules from the anti-misoperation rule base.

[0078] S2, based on the test case generation rules, sends the error prevention test case task to the error prevention verification engine to automatically generate a test case set;

[0079] S3, based on the test case set, sends a verification instruction to the error prevention system to test the target test cases;

[0080] S4, when the error prevention system responds to the verification command, receives the verification result returned by the error prevention system;

[0081] S5 displays the test results of the automatically generated target test cases based on the received verification results.

[0082] Optionally, in this embodiment, those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0083] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0084] If the integrated units in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in the aforementioned computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.

[0085] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0086] In the several embodiments provided in this application, it should be understood that the disclosed client can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between units or modules, and may be electrical or other forms.

[0087] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0088] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0089] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for preventing errors in logic testing, characterized in that, include: Initialize the substation data model and the anti-misoperation verification engine. The substation data model is obtained from the microcomputer anti-misoperation system. The substation data model includes a primary model file and a secondary point table file. The anti-misoperation verification engine obtains anti-misoperation logic rules from the anti-misoperation rule base. According to the test case generation rules, send the error prevention test case test task to the error prevention verification engine to automatically generate a test case set; The test case set is used to send a verification instruction to the anti-misoperation system for testing the target operating device; When the error prevention system responds to the verification command, the verification result returned by the error prevention system is received; Based on the received verification results, the test results of the automatically generated target test cases are displayed; Specifically, according to the test case generation rules, an anti-mistake test case test task is sent to the anti-mistake verification engine to automatically generate a test case set. This includes: obtaining the pre-configured test case generation rules, which include primary device test case generation rules, secondary device test case generation rules, and remotely controllable device test case generation rules; and according to the test case generation rules, traversing all operating devices in the anti-mistake logic test data model, with the anti-mistake verification engine generating the test case set based on the device type and test case type of each operating device. The process involves traversing all operating devices in the anti-misoperation logic test data model. The anti-misoperation verification engine generates the test case set based on the device type and test case type of each operating device. This includes: calculating the operating scenario of the target device based on the device type of each device, obtaining the device set within the scenario, wherein the device set includes: a primary device set, a secondary device set, and a secondary equipment set; determining test constraints based on the logical constraint fields parsed from the anti-misoperation logic rules; and outputting the test case set according to the test constraints, wherein the test case set includes: a primary device operation test case set, a secondary operation device test case set, and a remote control status test case set.

2. The method according to claim 1, characterized in that, The initialization of the substation data model includes: The topology is initialized by recording the connection relationships of the primary devices in the primary model file; The device attribute information of the primary device in the primary model file is parsed by topological boundary search. Obtain secondary device data and secondary equipment data from the secondary point table file.

3. The method according to claim 1, characterized in that, The initialization error prevention verification engine includes: Read the error prevention logic rules from the error prevention rule base. The error prevention logic rules include first-level rules, second-level rules and third-level rules. The third-level rules include the device attribute information of the secondary devices participating in the error prevention logic and the device attribute information of the secondary devices. The second-level rules include the association information and logical constraints between the third-level rules. The first-level rules include the association information and logical constraints between the second-level rules, as well as the information of the operating device in the current operating scenario.

4. The method according to claim 1, characterized in that, Before initializing the anti-misoperation logic test data model and the anti-misoperation verification engine, the following is also included: Establish a communication link with the anti-misoperation system; The substation configuration data configured in the anti-misoperation system is obtained based on the communication link.

5. The method according to any one of claims 1 to 4, characterized in that, The test results of the target test cases automatically generated based on the received verification results include: Based on the verification results received from the error prevention system through the communication link, the verification results are compared with the expected results corresponding to the local logic verification test cases to draw test conclusions for the test cases. A logic verification report is automatically generated based on the test results. The logic verification report includes the test results, which include statistical analysis information, test start and end times, and test details.

6. A logic testing system for preventing errors, characterized in that, include: An initialization processing unit is used to initialize the substation data model and the anti-misoperation verification engine. The substation data model is obtained from the microcomputer anti-misoperation system and includes a primary model file and a secondary point table file. The anti-misoperation verification engine obtains anti-misoperation logic rules from the anti-misoperation rule base. The generation unit is used to send error prevention test case tasks to the error prevention verification engine according to the test case generation rules, so as to automatically generate a test case set; The sending unit is used to send a verification instruction for testing the target test cases to the error prevention system according to the test case set; A receiving unit is configured to receive the verification result returned by the error prevention system when the error prevention system responds to the verification instruction; The display unit is used to display the test results of the automatically generated target test cases based on the received verification results; The generation unit is further configured to obtain the pre-configured test case generation rules, which include primary device test case generation rules, secondary device test case generation rules, and remotely controllable device test case generation rules; according to the test case generation rules, it traverses all operating devices in the anti-misoperation logic test data model, and the anti-misoperation verification engine generates the test case set according to the device type and test case type of each operating device; The generation unit is further configured to, within the anti-misoperation verification engine, calculate the operation scenario of the target device based on the device type of each device, obtain the device set within the scenario, wherein the device set includes: a primary device set, a secondary device set, and a secondary equipment set; determine test constraints based on the logical constraint fields parsed from the anti-misoperation logic rules; and output the test case set according to the test constraints, wherein the test case set includes: a primary device operation test case set, a secondary operation device test case set, and a remote control status test case set.

7. The system according to claim 6, characterized in that, The initialization processing unit includes: The first processing module is used for topology initialization of the connection relationships of primary devices recorded in the primary model file; The second processing module is used to parse the device attribute information of the primary device in the primary model file through topological boundary search; The acquisition module is used to acquire secondary device data and secondary equipment data from the secondary point table file.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program, when executed, performs the method described in any one of claims 1 to 5.