An implementation method for automatically generating test cases based on the types of relay protection setting values

By filling in the fixed value type tag and content value in the standard format file, importing and identifying the relay protection fixed value type file, and using preset programs to generate test cases, the problems of low efficiency and high labor cost in the existing technology are solved, and efficient and low error rate automated testing is achieved.

CN115327361BActive Publication Date: 2025-07-25XUCHANG KETOP DETECTION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210960917.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-11
Publication Date
2025-07-25
Estimated Expiration
2042-08-11

AI Technical Summary

Technical Problem

In the prior art, the test case generation efficiency is low, the labor cost is high, the error rate is high, the debugging and maintenance is difficult, and the standardization is poor.

Method used

By filling in the fixed value type tags and content values in the standard format file, importing and identifying the labels and content values in the relay protection fixed value type file, and using the preset program to call the tester script to generate test cases.

Benefits of technology

It realizes automated test case generation, improves efficiency, reduces manual participation, reduces error rate, and improves the matching and standardization of test cases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115327361B_ABST
    Figure CN115327361B_ABST
Patent Text Reader

Abstract

An implementation method for automatically generating test cases based on relay protection setting value types. Fill in the setting value type tags and the corresponding content values in a standard format file to obtain a relay protection setting value type file, and then import, read, and identify the setting value type tags and the corresponding content values to confirm the setting content. Call the corresponding script of the tester through a preset program and set parameters to finally generate test cases; the setting content is determined by the setting value type tags and the corresponding content values. The implementation method for automatically generating test cases based on relay protection setting value types has the following beneficial effects: (1) It can automatically complete the generation of test cases, with the advantages of high efficiency and low labor cost; (2) The degree of manual participation is low, thus improving the matching degree of test cases, reducing the error rate, having high standardization, and being simple, fast, and convenient for debugging and maintenance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of reliability testing of relay protection in power systems, and particularly relates to a method for automatically generating test cases based on the types of relay protection setting values. Background Art

[0002] Reliability is the most basic requirement of the power system for relay protection, that is, it is required that the relay protection does not refuse to operate when it should operate and does not misoperate when it should not operate. Therefore, compiling test cases to quantitatively assess the accuracy of relay protection is particularly important in all stages such as relay protection design and research, type inspection, grid connection and commissioning, and regular inspection and maintenance.

[0003] According to the regulations of the power system detection procedure, the accuracy test cases need to fully cover all protection functions, and include the maximum, minimum, and intermediate values of the setting values, and at the same time cover all phases related to the excitation quantity setting value. Therefore, for the accuracy inspection of a relay protection device, the number of test cases that need to be created can be as many as hundreds; at the same time, each test case includes many necessary parameters such as excitation quantity, application method, starting value, ending value, step size, and duration, involving a large number of parameters that need to be set.

[0004] The generation of test cases in the prior art mainly faces the following problems: the number of test case entries is large, and for each test case, the excitation quantity and phase need to be set in combination with the protection principle, error requirements, and setting value coordination, and multiple parameters such as the initial value, ending value, step size, and change time that change gradually are involved, and the relevant parameters are set manually and the test cases are created one by one. The creation efficiency of test cases is not high, and the workload of debugging and maintaining test cases is large.

[0005] The main disadvantages of the prior art are: 1) The test cases are created manually one by one, which takes a long time and has low efficiency; 2) The test cases rely on manual creation, with a high error rate and great difficulty in debugging and maintenance; 3) The creation of test cases is fully participated by humans throughout the process, with large differences among personnel and poor standardization.

[0006] Therefore, in view of the deficiencies of the prior art, it is very necessary to provide a method for automatically generating test cases based on the types of relay protection setting values to solve the deficiencies of the prior art. Summary of the Invention

[0007] The purpose of the present invention is to avoid the deficiencies of the prior art and provide a method for automatically generating test cases based on the types of relay protection setting values. This method for automatically generating test cases based on the types of relay protection setting values can automatically complete the generation of test cases, and has the advantages of high efficiency, low labor cost, high matching degree, low error rate, and simple, fast debugging and maintenance.

