A substation automation testing method and system

By employing non-intrusive automated testing methods and utilizing digital test messages and time synchronization technology, the problems of low testing efficiency and poor accuracy of substation intelligent terminals have been solved. This has enabled online automated testing and simulation of complex operating conditions, thereby improving testing efficiency and reliability.

CN120855667BActive Publication Date: 2026-07-03DONGGUAN TRANSMISSION & TRANSFORMATION ENG CO

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
DONGGUAN TRANSMISSION & TRANSFORMATION ENG CO
Filing Date
2025-07-22
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Existing testing methods for substation smart terminals are inefficient, inaccurate, and have insufficient coverage. They cannot be tested online and are difficult to simulate complex working conditions. Manual operation is time-consuming and the consistency of results is difficult to guarantee.

Method used

A non-intrusive automated testing method is adopted. By constructing digital test messages and injecting test signals through reserved diagnostic interfaces on smart terminals or communication networks, combined with time synchronization and response data acquisition, the testing process is isolated from the main functional logic, and resource allocation and data transmission are optimized.

Benefits of technology

It enables online automated testing of smart terminals, improving testing efficiency and reliability, ensuring the accuracy and stability of test results, and simulating complex working conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120855667B_ABST
    Figure CN120855667B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of substation automation testing, and particularly relates to a substation automation testing method and system, the method comprising the following steps: constructing a digital test message for simulating a power grid operating state, the digital test message conforming to internal processing specifications of an intelligent terminal; non-invasively injecting the digital test message into an internal logic processing path of the intelligent terminal through a diagnostic interface reserved by the intelligent terminal or an internal communication network of the intelligent substation; using a time synchronization mechanism of the intelligent substation to synchronize the time of the digital test message; receiving response data returned by the intelligent terminal through the internal communication network of the intelligent substation; wherein a testing process is isolated from main function logic of the intelligent terminal, and the testing process comprises injection of the digital test message, time synchronization and acquisition of the response data. Through the above scheme, testing efficiency and reliability are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of substation automation testing, and specifically to a substation automation testing method and system. Background Technology

[0002] In modern power systems, smart substations have become an important direction for the digitalization and automation of power grids. Compared to traditional substations based on electromechanical equipment, smart substations deeply integrate communication networks, information processing, and automated control technologies. Relying on high-speed networks and precise time synchronization, they achieve real-time monitoring, control, and protection of the power system. In smart substations, intelligent terminals (such as digital protection devices, integrated measurement and control units, and fault recording devices) undertake multiple key tasks, including collecting electrical quantities, executing logical judgments, generating control commands, and recording operating status. Their performance and reliability directly affect the safe and stable operation of the power grid.

[0003] Intelligent terminals within smart substations are typically physically distributed. For example, merging units that convert analog to digital signals may be deployed in the outdoor switchyard, while protection and control devices are located in a remote control room. These distributed devices rely on high-speed communication networks such as process layer networks and station control layer networks to achieve data exchange and control coordination. Due to this architecture, the devices have extremely high requirements for communication latency, data consistency, and clock synchronization accuracy. In actual operation, terminals often need to handle large-scale concurrent data streams and complex logical judgments while ensuring millisecond-level response performance.

[0004] In existing technologies, the testing of smart terminals mainly relies on manual operation and centralized wiring methods. Functional verification and performance testing are completed by manually injecting test signals and monitoring the response results. However, this method has the following drawbacks: a large amount of manual operation can lead to time-consuming testing processes, high labor intensity, and the consistency of results is difficult to guarantee due to human factors. Summary of the Invention

[0005] The purpose of this invention is to address the aforementioned shortcomings by proposing a substation automation testing method and system.

[0006] The present invention adopts the following technical solution:

[0007] A substation automation testing method, comprising the following steps:

[0008] S1: Construct a digital test message to simulate the power grid operating state. The digital test message conforms to the internal processing specifications of the smart terminal.

[0009] S2: Digital test messages are non-intrusively injected into the internal logic processing path of the smart terminal through the diagnostic interface reserved in the smart terminal or the internal communication network of the smart substation.

[0010] S3: Utilize the time synchronization mechanism of the intelligent substation to synchronize the time of digital test messages;

[0011] S4: Receive response data transmitted back from the smart terminal through the internal communication network of the smart substation;

[0012] The testing process is isolated from the main functional logic of the smart terminal. The testing process includes the injection of digital test messages, time synchronization, and acquisition of response data.

[0013] The above solution solves the problems of low efficiency, poor accuracy, insufficient coverage, inability to conduct online testing, and difficulty in simulating complex working conditions in existing testing methods. It realizes non-intrusive, online automated testing of smart terminals, improving testing efficiency and reliability.

[0014] Furthermore, this application also proposes that, in step S2, upon receiving the digitized test message, the following processing be performed:

[0015] Identify digital test messages;

[0016] The identified digital test messages are routed to the test data path of the smart terminal;

[0017] The test data path is logically isolated from the main functional logic of the smart terminal that processes actual power grid data;

[0018] The test data path is logically separated from the path used by the smart terminal to process maintenance task data streams, and the processing priority of maintenance task data streams is lower than that of digital test messages.

[0019] Allocate processing resources that prioritize the processing of digital test messages in the test data path over the processing resources of the maintenance task data stream, and allocate dedicated buffers for the processing of digital test messages in the test data path.

[0020] By isolating test data from main functional logic and maintenance task logic and allocating dedicated resources, the independence and high priority of the testing process are ensured, the impact on the normal operation of smart terminals is avoided, and the stability and accuracy of testing are improved.

[0021] Furthermore, this application also proposes to include the following steps in S3:

[0022] Before the test system sends the digital test message, the test system adds a timestamp to the digital test message according to the synchronous clock source of the smart substation;

[0023] After receiving the digital test message, the smart terminal uses its own synchronization clock mechanism to verify the timestamp and processes the digital test message based on the verification result.

[0024] By adding a timestamp before the test system sends the message and then verifying it after receiving it on the smart terminal, the time synchronization accuracy of the digital test message is ensured, and the reliability of the test results is improved.

[0025] Furthermore, this application also proposes to include the following steps in S4:

[0026] The smart terminal segments the response data and adds a sequence number and timestamp to each data segment;

[0027] The intelligent terminal encapsulates data segments with serial numbers and timestamps into response messages and sends them through the internal communication network of the intelligent substation. The intelligent terminal sets the transmission order of response messages to take priority over transmission tasks used to process maintenance task data, and allocates dedicated transmission resources for the transmission of response messages.

[0028] After receiving messages through the internal communication network of the smart substation, the test system sorts and reassembles them according to the sequence number and timestamp.

[0029] The testing system verifies the recombined response data.

[0030] By segmenting the response data, adding sequence numbers and timestamps, and prioritizing the transmission and allocation of dedicated resources, the integrity, timeliness, and efficient return of the response data are ensured, thereby improving the accuracy and traceability of the test results.

[0031] Furthermore, this application also proposes that S1 include the following steps:

[0032] Based on the preset power grid topology, equipment operating parameters, and dynamic power grid event sequence, current and voltage sample values ​​and state information are generated to simulate the occurrence, development, and clearing of power grid events.

[0033] The sampled current and voltage values ​​and status information are encapsulated into digital test messages, and the digital test messages conform to the internal processing specifications of the smart terminal.

[0034] Adjust the generation rate and content changes of digital test messages to match the evolution of dynamic power grid events;

[0035] Adjust the timing of digital test messages to correspond to the concurrent occurrence and evolution of dynamic power grid events.

[0036] The above scheme can generate highly realistic digital test messages based on power grid topology, equipment parameters and dynamic event sequences, and adjust their rate and timing to effectively simulate complex dynamic power grid events, thereby improving the realism and coverage of the test.

[0037] Furthermore, this application also proposes that the steps of isolating the testing process from the main functional logic of the smart terminal include:

[0038] Obtain the resource usage of the main functional logic of the smart terminal;

[0039] Obtain the operating status of the power grid connected to the smart terminal;

[0040] Based on the resource usage of the main functional logic and the power grid operation status, adjust the resource allocation priority of the testing process. Through this adjustment, maintain the isolation between the testing process and the main functional logic of the smart terminal.

[0041] When the power grid operation status indicates a fault or abnormality, the resource allocation during the testing process is reduced to ensure the priority operation of the main functional logic and to maintain the isolation between the testing process and the main functional logic of the smart terminal.

[0042] By dynamically acquiring the main functional logic resource usage and power grid operation status, and adjusting the priority of test resource allocation accordingly, the above scheme ensures that the test process can be carried out without affecting the main functional logic of the smart terminal. In particular, it ensures that the main function can run first in case of fault or abnormality, thereby improving the safety and reliability of the test.

