Method for simulating and generating industrial equipment data
Patent Information
- Application Number
- CN202311768361.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-21
- Publication Date
- 2025-06-24
AI Technical Summary
The lack of real data in the prior art to verify industrial software model algorithms or systems, resulting in the lack of sufficient testing process and complex data support for industrial software implementation, which cannot meet multiple application scenarios.
A method for generating industrial equipment data in simulation is proposed, and simulation data is generated from three steps: equipment simulation, data simulation and large-scale equipment simulation performance tuning. The specific steps include characterizing industrial equipment as virtual devices, performing data transformation simulation, and dynamically adjusting the number of threads required for program operation.
More types of time series data generation modes are provided, which not only simulates the data itself, but also simulates the equipment attributes and protocol attributes, providing users with a highly flexible dynamic simulation configuration environment, which can simulate data in more complex working conditions.
Smart Images

Figure CN120197325A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method for simulating and generating industrial equipment data, belonging to the field of industrial software testing in industrial processes and discrete manufacturing industries. Background Art
[0002] The Internet of Things (IoT) is the "Internet where all things are connected". It is a network that extends and expands on the basis of the Internet, combining various information sensing devices with the Internet to form a huge network, realizing the interconnection and intercommunication of people, machines, and things at any time and any place. This has two meanings: First, the core and foundation of the IoT are still the Internet, which is a network that extends and expands on the basis of the Internet; Second, its user side extends and expands to any object-to-object connection for information exchange and communication.
[0003] Data collection through IoT edge devices includes data collection from industrial field programmable logic controllers, general instruments, industrial equipment, and information systems. That is, the collected data comes from the above four scenarios, and the data is presented in digital form, using standard Ethernet as the network medium, entering the IoT edge device through a computer general network card, and performing data parsing, data caching, and data forwarding in the edge device.
[0004] Data is the core of IoT applications, but in real applications, whether it is an Internet application cloud platform, an industrial control information system, or the implementation process of an AI model, there is a problem of lacking real data to verify the model algorithm or system testing. The reason lies in the irreproducibility of industrial data, that is, these data are generated in a specific production environment, and these production conditions change every day or even every moment. When an information system is deployed, sufficient historical data is required to verify the system under various normal and abnormal conditions, but most factories do not have original data accumulation, or have data but cannot meet the data reproducibility under multiple working conditions. Summary of the Invention
[0005] To solve the above technical problems, the present invention proposes a method for simulating and generating industrial equipment data. This method generates simulation data from three steps: equipment simulation, data simulation, and performance tuning of a large number of equipment simulations, thereby providing data support for system implementation.
[0006] The technical solution adopted by the present invention to achieve the above object is: A method for simulating and generating industrial equipment data, comprising the following steps:
[0007] Characterize the industrial equipment as a virtual equipment and configure it;
[0008] Perform data transformation simulation on the simulation data of the virtual equipment;
[0009] When the number of virtual devices increases, dynamically adjust the number of threads required for program operation.
[0010] Characterize the industrial device as a simulated device and configure it, including the following steps:
[0011] Establish in memory the virtual device name, device attributes, and device communication protocol used to characterize the industrial device; the protocol includes at least one of Bacnet, Modbus_TCP, Modbus_RTU, Modbus_RTU_ASCII, MQTT, OPCUA, RabbitMQ, DLT645-2007, HART, HTTP / JSON, IEC104 protocols.
[0012] Perform data transformation simulation on the simulated data of the virtual device, including the following steps:
[0013] Simulate the process of data change in memory and assign the simulated data to the device attributes; the data change process includes: normal range change, abnormal range change, increasing trend change, and decreasing trend change.
[0014] The normal range change includes the following steps:
[0015] 1) Randomly generate a data within the normal range;
[0016] 2) If the absolute value of the difference between the generated data and the previous generated data is less than the smoothing coefficient, retain the data; otherwise, regenerate and return to step 1) to generate the next data; the interval for data generation is 1 second; the generation process is triggered or ended by the user;
[0017] The smoothing coefficient is a user-configured value; the upper and lower limits of the normal range are user-configured values.
[0018] The abnormal range change includes the following steps:
[0019] Define a random number in the range of 0 to 1;
[0020] If the random number is less than or equal to the abnormal probability P, generate normal range data, that is, randomly generate a data within the normal range; if the absolute value of the difference between the generated data and the previous generated data is less than the smoothing coefficient, retain the data; otherwise, return to the step of randomly generating a data within the normal range to generate the next data;
[0021] If the random number is greater than the abnormal probability P, generate abnormal range data, that is, randomly generate a data within the upper and lower limits of the abnormal range, and then loop to generate the next data; the interval for data generation is 1 second; the generation process is triggered or ended by the user.
[0022] The abnormal probability is a value from 0 to 1 configured by the user; the upper and lower limits of the abnormal range are values configured by the user.
[0023] The increasing trend change includes the following steps:
[0024] The Nth generated data is obtained by multiplying the (N - 1)th data by the increasing threshold slope; the increasing threshold slope is obtained by adding the increasing threshold to 1;
[0025] The increasing threshold is randomly generated within 0 to 0.2 each time. The first increasing threshold is a randomly generated data. Each generated data cycles to generate the next increasing threshold. The generation interval of the increasing threshold is 1 second; the generation process is triggered or ended by the user.
[0026] The decreasing trend change includes the following steps:
[0027] The Nth generated data is obtained by multiplying the (N - 1)th data by the decreasing threshold slope; the decreasing threshold slope is obtained by subtracting the decreasing threshold from 1;
[0028] The decreasing threshold is randomly generated within 0 to 0.2 each time. The first decreasing threshold is a randomly generated data. Each generated data cycles to generate the next decreasing threshold. The generation interval of the decreasing threshold is 1 second; the generation process is triggered or ended by the user.
[0029] When the number of simulated devices increases, dynamically adjust the number of threads required for program operation, including the following steps:
[0030] Calculate the actual single-core utilization rate of the program; if the single-core utilization rate is greater than the theoretical threshold, increase the number of threads for the program; then repeatedly calculate the single-core utilization rate until the single-core utilization rate is less than or equal to the theoretical threshold;
[0031] The single-core utilization rate is the number of simulated devices divided by the number of CPU cores and then multiplied by the debugging constant; wherein, the debugging constant is configured by the user.
[0032] A system for simulating and generating industrial device data, including:
[0033] A device management module, used to represent an industrial device as a virtual device and perform virtual device configuration;
[0034] A protocol management module, used to perform protocol simulation;
[0035] Data trend configuration, used to perform data transformation simulation on the simulated data of the virtual device;
[0036] Operation management, used to perform dynamic simulation of the simulated data; when the number of virtual devices increases, dynamically adjust the number of threads required for program operation.
[0037] The present invention has the following beneficial effects and advantages:
[0038] (1) The present invention can provide more types of timing data generation modes.
[0039] (2) The present invention not only simulates the data itself but also simulates device attributes and protocol attributes.
[0040] (3) The present invention provides a highly flexible dynamic simulation configuration environment for users, enabling them to simulate data under more complex working conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 Flowchart of the method of the present invention;
[0042] Figure 2 Flowcharts of four common timing data trend simulations of the present invention;
[0043] Figure 3 Flowchart of performance tuning for a large number of device simulations of the present invention;
[0044] Figure 4 Example of a device management module Figure 1 ;
[0045] Figure 5 Example of a device management module Figure 2 ;
[0046] Figure 6 Example of a data trend configuration module Figure 1 ;
[0047] Figure 7 Example of a data trend configuration module Figure 2 ;
[0048] Figure 8 Example of a protocol management module Figure 1 ;
[0049] Figure 9 Example of a protocol management module Figure 2 ;
[0050] Figure 10 Example of an operation management module Figure 1 ;
[0051] Figure 11 Example of an operation management module Figure 2 ;
[0052] Figure 12 Example of an operation management module Figure 3 。 DETAILED DESCRIPTION OF THE INVENTION
[0053] The present invention will be further described in detail below with reference to the drawings and embodiments.
[0054] Facing complex industrial software application scenarios, the implementation of industrial software lacks sufficient testing processes and complex data support to enable industrial software to meet various application scenarios. The content involved in this patent is an automated simulation generation method for industrial equipment data, and the data generated by this method provides reliable and simulated data support for industrial software. This method realizes the simulation of simulation data in three steps: equipment simulation method, data change simulation, and performance tuning of a large number of equipment simulations.
[0055] The industrial equipment data generation method includes the following three steps, as Figure 1 shown:
[0056] 1) Simulation device definition;
[0057] 2) Data change simulation;
[0058] 3) Performance tuning of a large number of equipment simulations;
[0059] Establish virtual device names, device attributes, and device communication protocols used in memory. The protocols include, but are not limited to, Bacnet, Modbus_TCP, Modbus_RTU, Modbus_RTU_ASCII, MQTT, OPCUA, RabbitMQ, DLT645 - 2007, HART, HTTP / JSON, IEC104 protocols.
[0060] The data simulation configuration includes that the user configures four common time - series data trends in the production environment, that is, simulating the process of the device generating data and assigning the data to the device attributes. Among them, the four common time - series data trends include: normal interval simulation, abnormal interval simulation, increasing trend simulation, and decreasing trend simulation, as Figure 2 shown.
[0061] Among them, for normal interval simulation, the user needs to configure the base value of the normally generated data, the upper and lower limits of the base value change (this change interval is still within the normal interval), and the smoothing coefficient. For abnormal interval simulation, the user needs to configure the relevant content of the normal interval and generate abnormal values in the normal data sequence. Therefore, further configure the base value of the abnormal data, the upper and lower limits of the abnormal data base value (this change interval exceeds the normal interval), and the frequency of the abnormal value appearance. For increasing trend simulation, the user needs to configure the upper and lower limits of the increasing interval, the slope, and the upper and lower limits of the slope jitter. For decreasing trend simulation, the user needs to configure the upper and lower limits of the decreasing interval, the slope, and the upper and lower limits of the slope jitter.
[0062] Normal range variation: The method randomly generates a data within the normal range. If the absolute value of the difference between the generated data and the previous generated data is less than the smoothing coefficient, the number is retained; otherwise, it is regenerated. Then, the next data is generated in a loop, with a time interval of 1 second in between. The generation process is triggered and ended by the user. The smoothing coefficient is a value configured by the user. The upper and lower limits of the normal range are values configured by the user.
[0063] Abnormal range variation: The method first defines a random number in the range of 0 to 1. If the random number is less than or equal to the abnormal probability P, the method generates data within the normal range, and the generation method is as described in claim 4; if the random number is greater than the abnormal probability P, the method generates data within the abnormal range. The method randomly generates a data within the upper and lower limits of the abnormal range, and then generates the next data in a loop, with a time interval of 1 second in between. The generation process is triggered and ended by the user. The abnormal probability is a value configured by the user in the range of 0 to 1. The upper and lower limits of the abnormal range are values configured by the user.
[0064] Increasing range variation: The Nth data generated by the method is obtained by multiplying the (N - 1)th data by the increasing threshold slope. The increasing threshold slope is obtained by adding 1 to the increasing threshold. The increasing threshold is randomly generated within 0 to 0.2 each time. The first data is a randomly generated data. Each time, the next data is generated in a loop, with a time interval of 1 second in between. The generation process is triggered and ended by the user.
[0065] Decreasing range variation: The Nth data generated by the method is obtained by multiplying the (N - 1)th data by the decreasing threshold slope. The decreasing threshold slope is obtained by subtracting the decreasing threshold from 1. The decreasing threshold is randomly generated within 0 to 0.2 each time. The first data is a randomly generated data. Each time, the next data is generated in a loop, with a time interval of 1 second in between. The generation process is triggered and ended by the user.
[0066] Performance tuning for simulating a large number of devices includes: As the number of simulated devices increases, the number of threads required for the program to run is dynamically adjusted. First, calculate the actual single-core utilization rate of the program. The single-core utilization rate is the number of simulated devices divided by the number of CPU cores and then multiplied by the debugging constant. If the single-core utilization rate is greater than the theoretical threshold, the number of threads for the program is increased, and then the single-core utilization rate is calculated in a loop until the single-core utilization rate is less than or equal to the theoretical threshold. The debugging constant is configured by the user. As Figure 3 shown.
[0067] Embodiment:
[0068] Based on the invention content, a data simulation software system is formed. The system adopts a BS architecture, with the backend implemented in JAVA and the frontend using the VUE framework. The system operating environment is as follows:
[0069] Operating systems: Windows 7, Windows 8, Windows 10, Linux;
[0070] Browsers: IE9, IE10, IE11, Chrome, etc.
[0071] Operating environment: JDK 1.8, Redis 3.2, Tomcat 9, Mysql 5.7, Rabbitmq 3.11.
[0072] The system includes modules such as device management, data trend configuration, protocol management, and operation management. Among them, device management corresponds to the device simulation part, and the points of the device are configured separately; data trend configuration corresponds to the data simulation part, simulating different time series data trends; protocol management corresponds to the protocol simulation part, which includes a common protocol library; operation management corresponds to the dynamic simulation part, realizing the simulation generation of data under complex working conditions. The specific function modules are introduced as follows.
[0073] (1) Device management
[0074] Under this module, operations such as searching, creating, deleting, trend configuration, and editing of points can be performed. Device management is as Figure 4 shown; clicking on "Create Point" can enter the new point information page, as Figure 5 shown.
[0075] (2) Trend configuration
[0076] Clicking on "Trend Configuration" can enter the data trend information page, as Figure 6 shown; filling in relevant information in the data trend information page and clicking on "Test", a data trend update indicator will be displayed above, as Figure 7 shown. Click on "Save" to save the data trend information.
[0077] (3) Protocol management
[0078] Under this module, operations such as configuring and editing protocol information can be performed, as Figure 8 shown; clicking on "Protocol Configuration" can enter the protocol configuration page, as Figure 9 shown. After writing the information, click on "Save" to save.
[0079] (4) Operation management
[0080] Under this module, the operating status of the device can be adjusted, turning the device on or off, as Figure 10 shown; clicking on "Start Device", a startup success indicator will appear above, and the device status will be updated to online, as Figure 11 shown; clicking on "Stop Device", a shutdown success indicator will appear above, and the device status will be updated to offline, as Figure 12 shown.
Claims
1. A method for simulating and generating industrial equipment data, characterized in that, Including the following steps: Characterize industrial equipment as virtual equipment and configure it; Conduct data transformation simulation on the simulation data of the virtual equipment; When the number of virtual equipment increases, dynamically adjust the number of threads required for program operation.
2. The method for simulating and generating industrial equipment data according to claim 1, wherein The step of characterizing industrial equipment as simulation equipment and configuring it includes the following steps: Establish in memory the virtual equipment name, equipment attributes, and equipment communication protocols used to characterize industrial equipment; the protocols include at least one of Bacnet, Modbus_TCP, Modbus_RTU, Modbus_RTU_ASCII, MQTT, OPCUA, RabbitMQ, DLT645-2007, HART, HTTP / JSON, and IEC104 protocols.
3. A method for simulating and generating industrial equipment data according to claim 1, characterized in that, The step of conducting data transformation simulation on the simulation data of the virtual equipment includes the following steps: Simulate the process of data change in memory and assign the simulated data to the equipment attributes; the data change process includes: normal range change, abnormal range change, increasing trend change, and decreasing trend change.
4. The method for simulating and generating industrial equipment data according to claim 3, wherein The normal range change includes the following steps: 1) Randomly generate a data within the normal range; 2) If the absolute value of the difference between the generated data and the previous generated data is less than the smoothing coefficient, retain the data; otherwise, regenerate and return to step 1) to generate the next data; the interval for data generation is 1 second; the generation process is triggered or ended by the user; The smoothing coefficient is a user-configured value; the upper and lower limits of the normal range are user-configured values.
5. The method for simulating and generating industrial equipment data according to claim 3, wherein The abnormal range change includes the following steps: Define a random number in the range of 0 to 1; If the random number is less than or equal to the abnormal probability P, generate normal range data, that is, randomly generate a data within the normal range; if the absolute value of the difference between the generated data and the previous generated data is less than the smoothing coefficient, retain the data; otherwise, return to the step of randomly generating a data within the normal range to generate the next data; If the random number is greater than the abnormal probability P, generate abnormal range data, that is, randomly generate a data within the upper and lower limits of the abnormal range, and then loop to generate the next data; the interval for data generation is 1 second; the generation process is triggered or ended by the user.
6. A method for simulating and generating industrial equipment data according to claim 5, characterized in that, The abnormal probability is a user-configured value between 0 and 1; the upper and lower limits of the abnormal range are user-configured values.
7. A method for simulating and generating industrial equipment data according to claim 3, characterized in that, The increasing trend change includes the following steps: The Nth generated data is obtained by multiplying the (N-1)th data by the increasing threshold slope; the increasing threshold slope is obtained by adding the increasing threshold to 1; The increasing threshold is randomly generated within 0 to 0.2 each time; the first increasing threshold is a randomly generated data; each generated data loops to generate the next increasing threshold; the interval for generating the increasing threshold is 1 second; the generation process is triggered or ended by the user.
8. A method for simulating and generating industrial equipment data according to claim 3, characterized in that The decreasing trend change includes the following steps: The Nth generated data is obtained by multiplying the (N-1)th data by the decreasing threshold slope; the decreasing threshold slope is obtained by subtracting the decreasing threshold from 1; The decreasing threshold is randomly generated within the range of 0 to 0.2 each time. The first decreasing threshold is randomly generated data, and the next decreasing threshold is generated in each loop of the generated data. The generation interval of the decreasing threshold is 1 second; the generation process is triggered or ended by the user.
9. The method for simulating and generating industrial equipment data according to claim 1, wherein When the number of simulated devices increases, dynamically adjust the number of threads required for program operation, including the following steps: Calculate the actual single-core utilization rate of the program; if the single-core utilization rate is greater than the theoretical threshold, increase the number of threads for the program; then calculate the single-core utilization rate in a loop until the single-core utilization rate is less than or equal to the theoretical threshold; The single-core utilization rate is the number of simulated devices divided by the number of CPU cores and then multiplied by the debugging constant; wherein, the debugging constant is configured by the user.
10. A system for simulating and generating industrial equipment data, characterized in that, It includes: A device management module, which is used to represent industrial devices as virtual devices and perform virtual device configuration; A protocol management module, which is used to perform protocol simulation; Data trend configuration, which is used to perform data transformation simulation on the simulated data of virtual devices; Operation management, which is used to perform dynamic simulation of simulated data; when the number of virtual devices increases, dynamically adjust the number of threads required for program operation.