Scada system stress testing method, apparatus, device, medium, and product

The SCADA system stress testing method, which generates and verifies compliance using preset scenario rule templates, solves the data consistency problem caused by the diversity and complexity of power scenarios, and achieves efficient and accurate stress test results.

CN122262001APending Publication Date: 2026-06-23STATE POWER RIXIN TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
STATE POWER RIXIN TECH CO LTD
Filing Date
2026-03-26
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Existing SCADA system stress testing methods are ill-suited to the diversity and complexity of power scenarios, resulting in low data consistency between data configuration tools and data dispatch and acquisition tools, a lack of standardized data interfaces, and an inability to meet the dynamic adjustment needs of power systems, leading to low reliability of test results.

Method used

The test data table template and generation rules are generated by parsing the preset scenario rule template. The test data that conforms to the characteristics of power scenario data is generated by using a randomization algorithm, and scenario tags are added and populated into the test data table template. Finally, compliance verification is performed to ensure that the data meets the stress test requirements.

Benefits of technology

It simplifies test code modification, reduces the definition work for engineers, improves the accuracy and reliability of test data, ensures the execution efficiency and reliability of stress tests, and adapts to changes in power scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122262001A_ABST
    Figure CN122262001A_ABST
Patent Text Reader

Abstract

The application discloses a SCADA system pressure test method, device, equipment, medium and product, relates to the power system test technical field, and includes the following steps: according to a rule template, data tables and data generation rules are parsed and generated; test data is generated, power scene labels are added, and is filled into the data table to form data information for pressure test. Through the pre-defined scene rule template, the code does not need to be modified, and is simplified from the code level to the declaration level; meanwhile, the test data meeting the requirements can be generated according to the rule template, the definition of the header field of the data table no longer depends on the data mastering degree of the engineering personnel, the complicated definition work is reduced, the associated information can be automatically added to the data table according to the correlation between the data indexes, the data for pressure test is formed; finally, the compliance check is performed to ensure that the data meets the requirements and the business logic of the pressure test, and the execution efficiency and the reliability of the pressure test are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power system testing technology, and in particular to a SCADA system stress testing method, apparatus, equipment, medium, and product. Background Technology

[0002] SCADA (Supervisory Control and Data Acquisition) systems are computer-based DCS and power automation monitoring systems widely used in data acquisition, monitoring, control, and process control across various fields, including power, metallurgy, petroleum, chemical, gas, and railway industries. In power systems, SCADA is primarily used in remote control systems to monitor and control the operating status of field equipment in power scenarios, enabling functions such as data acquisition, equipment control, information measurement, parameter adjustment, and various early warning alarms. SCADA systems typically use numerous RTUs (Remote Terminal Units) and FTUs (Feeder Terminal Units) as terminals to collect operating status data from various power devices. With the development of power grids, the amount of data from power devices often reaches millions, thus facing significant data concurrency pressure. Therefore, stress testing of the SCADA system is necessary to ensure stable operation in various power scenarios.

[0003] When stress testing a SCADA system, it is necessary to configure corresponding engineering data based on the power scenario under test, generate accurate test data, and construct test cases that conform to the power scenario to test the SCADA system. However, when constructing test cases, due to the numerous and complex power scenarios with significant differences between them, relying on manual input or static configuration of engineering data is difficult to handle the complexity of changing engineering data (such as the variety of equipment parameters and communication rules). This leads to a lack of standardized data interfaces and inconsistent data communication between data configuration tools, data scheduling and distribution tools, and data acquisition tools. Especially when facing stress testing of new power scenarios, if the previously fixed configuration logic is used to configure engineering data and generate test cases, it cannot adapt to the dynamic adjustments of the power system such as SCADA system upgrades and protocol changes, greatly reducing the realism of the data simulation and resulting in low reliability of the test results. Summary of the Invention

[0004] This invention provides a method, apparatus, equipment, medium, and product for stress testing of SCADA systems, to solve the technical problem of cumbersome and complex configuration of large amounts of data required for stress testing of SCADA systems.

