High-precision network flow generation method, device and system for complex service scene and related equipment

Through dynamic scenario modeling and protocol state-driven mechanisms, high-precision network traffic is generated, which solves the problem that existing technologies cannot accurately simulate complex business scenarios of power dispatching systems, realizes the evaluation of the reliability and stability of the dispatching system, and improves the testing and security assessment capabilities of the power dispatching system.

CN120602353APending Publication Date: 2025-09-05STATE GRID XINJIANG ELECTRIC POWER CO LTD CHANGJI POWER SUPPLY CO
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510956866.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-11
Publication Date
2025-09-05

AI Technical Summary

Technical Problem

Existing network traffic generation methods cannot accurately simulate complex business scenarios in power dispatching systems, especially distributed energy access scenarios. They are unable to meet the testing requirements of power dispatching systems under complex conditions such as high concurrency, rapid switching, and abnormal response. As a result, the dispatching automation system cannot effectively evaluate its own performance and reliability when dealing with complex situations.

Method used

It adopts dynamic scenario modeling and protocol state driving mechanism, generates scenario flow charts, interaction state diagrams, communication timing diagrams and protocol state machines, combines high-precision timing mechanism, dynamically frames and generates simulation traffic, simulates the communication behavior and interaction logic of each business scenario, and supports deep customization of special protocols for power dispatching.

Benefits of technology

It enables the evaluation of the reliability, stability and response speed of the dispatching system in real scenarios, can identify potential performance bottlenecks and safety hazards, improves the functional verification and network security assessment capabilities of the dispatching system, and supports emergency response simulation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120602353A_ABST
    Figure CN120602353A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of power dispatching, and provides a high-precision network flow generation method, device and system for a complex service scene and related equipment.The method comprises the steps that a scene flow chart is generated according to service flow information input by a user; generating an interaction state diagram according to protocol setting information input by a user; generating a communication sequence diagram according to the scene flow diagram and the interaction state diagram; generating a protocol state machine corresponding to each network node according to the communication sequence diagram; generating message information corresponding to each pre-simulation service scene according to each piece of communication time sequence information and a protocol template of each communication protocol; generating simulation flow information corresponding to each pre-simulation service scene according to each message information and each corresponding protocol state machine; executing each piece of simulation flow information in parallel to simulate each service scene; according to the invention, highly real, repeatable and flexibly configurable network traffic can be generated, and various complex communication behaviors and interaction logics in a scheduling automation scene can be truly restored.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of power system dispatching automation, and specifically to a high-precision network traffic generation method, device, system and related equipment for complex business scenarios. Background Art

[0002] As the power industry accelerates its transformation toward intelligent systems, the importance of dispatch automation is becoming increasingly prominent. In modern power dispatch systems, ensuring the safe, stable, and economical operation of the power grid lies in accurate dispatching decisions, which rely heavily on reliable and efficient communication networks to transmit various data. Power dispatch systems place extremely high demands on the real-time, reliability, and security of communication networks. Any network issue could lead to a serious power outage, so the reliability and stability of the communication network must be verified in advance.

[0003] However, testing and verification directly in a live operational network environment is extremely risky, or even impossible. Therefore, a secure, controllable, and repeatable simulation environment is needed to simulate various complex situations. This allows operators and developers to proactively identify and address potential network performance bottlenecks, vulnerabilities, and security risks. This allows them to rigorously verify that the network's performance in extreme, complex, and abnormal scenarios meets design and operational requirements, effectively optimize network architecture and configuration strategies, and safely conduct personnel training and emergency drills. Ultimately, this ensures that the power communication network, the "nervous system" supporting power dispatch operations, remains robust, reliable, and secure under any complex circumstances, guaranteeing the safe and stable operation of the power grid. Therefore, network traffic generation devices have emerged.

[0004] The increasingly complex power grid structure, the widespread integration of distributed energy resources, and the rapid connection of numerous rooftop photovoltaic and small wind turbines to the grid have resulted in highly random and volatile power flow distribution. Traditional network traffic generation methods, however, lack the ability to dynamically simulate distributed energy integration scenarios, making it difficult to accurately replicate actual network traffic trends. This hinders dispatch automation systems from effectively assessing their performance and reliability in these complex situations, increasing grid operational risks. Furthermore, the power dispatching sector relies on a series of specialized and complex communication protocols. These protocols have strict and unique regulations regarding data transmission priority, real-time requirements, and information encoding formats, significantly differing from general-purpose network protocols. Currently, most network traffic generation devices on the market are designed for general-purpose network applications and lack the deep customization of specialized power dispatch protocols. This makes it difficult to fully verify the functional integrity and stability of dispatch automation equipment in real-world power dispatch communication environments during the R&D and testing phases, severely hindering the advancement of power dispatch automation.