[0043] Furthermore, this application also proposes steps for adjusting the resource allocation priority during the testing process, including:

[0044] Adjust the priority of the test process in the internal processor scheduling queue of the smart terminal, or adjust the memory resource quota that the test process can access.

[0045] The above scheme provides specific methods for adjusting resource allocation priorities, including processor scheduling queue priorities and memory resource quotas, making resource management during the testing process more precise and controllable.

[0046] Furthermore, this application also proposes that the steps for obtaining the resource usage of the main functional logic of a smart terminal include:

[0047] By calling the resource management interface provided by the internal operating system or real-time operating system of the smart terminal, the processor utilization, memory usage, and network interface throughput of the main functional logic of the smart terminal can be obtained.

[0048] The above solution clarifies the specific way to obtain the resource usage of the main functional logic, namely by calling the resource management interface provided by the operating system, which improves the accuracy and convenience of resource acquisition.

[0049] Furthermore, this application also proposes that the steps for obtaining the operating status of the power grid connected to the smart terminal include:

[0050] Intelligent terminals monitor the process layer or station control layer communication network of intelligent substations;

[0051] The intelligent terminal receives real-time data packets from the process layer or station control layer communication network of the intelligent substation;

[0052] The intelligent terminal parses real-time data packets to extract the operating status information and protection action signals of the intelligent electronic device;

[0053] Based on the extraction results, the operating status of the power grid connected to the smart terminal is obtained.

[0054] The above scheme clarifies the specific methods for obtaining the power grid's operating status. By monitoring the communication network and receiving and parsing real-time data packets, the real-time nature and accuracy of power grid status perception are improved.

[0055] Furthermore, this application also proposes a substation automation testing system applied to the aforementioned substation automation testing method, the system comprising:

[0056] The message construction module constructs digital test messages to simulate the operating state of the power grid. The digital test messages conform to the internal processing specifications of the smart terminal.

[0057] The message injection module injects digital test messages into the internal logic processing path of the smart terminal in a non-intrusive manner through the diagnostic interface reserved in the smart terminal or the internal communication network of the smart substation.

[0058] The time synchronization module utilizes the time synchronization mechanism of the intelligent substation to synchronize the digital test messages.

[0059] The response data acquisition module receives response data transmitted back from the smart terminal through the internal communication network of the smart substation;

[0060] The isolation management module is used to manage the isolation between the testing process and the main functional logic of the smart terminal.

[0061] The above solution provides a system for implementing the aforementioned automated testing method. Through modular design, the functions of each stage of the testing process are clearly defined and work collaboratively, thereby improving the overall efficiency and maintainability of the testing system.

[0062] As can be seen from the above, the substation automation testing method and system provided in this application, by constructing digital test messages that are not intrusively injected into the internal logic path of the intelligent terminal, combined with time synchronization and response data acquisition, and ensuring that the testing process is isolated from the main functional logic of the intelligent terminal, effectively solves the problems of low efficiency, poor accuracy, insufficient coverage, inability to conduct online testing, and difficulty in simulating complex working conditions in existing testing methods. It has the advantages of solving the problems of low efficiency, poor accuracy, insufficient coverage, inability to conduct online testing, and difficulty in simulating complex working conditions in existing testing methods, realizing non-intrusive, online automated testing of intelligent terminals, and improving testing efficiency and reliability.

[0063] To further understand the features and technical content of the present invention, please refer to the following detailed description and drawings of the present invention. However, the drawings provided are for reference and illustration only and are not intended to limit the present invention. Attached Figure Description

[0064] Figure 1 This is a flowchart of the method of the present invention;

[0065] Figure 2 This is a schematic diagram of the overall structure of the present invention. Detailed Implementation

[0066] The following specific embodiments illustrate the implementation of the present invention. Those skilled in the art can understand the advantages and effects of the present invention from the content disclosed in this specification. The present invention can be implemented or applied through other different specific embodiments, and various details in this specification can also be modified and changed based on different viewpoints and applications without departing from the spirit of the present invention. Furthermore, the accompanying drawings of the present invention are for simple illustrative purposes only and are not depictions of actual dimensions; this is stated in advance. The following embodiments will further describe the relevant technical content of the present invention in detail, but the disclosed content is not intended to limit the scope of protection of the present invention.

[0067] This embodiment provides a substation automation testing method and system, combined with... Figure 1 and Figure 2 As shown.

[0068] refer to Figure 1 A substation automation testing method, comprising the following steps:

[0069] S1: Construct a digital test message to simulate the power grid operating state. The digital test message conforms to the internal processing specifications of the smart terminal.

[0070] S2: Digital test messages are non-intrusively injected into the internal logic processing path of the smart terminal through the diagnostic interface reserved in the smart terminal or the internal communication network of the smart substation.

[0071] S3: Utilize the time synchronization mechanism of the intelligent substation to synchronize the time of digital test messages;

[0072] S4: Receive response data transmitted back from the smart terminal through the internal communication network of the smart substation;

[0073] The testing process is isolated from the main functional logic of the smart terminal. The testing process includes the injection of digital test messages, time synchronization, and acquisition of response data.

[0074] To clearly illustrate the technical details of this method, the key technical features involved are further explained below. Specifically, the digital test message refers to a set of digital signals used to simulate the operating state of the power grid. This can include current and voltage sample values ​​and status information during the simulation of power grid events occurring, developing, and clearing up. It can also be general substation event-oriented messages or sample value messages conforming to smart substation communication protocols such as IEC 61850. Its purpose is to provide controllable and repeatable input to the smart terminal to verify its behavior under specific power grid conditions. Non-intrusive injection refers to the method of introducing test signals into the internal logic processing path of the smart terminal without interrupting or minimizing the normal operation of the smart terminal. Specifically, this can be done using the smart terminal's reserved diagnostic interfaces, such as JTAG interfaces, debugging ports, or dedicated Ethernet ports, or through the internal communication network of the smart substation, such as the process layer or station control layer network, in a bypass or simulated real data stream manner. Its purpose is to avoid interfering with power grid operation and to achieve "online" or "quasi-online" testing. The time synchronization mechanism of a smart substation refers to the technical means used within the substation to ensure the clock consistency of each smart terminal. Specifically, it can be implemented using GPS / BeiDou time synchronization, IRIG-B code synchronization, or Network Time Protocol (NTP / PTP), etc. The purpose is to ensure that digital test messages processed within the smart terminal maintain a precise temporal correspondence with simulated power grid events, thereby ensuring the accuracy of test results. Isolation of the testing process from the main functional logic of the smart terminal refers to ensuring that during automated testing, testing activities do not negatively impact or interfere with the main functional logic of the smart terminal in processing actual power grid data and executing core control functions. This can include isolation at the logical level, such as through independent software modules or processing threads, or isolation at the resource level, such as through independent processor resources, memory regions, or network bandwidth allocation. The aim is to ensure the stability and reliability of power grid operation and avoid testing risks.

[0075] In some preferred embodiments, this application is implemented as follows. First, the test system can utilize a message generator to generate a series of digital test messages conforming to the IEC 61850-9-2LE or IEC 61850-8-1 protocol specifications, based on preset power grid fault scenarios, such as line short circuits or bus grounding. These messages can contain simulated current and voltage sampling values, as well as switch status information, and are designed to be correctly parsed by the target intelligent terminal, such as a line protection device. Subsequently, the message injection module can send these digital test messages to the intelligent terminal in the form of UDP / IP packets through the debugging Ethernet port connected to the intelligent terminal, or through the process layer network of the intelligent substation. During the injection process, the test system utilizes the PTP (Precise Time Protocol) synchronization mechanism of the intelligent substation to ensure that the timestamp carried by the injected message is highly consistent with the internal clock of the intelligent terminal. After receiving and processing these test messages, the intelligent terminal will generate corresponding actions or status changes according to its internal logic, such as issuing trip commands or changing protection settings. These response data, such as GOOSE (General Event-Oriented Message) messages or SV (Sample Value) messages, are transmitted back to the test system via the smart substation's control layer or process layer network. The test system receives and parses these response messages to verify whether the smart terminal's response meets expectations. To ensure the security of the testing process, the smart terminal's operating system can be configured to assign the processing tasks of test messages to independent, low-priority threads and allocate dedicated memory areas for them. This ensures that even if an anomaly occurs in the processing of test messages, it will not affect the high-priority main functional logic of the smart terminal in processing actual power grid data.

[0076] This application further proposes the following steps for performing processing upon receiving a digital test message:

[0077] Identify digital test messages;