[0005] In a first aspect, embodiments of the present invention provide a method for stress testing a SCADA system, comprising: S101, for power data acquisition scenarios requiring stress testing, parse the preset power data acquisition scenario rule template and generate a stress test data table template and stress test data generation rules corresponding to the power data acquisition scenario; S102, Generate test data that conforms to the characteristics of power data acquisition scenario data according to the stress test data generation rules and the power data acquisition scenario to be stress tested, and add power scenario tags according to the power data acquisition scenario to be stress tested to form power scenario test data; S103, Select the appropriate stress test data table template according to the power data acquisition scenario to be stress tested, fill the power scenario test data into the stress test data table template, and form the data information for power scenario stress test; S104, Based on the data characteristics of the power data acquisition scenario, perform compliance verification on the data information used for power scenario stress testing.

[0006] Furthermore, the method also includes: A power test scenario metadata file is generated based on the data information used for power scenario stress testing. The power test scenario metadata file includes the power scenario name, power scenario data fields, total power scenario data volume, and power scenario verification hash.

[0007] Furthermore, S101 includes: Based on the data content collected in each power data acquisition scenario as required for stress testing, the scenario rules for each power scenario are configured using YAML configuration files to form a preset power data acquisition scenario rule template. The power data acquisition scenario rule template is parsed to extract the power data that will be collected in each power data acquisition scenario. Based on the data type and the data information that can be collected, stress test data table templates and stress test data generation rules corresponding to the power data acquisition scenario are formed respectively.

[0008] Furthermore, S102 includes: A randomization algorithm is used to generate test data that conforms to the characteristics of the power data acquisition scenario based on the stress test data generation rules and the power data acquisition scenario to be stress tested. The randomization algorithm includes Gaussian distribution or uniform distribution algorithm. Based on the power data acquisition scenario rule template and the power data acquisition scenario to be stress tested, add corresponding power scenario tags and power scenario data table association tags to the test data to form power scenario test data.

[0009] Furthermore, S103 includes: Select the corresponding stress test data table template according to the power scenario label, fill the power scenario test data into the stress test data table template, and form multiple power scenario stress test data tables; The power scenario test data tables are marked according to the associated tags of the power scenario data tables to form data information for power scenario stress testing.

[0010] Furthermore, S104 includes: Pydantic is used to perform compliance verification on data used for stress testing in simulated real power scenarios, generate compliance verification results, and remove data that does not meet compliance requirements based on the compliance verification results.

[0011] Secondly, embodiments of the present invention provide a SCADA system stress testing device, comprising: The scenario rule parsing module is used to parse the preset power data acquisition scenario rule template and generate the stress test data table template and stress test data generation rules corresponding to the power data acquisition scenario for the power data acquisition scenario that needs to be stress tested. The test data generation module is used to generate test data that conforms to the characteristics of the power data acquisition scenario based on the stress test data generation rules and the power data acquisition scenario to be stress tested, and to add power scenario tags according to the power data acquisition scenario to be stress tested. The test data filling module is used to select the appropriate stress test data table template according to the power data acquisition scenario to be stress tested, and fill the power scenario test data into the stress test data table template; The compliance verification module is used to verify the compliance of data information used for stress testing in power scenarios based on the characteristics of the data collected in the power data acquisition scenario.

[0012] Thirdly, embodiments of the present invention provide an electronic device, including: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the above-described SCADA system stress testing method.

[0013] Fourthly, embodiments of the present invention provide a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the above-described SCADA system stress test method.

[0014] Fifthly, embodiments of the present invention also provide a computer product, including a computer program that, when executed by a processor, implements the method for stress testing of a SCADA system as described above.

[0015] This invention provides a SCADA system stress testing method, apparatus, equipment, medium, and product. The method uses a pre-defined scenario rule template to generate a test data table template and test data generation rules. It then generates test data for the power scenario to be tested, adds scenario tags to form the test data for that power scenario, and fills the test data into the test data table template to form stress test data information and performs compliance verification. By using the predefined scenario rule template, when the power scenario requiring stress testing changes, the test code no longer needs to be modified; only relevant content needs to be defined or modified in the rule template, simplifying the process from code-level to declaration-level. Simultaneously, based on the content recorded in the rule template, corresponding data tables and compliant test data can be generated. Defining the header fields of the data tables no longer depends on the engineers' knowledge of power data, reducing the tedious definition work for engineers. Furthermore, it automatically adds correlation information to the data tables storing data indicators based on their relationships, forming stress test data. Finally, compliance verification ensures that the data meets the requirements of stress testing and business logic, ensuring the execution efficiency and reliability of the stress test. Attached Figure Description