[0005] Therefore, developing a network traffic generation device that can dynamically simulate various complex business scenarios and deeply customize various protocols has become a key issue that needs to be urgently solved in the field of dispatching automation. It is of vital importance to ensuring the safe and stable operation of the power grid and promoting the intelligent development of the power industry. Summary of the Invention

[0006] In order to solve one of the above technical defects, the present application provides a high-precision network traffic generation method, device, system and related equipment for complex business scenarios.

[0007] According to a first aspect of the present application, a high-precision network traffic generation method for complex business scenarios is provided, comprising:

[0008] Generate a scenario flow chart based on the service flow information corresponding to at least one pre-simulated service scenario input by the user; wherein the service flow information includes: information of each network node in each pre-simulated service scenario and pre-simulated communication behavior of each network node;

[0009] Generate an interaction state diagram based on the protocol setting information input by the user; wherein the protocol setting information includes: information on the communication protocols pre-adopted by each network node when simulating communication behavior;

[0010] Based on the scenario flow chart and the interaction state diagram, each communication protocol is bound to each scenario process step to generate a communication sequence diagram; wherein the communication sequence diagram contains communication timing information corresponding to at least one pre-simulated business scenario, and the communication timing information includes: the communication direction, interaction type, corresponding communication protocol operation, and timing requirements of each pre-simulated business scenario;

[0011] Generate a protocol state machine corresponding to each network node in each pre-simulated business scenario based on the communication sequence diagram; wherein each protocol state machine includes a state machine model of at least one communication protocol pre-used by the corresponding network node when simulating communication behavior;

[0012] Perform dynamic framing operations based on the communication timing information in the communication timing diagram and the protocol templates of the communication protocols corresponding to the communication timing information to generate message information corresponding to each pre-simulated business scenario;

[0013] Generate simulated traffic information corresponding to each pre-simulated business scenario based on each message information and the corresponding protocol state machine;

[0014] Execute various simulated traffic information in parallel to simulate various business scenarios.

[0015] Preferably, the information of each network node includes: the type, quantity and number of concurrent connections of each network node;

[0016] The pre-simulated communication behaviors of each network node include: pre-simulated normal communication behaviors and abnormal communication behaviors of each network node;

[0017] The communication protocol information includes: the type, quantity, communication cycle, data structure and interaction logic of each communication protocol; wherein the data structure includes the data format and keyword segment content.

[0018] Preferably, the service flow information further includes: an absolute period or relative period during which each communication behavior is expected to occur;

[0019] Before generating message information corresponding to each pre-simulated business scenario, the method further includes:

[0020] Register each message task to the time wheel according to the absolute period or relative period;

[0021] The time wheel rotates at a fixed time granularity, and the corresponding slot task is checked every time it rotates one grid;

[0022] When there is a message task that is due, the corresponding message generation event is triggered immediately.

[0023] Preferably, the business flow information further includes: behavior chain logic control information, and the logic control information is one or more of condition judgment information, loop structure information, and nested sub-process information.

[0024] Preferably, the method further comprises:

[0025] Mark each simulated traffic information that has been generated and executed;

[0026] Capture the corresponding real traffic in the current network as a control sample;

[0027] Based on the tags, the protocol consistency, timing consistency, and data semantic similarity of the corresponding simulated traffic and real traffic are compared;

[0028] Based on the comparison results, evaluation information is generated; the evaluation information includes: the packet loss rate, retransmission rate, delay rate of each simulated flow and the similarity with the corresponding real flow.

[0029] Preferably, the evaluation information further includes: the total number of sent packets, the number of successful packets and the number of error packets of each simulated flow.

[0030] According to a second aspect of the present application, a high-precision network traffic generation device for complex business scenarios is provided, comprising:

[0031] Scenario flow generation module: used to generate a scenario flow chart based on the business flow information corresponding to at least one pre-simulated business scenario input by the user; wherein the business flow information includes: information about each network node in each pre-simulated business scenario and the pre-simulated communication behavior of each network node;

[0032] Interaction state generation module: used to generate an interaction state diagram based on the protocol setting information input by the user; wherein the protocol setting information includes: information on each communication protocol pre-adopted by each network node when simulating communication behavior;

[0033] A communication sequence generation module is configured to bind each communication protocol to each scenario process step based on the scenario flow chart and interaction state diagram to generate a communication sequence diagram. The communication sequence diagram includes communication sequence information corresponding to at least one pre-simulated business scenario, including the communication direction, interaction type, corresponding communication protocol operation, and timing requirements for each pre-simulated business scenario.

[0034] The protocol state machine generation module is used to generate a protocol state machine corresponding to each network node in each pre-simulated service scenario based on the communication sequence diagram; each protocol state machine includes a state machine model of at least one communication protocol pre-used by the corresponding network node when simulating communication behavior;