[0078] The identified digital test messages are routed to the test data path of the smart terminal;

[0079] The test data path is logically isolated from the main functional logic of the smart terminal that processes actual power grid data;

[0080] The test data path is logically separated from the path used by the smart terminal to process maintenance task data streams, and the processing priority of maintenance task data streams is lower than that of digital test messages.

[0081] Allocate processing resources that prioritize the processing of digital test messages in the test data path over the processing resources of the maintenance task data stream, and allocate dedicated buffers for the processing of digital test messages in the test data path.

[0082] Among them, the test data path refers to the logical or physical channel within the intelligent terminal specifically used for processing test data streams. It can be implemented using software-defined data flow paths, independent hardware processing units, or specific memory regions. Its purpose is to distinguish test data from the data stream of the main functional logic of the intelligent terminal, which processes actual power grid data. Logical isolation refers to ensuring, through software mechanisms or hardware design, that the data processing, resource access, and execution processes of different functional modules do not affect each other. Even if one module malfunctions, it will not affect other modules. This can be achieved using operating system process isolation, virtualization technology, independent processor cores, or memory protection units. Its purpose is to ensure the stable operation of the main functional logic. Logical separation refers to logically dividing different types of data streams (e.g., test data streams and maintenance task data streams) along the data processing path. Independent channels ensure that processing flows, resource allocation, and priority management are independent of each other. They can be implemented using routing rules based on packet type or source address, independent task scheduling queues, or different communication ports. Their purpose is to optimize the processing efficiency and priority of different data streams. Processing resources refer to the hardware and software capabilities within the smart terminal used to perform computation, storage, and data transmission. These can include processor time slices, CPU cores, memory bandwidth, network interface bandwidth, or I / O channels. Their purpose is to allocate the necessary execution capabilities for different tasks. Dedicated buffers refer to memory areas reserved for specific types of data (such as digitized test messages) and independent of other data buffers. They can be implemented using static memory allocation, dynamic memory pool management, or hardware cache partitioning. Their purpose is to ensure that test data can be stored and accessed quickly and without conflicts.

[0083] The proposed solution first identifies the received digital test messages, accurately distinguishing test data from actual power grid operation data. This is fundamental to ensuring the correctness of subsequent processing. Once a message is identified as a digital test message, it is routed to a dedicated test data path within the smart terminal. This routing mechanism achieves initial separation between the test data stream and the main functional logic of the smart terminal processing actual power grid data. Furthermore, the test data path is logically isolated from the main functional logic of the smart terminal, meaning that even if any processing anomalies or resource contention occur within the test data path, it will not interfere with the main functional logic of power grid operation being executed by the smart terminal, thus ensuring the stable operation of the power grid. Based on this, to optimize testing efficiency and ensure timely response to test tasks, the test data path is logically separated from the path used by the smart terminal to process maintenance task data streams. This separation ensures that the test data stream and the maintenance task data stream do not interfere with each other on their processing paths. Simultaneously, the processing priority of the maintenance task data stream is set lower than that of the digital test message, ensuring that the test message receives priority processing within the smart terminal. To further reinforce this priority, this solution allocates processing resources to digital test messages in the test data path with higher priority than those to maintenance task data streams, and assigns them a dedicated buffer. This means that digital test messages will receive priority and dedicated space in processor scheduling and memory access, avoiding resource competition with maintenance task data streams or other low-priority tasks, thereby improving the processing speed and reliability of test messages. Through this series of refined processing mechanisms, this solution effectively solves the problem of potential interference between test messages and main functional logic, while ensuring the priority and effective execution of test tasks, thereby improving the practicality and reliability of substation automation testing methods.

[0084] In some preferred embodiments, this application is implemented as follows. When a smart terminal receives a data packet, its internal packet parsing module can first check the packet header information, for example, by identifying the packet's specific protocol identifier, source address, or destination port number to determine whether the packet is a digital test packet. Once the packet is confirmed as a digital test packet, the smart terminal's internal data distribution mechanism can route it to a dedicated software processing module, which is the test data path. This test data path can run as an independent process or thread in the smart terminal's real-time operating system, thereby achieving logical isolation from the main functional logic (e.g., protection calculation, measurement and control functions) that processes actual power grid data at the operating system level, ensuring that even if an anomaly occurs during the test, it will not affect the normal execution of the main functional logic. Furthermore, to further optimize resource management, the smart terminal's internal scheduler can be configured to logically separate the test data path from the path used for processing maintenance task data streams (e.g., log upload, parameter configuration update). This separation can be achieved by allocating an independent task queue or scheduling priority to the test data path. Specifically, the operating system of the smart terminal can allocate a higher scheduling priority to the processing tasks of digital test messages, allowing them to be executed first in processor resource contention. Simultaneously, the memory management unit of the smart terminal can pre-allocate a dedicated memory area as a dedicated buffer for digital test messages, ensuring fast access during reception and processing and avoiding latency or data overwriting issues that may occur when sharing the buffer with other data streams. Through these specific implementation methods, it can be ensured that digital test messages are processed effectively, isolated, and with priority within the smart terminal.

[0085] This application further proposes steps for time synchronization of digital test messages, including:

[0086] Before the test system sends the digital test message, the test system adds a timestamp to the digital test message according to the synchronous clock source of the smart substation;

[0087] After receiving the digital test message, the smart terminal uses its own synchronization clock mechanism to verify the timestamp and processes the digital test message based on the verification result.

[0088] The testing system refers to a collection of external or internal devices used to generate, send, and receive digital test messages. Specifically, it can be a standalone test workstation, a server, or a module integrated into a substation automation system. Its purpose is to provide a controllable testing environment and data source. The synchronous clock source for a smart substation refers to the device or system that provides a unified, high-precision time reference for the entire smart substation. Specifically, this can be achieved through a GPS receiver, a BDS receiver, a PTP high-precision time protocol, or an IEEE 500000 time reference. This is achieved through methods such as a 1588 master clock or a Network Time Protocol (NTP) server, aiming to ensure time synchronization of all equipment within the substation. A timestamp is time information appended to a digital test message, specifically a time value accurate to nanoseconds or microseconds, used to record the moment the message was generated or sent, providing a traceable time reference. The intelligent terminal's own synchronization clock mechanism refers to the system within the intelligent terminal that maintains its own time consistent with an external synchronization clock source. This can be achieved through a built-in PTP clock, NTP client, or GPS / BDS receiver module, ensuring the time accuracy of the intelligent terminal's internal processing logic. Calibration refers to the intelligent terminal's verification of received data. The process of comparing and correcting the timestamp carried in a digital test message with its current time can be done by calculating the time difference, applying a time offset, or adjusting the message processing sequence. The purpose is to eliminate time inconsistencies caused by transmission delays or clock deviations. Processing the digital test message based on the verification result means that after the smart terminal completes the timestamp verification, it performs subsequent logical judgments, data parsing, or control operations based on the verified time information. This can be done by adjusting the priority of the message's internal processing queue, remarking the message's valid time, or triggering specific time-sensitive functions. The purpose is to ensure that the smart terminal's response and processing of the test message are based on an accurate time context.

[0089] In some preferred embodiments, this application is implemented as follows. For example, before the test system sends a digital test message, the test system can be configured to synchronize with the PTP master clock of the smart substation via the High Precision Time Protocol (PTP). The test system, acting as a PTP slave clock, periodically obtains time information from the PTP master clock and maintains a high degree of consistency between its internal clock and the PTP master clock. When a digital test message needs to be sent, the test system embeds a timestamp of the current PTP synchronization in a specific field of the message. For example, a timestamp format defined by the IEEE 1588 standard can be used to accurately record the message's transmission time.

[0090] Specifically, after receiving a timestamped digital test message, the smart terminal's internal PTP slave clock module continuously synchronizes with the smart substation's PTP master clock to maintain its own clock accuracy. Upon receiving the digital test message, the smart terminal's message processing module extracts the timestamp from the message and compares it with the smart terminal's current local time after PTP synchronization. If a time difference exists, the smart terminal calculates a time offset. Based on the calibration result, the digital test message is processed. Specifically, this time offset can be applied to the message's subsequent processing logic. For example, if the message's timestamp indicates it arrived before the local time, it can be considered an "early" message, and its priority in the processing queue can be adjusted accordingly, or it can wait a certain time before processing. If the message's timestamp indicates it arrived after the local time, it can be considered a "delayed" message, and it can be marked or have an exception handling process triggered. Furthermore, the smart terminal can also recalculate the message's effective processing time based on the calibrated timestamp, ensuring that all time-sensitive operations are performed based on the accurate calibrated time.

[0091] This application further proposes the following steps when receiving response data transmitted back by a smart terminal through the internal communication network of a smart substation:

[0092] The smart terminal segments the response data and adds a sequence number and timestamp to each data segment;

[0093] The intelligent terminal encapsulates data segments with serial numbers and timestamps into response messages and sends them through the internal communication network of the intelligent substation. The intelligent terminal sets the transmission order of response messages to take priority over transmission tasks used to process maintenance task data, and allocates dedicated transmission resources for the transmission of response messages.

[0094] After receiving messages through the internal communication network of the smart substation, the test system sorts and reassembles them according to the sequence number and timestamp.

[0095] The testing system verifies the recombined response data.

[0096] Setting the transmission order of response messages to take precedence over transmission tasks used for processing maintenance data means assigning a higher transmission priority to the data stream of response messages within the smart terminal or communication network. This ensures that the data is processed and sent preferentially during network congestion or resource contention. Specifically, this can be achieved by configuring the QoS (Quality of Service) policy of network devices, such as setting high-priority queues or using Differential Service Code Points (DSCP). The aim is to ensure that test response data arrives at the test system promptly and quickly, avoiding delays caused by low-priority data congestion. Furthermore, allocating dedicated transmission resources for response messages means reserving or isolating a portion of network bandwidth, processing capacity, or buffer space for the data transmission of response messages, preventing it from being affected by other data streams. This can be achieved by establishing a Virtual Local Area Network (VLAN), configuring bandwidth management policies, or using a dedicated channel. The purpose is to provide a stable and interference-free transmission path for test response data, further ensuring the reliability and real-time performance of data transmission.

[0097] This application's solution optimizes the processing flow of response data transmitted from the intelligent terminal, resolving issues of data transmission chaos, latency, and data organization and verification at the receiving end. Specifically, after generating response data, the intelligent terminal first segments this data and appends a sequence number and timestamp to each data segment. This segmentation and marking mechanism breaks down the original, potentially large, response data into manageable small units, each carrying ordered and time information. Subsequently, these data segments with sequence numbers and timestamps are encapsulated into response messages and sent through the intelligent substation's internal communication network. During transmission, the intelligent terminal prioritizes the transmission of these response messages over transmission tasks used for processing maintenance task data and allocates dedicated transmission resources for the response messages. This priority setting and resource allocation mechanism ensures higher transmission reliability of test response data within the network, enabling rapid network access and effectively avoiding delays and data loss caused by network congestion or competition for resources with maintenance task data, thereby guaranteeing the real-time performance and integrity of the test data. After the test system receives these messages through the internal communication network of the smart substation, it uses the sequence number and timestamp contained in the message to accurately sort and reassemble the received data segments, thereby recovering the original, complete response data. The sequence number ensures the correct order of data reassembly, while the timestamp helps to assess transmission delay and perform time synchronization analysis. Finally, the test system verifies the reassembled response data. This step verifies whether errors or corruption occurred during data transmission and reassembly, ensuring the accuracy of the test results. Through the above improvements, the process of intelligent terminal transmitting response data becomes orderly, efficient, and reliable. This is closely integrated with the step of receiving response data in the substation automation testing method, significantly improving the quality of the data acquisition stage in the entire testing process. In the substation automation testing method, the injection of digital test messages, time synchronization, and the acquisition of response data are core components. This solution optimizes the transmission and processing of response data, ensuring that the test system can acquire the intelligent terminal's response in a timely and accurate manner, thus providing a high-quality data foundation for subsequent test analysis and result judgment. This enables the entire substation automation testing method to more reliably evaluate the performance of smart terminals under simulated power grid operating conditions, improving the overall efficiency of the test and the accuracy of the results.

[0098] In some preferred embodiments, when the smart terminal segments the response data, it can logically divide it according to a preset message size or data type, for example, splitting a complete test result file into multiple 1KB data blocks. A sequence number is added to each data segment, which can be an incrementing integer value, such as sequentially numbered starting from 1, to identify the data segment's position in the original data stream. The timestamp can be the system time obtained using a high-precision time synchronization protocol (such as IEEE 1588 or NTP), accurate to the microsecond level, and appended to the message header of each data segment. When the smart terminal encapsulates the data segments with sequence numbers and timestamps into a response message, it can use the IEC 61850-9-2LE or GOOSE message format for encapsulation. These formats support adding custom fields for the sequence number and timestamp to the message header. When sending data through the internal communication network of the smart substation, the intelligent terminal can utilize the QoS mechanisms supported by the network switch or router, such as configuring IEEE 802.1p priority tags to set the priority of response messages to the highest level (e.g., priority 7), while setting the priority of maintenance task data (such as log uploads and configuration synchronization) to a lower level (e.g., priority 0 or 1). Simultaneously, the intelligent terminal can allocate dedicated transmission resources for the transmission of response messages, such as configuring VLAN (Virtual Local Area Network) or MPLS (Multiprotocol Label Switching) tunnels on the network switch to provide an independent logical channel for test response data, ensuring that its bandwidth and latency are not affected by other network traffic. After receiving messages through the internal communication network of the smart substation, the test system can maintain a receive buffer, caching and sorting the received data segments according to the sequence number and timestamp in the message header. When all data segments with all sequence numbers have been received or the preset timeout period has been reached, the test system reassembles the data segments according to the sequence number order. To verify the reassembled response data, a Cyclic Redundancy Check (CRC) or MD5 hash algorithm can be used to calculate the checksum of the reassembled data and compare it with the checksum calculated by the smart terminal before sending and appended to the last data segment to verify the data integrity and accuracy.

[0099] This application further proposes steps for constructing digital test messages to simulate power grid operating conditions, including:

[0100] Based on the preset power grid topology, equipment operating parameters, and dynamic power grid event sequence, current and voltage sample values ​​and state information are generated to simulate the occurrence, development, and clearing of power grid events.

[0101] The sampled current and voltage values ​​and status information are encapsulated into digital test messages, and the digital test messages conform to the internal processing specifications of the smart terminal.

[0102] Adjust the generation rate and content changes of digital test messages to match the evolution of dynamic power grid events;

[0103] Adjust the timing of digital test messages to correspond to the concurrent occurrence and evolution of dynamic power grid events.

[0104] The preset power grid topology refers to an abstract description of the physical connections, equipment layout, and electrical connections of the power grid. It can be implemented using standardized power system models, such as the Common Information Model (CIM) or IEEE standard test system models, to provide basic structural information for simulating power grid operation. Equipment operating parameters refer to the inherent attributes and current operating states of various electrical devices in the power grid, such as generator capacity, transformer ratio, line impedance, circuit breaker status, and relay settings. These can be implemented using database storage or configuration file definitions, to provide accurate data on equipment behavior for simulating power grid events. The dynamic power grid event sequence refers to a series of time-sequential definitions of possible faults, operations, or abnormal situations in the simulated power grid, such as short-circuit faults, ground faults, load surges, generator tripping, and circuit breaker closing or opening. These can be implemented using event scripts, state machine models, or predefined event libraries, to drive changes in the content and timing of test messages. The dynamic power grid event occurrence, development, and clearance process refers to the evolution of a power grid event from its initial triggering to the complete disappearance of its impact over the entire timeline. This includes the various stages of fault generation, persistence, clearance, and system recovery. It can be implemented using power system simulation algorithms or calculations based on physical models, with the aim of generating simulated data highly consistent with actual power grid events. The generation rate and content change refer to the frequency of digital test messages sent per unit time and the way the values ​​of data fields within the messages change over time. This can be achieved using data interpolation algorithms, dynamic sampling rate adjustment, or event-triggered message content update mechanisms, with the aim of ensuring that the test messages accurately reflect the dynamic characteristics of power grid events. The timing refers to the precise arrangement and interrelationships of digital test messages on the timeline, especially for situations where multiple events occur simultaneously or in a specific order. This can be achieved using high-precision timestamps, event synchronization mechanisms, or multi-threaded concurrent control, with the aim of simulating the concurrency and correlation of events in the actual power grid. The concurrent occurrence and evolution process refers to a complex scenario in which multiple power grid events occur simultaneously within the same time period, and each develops and influences the other according to its own inherent laws. It can be implemented using a multi-event superposition model or parallel simulation technology. Its purpose is to comprehensively verify the processing capabilities of smart terminals under complex and variable operating conditions.