[0008] The above object of the present invention is achieved by the following technical measures:

[0009] Provide a method for automatically generating test cases based on the types of relay protection setting values, the steps are as follows:

[0010] Step (1), fill in the setting value type tags and the corresponding content values of the setting value type tags in the standard format file to obtain the relay protection setting value type file;

[0011] Step (2), import, read and identify the setting value type tags and the corresponding content values of the setting value type tags in the relay protection setting value type file, and determine the setting value content through the setting value type tags and the corresponding content values;

[0012] Step (3), call the corresponding script of the tester and set parameters through the preset program to generate the final test cases.

[0013] Preferably, the above standard format file is a.csv file.

[0014] Preferably, the function of the above preset program is to establish a connection with the tester, and to identify the setting value type tags and combine parameters according to rules to generate test cases.

[0015] Preferably, the above script is the interface program of the tester that needs to be used during actual testing.

[0016] Preferably, the above relay protection setting value type file is a two-dimensional table, the setting value type tags are the columns of the two-dimensional table, and each setting value content is determined by the content value corresponding to the setting value type tag in the same row.

[0017] Preferably, the above setting value type tags are set with "protection function" tags and "setting value name" tags.

[0018] Preferably, the above step (2) is specifically as follows:

[0019] Step (2.1), import the relay protection setting value type file obtained in step (1), the preset program searches row by row in the two-dimensional table for the content values of the "protection function" tag and the "setting value name" tag, and when the combination of the content values of the "protection function" tag and the "setting value name" tag is the target test name, enter step (2.2);

[0020] Step (2.2), define the row with the combination of the content values of the "protection function" tag and the "setting value name" tag as the target test name as the current row, and respectively read the content values corresponding to the setting value type tags of the current row. When all the content values of the setting value type tags are read, determine the setting value content and enter step (3).

[0021] Preferably, step (3) is specifically to call the corresponding script of the tester through a preset program, use the content value of the fixed-value type tag obtained in step (2.2) as the parameter of the test case, and finally generate a test case corresponding to the fixed-value content.

[0022] Preferably, the above fixed-value type tag is also provided with at least one of the tags of "minimum value", "maximum value", "intermediate value", "error", "unit", "phase", "fault feature", "method".

[0023] When the fixed-value type tag is at least one of the tags of "protection function", "fixed-value name", "minimum value", "maximum value", "intermediate value", "error", or "unit", the content of the fixed-value type tag is filled in according to the protection function configuration of the device to be tested and the requirements of the enterprise standard.

[0024] When the fixed-value type tag is at least one of the tags of "phase", "fault feature", or "method", a standard option library is preset in the relay protection fixed-value type file, and the content of the standard option fixed-value type tag is selected according to the protection principle and fixed-value characteristics, without customizing.

[0025] When the fixed-value type tag is the "phase" tag, the "phase" tag is used to define the phase to be tested for the excitation quantity; the standard options of the "phase" tag include positive sequence, negative sequence, zero sequence, phase splitting, line splitting, three-phase or three-wire.

[0026] When the fixed-value type tag is the "fault feature" tag, the "fault feature" tag is used to define the change trend of the excitation quantity; the standard options of the "fault feature" tag include under-quantity or over-quantity.

[0027] When the fixed-value type tag is the "method" tag, the "method" tag is used to define the method of applying the excitation quantity; the standard options of the "method" tag include slow addition or sudden addition.

[0028] Preferably, the content value of the above "protection function" tag is complex voltage blocking overcurrent protection, zero-sequence overcurrent protection, zero-sequence overvoltage protection or phase distance protection.

[0029] Preferably, the content value of the above "fixed-value name" tag is low voltage lock value, negative sequence voltage blocking lock value, operating current, delay time or phase impedance operating value.