[0035] Message generation module: used to perform dynamic framing operations based on the communication timing information in the communication timing diagram and the protocol templates of the communication protocols corresponding to the communication timing information, and generate message information corresponding to each pre-simulated business scenario;

[0036] Simulation traffic generation module: used to generate simulation traffic information corresponding to each pre-simulated business scenario based on each message information and the corresponding protocol state machine;

[0037] Execution module: used to execute various simulated traffic information in parallel to simulate various business scenarios.

[0038] According to a third aspect of the present application, a power dispatching automation system is provided, comprising the high-precision network traffic generation device as described above.

[0039] According to a fourth aspect of the present application, a terminal device is provided, including:

[0040] Memory;

[0041] processor; and

[0042] computer programs;

[0043] The computer program is stored in the memory and is configured to be executed by the processor to implement the high-precision network traffic generation method as described above.

[0044] According to a fifth aspect of the present application, a computer-readable storage medium is provided, on which a computer program is stored; the computer program is executed by a processor to implement the high-precision network traffic generation method as described above.

[0045] The high-precision network traffic generation method provided in this application can not only define the typical business flow in the power dispatching process according to the user's scenario modeling requirements, simulate the communication direction, interaction type, corresponding communication protocol operation, timing requirements and related message content of each business scenario, and model multiple behavioral links according to business logic; it can also configure the field structure of various protocols and customize the state machine-driven process according to the user's deep customization needs, and dynamically bind the deeply customized protocol to the behavioral steps in each business scenario to achieve protocol-level interaction reproduction under scenario-driven; and multiple simulated business scenarios can be run concurrently by executing the generated simulation traffic in parallel. This application controls and refines protocol states and fields through visual editing of complex protocol structures, and constructs network interaction scenarios from the perspective of business processes. It combines dynamic business modeling, protocol state machine drive, and concurrent session simulation to generate network traffic with high authenticity, repeatability, and flexible configuration. It solves the problem that general network traffic tools cannot reproduce dedicated protocols, and truly restores various complex communication behaviors and interaction logics in scheduling automation scenarios. It breaks away from the limitations of traditional static message libraries and can evaluate the reliability, stability, processing capability, and response speed of the scheduling system in real scenarios, providing important support for scheduling system function verification, network security assessment, and emergency response simulation.

[0046] Other features and advantages of the present application will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the contents indicated in the written description and the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0048] Figure 1 Flowchart of the high-precision network traffic generation method provided by this application;

[0049] Figure 2 A block diagram of the high-precision network traffic generation device provided by this application;

[0050] Among them: 10 is a scenario process generation module, 20 is an interaction state generation module, 30 is a communication timing generation module, 40 is a protocol state machine generation module, 50 is a message generation module, 60 is a simulation traffic generation module, and 70 is an execution module. DETAILED DESCRIPTION

[0051] In order to make the technical solutions and advantages of the embodiments of the present application more clearly understood, the exemplary embodiments of the present application are further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, and are not an exhaustive list of all the embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other unless they conflict.

[0052] To address the technical shortcomings of traditional network traffic generators, such as their inability to accurately simulate the dynamic behavior of dispatching services and their inability to flexibly support power-specific communication protocols, traditional network testing methods are unable to effectively cover the actual communication characteristics of power grids.

[0053] First, embodiments of the present application provide a method for generating high-precision network traffic for complex business scenarios. This method can be performed by a high-precision network traffic generation device for complex business scenarios, or by components configured within the high-precision network traffic generation device for complex business scenarios, such as a chip or chip system. The method can also be implemented by a logic module or software that has some or all of the functions of a high-precision network traffic generation device for complex business scenarios. This application is not limited to this.

[0054] For example, Figure 1 As shown, the high-precision network traffic generation method for complex business scenarios includes:

[0055] Generate a scenario flow chart based on the service flow information corresponding to at least one pre-simulated service scenario input by the user; wherein the service flow information includes: information of each network node in each pre-simulated service scenario and pre-simulated communication behavior of each network node;

[0056] Generate an interaction state diagram based on the protocol setting information input by the user; wherein the protocol setting information includes: information on the communication protocols pre-adopted by each network node when simulating communication behavior;

[0057] Based on the scenario flow chart and the interaction state diagram, each communication protocol is bound to each scenario process step to generate a communication sequence diagram; wherein the communication sequence diagram contains communication timing information corresponding to at least one pre-simulated business scenario, and the communication timing information includes: the communication direction, interaction type, corresponding communication protocol operation, and timing requirements of each pre-simulated business scenario;