[0016] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings: Figure 1 This is a flowchart of a SCADA system stress testing method according to Embodiment 1 of the present invention; Figure 2 This is a flowchart of a SCADA system stress testing method according to Embodiment 2 of the present invention; Figure 3 This is a flowchart of a SCADA system stress testing method according to Embodiment 3 of the present invention; Figure 4 This is a schematic diagram of the structure of a SCADA system pressure testing device according to Embodiment 4 of the present invention; Figure 5 This is a structural diagram of the electronic device described in Embodiment 5 of the present invention. Detailed Implementation

[0017] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.

[0018] When stress testing SCADA systems used in power systems, the sheer volume of data—in the millions—is overwhelming, and the data is collected from multiple terminal devices, resulting in a large amount of correlated data. This leads to numerous data fields and complex data table relationships. Engineers designing stress test data and test cases need to define numerous data table templates to populate different data types and formats collected from different devices. This requires a deep understanding of business logic and data relationships, but defining a large number of tables and fields is time-consuming and inefficient. Especially when facing new power scenarios, insufficient understanding of the relevant scenarios can easily lead to data configuration errors or inaccurate definitions, resulting in low matching with real-world scenarios and an inability to simulate real-world conditions. This significantly reduces the reliability of stress test results, particularly affecting the adaptability and operational stability of the SCADA system in new scenarios. To address these shortcomings, this invention proposes the following solution: Example 1 Figure 1 The SCADA system stress testing method described in Embodiment 1 of the present invention establishes a test data table template and test data generation rules through a preset scenario rule template, automatically generates test data according to the corresponding power scenario and fills it into the data table template to form stress test data information, and performs compliance verification to ensure that the stress test can be executed smoothly. Specifically, it includes the following steps: S101, based on the power data acquisition scenario requiring stress testing, parse the preset power data acquisition scenario rule template and generate a stress test data table template and stress test data generation rules corresponding to the power data acquisition scenario.

[0019] The scenario rule template defines different power scenarios, and correspondingly, it defines the data content to be collected under each scenario. This data content includes different data collected by different terminal devices, specifying the data types collected by each terminal and the data format for each data type. Based on the scenario rule template, for different power scenarios, it can be determined what data needs to be collected, which terminals will be used for collection, and what data content each terminal collects. This allows for the generation of test data table templates to store this data. Furthermore, based on the data fields and data types, test data table templates that can generate corresponding field formats are also created.

[0020] S102, generate test data that conforms to the characteristics of power data acquisition scenario data according to the stress test data generation rules and the power data acquisition scenario to be stress tested, and add power scenario tags according to the power data acquisition scenario to be stress tested to form power scenario test data.

[0021] Based on the power scenario to be tested, a randomization algorithm is used to generate test data according to the test data generation rules, simulating data fluctuations under real-world conditions. The generated test data needs to be tagged with corresponding scenario labels to indicate the power scenario to which the test data belongs. These scenario labels contain data relationships within the power scenario, specifically relationships between different data groups. For example, there is a relationship between a data group recording communication protocols and rules and a data group recording data transmission status and transmission volume. This ultimately forms multiple related data groups, which are inserted into corresponding tables based on their relationships. Relationships can be established between data tables based on the relationships between data groups.

[0022] S103. Select the appropriate stress test data table template according to the power data acquisition scenario to be stress tested, and fill the power scenario test data into the stress test data table template to form the data information for power scenario stress test.

[0023] Based on the power indicators that need to be collected in the power scenario to be tested, select the corresponding test data table template that can store the corresponding indicators. Then, according to the relationship between the data groups recorded in the scenario label, insert each group of data into the corresponding data table, and add table relationship to the data table where the related data groups are located, and finally form the data information for stress testing.