[0030] An implementation method for automatically generating test cases based on relay protection setting value types of the present invention is as follows: Step (1), fill in the setting value type tags and the content values corresponding to the setting value type tags in a standard format file to obtain a relay protection setting value type file; Step (2), import, read and identify the setting value type tags and the content values corresponding to the setting value type tags in the relay protection setting value type file, and determine the setting value content through the setting value type tags and the corresponding content values; Step (3), call the corresponding script of the tester and set parameters through a preset program to generate the final test cases. The implementation method for automatically generating test cases based on relay protection setting value types has the following beneficial effects: (1) It can automatically complete the generation of test cases, with the advantages of high efficiency and low labor cost; (2) The degree of manual participation is low, thereby improving the matching degree of test cases, reducing the error rate, having high standardization, and being simple, fast and convenient for debugging and maintenance. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] The present invention will be further described with reference to the accompanying drawings, but the content in the drawings does not constitute any limitation to the present invention.

[0032] Figure 1 It is a flowchart of an implementation method for automatically generating test cases based on relay protection setting value types.

[0033] Figure 2 It is a content and format table of the relay protection setting value type file for Embodiment 2. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0034] The technical solution of the present invention will be further described in conjunction with the following embodiments.

[0035] Relay protection refers to an important measure for detecting faults or abnormal conditions occurring in a power system, thereby sending out alarm signals or directly isolating and removing the faulty part.

[0036] Accuracy refers to the degree to which the operating value approaches the set value of the input excitation quantity and the operating time approaches the time set value or the absolute nominal operating time.

[0037] A test case refers to a case that specifically quantifies the relay protection accuracy test by applying an excitation quantity using a standard test method in accordance with the regulations of the detection procedure.

[0038] Embodiment 1.

[0039] An implementation method for automatically generating test cases based on relay protection setting value types is as Figure 1 , and the steps are as follows:

[0040] Step (1), fill in the setting value type tags and the content values corresponding to the setting value type tags in a standard format file to obtain a relay protection setting value type file;

[0041] Step (2): Import, read, and identify the value type tags and the corresponding content values in the relay protection setting value type file, and determine the setting value content based on the value type tags and the corresponding content values.

[0042] Step (3): Call the corresponding script of the tester through the preset program and set parameters to generate the final test cases.

[0043] Among them, the setting value content is determined based on the value type tags and the corresponding content values. The standard format file is a.csv file.

[0044] The function of the preset program of the present invention is to establish a connection with the tester, identify the value type tags, and combine the parameters according to the rules to generate test cases. The script is the interface program of the tester that needs to be used during actual testing.

[0045] The relay protection setting value type file is a two-dimensional table. The value type tags are the columns of the two-dimensional table, and each setting value content is determined by the content value corresponding to the value type tag in the same row.

[0046] The value type tags are set with a "protection function" tag and a "setting value name" tag.

[0047] Among them, step (2) is specifically as follows:

[0048] Step (2.1): Import the relay protection setting value type file obtained in step (1). The preset program searches row by row in the two-dimensional table for the content values of the "protection function" tag and the "setting value name" tag. When the combination of the content values of the "protection function" tag and the "setting value name" tag is the target test name, enter step (2.2);

[0049] Step (2.2): Define the row with the combination of the content values of the "protection function" tag and the "setting value name" tag as the current row, and read the content values corresponding to the value type tags of the current row respectively. When the content values of all value type tags are read, determine the setting value content and enter step (3).

[0050] Step (3) of the present invention is specifically to call the corresponding script of the tester through the preset program, using the content values of the value type tags read in step (2.2) as

[0051] The value type tags are also set with at least one of a "minimum value" tag, a "maximum value" tag, a "middle value" tag, an "error" tag, a "unit" tag, a "phase" tag, a "fault characteristic" tag, or a "method" tag.

[0052] When at least one of the fixed value type tags is a "protection function" tag, a "fixed value name" tag, a "minimum value" tag, a "maximum value" tag, a "median value" tag, an "error" tag, or a "unit" tag, the content of the fixed value type tag is filled in according to the protection function configuration of the device under test and enterprise standard requirements.

[0053] When at least one of the fixed value type tags is a "phase sequence" tag, a "fault characteristic" tag, or a "method" tag, a standard option library is preset in the relay protection fixed value type file, and the content of the standard option of the fixed value type tag is selected according to the protection principle and fixed value characteristics, without customizing.