[0058] Generate a protocol state machine corresponding to each network node in each pre-simulated business scenario based on the communication sequence diagram; wherein each protocol state machine includes a state machine model of at least one communication protocol pre-used by the corresponding network node when simulating communication behavior;

[0059] Perform dynamic framing operations based on the communication timing information in the communication timing diagram and the protocol templates of the communication protocols corresponding to the communication timing information to generate message information corresponding to each pre-simulated business scenario;

[0060] Generate simulated traffic information corresponding to each pre-simulated business scenario based on each message information and the corresponding protocol state machine;

[0061] Execute various simulated traffic information in parallel to simulate various business scenarios.

[0062] During implementation, the system provides modeling templates and a service interaction library for users to select typical operations. Users can define typical service flows in the power dispatch process through a graphical user interface or script configuration languages ​​(such as YAML / JSON), including telemetry uploads, telesignaling changes, remote control operations, protection actions, dispatch command issuance, and other practical communication behaviors. Each scenario model consists of a series of steps, each of which specifies the communication direction (e.g., master station sends / substation receives), the interaction type (e.g., handshake, data exchange, confirmation), the corresponding protocol operation (e.g., sending STARTDT, I-frame, S-frame), relevant message fields (e.g., telemetry point number, value, time stamp), and timing requirements (e.g., timing time or waiting for trigger conditions).

[0063] Optionally, after generating the communication sequence diagram, the method further comprises: verifying the basic structural integrity of the communication sequence diagram, and automatically performing protocol consistency verification and process dependency checking.

[0064] Based on the above scheme, the high-precision network traffic generation method provided in the embodiment of the present application is adopted, which can not only define the typical business flow in the power dispatching process according to the user's scenario modeling requirements, simulate the communication direction, interaction type, corresponding communication protocol operation, timing requirements and related message content of each business scenario, and model multiple behavioral links according to business logic; it can also respond to the user's deep customization needs to configure the field structure of various protocols and customize the state machine-driven process, and dynamically bind the deeply customized protocol to the behavioral steps in each business scenario to achieve protocol-level interaction reproduction under scenario-driven; and multiple simulated business scenarios can be run concurrently by executing the generated simulation traffic in parallel. The embodiment of the present application controls and refines the protocol status and fields through visual editing of complex protocol structures, and constructs network interaction scenarios from the perspective of business processes. That is, it combines dynamic business modeling, protocol state machine drive and concurrent session simulation to generate network traffic with high authenticity, repeatability and flexible configuration. It solves the problem that general network traffic tools cannot reproduce special protocols, and truly restores various complex communication behaviors and interaction logics in scheduling automation scenarios. It breaks away from the limitations of traditional static message libraries and can evaluate the reliability, stability, processing capability and response speed of the scheduling system in real scenarios, providing important support for scheduling system function verification, network security assessment, emergency response simulation, etc.

[0065] Traditional network process generation devices and methods mainly rely on static messages or general protocol simulations, and lack the ability to model scenarios and communication behaviors unique to the power dispatching field. For example, when the dispatching master station handles scenarios such as distributed power access, frequent telesignaling changes, and short-term high-frequency telemetry uploads, its communication link will produce significantly different load forms and interaction processes. The "dynamic scenario modeling + protocol state drive" mechanism proposed in the embodiment of the present application can accurately restore the above-mentioned complex communication behaviors, so that the network test content is no longer limited to "whether the communication is successful", but can evaluate the stability, processing power and response speed of the dispatching system in real scenarios. Especially in the context of the increasing proportion of new energy, the operation of the power grid is highly uncertain, and the dynamic participation of various power sources, loads, and energy storage makes the communication environment faced by the dispatching system constantly changing. Through the dynamic load simulation model constructed by the embodiment of the present application, the dispatching master station manufacturer can carry out boundary performance testing in the early stage of product development, discover and solve hidden defects under complex conditions such as high concurrency, fast switching, and abnormal response, and improve product quality from the source.

[0066] Power communication protocols are highly specialized and complex, such as the I-frame, S-frame, and U-frame combinations in the IEC 60870-5-104 protocol, real-time message formats like GOOSE and SV in IEC 61850, and Modbus TCP's specialized processing for address resolution and CRC checking. These protocols all have unique requirements for packet structure, state transitions, and interaction frequency. Commonly used traffic generators on the market often only support shallow field definitions and simple data combinations, making it difficult to meet the in-depth replication requirements of these protocols. The present embodiment establishes a protocol-driven and state-control mechanism, combining a protocol template library with a user-extensible protocol field library. This allows users to not only directly generate messages using predefined protocol templates, but also quickly construct customized protocol messages based on specific needs, thereby simulating the complex protocol interactions between various power dispatching devices (such as RTUs, DTUs, and IEDs) and the master station. This flexible protocol adaptability makes the present invention applicable not only to traditional power grids but also to new application scenarios such as microgrids, virtual power plants, and distribution automation.