[0105] This application's solution enhances the realism and comprehensiveness of substation automation testing by meticulously constructing digital test messages. Specifically, firstly, based on preset grid topology, equipment operating parameters, and dynamic grid event sequences, the system generates current and voltage sampling values ​​and state information simulating the occurrence, development, and resolution of grid events. This step is fundamental to the entire dynamic simulation, ensuring that the generated data not only conforms to the basic physical laws of the power grid but also reflects the dynamic response of the grid under fault or abnormal conditions. By pre-setting the grid topology and equipment parameters, a simulation model highly consistent with the actual substation environment can be constructed; the introduction of dynamic grid event sequences enables testing to cover various scenarios, from simple faults to complex chain reactions. Based on this, the generated current and voltage sampling values ​​and state information are encapsulated into digital test messages, ensuring they conform to the internal processing specifications of the intelligent terminal. This encapsulation process guarantees that the test data can be correctly identified, parsed, and processed by the intelligent terminal, thus smoothly entering its internal logic processing path. This aligns with the steps in constructing digital test messages in substation automation testing methods, ensuring the usability of the test messages. Furthermore, the solution adjusts the generation rate and content changes of digital test messages to match the evolution of dynamic power grid events. Power grid events do not occur instantaneously but have specific time scales and evolution paths. By dynamically adjusting the message generation rate, the speed of event changes can be simulated, such as the difference between the instantaneous occurrence of a short-circuit fault and a slow change in load; by adjusting the changes in message content, the severity and development trend of events can be simulated, such as the rise of fault current from normal to peak value. Simultaneously, the solution also adjusts the timing of digital test messages to correspond to the concurrent occurrence and evolution of dynamic power grid events. In actual power grids, multiple faults or operations may occur simultaneously and influence each other, forming complex concurrent events. By precisely controlling the message timing, the synchronicity, sequence, and interaction of these concurrent events can be simulated; for example, simulating the simultaneous faulting of multiple lines or the coordinated tripping of protection devices. It is through the synergistic effect of the above steps that this solution can generate highly realistic, dynamically changing digital test messages. These messages not only conform to the processing specifications of smart terminals in terms of format, but also accurately reproduce the dynamic characteristics of actual power grid events in terms of content, timing, and rate. This dynamic simulation capability allows smart terminals to respond to these test messages as if processing real power grid data, thereby comprehensively evaluating their performance, reliability, and coordination capabilities under complex and dynamic operating conditions. This significantly improves the effectiveness of substation automation testing methods, enabling them to more deeply verify the performance of smart terminals in dealing with actual power grid challenges and solving the problem that simply constructing static messages that conform to specifications cannot comprehensively evaluate the performance and reliability of smart terminals in actual operation.

[0106] In some preferred embodiments, this application is implemented as follows. First, a power system simulation software, such as PSCAD / EMTDC or MATLAB / Simulink, can be used to construct a preset power grid topology and equipment operating parameter model. In this simulation model, a series of dynamic power grid event sequences can be defined, such as setting a three-phase short-circuit fault, a single-phase ground fault, or a line reclosing operation at a specific time point. Based on these presets and event sequences, the simulation software will calculate and output in real time the current and voltage sample values ​​of each node in the power grid, as well as the status information of devices such as circuit breakers and relays. This information accurately simulates the dynamic changes during the occurrence, development, and clearing of power grid events. Subsequently, a message encapsulation module can receive this simulation data. This module can encapsulate the current and voltage sample values ​​into Sample Value (SMV) messages according to the IEC 61850-9-2LE standard, and encapsulate the status information into General Events Toward Substation (GOOSE) messages according to the IEC 61850-8-1 standard. During the encapsulation process, the message encapsulation module ensures that the generated digital test messages conform to the internal processing specifications of the smart terminal. For example, fields such as the MAC address, VLAN ID, and application ID of the messages are configured according to the expected specifications of the smart terminal. To match the generation rate and content changes of the digital test messages with the evolution of dynamic power grid events, a dynamic data flow control mechanism can be adopted. For example, for rapidly changing fault currents, the message generation module can increase the transmission frequency of SMV messages and use linear interpolation or spline interpolation algorithms to smooth the transition of current and voltage values, ensuring that the message content changes are synchronized with the simulation results. For changes in state variables, GOOSE messages can be sent immediately when the state variable changes, and heartbeat messages are sent according to a preset period after the state stabilizes. In addition, to adjust the timing of the digital test messages to correspond to the concurrent occurrence and evolution of dynamic power grid events, high-precision time synchronization protocols, such as PTP (Precise Time Protocol) or NTP (Network Time Protocol), can be used. When generating simulation data, a precise timestamp is added to each sampled value and state variable change event. When generating SMV and GOOSE messages, the message encapsulation module embeds these timestamps into the messages. When multiple events occur concurrently, such as a short-circuit fault and a circuit breaker tripping occurring simultaneously, the message encapsulation module ensures that the corresponding SMV and GOOSE messages are sent within a very short time window, according to the actual occurrence order or concurrency relationship of the simulated events, thereby simulating a real power grid event concurrency scenario. In this way, when the smart terminal receives these messages, it can accurately perceive the dynamic evolution and concurrency relationship of power grid events, thus enabling more comprehensive testing of its internal logic.

[0107] This application further proposes steps for isolating the testing process from the main functional logic of the smart terminal, including:

[0108] Obtain the resource usage of the main functional logic of the smart terminal;

[0109] Obtain the operating status of the power grid connected to the smart terminal;

[0110] Based on the resource usage of the main functional logic and the power grid operation status, adjust the resource allocation priority of the testing process. Through this adjustment, maintain the isolation between the testing process and the main functional logic of the smart terminal.

[0111] When the power grid operation status indicates a fault or abnormality, the resource allocation during the testing process is reduced to ensure the priority operation of the main functional logic and to maintain the isolation between the testing process and the main functional logic of the smart terminal.

[0112] The acquisition of resource usage status of the main functional logic of the smart terminal refers to collecting information on the usage status of computing resources by the main functional logic modules within the smart terminal. This can be achieved by monitoring indicators such as processor utilization, memory usage, network interface throughput, or I / O operation frequency, with the aim of providing real-time data support for subsequent resource allocation decisions. Acquiring the operating status of the power grid connected to the smart terminal refers to sensing the current operating conditions of the power grid environment in which the smart terminal is located, including but not limited to the stability of the power grid, the presence of faults, and load change trends. This can be achieved by listening to real-time data packets in the power grid communication network and parsing the operating status information and protection action signals, with the aim of providing external environmental data for resource allocation during the testing process. Adjusting the resource allocation priority of the testing process refers to dynamically changing the resource acquisition order or quota of the testing process within the smart terminal's internal system based on preset strategies or real-time judgment. This can be achieved by adjusting the priority of the testing process in the processor scheduling queue or adjusting the memory resource quota accessible to the testing process, with the aim of ensuring that the testing process can make reasonable use of resources under different operating conditions without affecting the normal operation of the main functional logic.

[0113] This application's solution introduces a dynamic resource management mechanism to finely control resource allocation during the testing process. This ensures continuous isolation between the testing process and the main functional logic of the smart terminal under complex and ever-changing power grid conditions, prioritizing the operation of the main functional logic. Specifically, the solution first acquires the resource usage of the smart terminal's main functional logic, allowing the system to understand its load status in real time, such as processor and memory usage. Simultaneously, the system acquires the operating status of the power grid connected to the smart terminal, providing a basis for judging the external environment, such as whether the power grid is operating stably, experiencing a fault, or an abnormal state. Based on these two types of key information, the system can intelligently adjust the resource allocation priority of the testing process. This adjustment is not fixed but dynamically adjusted according to the actual situation. For example, when the main functional logic resource usage is high, the priority of the testing process can be appropriately reduced to avoid interfering with the main functional logic; when the power grid operating status indicates a fault or abnormality, the system immediately reduces the resource allocation of the testing process, ensuring that the smart terminal can concentrate all available resources on handling power grid faults and guaranteeing the safe and stable operation of the power grid. Through this dynamic adjustment, even under extreme operating conditions, the testing process can maintain isolation from the main functional logic, avoiding negative impacts on the core functions of the smart terminal. This dynamic resource adjustment mechanism, combined with the non-intrusive testing method proposed in this application, further enhances the reliability and security of the test. The non-intrusive injection of digital test messages, time synchronization, and acquisition of response data proposed in this application enables functional and performance verification without interrupting the normal operation of the smart terminal. However, if the resource allocation during the testing process is fixed, when the main functional logic of the smart terminal requires more resources due to changes in power grid conditions, the testing process may compete with the main functional logic for resources, affecting the response speed and processing capacity of the main functional logic, and potentially leading to inaccurate test results. This solution, by dynamically adjusting the resource allocation during the testing process, ensures that the main functional logic receives priority resource guarantees under any circumstances, thereby avoiding potential interference with the core functions of the smart terminal. For example, when a power grid fault occurs, the smart terminal needs to respond quickly and execute protective actions. In this case, the dynamic resource adjustment mechanism immediately reduces the resource consumption of the testing process, ensuring that the main functional logic can process fault information with the highest priority, thus ensuring the stable operation of the power grid. This combination makes the automated testing of smart terminals not only non-intrusive but also adaptive. It can intelligently manage test resources based on changes in the internal state of the smart terminal and the external power grid environment, thereby achieving efficient and accurate online testing while ensuring the safe operation of the power grid.

