Test methods, systems, media, and products for the protective behavior of protective devices

By acquiring the operating status parameters of the protection device, dynamically generating verification benchmarks and performing multi-layer verification, the inaccuracy problem caused by the inability of the verification benchmarks to be dynamically adjusted with the status in the protection device test is solved, and the accuracy and automation of protection behavior testing are realized.

CN123069174APending Publication Date: 2026-11-10GUANGZHOU POWER SUPPLY BUREAU GUANGDONG POWER GRID CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611077986.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-20
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

Existing protection devices suffer from inaccurate test results in protection behavior testing because the verification benchmark cannot be dynamically adjusted according to the device's operating status, and the testing process relies on manual intervention, making it impossible to achieve full-process remote automation.

Method used

By acquiring the status parameters of the protection device during operation, a verification benchmark adapted to the current working condition is dynamically generated. Event sequence record messages are received and parsed, similarity calculations and rule matching are performed, and multi-layer verification is carried out using drift confidence and review time windows to ensure test accuracy.

Benefits of technology

It improves the accuracy of protection behavior testing of protection devices, realizes full-process automation, solves the inaccuracy problem caused by static solidification of verification benchmarks, and enhances the automation and accuracy of testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123069174A_ABST
    Figure CN123069174A_ABST
Patent Text Reader

Abstract

This invention discloses a testing method, system, medium, and product for the protection behavior of a protection device. The method involves: acquiring the status parameters of the protection device and retrieving the expected description semantic set and expected data rule set; receiving the event sequence record message uploaded when the protection device performs protection behavior and parsing out the actual description text and private data block; calculating the description similarity, matching the private data block in the rule set to obtain the rule matching degree, and weighting the two values ​​to obtain the drift confidence; if the confidence is less than or equal to the review threshold, calculating the review time window, extracting the continuous message sequence falling into the window with the message as the center point, and parsing out three sequences: the set value area identifier, the fault current, and the action delay amount; if the three sequences meet the conditions, the protection behavior is determined to be normal. This invention can solve the problem of inaccurate test results caused by the inability of the verification benchmark to be dynamically adjusted with the device's operating status in the protection behavior test of existing protection devices, thereby improving the accuracy of protection behavior test of protection devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of protective device testing technology, and in particular to testing methods, systems, media, and products for the protective behavior of protective devices. Background Technology

[0002] Protection devices are the first line of defense for the safe and stable operation of a power system. They bear the critical task of quickly and selectively isolating faulty components when system failures occur. The correctness of their protective actions directly affects the power grid's reliability and operational safety. During long-term operation, the hardware characteristics, software logic, and setting configurations of protection devices may change due to environmental variations, device aging, or parameter adjustments, posing a risk of malfunction, failure to operate, or incorrect action sequence. Therefore, before commissioning, after maintenance, or during routine operation and maintenance, the protection functions of protection devices must be tested and verified to confirm their ability to execute correct protective actions according to preset logic under various fault scenarios.

[0003] Existing technologies employ fault waveform playback-based testing schemes to test the protection behavior of protection devices. However, these schemes have significant drawbacks: fault waveform playback relies on the pre-preparation of standard waveform files, which cannot cover the dynamic behavior differences caused by changes in operating modes and status activation / deactivation during actual device operation, resulting in poor accuracy in protection behavior testing. Furthermore, the testing process still requires significant manual intervention. From waveform loading and tester wiring to the retrieval and comparison of action reports, all operations rely on on-site operation by maintenance personnel, making it impossible to achieve fully remote automated testing and further reducing the accuracy of protection behavior testing. Summary of the Invention

[0004] This invention provides a method, system, medium, and product for testing the protective behavior of protective devices, which can solve the problem of inaccurate test results caused by the inability of the verification benchmark to be dynamically adjusted with the operating status of the device in the protection behavior test of existing protective devices, thereby improving the accuracy of the protection behavior test of protective devices.

[0005] In a first aspect, an embodiment of the present invention provides a method for testing the protective behavior of a protective device, comprising: The status parameters of the protection device during operation are obtained, and the status parameters are used to search in a preset database to obtain the expected description semantic set and the expected data rule set; The system receives the event sequence record message uploaded by the protection device when it performs protection behavior after receiving a test command, and parses the event sequence record message to obtain the actual description text and private data block. The similarity between the expected description semantic set and the actual description text is calculated to obtain the description similarity. Each key-value pair in the private data block is matched in the expected data rule set to obtain the rule matching degree. The description similarity and the rule matching degree are weighted and calculated to obtain the drift confidence corresponding to the protection behavior performed by the protection device. If the drift confidence is less than or equal to the preset review threshold, a review time window is calculated based on the drift confidence. A continuous message sequence falling within the review time window is extracted from the preset message buffer using the event sequence record message as the center point. The continuous message sequence is parsed to obtain a setpoint area identifier sequence, a fault current sequence, and an action delay sequence. If the setpoint area identifier sequence, the fault current sequence, and the action delay sequence meet preset legal conditions, the protection behavior of the protection device is determined to be normal.

[0006] By acquiring the state parameters of the protection device during operation, real-time data can be provided for the subsequent dynamic generation of verification benchmarks adapted to the current operating conditions, solving the inaccuracy problem caused by statically fixed verification benchmarks and providing a data foundation for improving test accuracy. Using the state parameters to retrieve the expected description semantic set and expected data rule set allows the verification benchmark to adaptively adjust with the actual operating conditions of the device, solving the problem in existing technologies where legal state changes are misjudged as abnormal due to fixed expected values, and providing dynamic benchmark assurance for improving test accuracy. Receiving and parsing the event sequence record messages uploaded when the device performs protection actions to obtain the actual description text and private data blocks allows the actual protection behavior output of the device to be transformed into… Quantifiable and verifiable structured data addresses the limitation of existing technologies that rely on manual message reading for automated and accurate comparison, providing a standardized data source to ensure testing accuracy. Calculating the similarity between the expected semantic set and the actual description text yields description similarity, quantifying semantic deviations into a computable metric and resolving the inability of existing technologies to identify legitimate variations of synonyms, thus providing semantic quantification assurance for testing accuracy. Matching key-value pairs in private data blocks against the expected data rule set yields rule matching degree, quantifying the degree of data structure conformity into a computable metric, addressing the issue of existing technologies ignoring private data structure matching, and further enhancing testing accuracy. Provides quantitative assurance for data structure; weighted calculation of description similarity and rule matching degree to obtain drift confidence, quantifying the overall deviation of a single message into a comprehensive indicator, solving the problem of the lack of comprehensive deviation quantification indicators in existing technologies, and providing comprehensive quantitative assurance for test accuracy; when the drift confidence is less than or equal to the preset review threshold, a second layer of verification is triggered. The review time window is first calculated based on the drift confidence, enabling the verification mechanism to automatically expand to sequence review when there is doubt at a single point, and the review scope is dynamically adjusted according to the degree of deviation, avoiding insufficient context or information redundancy caused by a fixed window, providing a dual guarantee of hierarchical expansion and window adaptation for improving the accuracy of protection behavior testing; taking the message as the center point... This invention extracts a continuous message sequence falling into the window, extending single-point verification to sequence verification. This addresses the problem in existing technologies where single-point independent verification cannot perceive the temporal correlation between messages, providing sequence context assurance for test accuracy. The continuous message sequence is parsed to obtain three types of feature sequences, enabling quantitative verification of physical constraints. This solves the problem of existing technologies lacking sequence feature extraction capabilities, providing sequence feature assurance for test accuracy. When the three types of sequences meet preset legal conditions, the protection behavior is determined to be normal, allowing legitimate drifts and real device defects to be distinguished at the level of sequence evolution laws. This solves the problem in existing technologies that cannot distinguish between legitimate drifts and real device errors, ultimately improving the accuracy of protection device behavior testing. This application can solve the problem of inaccurate test results caused by the inability of the verification benchmark to dynamically adjust with the device's operating status in existing protection device protection behavior testing, thereby improving the accuracy of protection device protection behavior testing.