[0054] When the fixed value type tag is a "phase sequence" tag, the "phase sequence" tag is used to define the phase sequence of the excitation quantity to be tested; the standard options of the "phase sequence" tag include positive sequence, negative sequence, zero sequence, phase splitting, line splitting, three-phase, or three-wire.

[0055] When the fixed value type tag is a "fault characteristic" tag, the "fault characteristic" tag is used to define the change trend of the excitation quantity; the standard options of the "fault characteristic" tag include under-quantity or over-quantity.

[0056] When the fixed value type tag is a "method" tag, the "method" tag is used to define the method of applying the excitation quantity; the standard options of the "method" tag include slow addition or sudden addition.

[0057] The test case automatic generation implementation method based on relay protection fixed value type has the following beneficial effects: (1) It can automatically complete the generation of test cases, with the advantages of high efficiency and low labor cost; (2) The manual participation degree is low, thus improving the matching degree of test cases, reducing the error rate, high standardization, and simple and fast debugging and maintenance.

[0058] Embodiment 2.

[0059] A test case automatic generation implementation method based on relay protection fixed value type, other features are the same as those in Embodiment 1, the difference is that the fixed value type tags in this embodiment are specifically a "protection function" tag, a "fixed value name" tag, a "minimum value" tag, a "maximum value" tag, a "median value" tag, an "error 1" tag, an "error 2" tag, a "unit" tag, a "phase sequence" tag, a "fault characteristic" tag, and a "method" tag, as Figure 2 shown.

[0060] The content value of the "protection function" tag in this embodiment is composite voltage blocking overcurrent protection, zero-sequence overcurrent protection, zero-sequence overvoltage protection, or phase-to-phase distance protection. The content value of the "fixed value name" tag is low voltage lock value, negative sequence voltage blocking lock value, operating current, delay time, or phase-to-phase impedance operating value.

[0061] Taking the generation of test cases for the setting value of the composite voltage blocking overcurrent protection action current as an example, an explanation is given.

[0062] Step (1): Fill in the setting value type label and the corresponding content value of the setting value type label in the standard format file to obtain a relay protection setting value type file in the.csv format.

[0063] Step (2) includes:

[0064] Step (2.1): Import the relay protection setting value type file obtained in step (1). The preset program searches row by row in the two-dimensional table for the content value of the "protection function" label and the content value of the "setting value name" label. When the combination of the content value of the "protection function" label and the content value of the "setting value name" label is the setting value of the composite voltage blocking overcurrent protection action current, that is, Figure 2 in the fourth row, enter step (2.2).

[0065] Step (2.2): Define the row where the combination of the content value of the "protection function" label and the content value of the "setting value name" label is the target test name as the current row, and respectively read the content values corresponding to the setting value type labels of the current row. When all the content values of the setting value type labels are read, determine the setting value content and enter step (3).

[0066] Step (3): Call the corresponding script of the tester through the preset program, and use the content value of the "protection function" label read in step (2.2) as the parameter of the test case to generate a test case corresponding to the setting value content.

[0067] Specifically, if it is located and identified in step (2.2) that the "method" label corresponds to "ramp up", then the preset program in step (3) calls the ramp change test script.

[0068] It should be noted that the "method" label determines which test script of the tester the preset program calls. When the content value of the "method" label is "ramp up", the corresponding ramp change test script is called; when it is "step up", the corresponding state sequence test script is called. The ramp change test script and the state sequence test script of the present invention are the control software of the tester. The present invention does not involve the compilation of this test script, but only establishes a connection with the tester through the preset program and calls the corresponding test script of the tester. The preset program refers to a complete set of programs compiled to complete the present invention, including an interface with the tester, a complete set of processes for calling the test scripts of the tester for different labels of the corresponding setting value types and completing necessary parameter assignments.

[0069] If it is located and identified in step (2.2) that the "unit" label corresponds to "A" and the "phase" label corresponds to "three-phase", then in the ramp change test script of the preset program in step (3), the excitation quantities are respectively selected as IA, IB, and IC.