[0114] In some preferred embodiments, this application is implemented as follows. The intelligent terminal can run a real-time operating system (RTOS) that provides a resource management interface. During testing, the intelligent terminal can periodically call the APIs (Application Programming Interfaces) provided by the RTOS, such as get_cpu_usage() to obtain processor utilization, get_memory_info() to obtain memory usage, and get_network_throughput() to obtain network interface throughput, thereby obtaining the resource usage of the main functional logic. Simultaneously, the intelligent terminal can continuously monitor the process layer or station control layer communication network of the intelligent substation, for example, by parsing IEC 61850 GOOSE or SV messages to extract the operating status information of the intelligent electronic equipment, such as circuit breaker position, relay action signals, voltage and current over-limit alarms, etc., and determine whether the power grid is in a fault or abnormal state based on this information. According to the obtained main functional logic resource usage and power grid operating status, the resource scheduling module inside the intelligent terminal can dynamically adjust the resource allocation priority during the testing process. For example, if the processor utilization of the main functional logic exceeds 80% and the power grid is operating normally, the resource scheduling module can appropriately reduce the priority of the test process in the RTOS scheduling queue, such as adjusting it from "high" to "medium-high," or reducing its accessible memory resource quota from 10MB to 8MB. When the power grid operation indicates a fault or anomaly, such as receiving a trip signal from a protection device or detecting a significant voltage drop, the resource scheduling module will immediately implement a stricter resource reduction strategy. For example, it may directly reduce the processor priority of the test process to "lowest," further compress its memory quota to 2MB, or even suspend non-critical test data processing to ensure that the main functional logic can obtain all available resources, prioritize handling power grid faults, and ensure the safe and stable operation of the power grid. In this way, the test process can always maintain isolation from the main functional logic of the intelligent terminal, avoiding any interference to the main functional logic at critical moments.

[0115] This application further proposes steps for adjusting the resource allocation priority during the testing process, including:

[0116] Adjust the priority of the test process in the internal processor scheduling queue of the smart terminal, or adjust the memory resource quota that the test process can access.

[0117] Adjusting the priority of the test process within the internal processor scheduling queue of the smart terminal refers to managing the order and opportunity for test tasks to obtain processor execution time in the operating system or real-time operating system. This can be achieved by modifying the priority field in the Task Control Block (TCB) or by calling API functions provided by the operating system. The purpose is to control the test process's ability to compete for processor resources, ensuring that the main functional logic can obtain processor resources first at critical moments. Alternatively, adjusting the memory resource quota accessible to the test process refers to limiting the amount of memory space that test tasks can use. This can be achieved through the memory management mechanisms provided by the operating system, such as setting process memory limits, or through memory partitioning, memory pool management, etc. The purpose is to prevent the test process from excessively consuming memory resources, thereby ensuring the normal operation of the main functional logic and sufficient memory space.

[0118] This application's solution achieves effective isolation between the testing process and the main functional logic of the smart terminal by finely adjusting the resource allocation priority during the testing process. Specifically, after obtaining the resource usage of the main functional logic of the smart terminal and the operating status of the power grid to which the smart terminal is connected, the system dynamically adjusts the priority of the testing process in the processor scheduling queue within the smart terminal, or adjusts the memory resource quota accessible to the testing process, based on this real-time information. It is precisely this dynamic and fine-grained adjustment mechanism that allows the testing process to rapidly reduce its processor or memory usage during critical moments such as resource scarcity in the main functional logic or power grid failures, ensuring that the main functional logic can preferentially obtain and fully utilize the necessary computing and storage resources, thereby guaranteeing the stability and reliability of the smart terminal in actual power grid operation. Simultaneously, when resources are sufficient or the power grid is operating smoothly, the system can appropriately increase the resource allocation of the testing process to accelerate test execution efficiency. This ability to adaptively adjust based on real-time status enables the testing process to efficiently complete various test tasks without affecting the normal operation of the main functional logic of the smart terminal, thus solving the problem of insufficiently specific resource allocation priority adjustment in existing solutions, which may lead to interference or inefficiency. In this way, while maintaining the non-intrusive nature of the testing process, this solution further enhances the robustness of the test and the protection of the main functional logic of the intelligent terminal, making the entire substation automation testing method more reliable and efficient.

[0119] In some preferred embodiments, this application is implemented as follows: When the processor utilization rate of the main functional logic of the intelligent terminal exceeds a preset threshold (e.g., 80%), or when a fault occurs in the power grid operating status indication (e.g., receiving a protection action signal or abnormal voltage and current data), the system immediately reduces the priority of the test process in the processor scheduling queue of the intelligent terminal's internal operating system (such as VxWorks or Linux RT). For example, the real-time priority of the test process can be adjusted from a default high value to a lower value to ensure that the main functional logic (such as relay protection algorithms and measurement and control data acquisition tasks) can obtain CPU time slices first. At the same time, the system can also dynamically adjust the memory resource quota accessible to the test process. For example, when the memory usage of the main functional logic is detected to be close to a certain percentage of the total system memory (e.g., 70%), the system can limit the memory quota allocated to the test process from the default 100MB to 50MB, or even lower, to free up memory space for the main functional logic to use. This dynamic adjustment mechanism can ensure that the operation of the main functional logic is not interfered with by the test process when intelligent terminal resources are scarce or when there is an emergency in the power grid, thereby ensuring the stability and reliability of the core functions of the substation automation system. Conversely, when the main functional logic resources are low and the power grid is operating stably, the system can appropriately increase the priority and memory quota of the testing process to speed up the execution of tests and improve data processing capabilities.

[0120] This application further proposes steps for obtaining the resource usage of the main functional logic of a smart terminal, including:

[0121] By calling the resource management interface provided by the internal operating system or real-time operating system of the smart terminal, the processor utilization, memory usage, and network interface throughput of the main functional logic of the smart terminal can be obtained.

[0122] Among them, the resource management interface provided by the internal operating system or real-time operating system of the smart terminal refers to a set of programming interfaces provided by the operating system for applications or system services, used to query, monitor or control the allocation and usage of system resources. It can be implemented by system calls, library functions or specific APIs (Application Programming Interfaces), and its purpose is to provide a standardized way to obtain the internal operating status data of the system; processor utilization refers to the proportion of time that the processor performs effective work in a specific time period. It can be implemented by calculating the ratio of the time the processor is in a non-idle state when running the main functional logic task to the total time. Its purpose is to reflect the degree to which the main functional logic occupies the processor's computing power; memory usage refers to the amount of physical or virtual memory space actually occupied by the main functional logic during operation. It can be implemented by counting the number of memory pages or bytes allocated by the main functional logic process or thread. Its purpose is to reflect the degree to which the main functional logic occupies the system's storage resources; network interface throughput refers to the amount of data that the main functional logic transmits or receives per unit time through the network interface. It can be implemented by monitoring the data transmission and reception rate of the network adapter. Its purpose is to reflect the degree to which the main functional logic occupies the network communication bandwidth.

[0123] In some preferred embodiments, obtaining the resource usage of the main functional logic of a smart terminal can be implemented as follows. For example, in a smart terminal based on a Linux operating system, this resource information can be obtained using the / proc file system provided by the Linux kernel. Specifically, the processor time statistics of a specific process (e.g., the process corresponding to the main functional logic) can be obtained by reading the / proc / [pid] / stat file, and then the processor utilization can be calculated. Simultaneously, the memory usage of the process, including virtual memory size and resident memory size, can be obtained by reading the / proc / [pid] / status file or the / proc / [pid] / smaps file. For network interface throughput, the number of bytes received and sent by the network interface can be obtained by reading the / proc / net / dev file. By sampling at different time points and calculating the difference, the network interface throughput per unit time can be obtained. If the smart terminal uses a real-time operating system (RTOS), such as VxWorks or FreeRTOS, specific API functions provided by the RTOS can be called. For example, VxWorks might provide functions like `taskInfoGet()` or `sysCpuLoadGet()` to obtain a task's CPU usage and system load; FreeRTOS, on the other hand, can obtain a task's stack usage and runtime by querying the Task Control Block (TCB) or using its provided statistics API. Network throughput can be obtained through interfaces provided by the network protocol stack or by directly reading the network driver's status register. Through these specific interface calls and data parsing, the actual usage of processor, memory, and network resources by the main functional logic of the smart terminal can be quantified in real time and accurately, providing data support for subsequent resource management and optimization.