[0007] Furthermore, if the setpoint zone identifier sequence, the fault current sequence, and the action delay sequence meet preset legal conditions, then the protection behavior of the protection device is determined to be normal, specifically including: Determine whether the first fixed-value zone identifiers corresponding to each time point in the fixed-value zone identifier sequence are equal, and obtain the first determination result; Determine whether the fault current value at each moment in the fault current sequence shows a monotonically non-increasing trend to obtain a second judgment result; A third judgment result is obtained by determining whether the action delay amount corresponding to each moment in the action delay amount sequence falls within the corresponding preset delay range, wherein each delay range is obtained by querying the database by the first fixed value area identifier corresponding to each moment; If the first judgment result, the second judgment result, and the third judgment result are all yes, then the protection behavior of the protection device is determined to be normal.

[0008] In this way, when the three types of sequences meet the preset legal conditions, the protection behavior is judged to be normal, so that legal drift and real device defects can be distinguished at the level of sequence evolution law, solving the problem that the existing technology cannot distinguish between legal drift and real device errors, and improving the accuracy of protection behavior testing of protection devices.

[0009] Furthermore, the calculation of the review time window based on the drift confidence specifically includes: Based on the drift confidence level, the deviation of the protection behavior is calculated; The initial window width is obtained by calculating the deviation degree with the preset window coefficient; If the initial window width is less than or equal to the preset maximum window width, then the initial window width is used as the review time window; If the initial window width is greater than the maximum window width, then the maximum window width is used as the review time window.

[0010] This method calculates the deviation based on drift confidence, allowing for a quantitative expression of the degree of deviation. The initial window width is calculated using the deviation and a preset window coefficient. The smaller of the initial window width and the preset maximum window width is then used as the verification time window. This enables the window width to adaptively adjust with the degree of deviation without exceeding the system's upper limit. This solves the problem that existing technologies cannot adapt to the differentiated context requirements under different degrees of deviation due to fixed time windows, providing window adaptive assurance for improving the accuracy of protection behavior testing.

[0011] Furthermore, the step of using the state parameters to search a preset database to obtain the desired semantic set and the desired data rule set specifically includes: Obtain the expected description text corresponding to the data point targeted by the current test task, wherein the expected description text is the description information defined for the data point in the device configuration file of the protection device; The expected descriptive text is used to perform a thesaurus search in the database to obtain the expected descriptive semantic set; The desired data rule set is obtained by retrieving the second fixed-value zone identifier in the fixed-value zone mapping table of the database using the state parameters.

[0012] By using state parameter retrieval to obtain the expected description semantic set and expected data rule set, the verification benchmark can be adaptively adjusted according to the actual operating conditions of the device. This solves the problem in existing technologies where legal state changes are misjudged as abnormal due to fixed expected values, and provides dynamic benchmark assurance for improving test accuracy.

[0013] Furthermore, the step of calculating the similarity between the expected descriptive semantic set and the actual descriptive text to obtain the descriptive similarity specifically includes: The descriptive text is vectorized using a preset word vector model to obtain the actual word vectors; The word vector model is used to transform the vectors of each word in the expected semantic set to obtain several expected word vectors. Calculate the cosine similarity between the actual word vector and each of the expected word vectors; The maximum value among the cosine similarities is selected as the descriptive similarity.

[0014] By calculating the similarity between the expected semantic set and the actual descriptive text, the degree of semantic deviation can be quantified into a calculable indicator. This solves the problem that existing technologies cannot identify legitimate variants of synonymous expressions and provides semantic quantification assurance for test accuracy.

[0015] Furthermore, the step of matching each key-value pair in the private data block with the expected data rule set to obtain the rule matching degree specifically includes: The key-value pairs of the private data block are matched with the rules in the expected data rule set to obtain the number of successful matches; The rule matching degree is obtained by calculating the ratio between the number of successful matches and the total number of rules in the expected data rule set.

[0016] By matching each key-value pair in the private data block against the expected data rule set to obtain the rule matching degree, the conformity of the data structure can be quantified into a calculable index, solving the problem of existing technologies ignoring the matching of private data structures and providing quantitative assurance of data structure for testing accuracy.

[0017] Furthermore, the testing method for the protection behavior of the protection device further includes: if the drift confidence level is greater than the verification threshold, then the protection behavior of the protection device is determined to be normal.

[0018] In this way, when the drift confidence level is greater than the verification threshold, the protection behavior is directly determined to be normal. This allows the test conclusion to be drawn without triggering the second-level sequence verification when the first-level verification is passed, providing a rapid judgment guarantee for improving the test efficiency while improving the accuracy of protection behavior testing.

[0019] Secondly, one embodiment of the present invention provides a testing system for the protective behavior of a protective device, the testing system being used to perform a testing method for the protective behavior of the protective device.

[0020] Thirdly, another embodiment of the present invention provides a computer-readable storage medium including a stored computer program, wherein a test method for controlling the device or apparatus containing the computer-readable storage medium to perform protective behavior of a protective device during the execution of the computer program.

[0021] Fourthly, another embodiment of the present invention provides a computer program product, including a computer program or instructions, wherein the computer program or instructions, when executed by a communication device, implement a test method for the protective behavior of a protection device. Attached Figure Description

[0022] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0023] Figure 1 This is a flowchart illustrating one embodiment of a test method for the protective behavior of a protective device provided in this application. Detailed Implementation

[0024] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0025] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings are intended to cover non-exclusive inclusion.

[0026] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly defined.

[0027] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0028] In the description of the embodiments in this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.

[0029] In the description of the embodiments of this application, the term "multiple" refers to two or more (including two), similarly, "multiple sets" refers to two or more (including two sets), and "multiple pieces" refers to two or more (including two pieces).

[0030] In the description of the embodiments of this application, unless otherwise expressly specified and limited, technical terms such as "installation," "connection," "joining," and "fixing" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. For those skilled in the art, the specific meaning of the above terms in the embodiments of this application can be understood according to the specific circumstances.

[0031] In the field of protection device testing technology, the correctness of the protection behavior of protection devices is directly related to power grid safety. During operation, due to environmental factors and aging, they may malfunction or fail to operate, so it is necessary to test and verify their protection behavior. Existing technologies use fault recording and playback schemes, but they rely on standard waveform preparation and cannot cover dynamic changes such as operation mode switching and status activation / deactivation, resulting in poor test accuracy. Furthermore, they require manual intervention and cannot be fully automated remotely, further reducing test accuracy.