[0024] S104, Based on the data characteristics of the power data acquisition scenario, perform compliance verification on the data information used for power scenario stress testing.

[0025] After generating the data for stress testing, it's necessary to perform compliance checks to ensure the data is legal and free from invalid data types, formats, character types, string lengths, etc. This prevents execution errors such as stress test interruptions due to invalid data, ensuring the efficiency of the stress test. Furthermore, validation rules can be defined to ensure the test data conforms to business logic, enabling thorough and comprehensive testing of relevant power scenarios and business processes, ensuring the accuracy and reliability of the tests.

[0026] This embodiment utilizes a pre-defined scenario rule template to generate a test data table template and test data generation rules. It then generates test data for the power scenario to be tested, adds scenario tags to form the test data for that power scenario, and populates the test data table template with this data to create stress test data information and perform compliance verification. By using the predefined scenario rule template, changes to the power scenario requiring stress testing can be avoided by simply defining or modifying relevant content in the rule template, simplifying the process from code-level to declaration-level. Furthermore, based on the content recorded in the rule template, corresponding data tables and compliant test data can be generated. Defining the header fields of the data tables no longer relies on the engineers' knowledge of power data, reducing their tedious definition work. It also automatically adds correlation information to the data tables storing data indicators based on their relationships, forming stress test data. Finally, compliance verification ensures that the data meets the requirements of stress testing and business logic, guaranteeing the efficiency and reliability of the stress test execution.

[0027] Optionally, the method further includes: A power test scenario metadata file is generated based on the data information used for power scenario stress testing. The power test scenario metadata file includes the power scenario name, power scenario data fields, total power scenario data volume, and power scenario verification hash.

[0028] Based on the data information used in the stress test, a JSON-formatted test scenario metadata file is generated. The metadata file includes the data framework that the business program depends on during execution, as well as the fields and data relationships contained therein. When the business program is executed, the collected data will be filled into the corresponding data framework. The JSON file records the power scenario name, scenario data fields, total scenario data volume, and scenario verification hash, which can be reused to generate test cases when stress testing the same power scenario again, thus improving the efficiency of stress testing.

[0029] Example 2 Figure 2 This is a flowchart of a SCADA system stress testing method according to Embodiment 2 of the present invention. This embodiment is based on the above embodiment and optimized. In this embodiment, S101 is specifically optimized as follows: Based on the data content collected in each power data acquisition scenario as required for stress testing, the scenario rules for each power scenario are configured using YAML configuration files to form a preset power data acquisition scenario rule template. The power data acquisition scenario rule template is parsed to extract the power data that will be collected in each power data acquisition scenario. Based on the data type and the data information that can be collected, stress test data table templates and stress test data generation rules corresponding to the power data acquisition scenario are formed respectively.

[0030] Accordingly, the SCADA system stress testing method provided in this embodiment specifically includes: S201. Based on the data content collected by each power data acquisition scenario for stress testing as required, the scenario rules for each power scenario are configured using a YAML configuration file to form a preset power data acquisition scenario rule template.

[0031] YAML configuration files are used to record scenario rules for each power scenario. These rules include the data content, data quantity, acquisition terminal, terminal data type, and terminal data format for each scenario. Before stress testing, information for the corresponding power scenario can be defined in the YAML file to form a preset scenario rule template. For example, based on the power scenario of the stress test and the number of channels, point numbers, and RTUs in the data collected under that scenario, the corresponding template generation rules are recorded in the YAML file to generate multiple corresponding CSV files.

[0032] S202, parse the power data acquisition scenario rule template, extract the power data that will be collected in each power data acquisition scenario, and form stress test data table templates and stress test data generation rules corresponding to the power data acquisition scenario according to the data types and data information that can be collected.

