Novel data interaction method for force control monitoring configuration system and MySQL database
By establishing data tables in MySQL database and using ADO components to optimize data transmission, the Power Control Monitoring Configuration System solves the problem of low data interaction efficiency, realizes more efficient data transmission and configuration management, and improves the real-time and user of the system Experience.
Patent Information
- Application Number
- CN202411093056.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-09
- Publication Date
- 2024-11-22
AI Technical Summary
The data interaction between the existing powerful control and monitoring configuration systems and MySQL databases is not efficient, especially when processing a large number of device points, resulting in complex database management and low retrieval efficiency.
Establish a data table in the MySQL database, monitor the connection between the configuration system and the MySQL database through force control, edit scripts to realize personalized data forwarding, group devices for data retrieval and transmission, and optimize data block sending using the ExcuteSQL method of the ADO component, and set appropriate settings forwarding cycle to improve efficiency.
It simplifies the configuration of equipment information, improves data transmission efficiency and concurrency, reduces the number of IO times, improves data logic and understanding, and significantly improves data transmission efficiency.
Smart Images

Figure CN119003526A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data structure and algorithm, and in particular to a new data interaction method between a force control monitoring configuration system and a MySQL database. Background Art
[0002] The force control monitoring configuration system can collect data information of industrial equipment in real time, so as to monitor the operation status of the equipment. The real-time database of the force control monitoring configuration system takes points as the basic data objects of the database, organizes points in a tree structure, and manages point "parameters". Point parameters are the names of data items containing a value (integer, real, string, etc.). The general standard point parameters are PV, NAME, DESC, etc.
[0003] It is not convenient and efficient for external applications to access the real-time database of the force control monitoring configuration system. Therefore, forwarding data to the MySQL database in the force control monitoring configuration system can make it more convenient and quick to use the data. The real-time database of the force control monitoring configuration system provides an interface for interaction with third-party databases, such as ODBC, but the data forwarded to the relational database by the ODBCRouter module of the force control monitoring configuration system is recorded as a point. When the number of points is large, the management of the third-party database becomes complicated and cumbersome, and the retrieval efficiency will be significantly reduced. In actual applications, PV (process measurement value) is used more frequently. If the PV values of multiple points of a device are combined into a relational database record, the data can be transmitted in batches, which can significantly improve the data transmission efficiency. Therefore, we propose a new data interaction method between the force control monitoring configuration system and the MySQL database. Summary of the invention
[0004] The purpose of the present invention is to solve the shortcomings of the prior art and to propose a new data interaction method between a force control monitoring configuration system and a MySQL database.
[0005] In order to achieve the above object, the present invention adopts the following technical solutions:
[0006] A new data interaction method between a force control monitoring configuration system and a MySQL database includes the following steps:
[0007] A. Create the data table that needs to be forwarded in the MySQL database.
[0008] B. Establish a connection between the real-time data of the force control monitoring configuration system and the MySQL database.
[0009] C. Edit the script in the action script of the force control monitoring configuration software to realize the personalized data forwarding function.
[0010] C1. Get the required forwarding device from the MySQL database.
[0011] C2. Extract the required data from the force control monitoring configuration soft real-time database.
[0012] C3. Data is forwarded to the MySQL database.
[0013] C4. Continuous data forwarding: according to application needs, the forwarding program is executed periodically to complete uninterrupted data transmission.
[0014] Preferably, each device in step A is a record, including several fields of information of the device.
[0015] Preferably, in step B, the ADO component of the force control monitoring configuration system is used to establish a connection between the two databases through ODBC.
[0016] Preferably, in step C1, the ExecuteSQL method of the ADO component of the force control monitoring configuration system is used to retrieve a list of devices that need to forward data. There are a large number of devices and they need to be grouped. It is recommended to group them according to the number of CPU logical processors.
[0017] Preferably, in step C2, the point variables of the force control monitoring configuration soft real-time database can be directly read by point name.
[0018] Preferably, the data information of each device in step C3 constitutes a data record, and all data records in each group of devices constitute a data block, and the data is sent to the MySQL database using the ExecuteSQL method of the ADO component. If there are a large number of devices in the group, data is sent in multiple times.
[0019] Preferably, in step C4, strong real-time performance is required, and the forwarding cycle time is set shorter, otherwise the forwarding cycle time is set longer.
[0020] Compared with the prior art, the present invention has the following beneficial effects:
[0021] 1. The present invention configures the device information in the MySQL database through step A, and the addition, deletion and modification are convenient and simple to implement. In the force control monitoring configuration system, the operation is based on points. Assuming that a device has k points, if the device configuration is operated in the force control monitoring configuration system, the workload will be k times that in MySQL.
[0022] 2. The present invention groups the devices through step C1, and each group is executed by one thread, which improves concurrency, that is, it can ensure the integrity of data transmission, and can also reduce the number of IOs and improve data transmission efficiency. Assuming there are m devices, each device has k data points, and one point is transmitted each time, the number of IOs is m*k. If the transmission is carried out in a grouped form according to the record, if there are 20 devices in each group, the number of IOs is m / 20.
[0023] 3. In the present invention, through step C3, it is assumed that a device has m data that need to be forwarded to the database, and these m data are grouped into a data group, and then the device ID is added, corresponding to a relational database record. The amount of forwarded data of a device is m+1. If a single forwarding is performed, the amount of forwarded data is 2m. The larger the m value is, the more obvious the efficiency improvement is, and the data is more logical and easier to understand and remember. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is a flow chart of data forwarding algorithm;
[0025] Figure 2 It is the real-time database of the force control monitoring configuration system;
[0026] Figure 3 It is the inverter parameter setting table in the MySQL database;
[0027] Figure 4 It is forwarded to the data table in the MySQL database. DETAILED DESCRIPTION
[0028] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0029] See also Figure 1-Figure 4 A new data interaction method between a force control monitoring configuration system and a MySQL database includes the following steps:
[0030] A. Create the data table that needs to be forwarded in the MySQL database.
[0031] B. Establish a connection between the real-time data of the force control monitoring configuration system and the MySQL database.
[0032] C. Edit the script in the action script of the force control monitoring configuration software to realize the personalized data forwarding function.
[0033] C1. Get the required forwarding device from the MySQL database.
[0034] C2. Extract the required data from the force control monitoring configuration soft real-time database.
[0035] C3. Data is forwarded to the MySQL database.
[0036] C4. Continuous data forwarding: according to application needs, the forwarding program is executed periodically to complete uninterrupted data transmission.
[0037] As a technical optimization solution of the present invention, each device in step A is a record, which includes several fields of the device information.
[0038] As a technical optimization solution of the present invention, in step B, the ADO component of the force control monitoring configuration system is used to establish a connection between the two databases through ODBC.
[0039] As a technical optimization solution of the present invention, in step C1, the ExecuteSQL method of the ADO component of the force control monitoring configuration system is used to retrieve a list of devices that need to forward data. There are a large number of devices and they need to be grouped. It is recommended to group them according to the number of CPU logical processors.
[0040] As a technical optimization solution of the present invention, the point variables of the force control monitoring configuration soft real-time database in step C2 can be directly read according to the point name.
[0041] As a technical optimization solution of the present invention, the data information of each device in step C3 constitutes a data record, and all data records in each group of devices constitute a data block, and the data is sent to the MySQL database using the ExecuteSQL method of the ADO component. If there are a large number of devices in the group, data is sent in multiple times.
[0042] As a technical optimization solution of the present invention, in step C4, strong real-time performance is required, and the forwarding cycle time is set shorter, otherwise the forwarding cycle time is set longer.
[0043] Implementation Example Solar Photovoltaic Inverter Data Forwarding Example
[0044] Some solar photovoltaic inverters are scattered and installed in the open field. The communication adopts the wireless 4G / 5G mode, and the data is transmitted back to the data center through the DTU. The data center server is equipped with a power control monitoring configuration system to collect data from the inverter. The real-time data format of the power control monitoring configuration system is as follows: Figure 2 .
[0045] 1. First, enter the inverter information in the MySQL data table and determine the data to be collected, such as Figure 3 .
[0046] 2. Use ADO components to establish a connection with the MySQL data table in Likong.
[0047] 3. Read the data of the required data points in the force control real-time database.
[0048] 4. Use the ExecuteSQL method of the ADO component to write the data into the MySQL data table. Figure 4 .
[0049] 5. Close the database connection.
[0050] The present invention solves the problem of inconvenient and inefficient access to the force control real-time database. To configure forwarding data in the force control monitoring configuration system, it is necessary to configure point by point, which is a large workload, and the program needs to be recompiled and restarted after each configuration. A forwarding program is developed in the force control monitoring configuration system script program, so that data transmission parameters can be flexibly configured in an external database to achieve data forwarding. There is no need to restart the force control monitoring configuration system, and the normal operation of the force control monitoring configuration system is not affected. By classifying, reorganizing and combining data, the redundancy of data transmission is reduced, and the transmission efficiency and real-time performance are improved. Provide users with a better experience.
[0051] The above are only preferred specific implementation modes of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical solutions and inventive concepts of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A new data interaction method between the force control monitoring configuration system and the MySQL database, It is characterized in that The steps include: A. Create the data table that needs to be forwarded in the MySQL database. B. Establish a connection between the real-time data of the force control monitoring configuration system and the MySQL database. C. Edit the script in the action script of the force control monitoring configuration software to realize the personalized data forwarding function. C1. Get the required forwarding device from the MySQL database. C2. Extract the required data from the force control monitoring configuration soft real-time database. C3. Data is forwarded to the MySQL database. C4. Continuous data forwarding: according to application needs, the forwarding program is executed periodically to complete uninterrupted data transmission. D. The forwarding task is completed and the connection between the force control monitoring configuration system and the MySQL database is closed.
2. According to the new data interaction method between the force control monitoring configuration system and the MySQL database as described in claim 1, Features: In step A, each device is a record, which includes several fields of information about the device.
3. According to the new data interaction method between the force control monitoring configuration system and the MySQL database as described in claim 1, Features: In the step B, the ADO component of the force control monitoring configuration system is used to establish a connection between the two databases through ODBC.
4. According to the new data interaction method between the force control monitoring configuration system and the MySQL database as described in claim 1, Features: In the step C1, the ExecuteSQL method of the ADO component of the force control monitoring configuration system is used to retrieve a list of devices that need to forward data. There are a large number of devices and they need to be grouped. It is recommended to group them according to the number of CPU logical processors.
5. According to the new data interaction method between the force control monitoring configuration system and the MySQL database as described in claim 1, Features: In the step C2, the point variables of the force control monitoring configuration soft real-time database can be directly read according to the point name.
6. According to the new data interaction method between the force control monitoring configuration system and the MySQL database as described in claim 1, Features: In step C3, the data information of each device forms a data record, and all data records in each group of devices form a data block, and the data is sent to the MySQL database using the ExecuteSQL method of the ADO component. If there are a large number of devices in the group, data transmission is performed in multiple times.
7. According to claim 1, a new data interaction method between a force control monitoring configuration system and a MySQL database, Features: In the step C4, if the real-time performance is strong, the forwarding cycle time is set shorter, otherwise the forwarding cycle time is set longer.