[0032] See Figure 1 In order to solve the problem of inaccurate test results caused by the inability of the verification benchmark to be dynamically adjusted with the operating status of the device in the protection behavior test of the existing protection device, and to improve the accuracy of the protection behavior test of the protection device, an embodiment of the present invention provides a test method for the protection behavior of the protection device, including steps S101 to S104. Step S101: Obtain the status parameters of the protection device during operation, and use the status parameters to search in the preset database to obtain the expected description semantic set and the expected data rule set; In some embodiments, acquiring the operational status parameters of the protection device includes: the master station sending a data acquisition request to the protection device under test via an MMS (Manufacturing Message Specification) communication link based on the IEC61850 standard (a standard for substation communication networks and systems developed by the International Electrotechnical Commission IEC) to collect the operational status parameters of the protection device; the status parameters include the setting zone number, the soft pressure plate status vector, and the CPU (Central Processing Unit) load rate; the soft pressure plate status vector is bit-coded, with each bit corresponding to a specific soft pressure plate, a value of 1 indicating activation and a value of 0 indicating deactivation.

[0033] For example, in a specific test scenario, the main station successfully read three status parameters: the fixed value area number is 3, the soft pressure plate status vector is the binary number 00101100 (each bit corresponds to a specific soft pressure plate, for example, the least bit represents the distance protection soft pressure plate, its value 1 indicates activation, 0 indicates deactivation), and the CPU load rate is 23%.

[0034] In some embodiments, the process of constructing the thesaurus and the mapping table of fixed value areas in the database specifically includes: the construction of the thesaurus in the database is based on the power industry standard terminology database and typical engineering practice experience, and is stored in a key-value pair structure, where the key is the original descriptive text extracted from the IEC61850 standard definition or the equipment ICD model (IED Capability Description, intelligent electronic device capability description file, which is the equipment configuration file for protection devices), and the value is a list of strings containing several synonyms. The construction of the dictionary first uses natural language processing technology to process DL / T860 (a power industry standard, corresponding to the international standard IEC). 61850 (which specifies the technical requirements for substation communication networks and systems) series of standard documents, ICD model description texts of typical protection devices, and industry-standard protection event terminology sets were used for word segmentation and frequency statistics to select core terms. Utilizing semantic relationships in the power industry knowledge graph and combined with expert review, synonyms were expanded for each core term. For example, for device fault, synonyms such as equipment anomaly, protection device alarm, and device anomaly were added. The setting zone mapping table is predefined and provided by the protection device manufacturer based on the device's internal logic and imported into the main station as an XML (Extensible Markup Language) file. Its data structure is also key-value pairs. The key is the setting zone number (usually an integer from 1 to 8), and the value is an object containing two subfields. One subfield is the private data rule, describing the key names and expected value constraints that must be included in the private data blocks of SOE (Sequence of Events) messages under this setting zone. The other subfield is the delay setting range, describing the various protection functions under this setting zone (such as distance protection). The allowable delay range for actions such as segment or zero-sequence protection, etc. The storage format specifies that each private data rule details the key name, expected value type (numeric / string / boolean), and expected value or expected range constraints contained in the private data blocks of all SOE messages within the current setting area. For example, for setting area number 3, the rule can stipulate that the private data block must contain a field with the key name "SetID" and its value equal to 3. The delay setting range can specify distance protection. The allowable delay range for a segment's action is 20ms to 40ms.

[0035] It should be noted that the design of the thesaurus ensures the generalization capability of subsequent semantic matching, enabling it to identify text variations that conform to business logic. The thesaurus and the value area mapping table are updated synchronously when the protection device software is upgraded or the value area configuration is changed, so as to maintain consistency with the actual capabilities of the device.

[0036] In some embodiments, the step of using the state parameters to search a preset database to obtain the expected description semantic set and the expected data rule set specifically includes: obtaining the expected description text corresponding to the data point targeted by the current test task, wherein the expected description text is the description information defined for the data point in the device configuration file of the protection device; using the expected description text to perform a synonym search in the thesaurus of the database to obtain the expected description semantic set; and using the second fixed-value area identifier in the state parameters to search in the fixed-value area mapping table of the database to obtain the expected data rule set. Specifically, the main station first obtains the expected description text corresponding to the data point targeted by the current test task, which is the description information defined for the data point targeted by the current test task in the device configuration file (i.e., ICD model) of the protection device, i.e., IEC The dU (description) attribute value corresponding to the data point in the 61850 standard is used as the key. The expected description text is then retrieved from the thesaurus in the pre-defined database to obtain a list of synonyms. The original expected description text and all its synonyms are merged to form the expected description semantic set. For example, if the expected description text for the data point targeted by the current test task is "device fault," the thesaurus retrieves the synonyms "device abnormality," "protection device alarm," and "device abnormality," and these three synonyms are combined to form the expected description semantic set. The main station uses the fixed-value zone number in the runtime status parameters as the index key to query the fixed-value zone mapping table in the pre-defined database to obtain the set of private data rules mandated under that fixed-value zone as the expected data rule set. During the query, the system first uses the fixed-value zone number as the index key. The system finds several candidate private data rules in the fixed-value area mapping table, and then obtains the currently collected soft pressure plate state vector. A bitwise AND operation is performed between the soft pressure plate mask of each candidate rule and the current soft pressure plate state vector. Only when the result equals the soft pressure plate mask of the rule is the rule deemed to meet the current soft pressure plate state condition and ultimately included in the expected data rule set. For example, if the current fixed-value area number is 3, the system finds two private data rules corresponding to this fixed-value area in the fixed-value area mapping table. Rule 1 requires that the private data block must contain a field with the key name SetID and its value equal to the current fixed-value area number 3. Rule 2 requires that the private data block must contain a field with the key name Mode and its value Normal. If the corresponding bits of the current soft pressure plate state vector meet the soft pressure plate mask conditions of the above two rules, then both rules are included in the expected data rule set.

[0037] By using state parameter retrieval to obtain the expected description semantic set and expected data rule set, the verification benchmark can be adaptively adjusted according to the actual operating conditions of the device. This solves the problem in existing technologies where legal state changes are misjudged as abnormal due to fixed expected values, and provides dynamic benchmark assurance for improving test accuracy.

[0038] Step S102: Receive the event sequence record message uploaded by the protection device when it performs protection behavior after receiving the test command, and parse the event sequence record message to obtain the actual description text and private data block; In some embodiments, receiving the event sequence record message uploaded by the protection device when performing protection actions after receiving a test command specifically includes: the master station issuing a test command to the protection device, which simulates a primary power grid fault; after receiving the test command, the protection device performing corresponding protection actions according to the currently activated setting zone number and soft pressure plate status; during the execution of the protection actions, the protection device recording each action event performed in chronological order as an event sequence record message, and sending it to the master station through the MMS communication link; the master station receiving the SOE message through the MMS link.

[0039] In some embodiments, parsing the event sequence record message to obtain the actual description text and the private data block specifically includes: the master station extracting the description field from the received event sequence record message as the actual description text; extracting the private data structure from the event sequence record message as the private data block. The message conforms to the IEC61850 standard format, and the description field corresponds to the dU attribute in the standard, which is used to describe the event type, such as device failure or protection activation; the private data block is a private structure, which contains several key-value pairs to carry structured information such as setting area identifier, fault current value, and action delay amount.