[0070] It should be noted that for different combinations of "unit" and "phase", first identify the "unit" label to determine the category of the excitation quantity. V corresponds to the excitation quantity being voltage, A corresponds to the excitation quantity being current, and Ω corresponds to the excitation quantity being voltage / current. Then identify the combination of the "phase" label and the "unit" label to finally determine the excitation quantity. The corresponding relationship of the "phase" label is as follows: negative sequence is the negative sequence component, zero sequence is the zero sequence component, three-wire means AB, BC, and CA simultaneously, split-wire means AB, BC, and CA separately, three-phase means A, B, and C simultaneously, and split-phase means A, B, and C separately. Taking the "unit" label as V as an example: if the "phase" label is three-wire, then a test case UABC is automatically generated; if the "phase" label is split-wire, then three test cases UAB, UBC, and UCA are automatically generated.

[0071] In step (2.2), if the "fault feature" label is identified as "excessive", then the preset program in step (3) determines that the change trend of the excitation quantity is increasing.

[0072] Taking the minimum value as an example, in step (2.2), the "minimum value" label is identified as corresponding to "0.05"; the "error 1" label is corresponding to "±5%"; the "error 2" label is corresponding to "±0.02A"; then the preset program determines to take the value corresponding to the "error 2" label with the larger error, which is 0.02A. Among them, since the preset program determines that the change trend of the excitation quantity is increasing, the initial value of the gradual change calls the relationship of "fixed value - error", and the termination value of the gradual change calls the relationship of "fixed value + error". The preset program substitutes the minimum value "0.05" and the "error 2" label with "0.02" for calculation and completes the assignment of the necessary parameters of the gradual change test script.

[0073] It should be noted that when the "fault feature" label has other content values, such as when the "fault feature" label is "excessive", the corresponding change trend of the excitation quantity is increasing; when the "fault feature" label is "deficient", the corresponding change trend of the excitation quantity is decreasing.

[0074] Step (3): Call the corresponding script of the tester through the preset program, and use the content value of the fixed value type label read in step (2.2) as the parameter of the test case to generate a test case corresponding to the fixed value content

[0075] After the above three steps, a total of 9 test cases are finally generated. Among them, there are 3 test cases with a minimum value of 0.05A: 1. Check the setting value IA of 0.05A for the operating current of the composite voltage blocked overcurrent protection; 2. Check the setting value IB of 0.05A for the operating current of the composite voltage blocked overcurrent protection; 3. Check the setting value IC of 0.05A for the operating current of the composite voltage blocked overcurrent protection. There are 3 test cases with a maximum value of 20A: 1. Check the setting value IA of 20A for the operating current of the composite voltage blocked overcurrent protection; 2. Check the setting value IB of 20A for the operating current of the composite voltage blocked overcurrent protection; 3. Check the setting value IC of 20A for the operating current of the composite voltage blocked overcurrent protection. There are 3 test cases with an intermediate value of 1A: 1. Check the setting value IA of 1A for the operating current of the composite voltage blocked overcurrent protection; 2. Check the setting value IB of 1A for the operating current of the composite voltage blocked overcurrent protection; 3. Check the setting value IC of 1A for the operating current of the composite voltage blocked overcurrent protection.

[0076] It should be noted that for other "phase" tags, multiple test cases will also be generated according to the corresponding logical relationships. For the same set value content, due to tags such as "phase", "maximum value", "minimum value", and "intermediate value", multiple test cases can be automatically generated and named accordingly. The initial value variation, final value variation relationship formula, etc. of the present invention are preset through program compilation according to standard requirements.

[0077] Through the method for automatically generating test cases based on relay protection setting value types in this embodiment, test cases for multiple composite voltage blocked overcurrent protection operating current setting values can be quickly generated.

[0078] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit the protection scope of the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the essence and scope of the technical solutions of the present invention.

Claims