[0033] Based on the power scenario to be tested, the rules and other content for the corresponding scenario are read and parsed from the YAML configuration file. A test data table template for storing this data is formed according to the acquisition terminal, terminal data type, and terminal data format. The template defines corresponding fields and the relationships between data tables based on the correlations between the acquired data. Then, test data generation rules are generated according to the data format and requirements of each field. Test data generated using these rules can be filled into the data table by replacing placeholders in the test data table template. For example, the formed test data table template can be a CSV data table. Empty tables use placeholders to hold data for insertion. The first row of each CSV table is the header created according to the rules recorded in the YAML configuration file. Each table contains multiple columns, each representing a data type. When the power scenario to be tested is photovoltaic power generation data, at least 20 related CSV tables will be generated, used to record photovoltaic equipment communication data, photovoltaic equipment power generation status data, photovoltaic equipment location data, photovoltaic equipment model and specifications, etc. In photovoltaic power generation scenarios, each machine has hundreds of data collection indicators. Based on these indicators, different RTU devices, data transmission channels, and data routing nodes are allocated, generating millions of data rows depending on the device's operating status. For example, the object RTU table has 41 fields: name, type, control identifier, availability status, start time, scan cycle, associated channel, associated device table, associated device ID, synchronization time, etc.; the channel table has 38 fields: name, type, control identifier, availability status, start time, associated RTU, associated route, associated front-end node, priority, etc.

[0034] S203: Generate test data that conforms to the characteristics of power data acquisition scenario data according to the stress test data generation rules and the power data acquisition scenario to be stress tested, and add power scenario tags according to the power data acquisition scenario to be stress tested to form power scenario test data.

[0035] S204. Select the appropriate stress test data table template according to the power data acquisition scenario to be stress tested, and fill the power scenario test data into the stress test data table template to form the data information for power scenario stress test.

[0036] S205, based on the data characteristics of power data acquisition scenarios, performs compliance verification on data information used for power scenario stress testing.

[0037] Specifically, Pydantic is used to perform compliance verification on data used for stress testing in simulated real power scenarios, generate compliance verification results, and remove data that does not meet compliance requirements based on the compliance verification results.

[0038] The Pydantic library is a Python library for defining, checking, and managing data interfaces. It can be used to validate data by defining a data model and setting different validation rules for different data types based on business logic and data collection characteristics. This automatically verifies whether the data structure and type meet relevant compliance requirements. When an invalid data field is detected, a ValidationError can be thrown and logged for later auditing. Alternatively, invalid fields or data can be directly removed to ensure that stress tests can proceed smoothly without being interrupted by errors caused by invalid data, thus improving the efficiency of system stress testing. Validation rules can also be set according to the company's business logic to remove data that does not conform to the business logic. For example, if a field's valid range is defined as 16385-20480 based on its actual data collection scenario, a value of 1 is invalid and needs to be removed.

[0039] This embodiment configures a YAML file based on data metrics collected from power scenarios. According to the scenario rule templates defined in the YAML file, it parses the data types and data information required for each power scenario. Based on the data types (what data metrics are included), it generates a test data table template, using placeholders to replace the data to be filled. This eliminates the need to modify the core code when facing different test scenarios; it can be achieved simply by defining the YAML configuration file. The scenario rule templates defined in the YAML file can also be reused, reducing the complexity of defining stress test templates. It no longer relies on the large amount of data information possessed by engineers, nor does it require staff to perform extensive work to build complex test case tables. After generating the stress test data, it also uses the Pydantic library for data compliance verification, identifying and removing data that does not meet compliance requirements. This ensures that the generated test data conforms to specifications, guaranteeing smooth execution of stress tests without interruption by erroneous data, while also meeting business logic requirements. This allows for more realistic stress testing of power scenarios, ensuring the efficiency and reliability of the test results.

[0040] Example 3 Figure 3 This is a flowchart of a SCADA system stress testing method according to Embodiment 3 of the present invention. This embodiment is based on the above embodiment and optimized. In this embodiment, S102 is specifically optimized as follows: A randomization algorithm is used to generate test data that conforms to the characteristics of the power data acquisition scenario based on the stress test data generation rules and the power data acquisition scenario to be stress tested. The randomization algorithm includes Gaussian distribution or uniform distribution algorithm. Based on the power data acquisition scenario rule template and the power data acquisition scenario to be stress tested, add corresponding power scenario tags and power scenario data table association tags to the test data to form power scenario test data.