[0067] Optionally, executing each simulated traffic flow information in parallel to simulate various business scenarios specifically includes: after generating each simulated traffic flow information, executing each simulated traffic flow information in parallel using a session isolation mechanism to simulate multi-connection, multi-channel, and multi-threaded communication scenarios (e.g., simulating communication links between a dispatching master station and multiple substations or distributed power sources). Specifically, this method can achieve resource isolation and scheduling through session pools, thread pools, and event dispatcher mechanisms, enabling the concurrent simulation of dozens of master stations / substations and hundreds of links on the same platform.

[0068] In order to adapt to different test objectives, the embodiment of the present application can run multiple test scenarios at the same time. Each scenario can be bound to different protocols, simulate different device roles and set independent connection parameters, so as to achieve real power grid load simulation without affecting the overall test rhythm. This is of great significance to power dispatching system developers and power grid company test centers. For example, before a new system goes online, an equivalent full-network dispatching communication topology can be constructed through the embodiment of the present application, the expected business load can be injected, and the processing bottlenecks and abnormal responses of the master station system can be monitored in real time to discover system design defects in advance; it can also cooperate with the distributed test environment to simultaneously initiate stress testing and fault-tolerance verification at multiple nodes to support system adaptability assessment under the expansion of the power grid scale. During specific implementation, the system can dynamically schedule execution threads according to the set number of businesses and concurrent connections, and can adopt multiple concurrent communication modes such as TCP connection simulation, UDP broadcast simulation, and multi-link load simulation.

[0069] In some possible implementations of the first aspect, the information of each network node includes: the type, quantity, and number of concurrent connections of each network node;

[0070] The pre-simulated communication behaviors of each network node include: pre-simulated normal communication behaviors and abnormal communication behaviors (such as power failure, link interruption, etc.) of each network node;

[0071] The communication protocol information includes: the type of each communication protocol (such as IEC 60870-5-104, IEC 61850, Modbus TCP, DNP3, MQTT, etc.), quantity, communication cycle, data structure and interaction logic; among which, the data structure includes the data format and keyword segment content (such as address field, function code, check segment, etc.).

[0072] During specific implementation, users can define the protocol's field value range, data type, encoding method, verification strategy, etc., and can even expand private extension fields of different manufacturers, so that it can flexibly adapt to the implementation differences of different scheduling system equipment manufacturers. Taking IEC-104 as an example: Protocol field structure configuration: Define the message structure (header, ASDU, information body, etc.) based on YAML; State machine-driven process: Supports simulation of state processes such as protocol handshake, data exchange, and confirmation response; Field extension and verification rules: Supports configuration of private fields, type conversion, and verification rules for different vendors; Message generation and behavior binding: Bind the configured protocol template to the scenario step to dynamically generate the actual message; Users can modify the custom frame structure, field size, and type (such as bitmask, float32, uint); Configurable field default values, range restrictions, or dependency conditions; Configurable protocol state transition relationships, such as from DISCONNECTED → CONNECTED → READY; and specify which frames trigger state transitions; Private fields can be configured for each vendor and the field insertion position can be specified; When users select a behavior step in scenario modeling, the corresponding frame structure will be bound to it from the template library.

[0073] In practical applications, the embodiments of this application can realistically simulate scenarios such as massive device concurrent communication, link failures, bit errors, and packet loss based on actual user needs, enhancing test coverage. As power systems increasingly rely on information technology and intelligent systems, communication security issues are becoming increasingly prominent, exposing dispatching systems to multiple risks, including external attacks, virus intrusions, and misconfigurations. This embodiment supports the construction of malicious traffic samples and the insertion of abnormal protocol behavior (such as illegal frames, forged telesignals, and frequent handshake interruptions), enabling simulation of network attacks and testing the response process of master station defense mechanisms. Power grid dispatching units can incorporate this system into routine drills, injecting abnormal traffic in a controlled manner to observe the rationality of dispatching equipment's alarm strategies, the effectiveness of isolation strategies, and the timeliness of recovery strategies. This provides an experimental foundation for building defense-in-depth systems and improving emergency response plans. Furthermore, for practical emergency drills conducted by power grid companies (such as "hacker attacks on master station servers" and "virtual power plant tampering with power data"), this embodiment provides executable, quantifiable, and verifiable technical tools, helping to enhance network security.

[0074] In some possible implementations of the first aspect, the service flow information further includes: an absolute period or a relative period during which each communication behavior is expected to occur;

[0075] Before generating message information corresponding to each pre-simulated business scenario, the method further includes:

[0076] Register each message task to the time wheel according to the absolute period or relative period;