[0124] This application further proposes steps for obtaining the operating status of the power grid connected to the smart terminal, including:

[0125] Intelligent terminals monitor the process layer or station control layer communication network of intelligent substations;

[0126] The intelligent terminal receives real-time data packets from the process layer or station control layer communication network of the intelligent substation;

[0127] The intelligent terminal parses real-time data packets to extract the operating status information and protection action signals of the intelligent electronic device;

[0128] Based on the extraction results, the operating status of the power grid connected to the smart terminal is obtained.

[0129] The process layer or station control layer communication network refers to the network within a smart substation used for data exchange and control command transmission between different functional levels. The process layer network primarily carries real-time, high-speed sampled values ​​and general substation event messages for data interaction between merging units and intelligent electronic devices. The station control layer network is mainly used for data acquisition, control command issuance, and event recording between various intelligent electronic devices and the station control system, aiming to ensure the real-time performance, reliability, and standardization of communication between devices within the smart substation. Real-time data packets refer to digital information packets reflecting the current operating status or events of the power grid, transmitted with low latency in the smart substation communication network. These packets can include sampled values ​​of current and voltage, the switching status of equipment such as circuit breakers and disconnectors, action signals of protection devices, alarm information, etc., aiming to provide an immediate snapshot of power grid operation and support rapid decision-making and response by intelligent electronic devices. The operational status information of intelligent electronic equipment refers to data reflecting the current working status of various intelligent electronic devices (such as protection devices, measurement and control units, merging units, etc.) within a smart substation. This includes data such as the equipment's health status, configuration parameters, internal temperature, and communication link status. Protection action signals refer to tripping signals, reclosing signals, or alarm signals issued by protection devices based on preset logic when a power grid fault occurs, used to isolate the fault. The purpose of this information is to provide crucial data for assessing the health status of power grid equipment and identifying the type and location of power grid faults.

[0130] This application's solution addresses the challenge of intelligent terminals accurately and comprehensively acquiring power grid operating status through a data acquisition and processing mechanism. Specifically, the intelligent terminal first monitors the process layer or station control layer communication network of the intelligent substation. This allows the intelligent terminal to directly access the data flow within the power grid, avoiding the lag or missing information inherent in traditional methods. Based on this, the intelligent terminal receives data packets from these communication networks in real time, ensuring the immediacy and freshness of the acquired data, which is crucial for rapid response in power grid operating status perception. Subsequently, the intelligent terminal parses the received real-time data packets, transforming the communication data into understandable operating status information and protection action signals for intelligent electronic devices. This parsing process is key to obtaining accurate power grid status, enabling the intelligent terminal to identify equipment health status and power grid fault status from the data. Ultimately, based on these extracted results, the intelligent terminal can comprehensively and accurately acquire the current operating status of the power grid, including various operating conditions such as normal, fault, or abnormal.

[0131] It is precisely because intelligent terminals can accurately and comprehensively acquire the power grid's operating status in this way that the substation automation testing method proposed in this application can further optimize its testing process. Specifically, when intelligent terminals can grasp the actual operating status of the power grid in real time, the testing system can dynamically adjust the resource allocation priority of the testing process according to the current state of the power grid, such as whether it is in a fault or abnormal operating condition. For example, when the power grid is operating normally, the testing process can obtain sufficient resources to conduct comprehensive functional verification; while when the power grid experiences a fault or abnormality, the resource allocation priority of the testing process can be reduced, thereby ensuring that the main functional logic of the intelligent terminal can obtain priority operating resources, guaranteeing the stability and reliability of the power grid operation. This adaptive adjustment capability based on real-time power grid status enables the testing process to be carried out without affecting the main functions of the power grid, and can adjust the testing strategy according to the actual operating conditions, improving the accuracy and effectiveness of the test, and avoiding unnecessary interference or risks to the power grid operation caused by testing activities.

[0132] In some preferred embodiments, the specific process by which the intelligent terminal acquires the power grid operating status can be implemented as follows: The intelligent terminal can configure its network interface to operate in promiscuous mode, thereby capturing all data frames flowing through the communication network of the process layer or station control layer of the intelligent substation. Simultaneously, the built-in IEC 61850 protocol stack software module can be used to monitor the communication traffic of the process layer (e.g., sampled value SV messages, general substation event-oriented GOOSE messages) and the station control layer (e.g., manufacturing message specification MMS messages) in real time. When receiving real-time data packets, the intelligent terminal can use its network interface controller to receive Ethernet frames and efficiently transmit these frames to the memory buffer through direct memory access technology to ensure the real-time performance and efficiency of data reception. Subsequently, the intelligent terminal can integrate the IEC 61850 parsing library to parse the received SV messages to extract instantaneous sampled values ​​of current and voltage, and to parse the GOOSE messages to extract circuit breaker status, protection trip signals, alarm information, etc. The parsed data can be mapped to predefined logical nodes and data objects within the smart terminal according to the IEC 61850 model. For example, SV data can be mapped to analog input logical nodes, and GOOSE data can be mapped to binary input or protection logical nodes. Ultimately, based on the extracted circuit breaker status, protection action signals, alarm information, and current and voltage values, the smart terminal can use a state machine or rule engine to determine whether the power grid is currently in a specific state such as normal operation, short circuit fault, ground fault, overload, or system oscillation, thereby achieving a comprehensive understanding of the operating status of the power grid connected to the smart terminal.

[0133] refer to Figure 2 This application further proposes a substation automation testing system, which includes:

[0134] The message construction module constructs digital test messages to simulate the operating state of the power grid. The digital test messages conform to the internal processing specifications of the smart terminal.

[0135] The message injection module injects digital test messages into the internal logic processing path of the smart terminal in a non-intrusive manner through the diagnostic interface reserved in the smart terminal or the internal communication network of the smart substation.

[0136] The time synchronization module utilizes the time synchronization mechanism of the intelligent substation to synchronize the digital test messages.

[0137] The response data acquisition module receives response data transmitted back from the smart terminal through the internal communication network of the smart substation;

[0138] The isolation management module is used to manage the isolation between the testing process and the main functional logic of the smart terminal.

[0139] The message construction module is responsible for generating test data that conforms to specific specifications. It can be implemented using software components, such as a data generator program, or hardware units, such as a programmable logic controller or application-specific integrated circuit. Its purpose is to ensure that test messages can be correctly identified and processed by the smart terminal, thereby simulating the real power grid operating state and providing accurate input for subsequent tests. The isolation management module is responsible for ensuring that the test activities and the core operating functions of the smart terminal do not interfere with each other. It can be implemented using independent hardware units, such as an interface card with isolation circuitry, or a software layer, such as a virtual machine hypervisor or a resource scheduler in the operating system. Its purpose is to prevent errors or anomalies during the test process from affecting the normal operation of the smart terminal and to ensure the stability of the power grid.

[0140] This application's solution, through modular design, effectively supports substation automation testing methods. Specifically, the message construction module generates digital test messages to simulate power grid operation. These messages strictly adhere to the internal processing specifications of the intelligent terminal, ensuring the accuracy and validity of the test input. Subsequently, the message injection module, through the intelligent terminal's reserved diagnostic interface or the intelligent substation's internal communication network, non-intrusively sends these digital test messages into the intelligent terminal's internal logic processing path, avoiding impact on the intelligent terminal's main functions. Simultaneously, the time synchronization module utilizes the intelligent substation's time synchronization mechanism to accurately synchronize the digital test messages, which is crucial for simulating real power grid event timing, thus ensuring test accuracy. After the intelligent terminal processes the test messages, the response data acquisition module receives the response data transmitted back by the intelligent terminal through the intelligent substation's internal communication network to evaluate the intelligent terminal's functionality and performance. Throughout the entire testing process, the isolation management module continuously manages and ensures that the testing process remains isolated from the intelligent terminal's main functional logic. This avoids interference with the intelligent terminal's normal operation during testing activities, ensuring power grid stability. It is precisely because of this systematic and modular implementation that the substation automation testing method can obtain reliable physical and logical support, solving the problem that testing cannot be effectively completed due to the lack of system support when there is only a method, thereby improving the accuracy, reliability and non-intrusiveness of the test.

