Energy test data simulation method and system
By defining the seed file identification and analysis process, data simulation process and data simulation storage process, the energy test data simulation method is solved, and the problem of high data acquisition cost and long time in the research and development test of energy systems is realized, and the energy data is simulated and stored, providing data support and traceability.
Patent Information
- Application Number
- CN202411658988.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-03-18
AI Technical Summary
During the research and development and testing of energy systems, the cost of collecting real data is high and the time is long, which makes it difficult to simulate energy test data.
Provides an energy test data simulation method, including defining seed file identification analysis process, data simulation process, and data simulation database entry process. The seed data of the device is collected through the seed file identification analysis process, and real-time data and accumulated data that comply with custom generation rules are generated based on preset time intervals, and written to the database.
It realizes the simulation of the characteristics of different points at the same time, generates data in a circular manner and simulates real scenarios, provides data support for real-time monitoring and testing of energy systems, and increases the traceability of energy data during the testing process.
Smart Images

Figure CN119645997A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of software development and testing, and in particular to an energy test data simulation method and system. Background Art
[0002] Based on the demand for environmental protection, energy management systems have emerged. However, since there are many data points in energy application scenarios and data is generated quickly, and the cost and time of collecting real data in the R&D and testing process of most energy systems are high, simulation data has become a difficult point in the energy system testing process.
[0003] How to provide energy data simulation methods to assist in accurate testing of energy systems is a technical problem that needs to be solved. Summary of the invention
[0004] The technical task of the present invention is to address the above deficiencies and provide an energy test data simulation method and system to solve the technical problem of how to provide an energy data simulation method to assist in accurate testing of energy systems.
[0005] In a first aspect, the present invention provides an energy test data simulation method, comprising the following steps:
[0006] Define the seed file identification and analysis process. The seed file analysis process includes the following steps: collect the seed data of the device and extract the content of the seed data. The content of the seed data includes the device serial number SN, point name, point type and basic data. There are two types of point types, namely real-time data and cumulative data.
[0007] Define a data simulation process, which includes the following steps: for real-time data, calculate the point simulation data range of each point data of the real-time data, and generate a random value within the point simulation data range as the simulation value of the real-time data; for cumulative data, calculate the cumulative data growth amount data range of each point of the cumulative data, and generate a random number within the point cumulative data growth amount data range as the simulation value of the cumulative data;
[0008] Define a data simulation warehousing process, which includes the following steps: using the device's seed data file as input, collecting the device's seed data and extracting the content of the seed data through the seed file recognition and analysis process, and executing the data simulation process loop to generate real-time data and cumulative data that meet the custom generation rules based on a preset time interval, adding timestamps to the real-time data and cumulative data, and writing the real-time data and cumulative data into the database in the format of the device's seed data, wherein the custom generation rules are used to limit the data parameters of the real-time data and simulation data, including the number of decimal places, length, and data range;
[0009] Service packaging and execution: Encapsulate the seed file identification and analysis process, data simulation process, and data simulation warehousing process into services, deploy and run the services, and call the service interface to input the seed data file of the device to realize the simulation data warehousing.
[0010] Preferably, for real-time data, the basic data includes the maximum and minimum values of the data at each point, and for cumulative data, the basic data includes the maximum and minimum values of the data at each point according to the time growth amount.
[0011] Preferably, for real-time data, the maximum and minimum values of each point data of the real-time data are calculated as the point simulation data range of the point data, and within the point simulation data range, a value is randomly generated as the simulation value of the real-time data.
[0012] As a preference, for the accumulated data, the maximum and minimum values of the growth amount of each point data of the accumulated data according to time are calculated as the data range of the growth amount of the accumulated data of the point data;
[0013] The cumulative data is simulated through the following operations: the cumulative data generated last time is taken as the base value baseValue. If there is no data generated last time, the maximum value of the cumulative data in the seed data is used as the base value baseValue. A random number random is generated within the data range of the point cumulative data growth amount. The sum of the base value baseValue and the random number random is used as the simulated value of this cumulative data.
[0014] In a second aspect, the present invention provides an energy test data simulation device, including a seed file identification and analysis definition module, a data simulation definition module, a data simulation storage definition module, and a service packaging execution module;
[0015] The seed file identification and analysis definition module is used to define the seed file identification and analysis process. The seed file analysis process includes the following steps: collecting the seed data of the device and extracting the content of the seed data. The content of the seed data includes the device serial number SN, point name, point type and basic data. There are two types of point types, namely real-time data and cumulative data;
[0016] The data simulation definition module is used to define the data simulation process, which includes the following steps: for real-time data, calculate the point simulation data range of each point data of the real-time data, and generate a random value within the point simulation data range as the simulation value of the real-time data; for cumulative data, calculate the data range of the cumulative data growth amount of each point of the cumulative data, and generate a random number within the data range of the cumulative data growth amount of the point as the simulation value of the cumulative data;
[0017] The data simulation warehousing definition module is used to define the data simulation warehousing process, which includes the following steps: taking the seed data file of the device as input, collecting the seed data of the device and extracting the content of the seed data through the seed file recognition and analysis process, and executing the data simulation process loop to generate real-time data and cumulative data that meet the custom generation rules based on the preset time interval, adding timestamps to the real-time data and cumulative data, and writing the real-time data and cumulative data into the database in the format of the device seed data, wherein the custom generation rules are used to limit the data parameters of the real-time data and the simulation data, including the number of decimal places, length and data range;
[0018] The service encapsulation execution module is used for service encapsulation execution: encapsulating the seed file identification and analysis process, data simulation process and data simulation warehousing process into services, deploying and running services, and calling the service interface to input the seed data file of the device to realize simulated data warehousing.
[0019] Preferably, for real-time data, the basic data includes the maximum and minimum values of the data at each point, and for cumulative data, the basic data includes the maximum and minimum values of the data at each point according to the time growth amount.
[0020] Preferably, for real-time data, the maximum and minimum values of each point data of the real-time data are calculated as the point simulation data range of the point data, and within the point simulation data range, a value is randomly generated as the simulation value of the real-time data.
[0021] As a preference, for the accumulated data, the maximum and minimum values of the growth amount of each point data of the accumulated data according to time are calculated as the data range of the growth amount of the accumulated data of the point data;
[0022] The cumulative data is simulated through the following operations: the cumulative data generated last time is taken as the base value baseValue. If there is no data generated last time, the maximum value of the cumulative data in the seed data is used as the base value baseValue. A random number random is generated within the data range of the point cumulative data growth amount. The sum of the base value baseValue and the random number random is used as the simulated value of this cumulative data.
[0023] The energy test data simulation method and system of the present invention have the following advantages:
[0024] 1. According to the characteristics of different points, simulate real-time data, accumulate data point data, generate data cyclically and store them in the database, simulate real scenarios to realize energy data, and provide data support for real-time monitoring and testing of energy systems;
[0025] 2. Customizable generation rules. By adjusting parameters, you can customize the number of decimal places, length, data range and other rules;
[0026] 3. Increased the traceability of energy data during the testing process. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0028] The present invention is further described below in conjunction with the accompanying drawings.
[0029] Figure 1 This is a flowchart of an energy test data simulation method according to Example 1;
[0030] Figure 2 A schematic diagram of seed data content in an energy test data simulation method in Example 1;
[0031] Figure 3 This is a schematic diagram of an interface for calling a service interface and uploading a seed data file in an energy test data simulation method in Example 1;
[0032] Figure 4 This is a schematic diagram of the results of checking the operation status and verifying the data storage in an energy test data simulation method in Example 1. DETAILED DESCRIPTION
[0033] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it. However, the embodiments are not intended to limit the present invention. In the absence of conflict, the embodiments of the present invention and the technical features in the embodiments may be combined with each other.
[0034] The embodiments of the present invention provide an energy test data simulation method and system for solving the technical problem of how to provide an energy data simulation method to assist in accurate testing of an energy system.
[0035] Embodiment 1:
[0036] The present invention provides an energy test data simulation method, which includes four steps of defining a seed file identification and analysis process, defining a data simulation process, defining a data simulation storage process, and service packaging and execution.
[0037] Step S100 identifies the analysis process. The seed file analysis process includes the following steps: collecting the seed data of the device and extracting the content of the seed data. The content of the seed data includes the device serial number SN, point name, point type and basic data. There are two types of point types, namely real-time data and cumulative data.
[0038] In this embodiment, for real-time data, the basic data includes the maximum value and the minimum value of each point data, and for cumulative data, the basic data includes the maximum value and the minimum value of each point data according to the time growth amount.
[0039] In the seed file identification and analysis process, the required simulated device SN in the seed data is extracted, and the SN is the subsequent simulated data device SN; the device point name and point in the seed data are extracted and analyzed, and the device points are divided into two categories: cumulative data and real-time data; the seed data of each point is extracted, the maximum and minimum values in the seed data of the real-time data point are recorded and stored, and the maximum and minimum growth values of each point in the cumulative data are calculated and stored.
[0040] The content of the seed data is as follows Figure 2 shown.
[0041] Step S200 means data simulation process, which includes the following steps: for real-time data, calculate the point simulation data range of each point data of the real-time data, and generate a random value within the point simulation data range as the simulation value of the real-time data; for cumulative data, calculate the data range of the cumulative data growth amount of each point of the cumulative data, and generate a random number within the data range of the point cumulative data growth amount as the simulation value of the cumulative data.
[0042] In this embodiment, for real-time data, the maximum and minimum values of each point data of the real-time data are calculated as the point simulation data range of the point data, and a value is randomly generated within the point simulation data range as the simulation value of this real-time data.
[0043] For the cumulative data, calculate the maximum and minimum values of the cumulative data point data according to the time growth amount, as the data range of the cumulative data growth amount of the point data. The cumulative data is simulated by the following operations: the cumulative data generated last time is used as the base value baseValue. If there is no data generated last time, the maximum value of the cumulative data in the seed data is used as the base value baseValue. A random number random is generated within the data range of the cumulative data growth amount of the point, and the sum of the base value baseValue and the random number random is used as the simulated value of this cumulative data.
[0044] The data simulation process includes two operations: calculating the simulation data range and simulating the data.
[0045] In the operation of calculating the simulation data range, the maximum and minimum values of each point of the real-time data are calculated as the simulation data range of the point; the maximum and minimum values of the growth amount of each data of the cumulative data over time are calculated as the data range of the cumulative data growth amount of the point;.
[0046] In the simulation data operation, real-time data simulation: within the point simulation data range, randomly generate values as the real-time data for this time. Cumulative data simulation: take the last generated cumulative data as the base value. If there is no last generated data, use the maximum value of the cumulative data in the seed data as the base value baseValue, and generate a random number random within the cumulative data increment range of the point; use the base value baseValue plus the random number random as the simulation value of the cumulative data this time.
[0047] Step S300 defines the data simulation warehousing process, which includes the following steps: taking the seed data file of the device as input, collecting the seed data of the device and extracting the content of the seed data through the seed file recognition and analysis process, and based on the preset time interval, executing the data simulation process loop to generate real-time data and cumulative data that conform to the custom generation rules, adding timestamps to the real-time data and cumulative data, and writing the real-time data and cumulative data into the database in the format of the device seed data, wherein the custom generation rules are used to limit the data parameters of the real-time data and the simulation data, including the number of decimal places, length and data range.
[0048] In the data simulation warehousing process, set the data time interval, cyclically generate real-time data and accumulated data according to the time interval, timestamp the data and write it into the database in seed data format. Encapsulate the above process as a service deployment and run it regularly.
[0049] Step S400: Service packaging execution: encapsulate the seed file identification and analysis process, data simulation process and data simulation warehousing process into a service, deploy the service and run the service, call the service interface to input the seed data file of the device to realize the simulation data warehousing.
[0050] Among them, the interface for calling the service interface and uploading the seed data file is as follows Figure 3 After the execution is completed, you can view the running status and verify the data storage, such as Figure 4 shown.
[0051] The method of this embodiment plays an important role in the real-time test of the energy system by analyzing the point characteristics, simulating the relevant point data, and generating simulation test data.
[0052] Embodiment 2:
[0053] The present invention provides an energy test data simulation system, which comprises a seed file identification and analysis definition module, a data simulation definition module, a data simulation storage definition module and a service packaging execution module.
[0054] The seed file identification and analysis definition module is used to define the seed file identification and analysis process. The seed file analysis process includes the following steps: collecting the seed data of the device and extracting the content of the seed data. The content of the seed data includes the device serial number SN, point name, point type and basic data. There are two types of point types, namely real-time data and cumulative data.
[0055] In this embodiment, for real-time data, the basic data includes the maximum value and the minimum value of each point data, and for cumulative data, the basic data includes the maximum value and the minimum value of each point data according to the time growth amount.
[0056] In the seed file identification and analysis process, the required simulated device SN in the seed data is extracted, and the SN is the subsequent simulated data device SN; the device point name and point in the seed data are extracted and analyzed, and the device points are divided into two categories: cumulative data and real-time data; the seed data of each point is extracted, the maximum and minimum values in the seed data of the real-time data point are recorded and stored, and the maximum and minimum growth values of each point in the cumulative data are calculated and stored.
[0057] The data simulation definition module is used to define the data simulation process, which includes the following steps: for real-time data, calculate the point simulation data range of each point data of the real-time data, and generate a random value within the point simulation data range as the simulation value of the real-time data; for cumulative data, calculate the data range of the cumulative data growth amount of each point of the cumulative data, and generate a random number within the data range of the point cumulative data growth amount as the simulation value of the cumulative data.
[0058] In this embodiment, for real-time data, the maximum and minimum values of each point data of the real-time data are calculated as the point simulation data range of the point data, and a value is randomly generated within the point simulation data range as the simulation value of this real-time data.
[0059] For the cumulative data, calculate the maximum and minimum values of the cumulative data point data according to the time growth amount, as the data range of the cumulative data growth amount of the point data. The cumulative data is simulated by the following operations: the cumulative data generated last time is used as the base value baseValue. If there is no data generated last time, the maximum value of the cumulative data in the seed data is used as the base value baseValue. A random number random is generated within the data range of the cumulative data growth amount of the point, and the sum of the base value baseValue and the random number random is used as the simulated value of this cumulative data.
[0060] The data simulation process includes two operations: calculating the simulation data range and simulating the data.
[0061] In the operation of calculating the simulation data range, the maximum and minimum values of each point of the real-time data are calculated as the simulation data range of the point; the maximum and minimum values of the growth amount of each data of the cumulative data according to time are calculated as the data range of the cumulative data growth amount of the point;.
[0062] In the simulation data operation, real-time data simulation: within the point simulation data range, randomly generate values as the real-time data for this time. Cumulative data simulation: take the last generated cumulative data as the base value. If there is no last generated data, use the maximum value of the cumulative data in the seed data as the base value baseValue, and generate a random number random within the cumulative data increment range of the point; use the base value baseValue plus the random number random as the simulation value of the cumulative data this time.
[0063] The data simulation warehousing definition module is used to define the data simulation warehousing process. The data simulation warehousing process includes the following steps: taking the device's seed data file as input, collecting the device's seed data and extracting the content of the seed data through the seed file recognition and analysis process, and based on the preset time interval, executing the data simulation process loop to generate real-time data and cumulative data that conform to the custom generation rules, adding timestamps to the real-time data and cumulative data, and writing the real-time data and cumulative data to the database in the format of the device seed data, wherein the custom generation rules are used to limit the data parameters of the real-time data and simulation data, including the number of decimal places, length, and data range.
[0064] In the data simulation warehousing process, set the data time interval, cyclically generate real-time data and accumulated data according to the time interval, timestamp the data and write it into the database in seed data format. Encapsulate the above process as a service deployment and run it regularly.
[0065] The service encapsulation execution module is used for service encapsulation execution: encapsulating the seed file identification and analysis process, data simulation process and data simulation warehousing process into services, deploying and running services, and calling the service interface to input the seed data file of the device to realize simulated data warehousing.
[0066] The system of this embodiment can execute the method disclosed in Example 1 to realize the simulated storage of energy test data.
[0067] The present invention has been shown and described in detail above through the accompanying drawings and preferred embodiments. However, the present invention is not limited to these disclosed embodiments. Based on the above multiple embodiments, those skilled in the art can know that the means in the above different embodiments can be combined to obtain more embodiments of the present invention, and these embodiments are also within the protection scope of the present invention.
Claims
1. A method for simulating energy test data, characterized in that: The steps include: Define the seed file identification and analysis process. The seed file analysis process includes the following steps: collect the seed data of the device and extract the content of the seed data. The content of the seed data includes the device serial number SN, point name, point type and basic data. There are two types of point types, namely real-time data and cumulative data. Define a data simulation process, which includes the following steps: for real-time data, calculate the point simulation data range of each point data of the real-time data, and generate a random value within the point simulation data range as the simulation value of the real-time data; for cumulative data, calculate the cumulative data growth amount data range of each point of the cumulative data, and generate a random number within the point cumulative data growth amount data range as the simulation value of the cumulative data; Define a data simulation warehousing process, which includes the following steps: using the device's seed data file as input, collecting the device's seed data and extracting the content of the seed data through the seed file recognition and analysis process, and executing the data simulation process loop to generate real-time data and cumulative data that meet the custom generation rules based on a preset time interval, adding timestamps to the real-time data and cumulative data, and writing the real-time data and cumulative data into the database in the format of the device's seed data, wherein the custom generation rules are used to limit the data parameters of the real-time data and simulation data, including the number of decimal places, length, and data range; Service packaging and execution: Encapsulate the seed file identification and analysis process, data simulation process, and data simulation warehousing process into services, deploy and run the services, and call the service interface to input the seed data file of the device to realize the simulation data warehousing.
2. The energy test data simulation method according to claim 1, characterized in that: For real-time data, the basic data includes the maximum and minimum values of the data at each point. For cumulative data, the basic data includes the maximum and minimum values of the data at each point according to the time growth.
3. The energy test data simulation method according to claim 1 or 2, characterized in that: For real-time data, the maximum and minimum values of each point data of the real-time data are calculated as the point simulation data range of the point data, and a value is randomly generated within the point simulation data range as the simulation value of this real-time data.
4. The energy test data simulation method according to claim 1 or 2, characterized in that: For the accumulated data, the maximum and minimum values of the growth amount of each point data of the accumulated data according to time are calculated as the data range of the accumulated data growth amount of the point data; The cumulative data is simulated through the following operations: the cumulative data generated last time is taken as the base value baseValue. If there is no data generated last time, the maximum value of the cumulative data in the seed data is used as the base value baseValue. A random number random is generated within the data range of the point cumulative data growth amount. The sum of the base value baseValue and the random number random is used as the simulated value of this cumulative data.
5. An energy test data simulation device, characterized in that: It includes a seed file identification and analysis definition module, a data simulation definition module, a data simulation storage definition module, and a service packaging execution module; The seed file identification and analysis definition module is used to define the seed file identification and analysis process. The seed file analysis process includes the following steps: collecting the seed data of the device and extracting the content of the seed data. The content of the seed data includes the device serial number SN, point name, point type and basic data. There are two types of point types, namely real-time data and cumulative data; The data simulation definition module is used to define the data simulation process, which includes the following steps: for real-time data, calculate the point simulation data range of each point data of the real-time data, and generate a random value within the point simulation data range as the simulation value of the real-time data; for cumulative data, calculate the data range of the cumulative data growth amount of each point of the cumulative data, and generate a random number within the data range of the cumulative data growth amount of the point as the simulation value of the cumulative data; The data simulation warehousing definition module is used to define the data simulation warehousing process, which includes the following steps: taking the seed data file of the device as input, collecting the seed data of the device and extracting the content of the seed data through the seed file recognition and analysis process, and executing the data simulation process loop to generate real-time data and cumulative data that meet the custom generation rules based on the preset time interval, adding timestamps to the real-time data and cumulative data, and writing the real-time data and cumulative data into the database in the format of the device seed data, wherein the custom generation rules are used to limit the data parameters of the real-time data and the simulation data, including the number of decimal places, length and data range; The service encapsulation execution module is used for service encapsulation execution: encapsulating the seed file identification and analysis process, data simulation process and data simulation warehousing process into services, deploying and running services, and calling the service interface to input the seed data file of the device to realize simulated data warehousing.
6. The energy test data simulation device according to claim 5, characterized in that: For real-time data, the basic data includes the maximum and minimum values of the data at each point. For cumulative data, the basic data includes the maximum and minimum values of the data at each point according to the time growth.
7. The energy test data simulation device according to claim 5 or 6, characterized in that: For real-time data, the maximum and minimum values of each point data of the real-time data are calculated as the point simulation data range of the point data, and a value is randomly generated within the point simulation data range as the simulation value of this real-time data.
8. The energy test data simulation device according to claim 5 or 6, characterized in that: For real-time data and accumulated data, the maximum and minimum values of the time increment of each point data of the accumulated data are calculated as the data range of the accumulated data increment of the point data; The cumulative data is simulated through the following operations: the cumulative data generated last time is taken as the base value baseValue. If there is no data generated last time, the maximum value of the cumulative data in the seed data is used as the base value baseValue. A random number random is generated within the data range of the point cumulative data growth amount. The sum of the base value baseValue and the random number random is used as the simulated value of this cumulative data.