[0041] Accordingly, the SCADA system stress testing method provided in this embodiment specifically includes: S301, for power data acquisition scenarios requiring stress testing, parse the preset power data acquisition scenario rule template and generate a stress test data table template and stress test data generation rules corresponding to the power data acquisition scenario.

[0042] S302, a randomization algorithm is used to generate test data that conforms to the characteristics of power data acquisition scenario data according to the stress test data generation rules and the power data acquisition scenario to be stress tested. The randomization algorithm includes Gaussian distribution or uniform distribution algorithm.

[0043] When generating test data that conforms to the power scenario under test according to the test data generation rules, a randomization algorithm can be used to add fluctuations to the test data. This simulates the fluctuations of data under real-world conditions, thereby more realistically simulating data collected in actual power scenarios and improving the accuracy and reliability of stress test results. The randomization algorithm can be either a Gaussian distribution algorithm or a uniform distribution algorithm. The Gaussian distribution algorithm provides fluctuations to the data based on a normal distribution, with high distribution density near the center value and gradually decreasing density further away from the center value. This is suitable for simulating data fluctuations where only a small number of data points deviate significantly from the center value under real-world conditions. The uniform distribution algorithm, on the other hand, provides a relatively uniform data distribution. The choice between Gaussian or uniform distribution can be made based on the characteristics of the data actually collected in the power scenario to add fluctuations to the test data.

[0044] S303, based on the power data acquisition scenario rule template and the power data acquisition scenario to be stress tested, add corresponding power scenario tags and power scenario data table association tags to the test data to form power scenario test data.

[0045] The scenario rule template defines various power scenarios and the data content collected under each scenario. In power scenarios, a large number of data indicators are collected through various types of devices such as data acquisition devices, RTU devices, communication devices, and monitoring devices. The data indicator content, data type, and data format collected by different types of devices will vary significantly. For example, there will be significant differences in data indicators and acquisition devices between communication indicators (data transmission status) and power generation indicators (power generation equipment operating status). However, there are often correlations between various data in the same scenario. For example, data from different states or functions of the same device may still belong to the various operating status data of the same device. It is necessary to define scenario labels according to the power scenario to be tested, and define scenario data table association labels according to the correlation between data groups in the scenario. This will link different types of related data tables in the storage scenario to form scenario test data.

[0046] S304. Select the appropriate stress test data table template according to the power data acquisition scenario to be stress tested, and fill the power scenario test data into the stress test data table template to form the data information for power scenario stress test.

[0047] One optional implementation of this embodiment is to select the corresponding stress test data table template according to the power scenario label, and fill the power scenario test data into the stress test data table template to form multiple power scenario stress test data tables.

[0048] Different power scenarios collect different data, so different types of data tables are needed for storage. The corresponding test data table template is selected according to the scenario label of the power scenario to be tested. Fields corresponding to the data indicators collected in the power scenario are defined in the test data table template, so that the generated scenario test data can be filled into the test data table according to the corresponding fields. The original placeholders in the test data table are replaced to form a scenario test data table with simulated real data. When performing stress testing, the test process can be executed by calling the data in the table.

[0049] The power scenario test data tables are marked according to the associated tags of the power scenario data tables to form data information for power scenario stress testing.

[0050] In addition to using scenario tags to mark and differentiate power scenarios, scenario data table association tags are also used to mark the data types collected in each power scenario. These association tags mark related data groups within a power scenario. For example, the power generation and status information of a photovoltaic power generation device are collected by a first device, and this collected information needs to be transmitted through a communication device. The operating status and data transmission volume of the communication device need to be collected by a second device. Therefore, there is a data association between the first and second devices; that is, the operating status information of the same device and its feedback reporting status need to be linked for data traceability. The scenario data table association tags are used to mark the corresponding scenario test data tables, linking the data tables to form the final stress test data.

[0051] S305, based on the data characteristics of power data acquisition scenarios, performs compliance verification on data information used for power scenario stress testing.