[0141] As a specific implementation method, this application is implemented as follows: The message construction module can be a software application running on a dedicated server. This program has a built-in power grid model and event simulation algorithm, and can generate SV messages or GOOSE messages conforming to standard formats such as IEC 61850 or IEC 60044-8 based on preset fault scenarios or historical data. The message injection module can be a hardware device with multiple Ethernet interfaces, such as a network injector or an industrial computer with a dedicated communication card, which is connected to the diagnostic port of the intelligent terminal or the process layer network of the intelligent substation via fiber optic or cable. The time synchronization module can be a high-precision clock source integrated into the test system, such as a GPS timing module or a PTP master clock, which synchronizes with the synchronization clock mechanism of the intelligent substation through network protocols and adds precise timestamps to the injected messages. The response data acquisition module can be a network data capture and parsing software running on the main control computer of the test system. This software can monitor the data flow on the internal communication network of the intelligent substation in real time and identify and receive response messages from the intelligent terminal according to preset filtering rules. The isolation management module can be a mechanism implemented through hardware and software collaboration. On the hardware side, opto-isolators or independent network interface cards can be used to physically isolate test data streams. On the software side, at the operating system level of the smart terminal, independent task scheduling queues, memory regions, or virtualization technologies can be configured to ensure that the resource allocation of test tasks is independent of the resource allocation of main function tasks. Furthermore, when the main function load is high, the priority or resource consumption of test tasks can be dynamically reduced.

[0142] Through the above technical solutions, this application provides a substation automation testing system. This system, through its modular design, effectively supports the implementation of substation automation testing methods, solving the problem of ineffective testing due to the lack of system support despite having methods. Specifically, the message construction module ensures the accuracy and standardization of test messages, providing reliable input for subsequent testing. The message injection module implements non-intrusive injection of test messages, avoiding impact on the main functions of the intelligent terminal. The time synchronization module ensures the timing accuracy of test messages, making the simulated power grid events more realistic. The response data acquisition module enables effective reception and analysis of the intelligent terminal's responses, thereby accurately evaluating its functionality and performance. The isolation management module ensures strict isolation between the testing process and the main functional logic of the intelligent terminal, guaranteeing the stable operation of the power grid. Overall, this system improves the accuracy, reliability, and non-intrusiveness of substation automation testing.

[0143] The content disclosed above is only a preferred and feasible embodiment of the present invention, and is not intended to limit the scope of protection of the present invention. Therefore, all equivalent technical changes made based on the content of the present invention specification and drawings are included within the scope of protection of the present invention. Furthermore, the elements therein can be updated as technology develops.

Claims

1. A substation automation testing method, characterized by, The method includes the following steps: S1: Construct a digital test message to simulate the power grid operating state. The digital test message conforms to the internal processing specifications of the smart terminal. S2: Digital test messages are non-intrusively injected into the internal logic processing path of the smart terminal through the diagnostic interface reserved in the smart terminal or the internal communication network of the smart substation. S3: Utilize the time synchronization mechanism of the intelligent substation to synchronize the time of digital test messages; S4: Receive response data transmitted back from the smart terminal through the internal communication network of the smart substation; The testing process is isolated from the main functional logic of the smart terminal. The testing process includes the injection of digital test messages, time synchronization, and acquisition of response data. In step S2, upon receiving the digitized test message, the following processing is performed: Identify digital test messages; The identified digital test messages are routed to the test data path of the smart terminal; The test data path is logically isolated from the main functional logic of the smart terminal that processes actual power grid data; The test data path is logically separated from the path used by the smart terminal to process maintenance task data streams, and the processing priority of maintenance task data streams is lower than that of digital test messages. Allocate processing resources that prioritize the processing of digital test messages in the test data path over the processing resources of the maintenance task data stream, and allocate dedicated buffers for the processing of digital test messages in the test data path; The testing process is isolated from the main functional logic of the smart terminal, including the following steps: Obtain the resource usage status of the main functional logic of the smart terminal; Obtain the operating status of the power grid connected to the smart terminal; Based on the resource usage of the main functional logic and the power grid operation status, adjust the resource allocation priority of the testing process. Through this adjustment, maintain the isolation between the testing process and the main functional logic of the smart terminal. When the power grid operation status indicates a fault or abnormality, the resource allocation during the testing process is reduced to ensure the priority operation of the main functional logic and to maintain the isolation between the testing process and the main functional logic of the smart terminal.

2. The substation automation testing method as described in claim 1, characterized in that, S3 includes the following steps: Before the test system sends the digital test message, the test system adds a timestamp to the digital test message according to the synchronous clock source of the smart substation; After receiving the digital test message, the smart terminal uses its own synchronization clock mechanism to verify the timestamp and processes the digital test message based on the verification result.

3. A substation automation testing method as claimed in claim 1, characterized in that, S4 includes the following steps: The smart terminal segments the response data and adds a sequence number and timestamp to each data segment; The intelligent terminal encapsulates data segments with serial numbers and timestamps into response messages and sends them through the internal communication network of the intelligent substation. The intelligent terminal sets the transmission order of response messages to take priority over transmission tasks used to process maintenance task data, and allocates dedicated transmission resources for the transmission of response messages. After receiving messages through the internal communication network of the smart substation, the test system sorts and reassembles them according to the sequence number and timestamp. The testing system verifies the recombined response data.

4. A substation automation testing method as claimed in claim 1, characterized in that, S1 includes the following steps: Based on the preset power grid topology, equipment operating parameters, and dynamic power grid event sequence, current and voltage sample values ​​and state information are generated to simulate the occurrence, development, and clearing of power grid events. The current and voltage sample values ​​and status information are encapsulated into digital test messages, and the digital test messages conform to the internal processing specifications of the smart terminal. Adjust the generation rate and content changes of digital test messages to match the evolution of dynamic power grid events; Adjust the timing of digital test messages to correspond to the concurrent occurrence and evolution of dynamic power grid events.

5. A substation automation testing method as claimed in claim 1, characterized in that, The steps to adjust resource allocation priorities during the testing process include: Adjust the priority of the test process in the internal processor scheduling queue of the smart terminal, or adjust the memory resource quota accessible to the test process.

6. A substation automation testing method as claimed in claim 1, characterized in that, The steps to obtain the resource usage of the main functional logic of a smart terminal include: By calling the resource management interface provided by the internal operating system or real-time operating system of the smart terminal, the processor utilization, memory usage, and network interface throughput of the main functional logic of the smart terminal can be obtained.

7. A substation automation testing method as claimed in claim 1, characterized in that, The steps for obtaining the operating status of the power grid connected to the smart terminal include: The intelligent terminal monitors the process layer or station control layer communication network of the intelligent substation. The intelligent terminal receives real-time data packets from the process layer or station control layer communication network of the intelligent substation; The intelligent terminal parses real-time data packets to extract the operating status information and protection action signals of the intelligent electronic device; Based on the extraction results, the operating status of the power grid connected to the smart terminal is obtained.

8. A substation automation testing system applied to the substation automation testing method of claim 1, characterized in that, The system includes: The message construction module, connected to the time synchronization module and the isolation management module, constructs digital test messages for simulating the power grid operation status. The digital test messages conform to the internal processing specifications of the smart terminal. The message injection module is connected to the time synchronization module, the smart terminal, and the isolation management module. Through the diagnostic interface reserved in the smart terminal or the internal communication network of the smart substation, it non-intrusively injects digital test messages into the internal logic processing path of the smart terminal. It is also used to identify digital test messages; The identified digital test messages are routed to the test data path of the smart terminal; The test data path is logically isolated from the main functional logic of the smart terminal that processes actual power grid data; The test data path is logically separated from the path used by the smart terminal to process maintenance task data streams, and the processing priority of maintenance task data streams is lower than that of digital test messages. Allocate processing resources that prioritize the processing of digital test messages in the test data path over the processing resources of the maintenance task data stream, and allocate dedicated buffers for the processing of digital test messages in the test data path; The time synchronization module is connected to the message construction module, message injection module, and isolation management module. It uses the time synchronization mechanism of the smart substation to synchronize the digital test messages. The response data acquisition module is connected to the smart terminal and the isolation management module to receive response data transmitted back by the smart terminal through the internal communication network of the smart substation. The isolation management module, connected to the message construction module, message injection module, time synchronization module, and response data acquisition module, is used to manage the isolation between the testing process and the main functional logic of the smart terminal. It is also used to obtain the resource usage of the main functional logic of the smart terminal; Obtain the operating status of the power grid connected to the smart terminal; Based on the resource usage of the main functional logic and the power grid operation status, adjust the resource allocation priority of the testing process. Through this adjustment, maintain the isolation between the testing process and the main functional logic of the smart terminal. When the power grid operation status indicates a fault or abnormality, the resource allocation during the testing process is reduced to ensure the priority operation of the main functional logic and to maintain the isolation between the testing process and the main functional logic of the smart terminal.