[0077] The time wheel rotates at a fixed time granularity, and the corresponding slot task is checked every time it rotates one grid;

[0078] When there is a message task that is due, the corresponding message generation event is triggered immediately.

[0079] In practical applications, power dispatch communications have extremely stringent timing requirements. For example, fault trip signals must be transmitted simultaneously across multiple points within hundreds of milliseconds, and remote control commands must be reliably responded to within a specified time window. Therefore, the test tool's high timing accuracy and jitter control capabilities become key indicators of its practicality.

[0080] To accurately replicate the time-sensitive nature of communications during the scheduling process, the present embodiment utilizes an event-driven scheduling mechanism, combined with a high-precision timing mechanism, to achieve millisecond-level message generation and transmission control. Each communication behavior can be set to an absolute or relative period, thereby controlling the delay relationship between messages and making the system more realistic during testing. This mechanism avoids multi-threaded context switching and enables millisecond-level high-precision control. It is suitable for scheduling master station performance evaluation scenarios with strict timing requirements for high concurrency, high precision, and low overhead scheduling processes.

[0081] In some possible implementations of the first aspect, the business flow information further includes: behavior chain logic control information, where the logic control information is one or more of conditional judgment information, loop structure information, and nested sub-process information.

[0082] Based on the above scheme, the embodiment of the present application not only has logical control structures such as nesting, conditional jumps, and loops, but is also compatible with complex protocols such as IEC 60870-5-104, IEC 61850, Modbus TCP, and DNP3, which have multi-layer nesting, state management, asynchronous confirmation mechanisms, etc., thereby being able to truly restore the complex interaction logic in scheduling automation scenarios.

[0083] In some possible implementations of the first aspect, the method further includes:

[0084] Mark each simulated traffic information that has been generated and executed;

[0085] Capture the corresponding real traffic in the current network as a control sample;

[0086] Based on the tags, the protocol consistency, timing consistency, and data semantic similarity of the corresponding simulated traffic and real traffic are compared;

[0087] Based on the comparison results, evaluation information is generated; the evaluation information includes: the packet loss rate, retransmission rate, delay rate of each simulated flow and the similarity with the corresponding real flow.

[0088] Optionally, the evaluation information further includes: the total number of sent packets, the number of successful packets, and the number of error packets of each simulated flow.

[0089] In practical applications, the generated network traffic can be used not only for performance testing of devices such as master stations, gateways, and firewalls, but also for restoring and verifying historical fault scenarios. The embodiment of the present application can perform traffic recording, playback, and similarity analysis, compare the generated message sequence with historical network data, evaluate the consistency of dimensions such as the time distribution, data structure, and field consistency of the generated traffic, and output similarity scores, deviation analysis reports, and other results. This function is particularly suitable for reproducing the communication interaction process during power grid accidents, and provides data support for playback simulation training and AI-assisted diagnosis of the dispatching system.

[0090] In addition, the traditional network testing process often lacks support for structuring and visualization of test data, making it difficult to conduct quantitative analysis of test results or track problems. The embodiment of the present application integrates a message capture and structure analysis module, which can display communication content, protocol fields, response time, error frames and other information in real time, and supports exporting to structured reports or JSON logs for subsequent analysis. At the same time, through the four-layer association structure of "scenario-protocol-behavior-message", users can trace any abnormal behavior back to specific configuration items to assist in locating the root cause of the problem. The system also supports historical message playback function. Users can import real communication logs, combine them with the generator for frame-by-frame comparison, evaluate the simulation accuracy and consistency of the generated data, and then verify the representativeness of the test environment for real business, providing sufficient basis for the interpretation of the results.

[0091] On the second aspect, an embodiment of the present application provides a device, which is a high-precision network traffic generation device for complex business scenarios. The high-precision network traffic generation device for complex business scenarios includes a module for implementing the aforementioned high-precision network flow generation method for complex business scenarios.

[0092] For example, Figure 2 As shown, the high-precision network traffic generation device for complex business scenarios includes:

[0093] Scenario flow generation module 10: used to generate a scenario flow chart based on the service flow information corresponding to at least one pre-simulated service scenario input by the user; wherein the service flow information includes: information about each network node in each pre-simulated service scenario and the pre-simulated communication behavior of each network node;

[0094] Interaction state generation module 20: used to generate an interaction state diagram based on the protocol setting information input by the user; wherein the protocol setting information includes: information on each communication protocol pre-adopted by each network node when simulating communication behavior;

[0095] Communication sequence generation module 30: configured to bind each communication protocol to each scenario process step based on the scenario flow diagram and the interaction state diagram to generate a communication sequence diagram; wherein the communication sequence diagram includes communication sequence information corresponding to at least one pre-simulated business scenario, the communication sequence information including: the communication direction, interaction type, corresponding communication protocol operation, and timing requirements for each pre-simulated business scenario;