[0052] This embodiment adds random fluctuations to the generated test data using a randomization algorithm, simulating data fluctuations in real-world power scenarios. Gaussian or uniform distribution algorithms can be selected for simulation based on different power scenarios and data indicators, improving the realism of the test data and enhancing the accuracy and reliability of stress test results. Furthermore, corresponding scenario tags and scenario data table association tags are added to the test data according to the power scenario to be tested. After the generated test data is inserted into the data table, these tags and association tags are used to mark and record the relationships between the data tables, ultimately forming the stress test data information. This allows for quick setting of various data types and their relationships, eliminating the need for engineers to define relationships between data tables and reducing reliance on engineers' deep understanding of data fundamentals, thus improving the efficiency and accuracy of stress test data generation.

[0053] Example 4 Figure 4 This is a schematic diagram of the structure of a SCADA system stress testing device according to Embodiment 4 of the present invention. In this embodiment, the SCADA system stress testing device includes: The scenario rule parsing module 810 is used to parse the preset power data acquisition scenario rule template and generate a stress test data table template and stress test data generation rules corresponding to the power data acquisition scenario for stress testing as needed. The test data generation module 820 is used to generate test data that conforms to the characteristics of the power data acquisition scenario according to the stress test data generation rules and the power data acquisition scenario to be stress tested, and to add power scenario tags according to the power data acquisition scenario to be stress tested. The test data filling module 830 is used to select the corresponding stress test data table template according to the power data acquisition scenario to be stress tested, and fill the power scenario test data into the stress test data table template; The compliance verification module 840 is used to verify the compliance of data information used for stress testing in power scenarios based on the data characteristics of power data acquisition scenarios.

[0054] This embodiment uses a scenario rule parsing module to parse test data table templates and test data generation rules from scenario rule templates; a test data generation module generates test data according to these rules; a test data filling module selects the appropriate test data table template based on the power scenario and fills in the test data; and a compliance verification module performs compliance verification on the data information used for stress testing. By using predefined scenario rule templates, when the power scenario requiring stress testing changes, the test code no longer needs to be modified; only the relevant content needs to be defined or modified in the rule template, simplifying the process from code-level to declaration-level. Simultaneously, based on the content recorded in the rule template, corresponding data tables and compliant test data can be generated. Defining the header fields of the data tables no longer depends on the engineers' knowledge of power data, reducing the tedious definition work for engineers. Furthermore, it automatically adds correlation information to the data tables storing data indicators based on their relationships, forming the data for stress testing. Finally, compliance verification ensures that the data meets the requirements of stress testing and business logic, ensuring the efficiency and reliability of stress test execution.

[0055] The SCADA system stress testing device provided in this embodiment of the invention can execute the SCADA system stress testing method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method.

[0056] Example 5 Figure 5 This is a structural diagram of an electronic device according to Embodiment 5 of the present invention. Figure 5 A block diagram is shown of an exemplary electronic device 12 suitable for implementing embodiments of the present invention. Figure 5 The electronic device 12 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.

[0057] like Figure 5 As shown, the electronic device 12 is represented in the form of a general-purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, system memory 28, and bus 18 connecting different system components (including system memory 28 and processing unit 16).

[0058] Bus 18 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.

[0059] Electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by electronic device 12, including volatile and non-volatile media, removable and non-removable media.

[0060] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (… Figure 5 Not shown; usually referred to as a "hard drive"). Although Figure 5 As not shown, disk drives for reading and writing to removable non-volatile disks (e.g., "floppy disks") and optical disc drives for reading and writing to removable non-volatile optical discs (e.g., CD-ROMs, DVD-ROMs, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. System memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present invention.

[0061] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of the present invention.

[0062] Electronic device 12 can also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), and with one or more devices that enable a user to interact with the electronic device 12 / server / computer, and / or with any device that enables the electronic device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed through input / output (I / O) interface 22. Furthermore, electronic device 12 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 20. Figure 5 As shown, network adapter 20 communicates with other modules of electronic device 12 via bus 18. It should be understood that, although... Figure 5 As not shown, other hardware and / or software modules may be used in conjunction with electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0063] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing the SCADA system stress testing method provided in the embodiments of the present invention.