1. An automatic generation implementation method for test cases based on relay protection setting value types, characterized in that, The steps are as follows: Step (1): Fill in the fixed value type label and the corresponding content value of the fixed value type label in the standard format file to obtain the relay protection fixed value type file; Step (2): Import, read and identify the fixed value type label and the corresponding content value of the fixed value type label in the relay protection fixed value type file, and determine the fixed value content through the fixed value type label and the corresponding content value; Step (3): Call the corresponding script of the tester through the preset program and set parameters to generate the final test case; The fixed value type label is set with a "protection function" label and a "fixed value name" label; The specific content of step (2) is as follows: Step (2.1): Import the relay protection fixed value type file obtained in step (1). The preset program searches row by row in the two-dimensional table for the content value of the "protection function" label and the content value of the "fixed value name" label. When the combination of the content value of the "protection function" label and the content value of the "fixed value name" label is the target test name, go to step (2.2); Step (2.2): Define the row with the combination of the content value of the "protection function" label and the content value of the "fixed value name" label as the current row, and respectively read the content values corresponding to the fixed value type labels of the current row. When all the content values of the fixed value type labels are read, determine the fixed value content and enter step (3); The specific content of step (3) is to call the corresponding script of the tester through the preset program, use the content value of the fixed value type label read in step (2.2) as the parameter of the test case, and finally generate a test case corresponding to the fixed value content.

2. The test case automatic generation implementation method based on the relay protection setting value type according to claim 1, wherein: The standard format file is a.csv file.

3. The method for automatically generating test cases based on relay protection setting value types according to claim 2, wherein: The preset program establishes a connection with the tester, identifies the fixed value type label and combines parameters according to rules to generate test cases.

4. The method for automatically generating test cases based on relay protection setting value types according to claim 3, characterized in that: The script is the interface program of the tester that needs to be used during actual testing.

5. The automatic generation implementation method of test cases based on the relay protection setting value type according to claim 4, characterized in that: The relay protection fixed value type file is a two-dimensional table, the fixed value type label is the column of the two-dimensional table, and each fixed value content is determined by the content value corresponding to the fixed value type label in the same row.

6. The automatic generation implementation method of test cases based on the relay protection setting value type according to claim 5, characterized in that: The fixed value type label is also set with at least one of a "minimum value" label, a "maximum value" label, a "middle value" label, an "error" label, a "unit" label, a "phase" label, a "fault feature" label, and a "method" label; 7. The method for automatically generating test cases based on relay protection setting value types according to claim 6, characterized in that: When the fixed value type label is at least one of a "protection function" label, a "fixed value name" label, a "minimum value" label, a "maximum value" label, a "middle value" label, an "error" label, or a "unit" label, the fixed value type label fills in the content according to the protection function configuration of the device to be tested and the requirements of the enterprise standard; When the fixed value type label is at least one of a "phase" label, a "fault feature" label, or a "method" label, a standard option library is preset in the relay protection fixed value type file, and the content of the standard option fixed value type label is selected according to the protection principle and the fixed value feature, without customizing; When the fixed value type label is a "phase" label, the "phase" label is used to define the phase to be tested for the excitation quantity; the standard options of the "phase" label include positive sequence, negative sequence, zero sequence, split phase, split line, three-phase, or three-wire; When the fixed value type label is the "fault feature" label, the "fault feature" label is used to define the change trend of the excitation quantity; the standard options of the "fault feature" label include under-amount or over-amount; When the fixed value type label is the "method" label, the "method" label is used to define the method of applying the excitation quantity; the standard options of the "method" label include slow addition or sudden addition.

8. The method for automatically generating test cases based on relay protection setting value types according to claim 1, characterized in that: The content value of the "protection function" label is composite voltage blocking overcurrent protection, zero-sequence overcurrent protection, zero-sequence overvoltage protection or phase distance protection; The content value of the "fixed value name" label is low voltage lock value, negative sequence voltage blocking lock value, operating current, delay time or phase impedance operating value.

Citation Information

Patent Citations

  • Establishment method of relay protection general test case frame system

    CN110174609A

  • Automatic test method, device and system based on protection device model file

    CN112214403A