[0096] The protocol state machine generation module 40 is configured to generate a protocol state machine corresponding to each network node in each pre-simulated service scenario based on the communication sequence diagram; wherein each protocol state machine includes a state machine model of at least one communication protocol pre-used by the corresponding network node when simulating communication behavior;

[0097] Message generation module 50: used to perform dynamic framing operations based on each communication timing information in the communication timing diagram and the protocol template of each communication protocol corresponding to each communication timing information, and generate message information corresponding to each pre-simulated service scenario;

[0098] Simulation traffic generation module 60: used to generate simulation traffic information corresponding to each pre-simulated service scenario based on each message information and each corresponding protocol state machine;

[0099] Execution module 70: used to execute various simulated traffic information in parallel to simulate various business scenarios.

[0100] This system adopts a modular design, is highly scalable and platform-independent, and can be deployed and used on standard PCs, or expanded to edge devices or private cloud environments, making it easy for a variety of users such as power research institutes, equipment manufacturers, and power grid companies to use it flexibly. It has standardized interfaces and can achieve data interoperability with existing SCADA / EMS systems, network monitoring platforms, and industrial firewall systems, facilitating integration and promotion in power grid testing systems.

[0101] In a third aspect, an embodiment of the present application provides an electric power dispatching automation system, which includes the high-precision network traffic generation device as described above.

[0102] Fourthly, a terminal device is provided in an embodiment of the present application. The device can be any device that can generate high-precision network traffic. The device can be various terminal devices, such as: desktop computers, laptops, tablet computers, handheld devices, etc., and can be implemented specifically through software and / or hardware.

[0103] Exemplarily, the terminal device includes:

[0104] Memory;

[0105] processor; and

[0106] computer programs;

[0107] The computer program is stored in the memory and is configured to be executed by the processor to implement the high-precision network traffic generation method as described above.

[0108] In a fifth aspect, a computer-readable storage medium is provided in an embodiment of the present application. The computer-readable storage medium may be: ROM, RAM, a disk or an optical disk, etc.

[0109] Exemplarily, a computer program is stored on the computer-readable storage medium; the computer program is executed by a processor to implement the high-precision network traffic generation method as described above.

[0110] This application focuses on solving the challenges of network traffic simulation and analysis in dispatch automation. By integrating dynamic scenario construction technology with deep customization capabilities for power dispatch protocols, it provides a professional tool for power dispatch analysis. Its applications encompass key areas such as performance testing of dispatch automation master stations, communication network evaluation for coordinated distributed energy resource control in smart grids, and verification of power grid fault diagnosis and recovery strategies, aiming to improve the reliability and stability of power dispatch networks.

[0111] Moreover, this application demonstrates significant advantages in terms of functional depth, precision control, protocol adaptation, and dynamic simulation. It has important practical significance and technical promotion value for various aspects of the power system, including design verification, operation testing, safety assessment, and emergency drills. It is not only applicable to dispatching automation master station systems, but can also be widely extended to distributed energy control platforms, electric vehicle charging station controllers, integrated energy service platforms, and other scenarios with dedicated communication protocols and complex control logic. As the construction of new power systems accelerates, concepts such as deep integration of source-grid-load-storage, ubiquitous Internet of Things, and digital twins take root, and the demand for network communication simulation testing will continue to increase.

[0112] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of the present application may be implemented in various computer languages, such as C, VHDL, Verilog, object-oriented programming language Java, and interpreted scripting language JavaScript.

[0113] The present application is described with reference to the flowcharts and block diagrams of the methods, apparatuses, systems and computer program products according to the embodiments of the present application. It should be understood that each process and block in the flowcharts and block diagrams, as well as the combination of processes and blocks in the flowcharts and block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and block diagrams. Figure 1 A process or multiple processes and boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0114] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and boxes Figure 1 The function specified in one or more boxes.

[0115] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 A process or multiple processes and boxes Figure 1 A step that specifies a function in one or more boxes.

[0116] In the description of the present application, it should be understood that, in the description of the present application, “multiple” means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0117] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present application.

[0118] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.

Claims