[0040] Step S103: Calculate the similarity between the expected description semantic set and the actual description text to obtain the description similarity; match each key-value pair in the private data block with the expected data rule set to obtain the rule matching degree; and perform a weighted calculation on the description similarity and the rule matching degree to obtain the drift confidence corresponding to the protection behavior performed by the protection device. In some embodiments, the construction and training process of the word vector model specifically includes: collecting raw corpora in the power system field, including DL / T860 series standard documents, ICD model description text of typical protection devices, and a set of protection event terms commonly used in the industry; preprocessing the raw corpora, including removing irrelevant characters, unifying the terminology format, and constructing a word segmentation dictionary specifically for the power field; training the model using the Skip-gram architecture in the Word2Vec algorithm, mapping each word to a 128-dimensional real vector, so that words with similar semantics are close in the vector space; during training, the context window size can be set to 5, the number of negative samples can be set to 10, and the number of iterations can be set to 15 rounds. After training, a word vector model that can express the semantic relationship of terms in the power field is obtained. This model is stored locally on the main station in the form of a binary file and loaded into memory when the test task starts.

[0041] In some embodiments, the step of calculating the similarity between the expected descriptive semantic set and the actual descriptive text to obtain the descriptive similarity specifically includes: performing vector transformation on the descriptive text using a preset word vector model to obtain actual word vectors; performing vector transformation on each word in the expected descriptive semantic set using the word vector model to obtain several expected word vectors; calculating the cosine similarity between the actual word vectors and each of the expected word vectors; and selecting the maximum value from the cosine similarities as the descriptive similarity. Specifically, the main station inputs the actual description text from the actual SOE message into a preset word vector model to obtain an actual word vector; it then inputs each word in the expected description semantic set into the word vector model to obtain several expected word vectors; for each expected word vector, it calculates its cosine similarity with the actual word vector. After traversing all words in the expected description semantic set, it obtains several cosine similarities and takes the maximum value as the description similarity. For example, if the expected description in the expected description semantic set is device fault, and its synonyms include equipment abnormality and protection device alarm, and the actual message description text is "device fault - severe", then the cosine similarity with device fault is 0.92, the similarity with equipment abnormality is 0.78, and the similarity with protection device alarm is 0.65. The maximum value of 0.92 is taken as the description similarity.

[0042] In some embodiments, the step of calculating the similarity between the desired descriptive semantic set and the actual descriptive text to obtain a formula for descriptive similarity specifically includes: The formula for calculating cosine similarity: ; The formula for calculating similarity is as follows: ; In the formula, This describes the actual word vectors corresponding to the text; To describe a specific word in the semantic set The corresponding expected word vectors; Let a be the cosine similarity between a and b; To describe the semantic set as expected; This describes the similarity; max is the function that takes the maximum value.

[0043] For example, assuming the runtime environment may fail to load the word vector model (e.g., insufficient memory or corrupted model file), the system can automatically switch to the edit distance algorithm to calculate similarity. Specifically, this includes: edit distance refers to the minimum number of single-character editing operations required to convert one string into another, including insertion, deletion, and replacement; calculating the edit distance between the actual description text and each word in the expected description semantic set, normalizing the edit distance as the similarity, and taking the maximum value after traversing all words as the description similarity; in this degraded mode, the system will mark the test report as having used low-precision semantic matching so that operations and maintenance personnel are aware of it.

[0044] For example, assuming the runtime environment may fail to load the word vector model, the system can automatically switch to the relevant formula for calculating similarity using the edit distance algorithm, specifically including: The formula for the edit distance-normalized similarity is: ; In the formula, s is the actual descriptive text string; t is the string that is expected to describe a word in the semantic set; To edit the distance function; This is a string length function.

[0045] By calculating the similarity between the expected semantic set and the actual descriptive text, the degree of semantic deviation can be quantified into a calculable indicator. This solves the problem that existing technologies cannot identify legitimate variants of synonymous expressions and provides semantic quantification assurance for test accuracy.

[0046] In some embodiments, matching each key-value pair in the private data block with the expected data rule set to obtain a rule matching degree specifically includes: matching each key-value pair in the private data block with each rule in the expected data rule set to obtain a number of successful matches; and performing a ratio calculation between the number of successful matches and the total number of rules in the expected data rule set to obtain a rule matching degree. Specifically, each key-value pair in the SOE message private data block is matched one by one with the private data rules in the expected data rule set. Each rule contains a key name and an expected value or expected range. If a key-value pair exists in the private data block whose key name is the same as the key name in the rule, and whose value satisfies the expected value in the rule or falls within the expected range, then the rule is determined to be a successful match. After traversing all rules, the number of successfully matched rules is counted as the number of successful matches. The number of successful matches is divided by the total number of rules to obtain the rule matching degree. If the expected data rule set is empty, the rule matching degree is directly set to 1, indicating that the private data part is empty. Dynamic matching is considered as conforming; for example, suppose the expected data rule set contains two rules. Rule 1 requires that the key SetID must be included and its value is equal to the current fixed value area number 3. Rule 2 requires that the key Mode must be included and its value is Normal. If the actual private data block of the message contains SetID=3 and Mode=Normal, then both rules are matched successfully, the number of successful matches is 2, the total number of rules in the expected data rule set is 2, and the rule matching degree is 1. If the Mode key is missing in the actual private data block of the message, then only the first rule is matched successfully, the number of successful matches is 1, and the rule matching degree is 0.5.

[0047] In some embodiments, the step of matching each key-value pair in the private data block with the desired data rule set to obtain a formula related to the rule matching degree specifically includes: Formula for calculating rule matching degree: ; In the formula, The number of successful matches; This represents the total number of rules.

[0048] By matching each key-value pair in the private data block against the expected data rule set to obtain the rule matching degree, the conformity of the data structure can be quantified into a calculable index, solving the problem of existing technologies ignoring the matching of private data structures and providing quantitative assurance of data structure for testing accuracy.