[0064] Example 6 Embodiment 6 of the present invention also provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the SCADA system stress testing method provided in the above embodiments.

[0065] The computer storage medium of this invention can be any combination of one or more computer-readable media. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0066] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.

[0067] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including—but not limited to—wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0068] Computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0069] Example 7 Embodiment 7 of the present invention also provides a computer product, including a computer program, which, when executed by a processor, implements the SCADA system stress testing method as described in the above embodiments.

[0070] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.

Claims

1. A stress testing method for a SCADA system, characterized in that, include: S101, for power data acquisition scenarios requiring stress testing, parse the preset power data acquisition scenario rule template and generate a stress test data table template and stress test data generation rules corresponding to the power data acquisition scenario; S102, Generate test data that conforms to the characteristics of power data acquisition scenario data according to the stress test data generation rules and the power data acquisition scenario to be stress tested, and add power scenario tags according to the power data acquisition scenario to be stress tested to form power scenario test data; S103, Select the appropriate stress test data table template according to the power data acquisition scenario to be stress tested, fill the power scenario test data into the stress test data table template, and form the data information for power scenario stress test; S104, Based on the data characteristics of the power data acquisition scenario, perform compliance verification on the data information used for power scenario stress testing.

2. The method according to claim 1, characterized in that, The method further includes: A power test scenario metadata file is generated based on the data information used for power scenario stress testing. The power test scenario metadata file includes the power scenario name, power scenario data fields, total power scenario data volume, and power scenario verification hash.

3. The method according to claim 1, characterized in that, S101 includes: Based on the data content collected in each power data acquisition scenario as required for stress testing, the scenario rules for each power scenario are configured using YAML configuration files to form a preset power data acquisition scenario rule template. The power data acquisition scenario rule template is parsed to extract the power data that will be collected in each power data acquisition scenario. Based on the data type and the data information that can be collected, stress test data table templates and stress test data generation rules corresponding to the power data acquisition scenario are formed respectively.

4. The method according to claim 1, characterized in that, S102 includes: A randomization algorithm is used to generate test data that conforms to the characteristics of the power data acquisition scenario based on the stress test data generation rules and the power data acquisition scenario to be stress tested. The randomization algorithm includes Gaussian distribution or uniform distribution algorithm. Based on the power data acquisition scenario rule template and the power data acquisition scenario to be stress tested, add corresponding power scenario tags and power scenario data table association tags to the test data to form power scenario test data.

5. The method according to claim 4, characterized in that, S103 includes: Select the corresponding stress test data table template according to the power scenario label, fill the power scenario test data into the stress test data table template, and form multiple power scenario stress test data tables; The power scenario test data tables are marked according to the associated tags of the power scenario data tables to form data information for power scenario stress testing.

6. The method according to claim 1, characterized in that, S104 includes: Pydantic is used to perform compliance verification on data used for stress testing in simulated real power scenarios, generate compliance verification results, and remove data that does not meet compliance requirements based on the compliance verification results.

7. A SCADA system pressure testing device, characterized in that, include: The scenario rule parsing module is used to parse the preset power data acquisition scenario rule template and generate the stress test data table template and stress test data generation rules corresponding to the power data acquisition scenario for the power data acquisition scenario that needs to be stress tested. The test data generation module is used to generate test data that conforms to the characteristics of the power data acquisition scenario based on the stress test data generation rules and the power data acquisition scenario to be stress tested, and to add power scenario tags according to the power data acquisition scenario to be stress tested. The test data filling module is used to select the appropriate stress test data table template according to the power data acquisition scenario to be stress tested, and fill the power scenario test data into the stress test data table template; The compliance verification module is used to verify the compliance of data information used for stress testing in power scenarios based on the characteristics of the data collected in the power data acquisition scenario.

8. An electronic device, characterized in that, The electronic device includes: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the SCADA system stress testing method as described in any one of claims 1-6.

9. A storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the SCADA system stress testing method as described in any one of claims 1-6.

10. A computer product comprising a computer program, characterized in that: When the computer program is executed by the processor, it implements the SCADA system stress testing method as described in any one of claims 1-6.