1. A high-precision network traffic generation method for complex business scenarios, characterized by: include: Generate a scenario flow chart based on the service flow information corresponding to at least one pre-simulated service scenario input by the user; wherein the service flow information includes: information of each network node in each pre-simulated service scenario and pre-simulated communication behavior of each network node; Generate an interaction state diagram based on the protocol setting information input by the user; wherein the protocol setting information includes: information on the communication protocols pre-adopted by each network node when simulating communication behavior; Based on the scenario flow chart and the interaction state diagram, each communication protocol is bound to each scenario process step to generate a communication sequence diagram; wherein the communication sequence diagram contains communication timing information corresponding to at least one pre-simulated business scenario, and the communication timing information includes: the communication direction, interaction type, corresponding communication protocol operation, and timing requirements of each pre-simulated business scenario; Generate a protocol state machine corresponding to each network node in each pre-simulated business scenario based on the communication sequence diagram; wherein each protocol state machine includes a state machine model of at least one communication protocol pre-used by the corresponding network node when simulating communication behavior; Perform dynamic framing operations based on the communication timing information in the communication timing diagram and the protocol templates of the communication protocols corresponding to the communication timing information to generate message information corresponding to each pre-simulated business scenario; Generate simulated traffic information corresponding to each pre-simulated business scenario based on each message information and the corresponding protocol state machine; Execute various simulated traffic information in parallel to simulate various business scenarios.

2. The high-precision network traffic generation method for complex business scenarios according to claim 1 is characterized by: The information of each network node includes: the type, quantity and number of concurrent connections of each network node; The pre-simulated communication behaviors of each network node include: pre-simulated normal communication behaviors and abnormal communication behaviors of each network node; The communication protocol information includes: the type, quantity, communication cycle, data structure and interaction logic of each communication protocol; wherein the data structure includes the data format and keyword segment content.

3. The high-precision network traffic generation method for complex business scenarios according to claim 1 is characterized by: The service flow information also includes: the absolute period or relative period during which each communication behavior is expected to occur; Before generating message information corresponding to each pre-simulated business scenario, the method further includes: Register each message task to the time wheel according to the absolute period or relative period; The time wheel rotates at a fixed time granularity, and the corresponding slot task is checked every time it rotates one grid; When there is a message task that is due, the corresponding message generation event is triggered immediately.

4. The high-precision network traffic generation method for complex business scenarios according to claim 1 is characterized by: The business flow information also includes: behavior chain logic control information, and the logic control information is one or more of condition judgment information, loop structure information, and nested sub-process information.

5. The high-precision network traffic generation method for complex business scenarios according to claim 1 is characterized by: The method further comprises: Mark each simulated traffic information that has been generated and executed; Capture the corresponding real traffic in the current network as a control sample; Based on the tags, the protocol consistency, timing consistency, and data semantic similarity of the corresponding simulated traffic and real traffic are compared; Based on the comparison results, evaluation information is generated; the evaluation information includes: the packet loss rate, retransmission rate, delay rate of each simulated flow and the similarity with the corresponding real flow.

6. The high-precision network traffic generation method for complex business scenarios according to claim 5 is characterized by: The evaluation information also includes: the total number of sent packets, the number of successful packets, and the number of error packets of each simulated flow.

7. A high-precision network traffic generation device for complex business scenarios, characterized by: include: A scenario flow generation module (10) is used to generate a scenario flow chart based on business flow information corresponding to at least one pre-simulated business scenario input by a user; wherein the business flow information includes: information of each network node in each pre-simulated business scenario and pre-simulated communication behavior of each network node; Interaction state generation module (20): used to generate an interaction state diagram according to protocol setting information input by the user; wherein the protocol setting information includes: information on each communication protocol pre-adopted by each network node when simulating communication behavior; A communication sequence generation module (30) is configured to bind each communication protocol to each scenario process step according to the scenario flow chart and the interaction state chart, and generate a communication sequence diagram; wherein the communication sequence diagram has communication sequence information corresponding to at least one pre-simulated business scenario, and the communication sequence information includes: the communication direction, interaction type, corresponding communication protocol operation, and timing requirements of each pre-simulated business scenario; A protocol state machine generation module (40) is used to generate a protocol state machine corresponding to each network node in each pre-simulated business scenario according to the communication sequence diagram; wherein each protocol state machine has a state machine model of at least one communication protocol pre-used by the corresponding network node when simulating communication behavior; A message generation module (50) is used to perform dynamic framing operations based on each communication timing information in the communication timing diagram and the protocol template of each communication protocol corresponding to each communication timing information, and generate message information corresponding to each pre-simulated business scenario; Simulation traffic generation module (60): used to generate simulation traffic information corresponding to each pre-simulation business scenario based on each message information and each corresponding protocol state machine; Execution module (70): used for executing various simulation traffic information in parallel to simulate various business scenarios.

8. Power dispatching automation system, characterized by: The invention comprises the high-precision network traffic generating device described in claim 7.

9. A terminal device, characterized in that: include: Memory; processor; as well as computer programs; The computer program is stored in the memory and is configured to be executed by the processor to implement the high-precision network traffic generation method according to any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that: A computer program is stored thereon; the computer program is executed by a processor to implement the high-precision network traffic generation method according to any one of claims 1 to 6.