[0049] For example, to prevent extreme inputs from causing computational anomalies, this application also employs an abnormal input protection mechanism, specifically including: checking the magnitude of the vectors before calculating the cosine similarity; if the magnitude of the actual word vectors is equal to 0 ( =0) or the expected word vector magnitude is equal to 0 ( If the similarity is 0, then the similarity of the word pair is directly determined to be 0. In downgrade mode, if the descriptive text or semantic set contains empty strings, then the edit distance is calculated according to the defined formula, that is, when one side is empty and the other side is not empty, the edit distance is calculated. Equal to the length of the non-empty string, For the same length, the similarity is 0. When both are empty, the denominator is 0, and the similarity is directly defined as 1. In the rule matching degree calculation, if the total number of private data rules... =0, the rule matching degree is directly set to 1. If the value is greater than 0 and the private data block is empty, then =0, the rule matching degree is 0, and the system will record "private data missing" as an alarm message and attach it to the test report.

[0050] In some embodiments, a weighted calculation is performed on the description similarity and the rule matching degree to obtain the drift confidence corresponding to the protection behavior performed by the protection device. Specifically, this includes: multiplying the description similarity by a preset weight factor to obtain a first product; multiplying the rule matching degree by 1 minus the difference of the weight factor to obtain a second product; and adding the two products to obtain the drift confidence corresponding to the protection behavior performed by the protection device.

[0051] In some embodiments, a weighted calculation is performed on the description similarity and the rule matching degree to obtain a formula for the drift confidence corresponding to the protection behavior performed by the protection device, specifically including: The formula for calculating drift confidence is: ; In the formula, For drift confidence; To describe similarity; For rule matching degree; This is the weighting factor.

[0052] It should be noted that the weighting factor is used to balance the proportion of semantic matching and data rule matching in the confidence calculation, and the default value is 0.5, that is, the two have equal weights; the drift confidence value ranges from 0 to 1, and the higher the value, the more consistent the actual message is with the expectation and the lower the degree of drift.

[0053] For example, the CPU load rate can be used to modulate the weighting factor, specifically including: when the CPU load rate is greater than a preset load threshold, it is determined that the device is currently under heavy load, and private data parsing may experience a brief delay or anomaly. Therefore, the preset weighting factor is reduced (e.g., reduced by 0.05) to reduce the dependence of the first-layer verification on the private data compliance. When the CPU load rate is not greater than the load threshold, the weighting factor is maintained. Through the above modulation, when the device is running under high load, the dependence of the first-layer verification on the private data compliance is reduced, which can avoid triggering unnecessary second-layer verification due to temporary deviations in private data caused by load.

[0054] Step S104: If the drift confidence is less than or equal to a preset review threshold, a review time window is calculated based on the drift confidence. A continuous message sequence falling into the review time window is extracted from the preset message buffer with the event sequence record message as the center point. The continuous message sequence is parsed to obtain a setpoint area identifier sequence, a fault current sequence, and an action delay sequence. If the setpoint area identifier sequence, the fault current sequence, and the action delay sequence meet preset legal conditions, the protection behavior of the protection device is determined to be normal.

[0055] In some embodiments, if the drift confidence is less than or equal to a preset verification threshold, the specific steps include: comparing the drift confidence calculated in step S103 with a preset verification threshold (e.g., set to 0.7); if the drift confidence is less than or equal to the verification threshold, it is determined that the protection device has not passed the first layer verification, triggering the second layer verification and starting the subsequent sequence verification process.

[0056] In some embodiments, the testing method for the protection behavior of the protection device further includes: if the drift confidence is greater than the verification threshold, then the protection behavior of the protection device is determined to be normal. Specifically, this includes: comparing the drift confidence calculated in step S103 with a preset verification threshold; if the drift confidence is greater than the verification threshold, then the first-level verification is determined to be passed, the protection behavior of the protection device is normal, the SOE message is marked as successful verification, and the verification result is directly written into the test report without triggering the second-level verification.

[0057] In this way, when the drift confidence level is greater than the verification threshold, the protection behavior is directly determined to be normal. This allows the test conclusion to be drawn without triggering the second-level sequence verification when the first-level verification is passed, providing a rapid judgment guarantee for improving the test efficiency while improving the accuracy of protection behavior testing.

[0058] In some embodiments, calculating the review time window based on the drift confidence specifically includes: calculating the deviation of the protection behavior based on the drift confidence; calculating an initial window width by combining the deviation with a preset window coefficient; if the initial window width is less than or equal to a preset maximum window width, then the initial window width is used as the review time window; if the initial window width is greater than the maximum window width, then the maximum window width is used as the review time window. Specifically, the deviation is 1 minus the drift confidence, and a preset baseline window width, window coefficient (initially set to 10), and maximum window width are used; the baseline window width is multiplied by the window coefficient multiplied by the deviation, and the product is added to obtain the initial window width; if the initial window width is less than or equal to the maximum window width, then the initial window width is used as the review time window; if the initial window width is greater than the preset maximum window width, then the preset maximum window width is used as the review time window.

[0059] It should be noted that the window width is dynamically adjusted based on the degree of deviation between the current message and the expectation. The underlying logic is that the greater the deviation, the more significant the difference between the message and the expectation at the semantic or data level. A wider time window is needed to capture more context messages so as to determine whether the deviation is a legitimate semantic evolution or a real device anomaly from the sequence evolution pattern. The baseline window width represents the basic window width when the deviation is zero. Based on the statistics of the maximum interval between adjacent SOE messages in a typical protection device fault event chain, it can be set to 5 seconds. This value is sufficient to cover the arrival time range of most messages in the same fault event chain. The window coefficient is used to control the amplification effect of the deviation on the window width. It is initially set to 10, that is, for every 0.1 increase in deviation, the window width increases by 1 second. The maximum window width is used to prevent the window from expanding indefinitely and causing the sequence to contain too many irrelevant messages. It can be set to 30 seconds based on the empirical value of the fault recording duration of the protection device (derived from the empirical value of the maximum duration of fault recording in the IEC61850 standard).

[0060] In some embodiments, the formula for calculating the review time window based on the drift confidence specifically includes: The formula for calculating deviation: ; In the formula, For deviation degree; For drift confidence; The formula for calculating the initial window width is: ; In the formula, The base window width; The window coefficient; For deviation degree; This is the initial window width; Formula for review time window: ; In the formula, This is the initial window width; Maximum window width; The function is for finding the minimum value; This is the time window for review.

[0061] For example, assuming the drift confidence level is 0.6 in a certain verification, the deviation is 0.4, and the initial window width is 5 + 10 × 0.4 = 9 seconds, which is less than the maximum window width of 30 seconds. The review time window is 9 seconds. If the deviation reaches the extreme value of 0.95, the initial window width is 5 + 9.5 = 14.5 seconds, which is still less than 30 seconds. Only when the deviation is theoretically close to 1 does it reach 15 seconds, which is still much less than 30 seconds. Therefore, in practical applications, the maximum window width mainly plays a protective role in preventing abnormally large values ​​caused by configuration errors.

[0062] This method calculates the deviation based on drift confidence, allowing for a quantitative expression of the degree of deviation. The initial window width is calculated using the deviation and a preset window coefficient. The smaller of the initial window width and the preset maximum window width is then used as the verification time window. This enables the window width to adaptively adjust with the degree of deviation without exceeding the system's upper limit. This solves the problem that existing technologies cannot adapt to the differentiated context requirements under different degrees of deviation due to fixed time windows, providing window adaptive assurance for improving the accuracy of protection behavior testing.

[0063] In some embodiments, extracting a continuous message sequence falling within the review time window from a preset message buffer with the event sequence record message as the center point specifically includes: using the event sequence record message as a reference point, extending the time range forward and backward by half the width of the review time window, and retrieving all SOE messages whose timestamps fall within this time range from the message buffer, arranging these messages in ascending order of timestamps to form a continuous message sequence centered on the reference point; when the event sequence record message is located near the boundary of the buffer, forward extension may cause it to exceed the starting position of the buffer, in which case the system only takes the actual existing messages; if the number of messages within the forward or backward extension range is insufficient, the sequence length is reduced accordingly.

[0064] It should be noted that the message buffer adopts a circular buffer structure with a capacity of 1024 messages. Each message contains complete information such as timestamp, descriptive text, and private data blocks. This method uses a dynamic window instead of a fixed window because a fixed width cannot adapt to the differentiated requirements for the amount of context information under different deviations. When the deviation is small, the message is close to the expectation, and only a small number of context messages are needed to verify its sequence consistency. When the deviation is large, a wider window is needed to capture the complete fault event chain, so as to judge whether the deviation is consistent with the physical law from the sequence evolution law. This avoids the misjudgment caused by insufficient context due to a narrow window, and also avoids the reduction of computational efficiency due to the introduction of too many irrelevant messages by a wide window.

[0065] In some embodiments, parsing the continuous message sequence to obtain a setpoint area identifier sequence, a fault current sequence, and an action delay sequence specifically includes: extracting the setpoint area identifier, fault current value, and action delay from the private data block of each message in the continuous message sequence; arranging the extracted setpoint area identifiers in the order of message timestamps to obtain a setpoint area identifier sequence; arranging the extracted fault current values ​​in the order of message timestamps to obtain a fault current sequence; arranging the extracted action delays in the order of message timestamps to obtain an action delay sequence; if a message does not have a certain field, then the corresponding position of the message in the feature sequence is empty.

[0066] In some embodiments, determining that the protection behavior of the protection device is normal if the setpoint zone identifier sequence, the fault current sequence, and the action delay sequence meet preset legal conditions specifically includes: determining whether the first setpoint zone identifiers corresponding to each time point in the setpoint zone identifier sequence are equal to obtain a first judgment result; determining whether the fault current values ​​corresponding to each time point in the fault current sequence show a monotonically non-increasing trend to obtain a second judgment result; determining whether the action delay amount corresponding to each time point in the action delay sequence falls within the corresponding preset delay range to obtain a third judgment result, wherein each delay range is obtained by querying the database using the first setpoint zone identifier corresponding to each time point; if the first judgment result, the second judgment result, and the third judgment result are all yes, then determining that the protection behavior of the protection device is normal. Specifically, the system checks whether all non-empty values ​​in the setpoint area identifier sequence are equal. If they are all equal, the first judgment result is yes; otherwise, it is no. If the number of non-empty values ​​in the setpoint area identifier sequence is less than 2, it is automatically considered to meet the consistency condition, and the first judgment result is yes. The system also checks whether the fault current sequence exhibits a monotonically non-increasing trend, meaning that for any two adjacent current values, the latter current value must be less than or equal to the former current value. If this condition is met, the second judgment result is yes; otherwise, it is no. If the number of non-empty values ​​in the fault current sequence is less than 2, the second judgment result is directly determined to be yes. Finally, the system queries the database based on the corresponding first setpoint area identifier at each time point. The system determines the delay range, with each action delay corresponding to a protection function type and each protection function type corresponding to a delay range. The system checks whether each action delay falls within the allowable delay range corresponding to the protection function type. If all action delays fall within the corresponding delay range, the third judgment result is yes; otherwise, it is no. If the number of non-empty values ​​in the action delay sequence is less than 1, it is automatically considered to meet the condition, and the third judgment result is yes. If all three judgment results are yes, it means that although the message drift confidence is lower than the threshold, the sequence context conforms to physical laws and belongs to legal drift. Therefore, the protection behavior of the protection device is determined to be normal.

[0067] It should be noted that the consistency verification of the setting zone identifier stems from the fact that the protection device does not automatically switch the setting zone during normal operation or a single fault event. The switching of the setting zone is usually explicitly commanded by the operation and maintenance personnel. Therefore, the setting zone number should be constant during verification. The fault current monotonicity verification stems from the physical process after the fault occurs. From the moment the fault occurs, the current suddenly increases, and after the protection device operates to clear the fault, the current gradually decreases. There should be no current rebound during this period (unless a new fault occurs, but a new fault will generate a new SOE event chain, which should be separated by an independent window). The compliance verification of the action delay mapping stems from the fact that each protection function of the protection device has a preset action delay setting value, and the actual action delay should fluctuate within the allowable range of the setting value. The above rules are clearly stated in the IEC61850 standard and the DL / T995 standard, which are in line with the common sense of power system operation.

[0068] For example, when determining whether the fault current sequence is monotonically non-increasing, a tolerance mechanism can be introduced, specifically including: allowing a small increase of no more than five percent of the rated current between adjacent current values. This tolerance is used to deal with measurement errors or instantaneous fluctuations in the early stage of fault development. The system reads the rated current of the line from the configuration parameters of the protection device. If it cannot be obtained, it defaults to 1000 amperes.

[0069] For example, when determining whether a fault current sequence exhibits a monotonically non-increasing trend, a relevant formula for a tolerance mechanism can be introduced, specifically including: Formula for the judgment condition: ; ; In the formula, Let be the fault current value at time j; This represents the fault current value at time j+1. To allow for an increase in value; Read the rated current of the line from the configuration parameters of the same protection device (if it cannot be read, take 1000A).

[0070] For example, when determining whether the action delay falls within the corresponding preset delay range, a delay error tolerance mechanism can be introduced. Specifically, this includes: if the error tolerance parameter for the current protection function is provided in the setting area mapping table, then the error tolerance is directly adopted; if not provided, then 10% of the width of the preset delay range is taken as the error tolerance; the actual judgment condition is that the action delay is greater than or equal to the lower limit of the allowable delay range minus the error tolerance, and less than or equal to the upper limit of the allowable delay range plus the error tolerance, in order to accommodate device clock synchronization error and inherent measurement deviation.

[0071] For example, when determining whether the action delay falls within the corresponding preset delay range, a formula related to the delay error tolerance mechanism can be introduced, specifically including: Formula for calculating error tolerance: ; The mathematical expression for the actual judgment condition: ; In the formula, and These represent the lower and upper limits of the allowed delay range, respectively. This is the tolerance for error; This is a function to find the maximum value. This represents the delay time for the action.

[0072] For example, suppose the setpoint area identifier sequence contains three non-empty values, namely 3, 3, and 3. If all three are equal, the first judgment result is yes. If the values ​​are 3, 3, and 4, they are not all equal, and the first judgment result is no. Suppose the fault current sequence contains three current values ​​in chronological order: 2500 amps, 1800 amps, and 600 amps. This satisfies a monotonically non-increasing trend, and the second judgment result is yes. If a sequence of 2500 amps, 1800 amps, and 2200 amps appears, then the condition 1800 amps is greater than or equal to 2200 amps is not met, and the second judgment result is no. Suppose a message action delay is 35 milliseconds, corresponding to the distance protection stage I. The delay range for this function, as found in the setpoint area mapping table, is 20 to 40 milliseconds. If 35 milliseconds falls within this range, the message's action delay compliance verification passes. If the action delay is 55 milliseconds, exceeding the range, the message's action delay compliance verification fails.

[0073] In some embodiments, the test method for the protection behavior of the protection device further includes: if any one of the first judgment result, the second judgment result, and the third judgment result corresponding to the set value area identification sequence, the fault current sequence, and the action delay amount sequence is negative, it indicates that there is a logical contradiction in the sequence of messages, the messages are illegally drifting, and the protection behavior of the protection device is determined to be abnormal.

[0074] In this way, when the three types of sequences meet the preset legal conditions, the protection behavior is judged to be normal, so that legal drift and real device defects can be distinguished at the level of sequence evolution law, solving the problem that the existing technology cannot distinguish between legal drift and real device errors, and improving the accuracy of protection behavior testing of protection devices.

[0075] In some embodiments, after determining that the protection behavior of the protection device is normal if the first judgment result, the second judgment result, and the third judgment result are all yes, the method further includes: when the protection behavior is determined to be normal (i.e., legal drift), the system stores the key data in this verification process as positive samples in the calibration queue. The positive sample contains three parts of information. The first part is the protection device running status parameters obtained in step S101, including the set value area number, the soft pressure plate state vector, and the CPU load rate. These parameters constitute the running fingerprint of the sample. The second part is the private data block structure of the event sequence record message, that is, the complete private data content stored in the form of key-value pairs, which is used to identify the private data keys in the high-frequency drift mode later. The third part consists of the drift confidence and deviation calculated in step S103. These three parts of data are combined into a positive sample and appended to the calibration queue. The queue adopts a first-in-first-out structure with a capacity of 10,000 entries. When the queue is full, the earliest sample is automatically eliminated. For example, suppose that in a certain verification, the drift confidence of the first SOE message is 0.55 and the deviation is 0.45. The runtime state parameters are set value area number 3, soft pressure plate state vector 0x2C, CPU load rate 23%, and the private data block contains "SetID=3" and "Mode=Normal". After the verification judgment sequence meets the legal conditions, it is determined to be a legal drift. The system encapsulates the above information into a positive sample and stores it in the calibration queue. Based on the accumulation of positive samples, the system performs cluster analysis on the positive samples in the calibration queue to identify high-frequency drift patterns. Specifically, the system classifies positive samples according to runtime state parameters, grouping samples with the same setpoint area number and the same soft pressure plate state vector into the same category. This is because the setpoint area number and the soft pressure plate state together determine the current working mode of the protection device, and the legitimate drift patterns of SOE messages may have essential differences under different modes. Within each category, the system performs cluster analysis on the key name set of private data blocks in the positive samples, using a hierarchical clustering algorithm based on Jaccard distance. That is, for any two positive samples A and B, the Jaccard distance between their private data block key name sets is calculated. The smaller the value, the more similar the key name composition of the two samples. The system merges samples with a Jaccard distance less than 0.3 into the same cluster. After clustering, the system counts the number of samples in each cluster and determines the category with the number of samples that meets the preset conditions as the high-frequency drift pattern. The preset conditions are that the proportion of the number of samples in the cluster to the total number of samples in the category is not less than 10% and the absolute number of samples is not less than 3. For each identified high-frequency drift pattern, the system performs four update operations. First, it updates the database's private data rules. The system extracts the set of private data keys corresponding to the pattern, counts the frequency of each key in the cluster, and includes keys with a frequency of at least 80% in the database's corresponding runtime state parameters' private data rules, setting the rule type to mandatory existence. Second, it updates the database's descriptive semantic set. The system extracts the descriptive text of SOE messages from all positive samples corresponding to the pattern, counts the frequency of each descriptive text, and adds variants of descriptive text with a frequency of at least 10% to the database. The system first sets the semantic descriptions of the runtime state parameters in the database. Then, it adjusts the preset review threshold by calculating the mean and standard deviation of drift confidence and deviation in all positive samples, calculating the recommended review threshold, and iteratively updating the current preset review threshold to the recommended review threshold using an exponentially weighted moving average. Finally, it adjusts the mapping coefficient between the time window width and the deviation by extracting deviation and time window width data pairs from the calibration queue, performing linear regression using the least squares method to fit the optimal window coefficient, and iteratively updating the current window coefficient to the optimal window coefficient using an exponentially weighted moving average. Based on this, the system can also calculate the model maturity index of high-frequency drift patterns. For each high-frequency drift pattern, the system obtains the set of positive samples corresponding to the pattern and calculates the standard deviation of the deviation in the set as the model maturity index. The smaller the standard deviation, the more concentrated the drift of each positive sample under the pattern is, and the more stable and mature the pattern is. The system compares the model maturity index with a preset maturity threshold of 0.08. When the model maturity index is lower than 0.08, the model confidence level corresponding to the pattern is set to a high confidence level; otherwise, it is set to a low confidence level. The model confidence level is associated with the high-frequency drift pattern and stored in the database. Before a new test task starts, the system re-acquires the current runtime status parameters of the protection device. It uses the combination of the setpoint zone number and the soft pressure plate status vector from the current runtime status parameters as the search key to match the stored high-frequency drift patterns. If a match is successful and the corresponding pattern confidence level is high, the system preloads the private data rules and descriptive semantic set corresponding to that high-frequency drift pattern as the default verification benchmark for the current test session, replacing the initial verification benchmark generated based on the original device configuration file. If a match is successful but the pattern confidence level is low, the system adopts a hybrid verification strategy, using the initial verification benchmark as the primary benchmark and the private data rules and descriptive semantic set corresponding to the high-frequency drift pattern as the secondary benchmark. The primary benchmark is used first for verification. When the drift confidence obtained from the primary benchmark verification is lower than a preset trigger threshold, the secondary benchmark is called for secondary verification. If the secondary verification passes, the verification data is stored as a new positive sample in the calibration queue.

[0076] In some embodiments, the relevant formula after determining that the protective behavior of the protection device is normal if the first judgment result, the second judgment result, and the third judgment result are all yes further includes: The formula for calculating Jaccard distance: ; In the formula, The set of private data block key names for positive sample A; Let be the set of private data block key names for positive sample B; |·| is the number of elements in the set; Formula for calculating the deviation from the mean: ; In the formula, The total number of positive samples; For the first The deviation corresponding to each positive sample; For positive sample index; Formula for calculating the standard deviation: ; In the formula, The total number of positive samples; For the first The deviation corresponding to each positive sample; For positive sample index; The mean deviation; Recommended formula for calculating the review threshold: ; In the formula, The mean deviation; The standard deviation of the deviation; The formula for calculating the exponentially weighted moving average is as follows: ; In the formula, This is the updated review threshold; This is the current review threshold; Recommended review threshold; It is a smoothing factor; Linear regression objective function (minimizing the sum of squared residuals): ; In the formula, This refers to the actual width of the time window in use. The deviation corresponding to positive sample j; The total number of positive samples; For positive sample index; The base window width; represents the window coefficients to be fitted; To minimize; The expression for the least squares solution of the optimal window coefficient is as follows: ; In the formula, The deviation corresponding to positive sample j; The total number of positive samples; For positive sample index; This refers to the actual width of the time window in use. The mean deviation; This represents the average window width. The formula for updating the window coefficient is: ; In the formula, The updated window coefficients; This is the current window coefficient; The optimal window coefficient; This is a smoothing factor.

[0077] By acquiring the state parameters of the protection device during operation, real-time data can be provided for the subsequent dynamic generation of verification benchmarks adapted to the current operating conditions, solving the inaccuracy problem caused by statically fixed verification benchmarks and providing a data foundation for improving test accuracy. Using the state parameters to retrieve the expected description semantic set and expected data rule set allows the verification benchmark to adaptively adjust with the actual operating conditions of the device, solving the problem in existing technologies where legal state changes are misjudged as abnormal due to fixed expected values, and providing dynamic benchmark assurance for improving test accuracy. Receiving and parsing the event sequence record messages uploaded when the device performs protection actions to obtain the actual description text and private data blocks allows the actual protection behavior output of the device to be transformed into… Quantifiable and verifiable structured data addresses the limitation of existing technologies that rely on manual message reading for automated and accurate comparison, providing a standardized data source to ensure testing accuracy. Calculating the similarity between the expected semantic set and the actual description text yields description similarity, quantifying semantic deviations into a computable metric and resolving the inability of existing technologies to identify legitimate variations of synonyms, thus providing semantic quantification assurance for testing accuracy. Matching key-value pairs in private data blocks against the expected data rule set yields rule matching degree, quantifying the degree of data structure conformity into a computable metric, addressing the issue of existing technologies ignoring private data structure matching, and further enhancing testing accuracy. Provides quantitative assurance for data structure; weighted calculation of description similarity and rule matching degree to obtain drift confidence, quantifying the overall deviation of a single message into a comprehensive indicator, solving the problem of the lack of comprehensive deviation quantification indicators in existing technologies, and providing comprehensive quantitative assurance for test accuracy; when the drift confidence is less than or equal to the preset review threshold, a second layer of verification is triggered. The review time window is first calculated based on the drift confidence, enabling the verification mechanism to automatically expand to sequence review when there is doubt at a single point, and the review scope is dynamically adjusted according to the degree of deviation, avoiding insufficient context or information redundancy caused by a fixed window, providing a dual guarantee of hierarchical expansion and window adaptation for improving the accuracy of protection behavior testing; taking the message as the center point... This invention extracts a continuous message sequence falling into the window, extending single-point verification to sequence verification. This addresses the problem in existing technologies where single-point independent verification cannot perceive the temporal correlation between messages, providing sequence context assurance for test accuracy. The continuous message sequence is parsed to obtain three types of feature sequences, enabling quantitative verification of physical constraints. This solves the problem of existing technologies lacking sequence feature extraction capabilities, providing sequence feature assurance for test accuracy. When the three types of sequences meet preset legal conditions, the protection behavior is determined to be normal, allowing legitimate drifts and real device defects to be distinguished at the level of sequence evolution laws. This solves the problem in existing technologies that cannot distinguish between legitimate drifts and real device errors, ultimately improving the accuracy of protection device behavior testing. This application can solve the problem of inaccurate test results caused by the inability of the verification benchmark to dynamically adjust with the device's operating status in existing protection device protection behavior testing, thereby improving the accuracy of protection device protection behavior testing.

[0078] Based on the above-described embodiment of a test method for the protective behavior of a protective device, an embodiment of the present invention provides a test system for the protective behavior of a protective device, the test system being used to execute the test method for the protective behavior of a protective device.

[0079] Based on the above-described embodiment of a test method for the protective behavior of a protective device, another embodiment of the present invention provides a terminal device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements a test method for the protective behavior of a protective device according to any embodiment of the present invention.

[0080] For example, in this embodiment, the computer program can be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the terminal device.

[0081] The terminal device may be a desktop computer, laptop, handheld computer, or cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.

[0082] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the terminal device, connecting all parts of the terminal device via various interfaces and lines.

[0083] Based on the above-described method embodiments, another embodiment of the present invention provides a computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform a test method for the protection behavior of a protection device as described in any of the above-described method embodiments of the present invention.

[0084] The modules / units integrated in the device / terminal equipment, if implemented as software functional units and sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.

[0085] Based on the above-described method embodiments, another embodiment of the present invention provides a computer program product, including a computer program or instructions, wherein the computer program or instructions, when executed by a communication device, implement a test method for the protective behavior of a protection device.

[0086] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A method for testing the protective behavior of a protective device, characterized in that, include: The status parameters of the protection device during operation are obtained, and the status parameters are used to search in a preset database to obtain the expected description semantic set and the expected data rule set; The system receives the event sequence record message uploaded by the protection device when it performs protection behavior after receiving a test command, and parses the event sequence record message to obtain the actual description text and private data block. The similarity between the expected description semantic set and the actual description text is calculated to obtain the description similarity. Each key-value pair in the private data block is matched in the expected data rule set to obtain the rule matching degree. The description similarity and the rule matching degree are weighted and calculated to obtain the drift confidence corresponding to the protection behavior performed by the protection device. If the drift confidence is less than or equal to the preset review threshold, a review time window is calculated based on the drift confidence. A continuous message sequence falling within the review time window is extracted from the preset message buffer using the event sequence record message as the center point. The continuous message sequence is parsed to obtain a setpoint area identifier sequence, a fault current sequence, and an action delay sequence. If the setpoint area identifier sequence, the fault current sequence, and the action delay sequence meet preset legal conditions, the protection behavior of the protection device is determined to be normal.

2. The test method for the protective behavior of the protective device as described in claim 1, characterized in that, If the setpoint zone identifier sequence, the fault current sequence, and the action delay sequence meet preset legal conditions, then the protection behavior of the protection device is determined to be normal, specifically including: Determine whether the first fixed-value zone identifiers corresponding to each time point in the fixed-value zone identifier sequence are equal, and obtain the first determination result; Determine whether the fault current value at each moment in the fault current sequence shows a monotonically non-increasing trend to obtain a second judgment result; A third judgment result is obtained by determining whether the action delay amount corresponding to each moment in the action delay amount sequence falls within the corresponding preset delay range, wherein each delay range is obtained by querying the database by the first fixed value area identifier corresponding to each moment; If the first judgment result, the second judgment result, and the third judgment result are all yes, then the protection behavior of the protection device is determined to be normal.

3. The test method for the protective behavior of the protective device as described in claim 1, characterized in that, The calculation of the review time window based on the drift confidence specifically includes: Based on the drift confidence level, the deviation of the protection behavior is calculated; The initial window width is obtained by calculating the deviation degree with the preset window coefficient; If the initial window width is less than or equal to the preset maximum window width, then the initial window width is used as the review time window; If the initial window width is greater than the maximum window width, then the maximum window width is used as the review time window.

4. The test method for the protective behavior of the protective device as described in claim 1, characterized in that, The step of using the state parameters to search a preset database to obtain the desired semantic set and the desired data rule set specifically includes: Obtain the expected description text corresponding to the data point targeted by the current test task, wherein the expected description text is the description information defined for the data point in the device configuration file of the protection device; The expected descriptive text is used to perform a thesaurus search in the database to obtain the expected descriptive semantic set; The desired data rule set is obtained by retrieving the second fixed-value zone identifier in the fixed-value zone mapping table of the database using the state parameters.

5. The test method for the protective behavior of the protective device as described in claim 1, characterized in that, The step of calculating the similarity between the expected descriptive semantic set and the actual descriptive text to obtain the descriptive similarity specifically includes: The descriptive text is vectorized using a preset word vector model to obtain the actual word vectors; The word vector model is used to transform the vectors of each word in the expected semantic set to obtain several expected word vectors. Calculate the cosine similarity between the actual word vector and each of the expected word vectors; The maximum value among the cosine similarities is selected as the descriptive similarity.

6. The test method for the protective behavior of the protective device as described in claim 1, characterized in that, The step of matching each key-value pair in the private data block with the expected data rule set to obtain the rule matching degree specifically includes: The key-value pairs of the private data block are matched with the rules in the expected data rule set to obtain the number of successful matches; The rule matching degree is obtained by calculating the ratio between the number of successful matches and the total number of rules in the expected data rule set.

7. The test method for the protective behavior of the protective device as described in any one of claims 1-6, characterized in that, Also includes: If the drift confidence level is greater than the verification threshold, the protection behavior of the protection device is determined to be normal.

8. A testing system for the protective behavior of a protective device, characterized in that, The testing system is used to perform the test method for the protective behavior of the protection device as described in any one of claims 1 to 7.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device or apparatus containing the computer-readable storage medium to perform a test method for the protective behavior of the protective device as described in any one of claims 1 to 7.

10. A computer program product, comprising a computer program or instructions, characterized in that, The test method for implementing the protective behavior of the protection device as described in any one of claims 1 to 7 when the computer program or instructions are executed by the communication device.