Database pressure testing method and device for industrial control system
By simulating the working conditions of frequent changes in real-time industrial data, using the minimization system and pressure measuring machine of the industrial control system to evaluate the performance of the database in industrial control scenarios, solving the problem of database stress testing that the existing technology cannot be applied to industrial control scenarios. , realizes effective evaluation of database performance and stability.
Patent Information
- Application Number
- CN202411707024.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2024-12-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing database stress testing methods are not suitable for industrial control scenarios, and it is impossible to effectively evaluate the performance and stability of databases in frequent real-time data changes and high-voltage environments.
A database stress testing method and device were designed to simulate the working conditions of frequent changes in real-time industrial data, and use the minimization system of the industrial control system, 10 Gigabit switch and pressure measuring machine to connect the measured database system to monitor the CPU load and memory. Occupancy rate, write data accuracy and data loss rate provide performance evaluation of databases in industrial control high-voltage scenarios.
The database pressure-bearing capacity in real industrial control scenarios is restored to the greatest extent, and the database performance is quantitatively evaluated through real-time monitoring and analysis of indicators, providing a reference basis for applications in industrial control scenarios.
Smart Images

Figure CN119201629A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of industrial control, and in particular relates to a database pressure testing method and device for an industrial control system. Background Art
[0002] Industrial control systems are at the heart of modern manufacturing. They are responsible for supervising and controlling equipment and machines in industrial production processes. Industrial control systems typically integrate sensors, actuators, control logic, and user interfaces to ensure that production processes are automated, optimized, and run efficiently.
[0003] In industrial control systems, databases play a vital role. They are used to store, analyze and process a large amount of real-time and historical data generated in industrial sites. Databases used in industrial control systems need to have efficient real-time data processing capabilities to support real-time monitoring and rapid response to control needs. At the same time, due to the continuous operation characteristics of industrial control systems, databases must have high reliability and stability to ensure data consistency and accuracy. In industrial environments, database systems need to have good performance and fault tolerance mechanisms to maintain stable operation of database systems under extreme working conditions (for example, the data that needs to be collected and stored changes frequently in a short period of time, causing great data collection and storage pressure) to ensure that production is not affected. Performing stress testing on database systems can effectively evaluate their performance and stability in high-pressure environments where data changes frequently and is written.
[0004] The existing database stress testing scenarios are mostly concentrated in information technology scenarios, such as transaction-based stress testing developed for simulated banking, e-commerce and other transaction scenarios, or benchmark stress testing based on technologies such as benchmarks. However, the above-mentioned general database stress testing methods are not suitable for database stress testing in industrial control scenarios. Industrial control systems emphasize real-time performance, that is, completing control tasks within strict time limits, while transaction-based stress testing focuses more on the assessment of transaction processing capabilities rather than real-time response performance. At the same time, the unique data structure, storage, and calling methods of industrial control systems also limit the application of benchmark stress testing methods based on technologies such as benchmarks in the field of industrial control.
[0005] In general, the stress testing scenarios of existing databases are mostly concentrated in information technology scenarios, such as stress testing based on transaction scenarios, or benchmark stress testing for testing the database system itself, which are not suitable for industrial control scenarios. Summary of the invention
[0006] The purpose of the present invention is to provide a database stress testing method and device for industrial control systems, which can test database performance by simulating working conditions in which a large amount of industrial real-time data changes frequently, obtain data loss conditions under high-pressure environments, and provide a basis for evaluating the performance of the database under industrial control high-pressure scenarios.
[0007] The technical solution of the present invention is as follows: a database stress testing device for an industrial control system includes a minimized system of the industrial control system, a 10 Gigabit switch, a stress testing machine and a database system under test. The minimized system of the industrial control system communicates with the stress testing machine through the 10 Gigabit switch, and the stress testing machine is connected to the database system under test.
[0008] The minimized system of the industrial control system includes a host computer, a power supply, a main controller card, and a network communication card. The power supply converts the external 220V AC power into 48V DC power and supplies power to the main controller card and the network communication card. The script software runs in the host computer, which is responsible for controlling the main controller card to generate constantly changing industrial control system network signals and transmits the signals to the 10 Gigabit switch through the network communication card.
[0009] The 10 Gigabit switch is a universal 10 Gigabit network switch for industrial control systems, responsible for signal forwarding and network communication.
[0010] The pressure testing machines described are several.
[0011] The stress test machine reads the real-time data provided by the minimized industrial control system, and writes the data into a cache queue and a hard disk of the stress test machine. The data written into the cache queue can be sent to the database system under test according to the test requirements.
[0012] The database system under test is composed of several servers and database software, data recording and analysis software running on the servers. Depending on the test purpose, the database server layout of this module can be a redundant layout of primary and standby database servers, or a distributed layout of three servers or multiple servers. The test data recording and analysis software is deployed on the server. The software function is to monitor and record the server CPU load and server memory occupancy rate in real time, as well as to count and record the accuracy of written test data and data loss rate.
[0013] A database stress testing method for an industrial control system includes the following steps:
[0014] Step 1: Build a test system;
[0015] Step 2: Confirm the initial test conditions, where the data of the stress test machine is normally injected into the database system, and stress test machine 2 to stress test machine N are not connected to the database system temporarily;
[0016] Step 3: Operate the minimized industrial control system on the host computer of the minimized system of the industrial control system to make its output data change frequently, creating the working condition when the industrial site encounters data avalanche;
[0017] Step 4: The stress test machine 1 receives the signal output by the 10 Gigabit switch, converts the signal into a format that can be received by the database, and stores it in the cache and hard disk of the stress test machine. The database system in the database system under test reads the data from the cache of the stress test machine and stores it in the database. During this process, the CPU load and memory usage of the database system are continuously monitored.
[0018] Step 5: After the test lasts for 60 seconds, the test is paused and the test data recording and analysis software deployed on the server is operated to calculate the write data accuracy and write data loss rate of the first phase test;
[0019] Step 6: Integrate several stress testers into the test system in sequence, increase the database system load in a step-by-step manner, and repeat steps 4 and 5. During this process, continuously record the CPU load and memory usage of the database system, calculate the write data accuracy and write data loss rate of each stage test, and obtain the database response performance under the step-by-step increase in stress conditions.
[0020] The step 1 is to connect the minimized system of the industrial control system to the stress test machine through a 10 Gigabit switch, and the stress test machine is connected to the database system under test.
[0021] The beneficial effects of the present invention are as follows: the test data source comes from the real-time data of the minimized industrial control system. Compared with the traditional database testing method, it can restore the database pressure-bearing capacity of the real industrial control scenario under avalanche conditions to the greatest extent; by real-time monitoring of indicators such as CPU load, memory occupancy, write data accuracy and data loss rate during the stress test, the performance of the database under data pressure can be quantitatively evaluated, providing a reference basis for the application of the database in the industrial control scenario. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 Industrial control system database stress test device architecture diagram;
[0023] Figure 2 Minimized system architecture diagram of industrial control system;
[0024] Figure 3 Function diagram of pressure testing machine software;
[0025] Figure 4 Functional architecture diagram of data recording and analysis software;
[0026] Figure 5 The server CPU load and memory usage monitoring function diagram of the data recording and analysis software;
[0027] Figure 6 The test data accuracy recording and statistical functions of the data recording and analysis software are used in the database pressure testing method and device of the industrial control system. DETAILED DESCRIPTION
[0028] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0029] Database stress testing method and device for industrial control systems
[0030] like Figure 1 The database stress testing device for industrial control systems shown in the figure includes: a minimized system of the industrial control system, a 10 Gigabit switch, a stress testing machine and a database system to be tested.
[0031] Minimized system of industrial control system. The system consists of host computer, power supply, main controller card, network communication card, such as Figure 2 The power module is responsible for converting the external 220V AC power into 48V DC power and supplying power to the main controller card and the network communication card. The script software runs in the host computer, which is responsible for controlling the main controller card to generate constantly changing industrial control system network signals and transmit the signals to the 10G switch through the network communication card.
[0032] The 10G switch is a common 10G network switch for industrial control systems, responsible for signal forwarding and network communication.
[0033] Several stress testing machines. This module consists of several identical stress testing machines. A stress testing machine refers to a server and the stress testing software running on the server. The stress testing machine is responsible for reading the real-time data provided by the minimized industrial control system and writing this data into the cache queue and the stress testing machine hard disk. The data written into the cache queue can be sent to the database system under test according to the test requirements: database system. The function diagram of the stress testing machine software is as follows: Figure 3 shown.
[0034] The database system under test is composed of several servers and database software, data recording and analysis software running on the servers. Depending on the test purpose, the database server layout of this module can be a redundant layout of primary and standby database servers, or a distributed layout of three or more servers. The test data recording and analysis software is deployed on the server. The software function is to monitor and record the server CPU load and server memory usage in real time, as well as to count and record the accuracy of written test data and data loss rate. The functional architecture of the data recording and analysis software is as follows: Figure 4The data recording and analysis software directly queries the CPU load and memory usage of the local machine from the database software interface program, and displays it in real time on the human-machine interface of the data recording and analysis software, and records it in the hard disk of the database server at the same time. The server CPU load and memory usage monitoring function of the data recording and analysis software is shown in the figure Figure 5 After a period of continuous testing, the test should be paused and the accuracy of the data recorded in the database should be counted. The test data accuracy recording and statistical function diagram of the data recording and analysis software is shown in the figure below. Figure 6 The data recording and analysis software queries the number of data tags recorded in the database system, recorded as K1, and queries the number of data tags recorded in the stress test machine, recorded as K2. The data loss rate is calculated according to the following formula (1):
[0035] Data loss rate: K=(1-K1 / K2)*100% (1)
[0036] A database stress testing method for an industrial control system includes the following steps:
[0037] Step 1: Follow Figure 1 As shown in the figure, a test system is built, specifically, the minimized system of the industrial control system is connected to the stress test machine through a 10 Gigabit switch, and the stress test machine is connected to the database system under test.
[0038] Step 2: Confirm the initial test conditions:
[0039] The data of stress test machine 1 is normally injected into the database system, and stress test machine 2 to stress test machine N are not connected to the database system for the time being.
[0040] Step 3: The tester operates the minimized industrial control system on the host computer of the minimized system of the industrial control system, causing its output data to change frequently, creating the working condition when the industrial site encounters data avalanche.
[0041] Step 4: Stress test machine 1 receives the signal output by the 10G switch, converts the signal into a format that can be received by the database, and stores it in the cache and hard disk of stress test machine 1. The database system in the database system under test reads data from the cache of stress test machine 1 and stores it in the database. During this process, the CPU load and memory usage of the database system are continuously monitored.
[0042] Step 5: Pause the test after the test lasts for 60 seconds, operate the test data recording and analysis software deployed on the server, and calculate the write data accuracy and write data loss rate of the first phase test.
[0043] Step 6: Integrate stress test machine 2 to stress test machine N into the test system in sequence, increase the database system load in a step-by-step manner, repeat steps 4 and 5, and continuously record the CPU load and memory usage of the database system during this process. Calculate the write data accuracy and write data loss rate of each stage test to obtain the database response performance under the step-by-step increase in stress conditions.
[0044] Example
[0045] according to Figure 1 The test system is shown in the figure, which is a minimal system of industrial control system. The system consists of a host computer, power supply, main controller card, and network communication card, such as Figure 2 The power module is responsible for converting the external 220V AC power into 48V DC power and providing power to the main controller card and network communication card.
[0046] The 10G switch is a common 10G network switch for industrial control systems, responsible for signal forwarding and network communication.
[0047] Several stress testing machines. This module consists of several identical stress testing machines. A stress testing machine refers to a server and the stress testing software running on the server. The stress testing software function diagram is as follows: Figure 3 shown.
[0048] The database system under test is composed of several servers, database software running on the servers, and database performance monitoring software. Depending on the purpose of the test, the database server layout of this module can be a redundant layout of primary and standby database servers, or a distributed layout of three or more servers. At the same time, the test data recording and analysis software is deployed on the server. The software function is to monitor and record the server CPU load and server memory usage in real time, as well as to count and record the accuracy and data loss rate of the test data written in the previous stage. The architecture of the data recording and analysis software is as follows: Figure 4 The data recording and analysis software can monitor and record the server CPU load and server memory usage in real time. Figure 5 The test data accuracy recording and statistical function diagram of the data recording and analysis software is shown in Figure 6 The data recording and analysis software queries the number of data tags recorded in the database system, recorded as K1, and queries the number of data tags recorded in the stress test machine, recorded as K2. The data loss rate is calculated according to the following formula (1):
[0049] Data loss rate K = (1-K1 / K2)*100% (1)
[0050] Confirm the initial test conditions: Confirm that each module of the database stress test system is powered on and running normally. In this example, the initial test conditions refer to:
[0051] The minimized industrial control system operates normally, and its main controller card and network communication card do not report errors;
[0052] The data of stress test machine 1 is normally injected into the database system, and stress test machines 2 to N are not connected to the database system for the time being;
[0053] The database system software starts and runs without error.
[0054] The tester operates the minimized industrial control system on the host computer of the minimized system of the industrial control system, causing its output data to change frequently, and creating the working conditions when the industrial site encounters data avalanche. In this example, the script software running in the host computer controls the main controller card to generate constantly changing industrial control system signal data according to the data structure in Table 1. The signal change frequency is 50HZ, and the signal value is randomly generated by the industrial control system within a predetermined range of values, and a timestamp is added to each data, and then the signal is transmitted to the 10G switch through the network communication card. In this example, the data structure generated by the minimized industrial control system when the timestamp is 1254325600 is shown in Table 1.
[0055] Table 1 Minimized industrial control system data structure table
[0056] Metric Name / Data Type Data Label / Data Type Value / Data Type Numeric unit / data type Timestamp / Data Type Pump Speed / string 1 / float 300 / float r per min / string 1254325600 / float Water Level / string 2 / float 1000 / float m / string 1254325600 / float ..... ..... ..... ..... ..... Water Temp / string 200000 / float 200 / float ℃ / string 1254325600 / float
[0057] Stress test machine 1 receives the signal output by the 10G switch, converts the signal into a format that can be received by the database, and stores it in the cache and hard disk of stress test machine 1. The database system in the database system under test reads data from the cache of stress test machine 1 and stores it in the database. During this process, the CPU load and memory usage of the database system are continuously monitored.
[0058] The test was paused after 60 seconds, and the test data recording and analysis software deployed on the server was operated to calculate the write data accuracy and write data loss rate of the first phase test.
[0059] Sequentially integrate stress test machine 2 to stress test machine N into the test system, increase the database system load in a step-by-step manner, repeat steps 4 and 5, continuously record the CPU load and memory usage of the database system during this process, calculate the write data accuracy and write data loss rate of each stage test, and obtain the database response performance under the step-by-step increase in stress conditions.
Claims
1. A database stress testing device for industrial control systems, characterized in that: It includes a minimized system of an industrial control system, a 10 Gigabit switch, a stress test machine and a database system under test. The minimized system of the industrial control system communicates with the stress test machine through the 10 Gigabit switch, and the stress test machine is connected to the database system under test.
2. The database stress testing device for an industrial control system according to claim 1, characterized in that: The minimized system of the industrial control system includes a host computer, a power supply, a main controller card, and a network communication card. The power supply converts the external 220V AC power into 48V DC power and supplies power to the main controller card and the network communication card. The script software runs in the host computer, which is responsible for controlling the main controller card to generate constantly changing industrial control system network signals and transmits the signals to the 10 Gigabit switch through the network communication card.
3. The database stress testing device for an industrial control system according to claim 1, characterized in that: The 10 Gigabit switch is a universal 10 Gigabit network switch for industrial control systems, responsible for signal forwarding and network communication.
4. The database stress testing device for an industrial control system according to claim 1, characterized in that: The pressure testing machines described are several.
5. The database stress testing device for an industrial control system according to claim 4, characterized in that: The stress test machine reads the real-time data provided by the minimized industrial control system, and writes the data into a cache queue and a hard disk of the stress test machine. The data written into the cache queue can be sent to the database system under test according to the test requirements.
6. The database stress testing device for an industrial control system according to claim 1, characterized in that: The database system under test is composed of several servers and database software, data recording and analysis software running on the servers. Depending on the test purpose, the database server layout of this module can be a redundant layout of primary and standby database servers, or a distributed layout of three servers or multiple servers. The test data recording and analysis software is deployed on the server. The software function is to monitor and record the server CPU load and server memory occupancy rate in real time, as well as to count and record the accuracy of written test data and data loss rate.
7. A database stress testing method for an industrial control system, characterized in that: The steps include: Step 1: Build a test system; Step 2: Confirm the initial test conditions, where the data of the stress test machine is normally injected into the database system, and stress test machine 2 to stress test machine N are not connected to the database system temporarily; Step 3: Operate the minimized industrial control system on the host computer of the minimized system of the industrial control system to make its output data change frequently, creating the working condition when the industrial site encounters data avalanche; Step 4: The stress test machine 1 receives the signal output by the 10 Gigabit switch, converts the signal into a format that can be received by the database, and stores it in the cache and hard disk of the stress test machine. The database system in the database system under test reads the data from the cache of the stress test machine and stores it in the database. During this process, the CPU load and memory usage of the database system are continuously monitored. Step 5: After the test lasts for 60 seconds, the test is paused and the test data recording and analysis software deployed on the server is operated to calculate the write data accuracy and write data loss rate of the first phase test; Step 6: Integrate several stress testers into the test system in sequence, increase the database system load in a step-by-step manner, and repeat steps 4 and 5. During this process, continuously record the CPU load and memory usage of the database system, calculate the write data accuracy and write data loss rate of each stage test, and obtain the database response performance under the step-by-step increase in stress conditions.
8. The database stress testing method for an industrial control system according to claim 7, characterized in that: The step 1 is to connect the minimized system of the industrial control system to the stress test machine through a 10 Gigabit switch, and the stress test machine is connected to the database system under test.
Citation Information
Patent Citations
Pressure testing system and method of middle system
CN106776300A
A performance test method of an industrial real-time database
CN109189661A
Pressure testing method and device used for FC-AE (Fibre Channel Avionics Environment) bus
CN109617763A
Pressure testing method and device
CN109726094A
Server power consumption test method and device
CN113961413A
