Relay protection constant value checking method and device of distribution network automatic protection switch
Through automated identification communication protocols and fuzzy matching technology, the problem of low efficiency and insufficient accuracy of setting value calibration of automatic protection switches in distribution networks is solved, and an efficient and accurate setting value calibration process is achieved.
Patent Information
- Application Number
- CN202510377398.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-07-22
AI Technical Summary
In the prior art, the fixed value verification of the distribution network automatic protection switch depends on manual operation, resulting in low calibration efficiency and easy human error, which affects the sensitivity and reliability of the protection device.
By obtaining the original data of the fixed value list of the automated protection switch, dynamically identify the communication protocol type, parse the fixed value item data, and fuzzy match with the pre-configured source data table, perform step size compliance, numerical range and unit compatibility verification, output a calibration report and make fixed value changes.
It improves calibration efficiency, reduces human error, and improves the accuracy and automation of calibration.
Smart Images

Figure CN120357383A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power grid operation and maintenance, and particularly to a method and device for checking relay protection setting values of a distribution network automatic protection switch. Background Art
[0002] The distribution network automatic protection switch is an important electrical equipment for isolating faults in distribution network lines and an important defense line to ensure the safe and reliable operation of distribution network lines. Therefore, the accurate downloading of the setting values of the relay protection device has a direct and significant impact on the sensitivity and reliability of the protection device during operation. Therefore, it is crucial to ensure the accuracy of the relay protection switch setting values and it must be rigorous and error-free.
[0003] Currently, when checking setting values, it is usually still dependent on manual checking. For example, currently, Ningdong Company operates and maintains approximately 908 automatic switches and 172 ring main units in total. Among them, there are more than 10 types of switches with different models, and there are 5 types of switch functions in total. The setting value downloading software and control word functions of each different model of automatic switch are all different. According to statistics, the number of changes or additions to the distribution network switch setting values of Ningdong Company is more than 400 per quarter. Therefore, before and after the on-site maintenance personnel perform equipment inspection or protection test work, they usually need to check the control words one by one, and the workload of setting value item checking is becoming increasingly heavy. Moreover, in the conventional working mode, the on-site maintenance personnel need to read all the setting value parameter items, then operate on the device to change the protection setting values, and then compare the downloaded setting values of the equipment item by item with the standard setting value list issued by the supply service center to complete the full set of setting value downloading verification process. During this process, any incorrect downloading of the control word will affect the correct operation of the protection function of the automatic switch. This work not only takes time and effort, has low checking efficiency, but also is prone to errors due to human factors. Summary of the Invention
[0004] In view of this, in view of the above deficiencies, it is necessary to propose a method and device for checking relay protection setting values of a distribution network automatic protection switch to improve the checking efficiency and accuracy of protection setting values.
[0005] In a first aspect, the present invention provides a method for checking relay protection setting values of a distribution network automatic protection switch, including:
[0006] Obtain the original data of the setting value list of the automatic protection switch;
[0007] Dynamically identify the communication protocol type based on the header characteristics of the original data;
[0008] Parse the original data according to the identified communication protocol type to obtain setting value item data;
[0009] Perform fuzzy matching on the obtained setting value item data with the data in the pre-configured source data table to establish a mapping relationship;
[0010] Perform at least one of the following validations on the mapped constant items: step compliance validation, numerical range validation, and unit compatibility validation;
[0011] Output a verification report containing each verification error and correction suggestion, and perform constant value change download according to the verification report.
[0012] Preferably, the dynamic identification of the communication protocol type based on the header features of the original data includes:
[0013] Detect the matching degree between the start byte of the original data and a pre-defined set of protocol signature codes, and determine the communication protocol type corresponding to the current original data as the protocol type with the highest matching degree;
[0014] Among them, the set of protocol signature codes includes the header signature code 0X0100 of the IEC61850 protocol and the header signature code 0X680A of the IEC60870-5-103 protocol; the protocol matching condition satisfies the following formula:
[0015]
[0016] In the formula, P is used to represent the identified communication protocol type, H i is the fixed header signature code of the known communication protocol type P i D raw is the original data, prefix_match(D raw , H i ) represents comparing the start byte of the original data D raw with the fixed header signature code of the known communication protocol type P i ; argmax is used to represent determining the communication protocol type at the time of successful comparison as P.
[0017] Preferably, the parsing of the original data according to the identified communication protocol type includes:
[0018] Extract the length field of the protocol data unit of the original data based on the following calculation formula:
[0019] L APDU = Length(D raw [a:b])
[0020] Among them, L APDU is used to represent the number of bytes of the valid data in the protocol data unit of the original data, Length is used to represent the function of calculating the number of bytes, D raw is the original data, and a and b are the start index and end index in the original data D raw respectively;
[0021] Based on the following calculation formula, the valid data segment D in the original data is intercepted according to the length field APDU :
[0022] D APDU = D raw [b:b + L APDU
[0023] Traverse and parse the information body starting from the offset pos = c: Among them,
[0024] Constant item identifier ID i = Hex(D APDU [pos:pos + 4]); In the formula, Hex represents the hexadecimal encoding operator;
[0025] Data type T i = D APDU [pos + 4];
[0026] Numeric decoding
[0027] In the formula, Decode Float32 is used to represent parsing 4-byte binary data into IEEE754 floating-point numbers, and Decode Int16 is used to represent parsing 2-byte binary data into signed integers.
[0028] Preferably, the obtained constant item data is fuzzy matched with the data in the pre-configured source data table, including:
[0029] Using the parsed constant item identifier ID i to find the corresponding name and unit of the current constant item data in the pre-configured source data table as the name s.name and unit s.U of the constant item data;
[0030] According to the obtained name, unit and value of the constant item data, calculate the name similarity, unit similarity and coverage degree between the constant item data and the source data table data, and obtain a comprehensive similarity score by weighting;
[0031] Judge whether the comprehensive similarity score is greater than the preset score threshold; if so, determine that the constant item data matches the source data table data, and establish a mapping relationship between the constant item data and the matched source data table data.
[0032] Preferably, the comprehensive similarity is calculated by the following calculation formula:
[0033] Sim(s, m) = α·NameSim(s, m) + β·UnitSim(s, m) + γ·RangeSim(s, m)
[0034] In the formula, Sim(s, m) is used to represent the comprehensive similarity between the fixed-value item data s and the source data table data m. NameSim(s, m), UnitSim(s, m), and RangeSim(s, m) respectively represent the name similarity, unit similarity, and range coverage between the fixed-value item data s and the source data table data m. α, β, and γ are respectively the weight coefficients of the name similarity, unit similarity, and range coverage;
[0035] Among them,
[0036]
[0037] In the formula, s.name and m.name are respectively used to represent the name in the parsed fixed-value item data and the name in the source data table data. EditDistance is used to represent the levenshtein edit distance. s.U and m.U are respectively used to represent the unit in the parsed fixed-value item data and the unit in the source data table data; s.V represents the value in the parsed fixed-value item data, and m.V min and m.V max respectively represent the minimum value and the maximum value of the values in the source data table data.
[0038] Preferably, the steps of the step compliance check include:
[0039] Calculate the difference between the value s.V in the parsed fixed-value item and the minimum value of the values in the source data table;
[0040] Calculate the remainder of the obtained difference and the step size m.Δ representing the minimum interval of fixed-value adjustment in the source data table;
[0041] If the remainder is non-zero, output a verification error prompt result indicating a step size violation.
[0042] Preferably, after the step size check fails, it further includes:
[0043] Calculate the corrected recommended value of the fixed-value item data using the following calculation formula:
[0044]
[0045] In the formula, V s is the corrected recommended value, is the floor operator.
[0046] Preferably, the steps of the numerical range check include:
[0047] Judge whether the value s.V in the parsed fixed-value item is between the minimum value m.V min and the maximum value m.V maxbetween;
[0048] If s.V is not within m.V min and m.V max then output a verification error prompt result indicating that the current set value item data exceeds the limit.
[0049] Preferably, the steps of the unit compatibility verification include:
[0050] If the unit s.U in the parsed set value item data is not equal to the unit m.U in the source data table data, but s.U and m.U are convertible, then use the following calculation formula to convert the value s.V in the parsed set value item data:
[0051] s.V converted = s.V × ScaleFactor(s.U → m.U)
[0052] In the formula, s.V converted is the value in the converted set value item data, and ScaleFactor is the conversion rate;
[0053] Judge whether |s.V converted - m.V ref | ≤ ε holds; where ε is the allowable error for unit conversion;
[0054] If it does not hold, then output a prompt result indicating that the numerical unit compatibility verification of the current set value item data is unqualified.
[0055] In a second aspect, the present invention provides a relay protection setting value verification device for a distribution network automation protection switch, including a data acquisition module, an analysis and processing module, a display and alarm module, and a setting value change and download module;
[0056] The data acquisition module is configured to obtain the original data of the setting value list of the automation protection switch;
[0057] The analysis and processing module is configured to dynamically identify the communication protocol type based on the header characteristics of the original data; parse the original data according to the identified communication protocol type to obtain the set value item data; perform fuzzy matching on the obtained set value item data with the pre-configured source data table data to establish a mapping relationship; perform at least one of step compliance verification, numerical range verification, and unit compatibility verification on the mapped set value item;
[0058] The display and alarm module is configured to output a verification report including each verification error prompt result and correction suggestion;
[0059] The setting value change and download module is configured to perform setting value change and download according to the verification report.
[0060] As can be seen from the above technical solution, in the relay protection setting verification method and device for the distribution network automation protection switch provided by the embodiments of the present invention, when performing protection setting verification, first obtain the original data of the setting list of the automation switch, and then dynamically identify the communication protocol type based on the header characteristics of the original data; further, parse the original data according to the identified communication protocol type, and perform fuzzy matching on the obtained setting item data with the data in the pre-configured source data table to establish a mapping relationship; after mapping, perform verifications such as step size compliance, numerical range, and unit compatibility on the setting items, and finally output a verification report including verification errors and correction suggestions. It can be seen that this solution can, after collecting the original data of the setting list of the automation switch, identify the communication protocol and perform fuzzy matching, and further independently verify the setting item data in terms of step size compliance, numerical range, unit compatibility, etc. In this way, it is not necessary for the operation and maintenance personnel to compare each item of the setting list one by one, which greatly improves the verification efficiency and also reduces the errors caused by human factors, thereby improving the accuracy of verification. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 FIG. is a flowchart of a relay protection setting verification method for a distribution network automation protection switch provided by an embodiment of the present invention;
[0062] Figure 2 FIG. is a schematic diagram of a relay protection setting verification device for a distribution network automation protection switch provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0063] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other accompanying drawings can be obtained based on these drawings without creative efforts.
[0064] As Figure 1 shown, an embodiment of the present invention provides a relay protection setting verification method for a distribution network automation protection switch, and the method may include the following steps:
[0065] Step 101: Obtain the original data of the setting list of the automation protection switch;
[0066] Step 102: Dynamically identify the communication protocol type based on the header characteristics of the original data;
[0067] Step 103: Parse the original data according to the identified communication protocol type to obtain the setting item data;
[0068] Step 104: Perform fuzzy matching on the obtained constant item data and the pre-configured source data table data to establish a mapping relationship;
[0069] Step 105: Perform at least one of the following validations on the mapped constant items: step compliance validation, numerical range validation, and unit compatibility validation;
[0070] Step 106: Output a verification report containing each verification error and correction suggestion, and perform constant value change download according to the verification report.
[0071] In this embodiment, after collecting the original data of the setting list of the automatic protection switch, through communication protocol identification and fuzzy matching, and further independently performing validations on the constant item data in terms of step compliance, numerical range, unit compatibility, etc., so that it is not necessary for the operation and maintenance personnel to compare each item of the setting list item by item, which greatly improves the verification efficiency, and also reduces the errors caused by human factors, thus improving the accuracy of verification.
[0072] For step 101, obtain the original data of the setting list of the automatic protection switch.
[0073] In this step, consider connecting the protection switch device serial port through an automatic switch serial port converter to efficiently obtain the setting list of the automatic switch. At the same time, considering that the automatic switch has various types of serial port interfaces, it is also possible to consider connecting the USB conversion module to the protection setting verification device, and connecting the other end to different automatic switch serial ports to collect the original data of the setting lists of different types of automatic switches. Of course, it is also possible to directly obtain the setting lists of each sub-station side on the master station side through the communication connection relationship between the master station and the sub-station to verify the protection settings of each sub-station side on the master station side. That is to say, this verification device can be set on the sub-station side to directly obtain the original data of the automatic switch setting list from the sub-station side, or can be set on the master station side to verify after obtaining the original data of the sub-station side setting list through the master station side.
[0074] For step 102, dynamically identify the communication protocol type based on the header characteristics of the original data.
[0075] In this step, when performing protocol identification, it can be specifically implemented in the following ways:
[0076] Detect the matching degree between the start byte of the original data and the pre-defined protocol signature set, and determine the communication protocol type corresponding to the current original data as the protocol type with the highest matching degree;
[0077] Among them, the protocol feature code set includes the header feature code 0X0100 of the IEC61850 protocol and the header feature code 0X680A of the IEC60870-5-103 protocol; the protocol matching condition satisfies the following formula:
[0078]
[0079] In the formula, P is used to represent the identified communication protocol type, and H i is the fixed header feature code of the known communication protocol type P i , D raw is the original data, and prefix_match(D raw , H i ) represents comparing the starting byte of the original data D raw with the fixed header feature code of the known communication protocol type P i ; argmax is used to determine the communication protocol type as P when the comparison is successful.
[0080] For example, the unprocessed byte sequence of the automation switch read from the protection device is 0x680A0100..., and the communication protocol type can be IEC 60870-5-103, IEC 61850, Modbus, etc. Then when performing header feature matching, first define the protocol feature code dictionary Φ = {(P i , H i )}, store the protocol type and the corresponding header feature bytes, such as the header feature of IEC61850 is 0x0100. Further, through the above matching condition, it can be judged whether the original data stream starts with some header features, that is, by comparing the starting byte of the data stream with the fixed header features of the known protocol features, so as to quickly determine the communication protocol type. If (that is, D raw starts with H i ), then the protocol type can be determined as P i .
[0081] Step 103: Parse the original data according to the identified communication protocol type to obtain the set value item data.
[0082] When parsing the original data in this step, it can be implemented in the following way:
[0083] Extract the length field of the protocol data unit of the original data based on the following calculation formula:
[0084] L APDU = Length(D raw [a:b])
[0085] Among them, L APDUThe number of bytes of valid data in the protocol data unit used to represent the original data, Length is a function used to represent the calculated number of bytes, D raw is the original data, and a and b are the starting index and ending index in the original data D raw respectively;
[0086] Based on the following calculation formula, intercept the valid data segment D in the original data according to the length field APDU :
[0087] D APDU = D raw [b:b + L APDU
[0088] Start traversing and parsing the information body from the offset pos = c: Among them,
[0089] The fixed value item identifier ID i = Hex(D APDU [pos:pos + 4]); In the formula, Hex represents the hexadecimal encoding operator;
[0090] The data type T i = D APDU [pos + 4];
[0091] Numeric decoding
[0092] In the formula, Decode Float32 is used to represent parsing 4-byte binary data into an IEEE754 floating-point number, and Decode Int16 is used to represent parsing 2-byte binary data into a signed integer.
[0093] This step is to parse the input original data D raw to obtain the fixed value item data set S = {(ID i , V i , U i )}, where ID i is the fixed value item identifier, V i is the value, and U i is the unit. The specific parsing can include the following process (taking IEC61850 as an example):
[0094] (1) Application protocol data unit APDU parsing
[0095] Extract the length field L APDU = Decode BigEndian (D raw [2:4]); The LAPDU represents the number of bytes of valid data. For example, if D_raw[2:4] = 0x001A, then LAPDU = 26 bytes.
[0096] Further, intercept the valid data segment D from the APDU data segment APDU = D raw [4:4 + L APDU , and this valid data segment contains actual control information and set value data.
[0097] (2) Cause address resolution
[0098] Resolve the transmission cause COT = D APDU [0]; It represents the transmission purpose of the data (such as periodic upload, event trigger, etc.).
[0099] Extract the device address A device = D APDU [1:3]; It represents the device address and identifies the protection device where the data comes from.
[0100] Extract the information body address A info = D APDU [3:5]; It represents the information body address and identifies the storage location of the set value item in the device.
[0101] (3) Information body resolution
[0102] Traverse the data segment: start loop resolution from the offset pos = 6:
[0103] Set value item identifier ID i = Hex(D APDU [pos:pos + 4])
[0104] Data type T i = D APDU [pos + 4]
[0105] Numeric decoding:
[0106] DecodeFloat32: Parse 4-byte binary data into an IEEE 754 floating-point number, that is, used to parse the actual value of the set value item (such as 3.75 kA).
[0107] DecodeInt16: Parse 2-byte binary data into a signed integer, that is, parse the integer set value (such as the time set value 0.5 s).
[0108] Step 104: Perform fuzzy matching on the obtained set value item data and the data in the pre-configured source data table, and establish a mapping relationship;
[0109] For the source data table M, for example, it can be where ID is the unique identifier of the fixed value item (such as 0x1A01); Name is the name of the fixed value item (such as the first stage of overcurrent protection); Unit is the unit (such as kA, s); V min and V max is the allowable numerical range (such as 0.1 ≤ fixed value ≤ 50.0). Δ is the step size (such as 0.1, indicating that the fixed value needs to be an integer multiple of 0.1). Desc is the description information (such as the fixed value of the first stage of overcurrent).
[0110] When performing fuzzy matching, it can be achieved in the following way:
[0111] Use the parsed fixed value item identifier ID i to find the corresponding name and unit of the current fixed value item data from the pre-configured source data table as the name s.name and unit s.U of the fixed value item data;
[0112] According to the obtained name, unit and value of the fixed value item data, calculate the name similarity, unit similarity and coverage degree of the fixed value item data and the source data table data, and obtain the comprehensive similarity score by weighting;
[0113] Judge whether the comprehensive similarity score is greater than the preset score threshold; if so, determine that the fixed value item data matches the source data table data, and establish a mapping relationship between the fixed value item data and the matched source data table data.
[0114] For example, the parsed fixed value item data s can include the original name, unit and value, such as {"name":"OC_I","unit":"A","value":5200}); while the source data table data m can be {"name":"OverCurrent_I>","unit":"kA","min":0.1,"max":50.0}).
[0115] Specifically, the comprehensive similarity can be calculated by the following calculation formula:
[0116] Sim(s,m)=α·NameSim(s,m)+β·UnitSim(s,m)+γ·RangeSim(s,m)
[0117] In the formula, Sim(s,m) is used to represent the comprehensive similarity between the fixed value item data s and the source data table data m, NameSim(s,m), UnitSim(s,m), RangeSim(s,m) respectively represent the name similarity, unit similarity and range coverage degree between the fixed value item data s and the source data table data m, and α, β, γ are the weight coefficients of the name similarity, unit similarity and range coverage degree respectively, and usually can be taken as 0.6, 0.3, 0.1 respectively.
[0118] Among them,
[0119]
[0120] In the formula, s.name and m.name are respectively used to represent the name in the parsed constant item data and the name in the source data table data, EditDistance is used to represent the levenshtein edit distance, s.U and m.U are respectively used to represent the unit in the parsed constant item data and the unit in the source data table data; s.V represents the value in the parsed constant item data, m.V min and m.V max respectively represent the minimum value and the maximum value of the numerical value in the source data table data.
[0121] Step 105: Perform at least one of the following validations on the mapped constant items: step compliance validation, numerical range validation, and unit compatibility validation;
[0122] (1) When performing step compliance validation, it can be achieved in the following way:
[0123] Calculate the difference between the value s.V in the parsed constant item and the minimum value of the numerical value in the source data table;
[0124] Calculate the remainder of the obtained difference and the step m.Δ representing the minimum interval of constant value adjustment in the source data table;
[0125] If the remainder is non-zero, output the verification error prompt result indicating step violation.
[0126] When the remainder is non-zero, it means that the constant value is not adjusted according to the step. Further, if the step verification fails, the corrected recommended value of the constant item data can also be calculated using the following calculation formula:
[0127]
[0128] In the formula, V s is the corrected recommended value, is the floor operator.
[0129] For example, 3.75kA does not conform to the step 0.1kA and needs to be corrected to 3.7kA or 3.8kA.
[0130] (2) When performing numerical range validation, it can be achieved in the following way:
[0131] Judge whether the value s.V in the parsed constant item is between the minimum value m.V min and the maximum value m.V max in the source data table data;
[0132] If s.V is not within m.V min and m.V max then output a verification error prompt result indicating that the current set value item data is out of limit.
[0133] (3) When performing unit compatibility verification, it can be implemented in the following manner:
[0134] If the unit s.U in the parsed set value item data is not equal to the unit m.U in the source data table, but s.U and m.U are convertible, then use the following calculation formula to convert the value s.V in the parsed set value item data:
[0135] s.V converted = s.V × ScaleFactor(s.U → m.U)
[0136] In the formula, s.V converted is the value in the converted set value item data, and ScaleFactor is the conversion rate;
[0137] Judge whether |s.V converted - m.V ref | ≤ ε holds; where ε is the allowable error for unit conversion, for example, it can be 10 -3 ;
[0138] If it does not hold, then output a prompt result indicating that the numerical unit compatibility verification of the current set value item data is unqualified.
[0139] Of course, in addition, version comparison verification can also be performed to determine the deviation between the current set value and the set value in history, so as to be able to prompt the operation and maintenance personnel to conduct verification when the deviation is large.
[0140] Step 106: Output a verification report containing each verification error and correction suggestion, and perform set value change download according to the verification report.
[0141] In this step, it aims to form a verification report by outputting the verification results, correction suggestions, etc., for the staff to view, and perform corresponding operation and maintenance operations based on the verification report, that is, the operation and maintenance personnel can perform set value change download according to the verification report.
[0142] As Figure 2 shown, the present invention also provides a relay protection set value verification device for a distribution network automation protection switch, which is used to execute the methods of the above embodiments; specifically, it may include a data acquisition module 201, an analysis and processing module 202, a display and alarm module 203, and a set value change download module 204;
[0143] The data acquisition module 201 is configured to obtain the original data of the customized list of the automatic switch. For example, it can support multiple serial ports, such as DB9, DB25, and terminal RS232. The serial port parameters support setting and can be associated with the device for automatic recording. After the fixed value acquisition is completed, double-click to view the specific fixed value. The fixed value viewing tool supports zooming. Printing, converting to PDF, etc. The fixed value file name supports "renaming". Incorrect files can also be deleted or the historical fixed values can be cleared.
[0144] The analysis and processing module 202 is configured to dynamically identify the communication protocol type based on the header features of the original data; parse the original data according to the identified communication protocol type to obtain the fixed value item data; perform fuzzy matching on the obtained fixed value item data with the data in the pre-configured source data table to establish a mapping relationship; perform at least one of step compliance verification, numerical range verification, and unit compatibility verification on the mapped fixed value items. For example, it can include a fixed value comparison function that supports fuzzy matching of fixed value item names, joint verification of setting values and units, such as ms and s, "degree", and "°". After selecting the device, automatic verification can be performed, and a verification report can be generated.
[0145] The display and alarm module 203 is configured to output a verification report containing the results of each verification error prompt and correction suggestions. For example, filtering can be performed according to the matching results, such as "All", "Match successful", "Match failed", etc. The fixed value items that fail to match will be marked in red, and clicking on "Details" can view the reason for the failure. For some fixed value items that do not need to be concerned about, "Ignore" can also be selected, and they will be automatically marked in green.
[0146] The fixed value change and download module 204 is configured to perform fixed value change and download according to the verification report. This part can be mainly used for parameter configuration and update, and should support modifying and downloading the protection fixed values (such as overcurrent, instantaneous trip, etc. parameters) of the relay protection device through local or remote methods. It has a built-in automatic verification function to ensure the rationality of the fixed value logic and device compatibility; supports multiple communication protocols such as IEC61850 and Modbus, provides hierarchical permission management to ensure operation safety, and generates operation logs at the same time to achieve full-process traceability.
[0147] This specification also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed on a computer, it causes the computer to execute the method in any one of the embodiments in the specification.
[0148] This specification also provides a computing device, including a memory and a processor. An executable code is stored in the memory. When the processor executes the executable code, it implements the method in any one of the embodiments in the specification.
[0149] Since the device embodiments provided in this specification are based on the same inventive concept as the method embodiments in this specification, for specific content, reference may be made to the descriptions in the method embodiments of this specification, and details will not be repeated here.
[0150] The modules or units in the device embodiments of the present invention can be combined, divided, and deleted according to actual needs. The foregoing disclosures are only the preferred embodiments of the present invention, and of course cannot be used to limit the scope of the rights of the present invention. Those of ordinary skill in the art can understand the entire or part of the processes of implementing the above embodiments, and the equivalent changes made according to the claims of the present invention still fall within the scope covered by the invention.
Claims
1. A method for checking the relay protection setting value of a distribution network automation protection switch, characterized in that, Including: Obtain the original data of the setting list of the automatic protection switch; Dynamically identify the communication protocol type based on the header characteristics of the original data; Parse the original data according to the identified communication protocol type to obtain setting item data; Perform fuzzy matching between the obtained setting item data and the pre-configured source data table data to establish a mapping relationship; Perform at least one of the following validations on the mapped setting items: step compliance validation, numerical range validation, and unit compatibility validation; Output a verification report containing each verification error and correction suggestion, and perform setting value change download according to the verification report.
2. The relay protection setting value checking method for the distribution network automation protection switch according to claim 1, characterized in that The dynamically identifying the communication protocol type based on the header characteristics of the original data includes: Detect the matching degree between the starting byte of the original data and the pre-defined protocol signature set, and determine the protocol type with the highest matching degree as the communication protocol type corresponding to the current original data; Among them, the protocol signature set includes the header signature 0X0100 of the IEC61850 protocol and the header signature 0X680A of the IEC60870-5-103 protocol; the protocol matching condition satisfies the following formula: Wherein, P is used to represent the identified communication protocol type, and H i is the fixed header feature code of the known communication protocol type P i , D raw is the original data, and prefix_match(D raw , H i ) represents comparing the start byte of the original data D raw with the fixed header feature code of the known communication protocol type P i ; argmax is used to represent determining the communication protocol type at the time of successful comparison as P.
3. The relay protection setting value checking method for the distribution network automation protection switch according to claim 1, characterized in that The parsing the original data according to the identified communication protocol type includes: Extract the length field of the protocol data unit of the original data based on the following calculation formula: L APDU = Length(D raw [a:b]) Among them, L APDU is used to represent the number of bytes of the valid data in the protocol data unit of the original data, Length is a function used to represent the number of calculated bytes, D raw is the original data, and a and b are respectively the starting index and the ending index in the original data D raw ; Based on the following calculation formula, the valid data segment D in the original data is intercepted according to the length field APDU : D APDU = D raw [b:b + L APDU Traverse and parse the information body starting from the offset pos = c: where, Fixed value item identifier ID i = Hex(D APDU [pos:pos + 4]); where Hex represents the hexadecimal encoding operator; Data type T i = D APDU [pos + 4]; Numeric decoding In the formula, Decode Float32 is used to represent parsing 4-byte binary data into IEEE754 floating-point numbers, Decode Int16 is used to represent parsing 2-byte binary data into signed integers.
4. The relay protection setting verification method for the distribution network automation protection switch according to claim 1, characterized in that, The performing fuzzy matching between the obtained setting item data and the pre-configured source data table data includes: Using the parsed fixed value item identifier ID i Search for the name and unit corresponding to the current fixed value item data from the pre-configured metadata table as the name s.name and unit s.U of the fixed value item data; Calculate the name similarity, unit similarity, and coverage degree between the setting item data and the source data table data according to the name, unit, and value of the obtained setting item data, and obtain a comprehensive similarity score by weighting; Judge whether the comprehensive similarity score is greater than the preset score threshold; if so, determine that the setting item data matches the source data table data, and establish a mapping relationship between the setting item data and the matching source data table data.
5. The relay protection setting verification method for the distribution network automation protection switch according to claim 4, characterized in that, The comprehensive similarity is calculated by the following calculation formula: Sim(s,m) = α·NameSim(s,m) + β·UnitSim(s,m) + γ·RangeSim(s,m) In the formula, Sim(s,m) is used to represent the comprehensive similarity between the setting item data s and the source data table data m, NameSim(s,m), UnitSim(s,m), RangeSim(s,m) respectively represent the name similarity, unit similarity, and range coverage degree between the setting item data s and the source data table data m, and α, β, γ are the weight coefficients of the name similarity, unit similarity, and range coverage degree respectively; Among them, Wherein, s.name and m.name are respectively used to represent the name in the parsed constant item data and the name in the source data table data, EditDistance is used to represent the levenshtein edit distance, s.U and m.U are respectively used to represent the unit in the parsed constant item data and the unit in the source data table data; s.V represents the value in the parsed constant item data, m.V min and m.V max respectively represent the minimum value and the maximum value of the numerical value in the source data table data.
6. The relay protection setting value checking method for the distribution network automation protection switch according to claim 5, characterized in that, The steps of the step compliance validation include: Calculate the difference between the value s.V in the parsed setting item and the minimum value of the value in the source data table; Calculate the remainder result of the obtained difference and the step m.Δ representing the minimum interval of setting value adjustment in the source data table; If the remainder result is non-zero, output a verification error prompt result indicating step violation.
7. The relay protection setting value verification method for the distribution network automation protection switch according to claim 6, characterized in that, After the step verification fails, it further includes: Calculate the correction suggestion value of the setting item data using the following calculation formula: where V s is the revised recommended value, is the floor operator.
8. The relay protection setting value verification method for the distribution network automation protection switch according to claim 5, characterized in that The steps of the numerical range validation include: Determine whether the value s.V in the parsed fixed-value item is between the minimum value m.V and the maximum value m.V of the data in the source data table min and the maximum value m.V max therebetween; If s.V is not within m.V min and m.V max then output a verification error prompt result indicating that the current fixed value item data exceeds the limit.
9. The method for checking the relay protection setting value of the distribution network automation protection switch according to claim 5, characterized in that, The steps of the unit compatibility check include: If the unit s.U in the parsed fixed value item data is not equal to the unit m.U in the source data table data, but s.U and m.U are convertible, then the value s.V in the parsed fixed value item data is converted using the following calculation formula: s.V converted = s.V × ScaleFactor(s.U → m.U) where s.V converted is the value in the converted fixed-value item data, and ScaleFactor is the conversion rate; Determine |s.V converted -m.V ref | ≤ ε holds; where ε is the error allowed for unit conversion; If not, a prompt result indicating that the numerical unit compatibility check of the current fixed value item data fails is output.
10. A relay protection setting verification device for a distribution network automation protection switch, characterized in that, It includes a data acquisition module, an analysis and processing module, a display and alarm module, and a fixed value change and download module; The data acquisition module is configured to obtain the original data of the fixed value list of the automatic protection switch; The analysis and processing module is configured to dynamically identify the communication protocol type based on the header characteristics of the original data; Parse the original data according to the identified communication protocol type to obtain fixed value item data; Perform fuzzy matching on the obtained fixed value item data with the pre-configured source data table data to establish a mapping relationship; Perform at least one of step compliance check, numerical range check, and unit compatibility check on the mapped fixed value items; The display and alarm module is configured to output a verification report including each verification error prompt result and correction suggestion; The fixed value change and download module is configured to perform fixed value change and download according to the verification report.
Citation Information
Cited By
Relay protection constant value verification method, device, equipment and medium
CN121307765A