Industrial control system data acquisition multi-database synchronous updating method and related device
By generating a forwarding database in the industrial control system and establishing its mapping relationship with the real-time database, the measurement point forwarding and data synchronization update are realized, solving the problem of additional data forwarding programs in the existing technology to realize multi-database synchronization update, and reducing system maintenance costs.
Patent Information
- Application Number
- CN202510050388.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-13
- Publication Date
- 2025-04-25
AI Technical Summary
In the prior art, additional data forwarding programs are needed to realize the synchronous update of multiple databases in the industrial control system, which increases the system maintenance cost.
By generating a forwarding database and establishing its mapping relationship with the real-time database, measuring point forwarding is performed, and measuring point forwarding events are generated to send to the real-time data acquisition program. When the real-time data acquisition program receives the measurement point forwarding event, it registers the measurement point list that needs to forward the data value, obtains the re-registered measurement point list, and then synchronizes and updates the collected real-time data to the real-time database and the forwarding database according to the list.
Without destroying the existing industrial control data acquisition process, the multi-database synchronization update of industrial control system data is realized, avoiding the need for additional data forwarding programs, thereby reducing system maintenance costs.
Smart Images

Figure CN119884134A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of industrial control system database update, and relates to an industrial control system data acquisition multi-database synchronous update method and related devices. Background Art
[0002] In the industrial control system, the control data of the power generation process is collected in real time to the database, and at the same time, the data of some measuring points are synchronized to the forwarding database. The synchronization process needs to ensure real-time performance and not disrupt the existing industrial control data collection process. The data values to be forwarded include: the control data values sent from the lower computer device and the data values manually set from the upper computer screen. The data content of the measuring point sent by the lower computer device includes the hardware address and real-time data in the measuring point device, but does not include the index address of the measuring point in the real-time database and the forwarding database; the data content manually set on the upper computer screen can include the hardware address of the measuring point device, the setting data and the storage location index of the measuring point in the real-time database, but cannot include the index address of the measuring point in the forwarding database. In addition, since the storage level, sequence and address information of the measuring point data records in the forwarding database are inconsistent with those in the original real-time database, it is impossible to use the real-time data acquisition program to directly write the two databases synchronously.
[0003] In the existing method, the control point data to be forwarded in the real-time database is periodically synchronized to the forwarding database through the data forwarding program. This method requires additional maintenance of a new program, which increases the maintenance cost of the system. Summary of the invention
[0004] The purpose of the present invention is to provide a method and related device for synchronously updating multiple databases of industrial control system data acquisition, so as to solve the technical problem that in the prior art, an additional data forwarding program is needed to realize synchronous updating of multiple databases, which increases the system maintenance cost.
[0005] In order to achieve the above object, the present invention adopts the following technical solutions:
[0006] In a first aspect, the present invention provides a method for synchronously updating multiple databases of industrial control system data acquisition, comprising the following steps:
[0007] Generate a forwarding database and a mapping relationship between the forwarding database and the real-time database, then perform measurement point forwarding, and generate measurement point forwarding events to send to the real-time data acquisition program;
[0008] When the real-time data acquisition program receives a measurement point forwarding event, it registers the measurement point list that needs to forward data values, and obtains a re-registered measurement point list;
[0009] According to the re-registered measuring point list, the collected real-time data are synchronously updated to the real-time database and the forwarding database respectively.
[0010] Furthermore, the step of performing measurement point forwarding and generating a measurement point forwarding event and sending it to the real-time data acquisition program specifically includes:
[0011] Select the measurement points to be forwarded in the real-time database and mark them as true using the agreed field;
[0012] The real-time database is traversed through the measuring point forwarding program, and the measuring point information and real-time database object addresses whose agreed fields are marked as true are forwarded;
[0013] After the measurement point forwarding is completed, the measurement point forwarding program generates a measurement point forwarding event and sends it to the real-time data acquisition program.
[0014] Furthermore, the measuring point information includes a measuring point name, a measuring point type, and a measuring point hardware address; and the real-time library object address represents a storage location index of the measuring point in the real-time database.
[0015] Furthermore, when the real-time data acquisition program receives a measuring point forwarding event, the list of measuring points that need to forward data values is registered to obtain the re-registered measuring point list, which specifically includes: when the real-time data acquisition program receives a measuring point forwarding event from the measuring point forwarding program, it responds to re-register the measuring point list, and uses the hash key value table to re-register all the latest measuring points in the forwarding database to obtain the re-registered measuring point list.
[0016] Furthermore, the measuring point list includes a first measuring point list and a second measuring point list; the first measuring point list stores real-time database object addresses and forwarding database measuring point object addresses; the second measuring point list stores measuring point hardware addresses and forwarding database measuring point object addresses.
[0017] Furthermore, the real-time data includes control data sent by the lower computer device and data sent by manual setting of the upper computer screen.
[0018] Furthermore, the step of synchronously updating the collected real-time data to the real-time database and the forwarding database respectively according to the re-registered measuring point list specifically includes:
[0019] When the real-time data acquisition program receives the control data sent by the lower computer device, the control data sent by the lower computer device is written into the real-time database storage buffer, and then it is determined whether the measuring point is in the second measuring point list. If it is in the second measuring point list, the forwarding database measuring point address of the measuring point is obtained according to the measuring point hardware address, and the forwarding database collection storage buffer is written. Finally, according to the real-time database object address and the forwarding database measuring point object address, the information of the collection storage buffer is written into the real-time database and the forwarding database respectively;
[0020] When the real-time data acquisition program receives the data sent by the manual setting of the upper computer screen, it writes the data sent by the manual setting of the upper computer screen into the real-time database storage buffer, and then determines whether the measuring point is in the first measuring point list. If it is in the first measuring point list, the forwarding database measuring point address of the measuring point is obtained according to the real-time database object address, and it is written into the collection storage buffer of the forwarding database. Finally, according to the real-time database object address and the forwarding database measuring point object address, the information of the collection storage buffer is written into the real-time database and the forwarding database respectively.
[0021] In a second aspect, the present invention provides an industrial control system data acquisition multi-database synchronous update system, comprising:
[0022] The measuring point forwarding module is used to generate a forwarding database and a mapping relationship between the forwarding database and the real-time database, and then perform measuring point forwarding and generate a measuring point forwarding event to send to the real-time data acquisition program;
[0023] The measuring point list re-entry module is used to register the measuring point list that needs to forward data values when the real-time data acquisition program receives the measuring point forwarding event, and obtain the re-registered measuring point list;
[0024] The synchronous update module is used to synchronously update the collected real-time data to the real-time database and the forwarding database according to the re-registered measuring point list.
[0025] In a third aspect, the present invention provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.
[0026] In a fourth aspect, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0027] Compared with the prior art, the present invention has the following beneficial effects:
[0028] The present invention discloses a method for synchronously updating multiple databases for data acquisition in an industrial control system and a related device. The method first generates a forwarding database, then performs measurement point forwarding and sends the measurement point forwarding event to a real-time data acquisition program. When the real-time data acquisition program receives the measurement point forwarding event, the measurement point list for which data value forwarding is required is registered. Finally, according to the re-registered measurement point list, the collected real-time data is synchronously updated to the real-time database and the forwarding database respectively. The present invention realizes synchronous updating of multiple databases for data acquisition in an industrial control system without destroying the existing industrial control data acquisition process and without adding an additional data forwarding program. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0030] Figure 1 is a flow chart of the method of the present invention;
[0031] Figure 2 is a schematic diagram of the system of the present invention;
[0032] Figure 3 It is a schematic diagram of the computer device structure of the present invention. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0034] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0035] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0036] In the description of the embodiments of the present invention, it should be noted that if the terms "upper", "lower", "horizontal", "inner", etc. indicate an orientation or positional relationship based on the orientation or positional relationship shown in the drawings, or the orientation or positional relationship in which the product of the invention is usually placed when in use, it is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. In addition, the terms "first", "second", etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.
[0037] In addition, if the term "horizontal" appears, it does not mean that the component must be absolutely horizontal, but can be slightly tilted. For example, "horizontal" only means that its direction is more horizontal than "vertical", which does not mean that the structure must be completely horizontal, but can be slightly tilted.
[0038] In the description of the embodiments of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "set", "install", "connect", and "connect" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal connection of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0039] The present invention is further described in detail below in conjunction with the accompanying drawings:
[0040] See also Figure 1 The embodiment of the present invention discloses a method for synchronously updating multiple databases of industrial control system data acquisition, including the following steps:
[0041] Step 1, generate a forwarding database, and generate a mapping relationship between the forwarding database and the real-time database, then perform measurement point forwarding, and generate a measurement point forwarding event and send it to the real-time data acquisition program;
[0042] Step 1.1, select the measurement points to be forwarded in the real-time database and mark them as true using the agreed field;
[0043] Step 1.2, traverse the real-time database through the measurement point forwarding program, and forward the measurement point information and real-time database object address whose agreed fields are marked as true;
[0044] Step 1.3, after the measurement point forwarding is completed, the measurement point forwarding program generates a measurement point forwarding event and sends it to the real-time data acquisition program.
[0045] It should be noted that the measuring point information includes the measuring point name, measuring point type, and measuring point hardware address; the real-time library object address represents the storage location index of the measuring point in the real-time database.
[0046] Step 2: When the real-time data acquisition program receives a measurement point forwarding event, it registers a list of measurement points for which data values need to be forwarded, and obtains a re-registered list of measurement points;
[0047] When the real-time data acquisition program receives a measuring point forwarding event from the measuring point forwarding program, it responds to re-register the measuring point list, and re-registers all the latest measuring points in the forwarding database using the hash key table to obtain the re-registered measuring point list.
[0048] It should be noted that the measuring point list includes a first measuring point list and a second measuring point list; the first measuring point list stores real-time database object addresses and forwarding database measuring point object addresses; the second measuring point list stores measuring point hardware addresses and forwarding database measuring point object addresses.
[0049] Step 3: According to the re-registered measuring point list, the collected real-time data is synchronously updated to the real-time database and the forwarding database respectively.
[0050] It is important to note that the real-time data includes the control data sent by the lower computer and the data sent by the upper computer screen manually.
[0051] When the real-time data acquisition program receives the control data sent by the lower computer device, the control data sent by the lower computer device is written into the real-time database storage buffer, and then it is determined whether the measuring point is in the second measuring point list. If it is in the second measuring point list, the forwarding database measuring point address of the measuring point is obtained according to the measuring point hardware address, and the forwarding database collection storage buffer is written. Finally, according to the real-time database object address and the forwarding database measuring point object address, the information of the collection storage buffer is written into the real-time database and the forwarding database respectively;
[0052] When the real-time data acquisition program receives the data sent by the manual setting of the upper computer screen, it writes the data sent by the manual setting of the upper computer screen into the real-time database storage buffer, and then determines whether the measuring point is in the first measuring point list. If it is in the first measuring point list, the forwarding database measuring point address of the measuring point is obtained according to the real-time database object address, and it is written into the collection storage buffer of the forwarding database. Finally, according to the real-time database object address and the forwarding database measuring point object address, the information of the collection storage buffer is written into the real-time database and the forwarding database respectively.
[0053] See also Figure 2The embodiment of the present invention discloses a multi-database synchronous update system for industrial control system data acquisition, including a measuring point forwarding module, a measuring point list re-entry module and a synchronous update module.
[0054] It should be noted that the measuring point forwarding module is used to generate a forwarding database and a mapping relationship between the forwarding database and the real-time database, and then perform measuring point forwarding and generate a measuring point forwarding event to send to the real-time data acquisition program; the measuring point list re-injection module is used to register the measuring point list that needs to forward data values when the real-time data acquisition program receives the measuring point forwarding event, and obtain the re-registered measuring point list; the synchronous update module is used to synchronously update the collected real-time data to the real-time database and the forwarding database according to the re-registered measuring point list.
[0055] Example:
[0056] This embodiment proposes a method for synchronously updating multiple databases for industrial control system data collection, which realizes synchronous updating of multiple databases for industrial control system data collection without disrupting the existing industrial control data collection process and without adding an additional data forwarding program.
[0057] The specific design is as follows:
[0058] 1. Generate a forwarding database and a mapping relationship between the forwarding database and the real-time database
[0059] 1) In the real-time database, manually select the measurement points to be forwarded and mark them as true using the agreed field.
[0060] 2) The measuring point forwarding program traverses the real-time database and forwards the measuring point information and real-time library object address whose agreed fields are marked as true. The measuring point information includes the measuring point name, measuring point type, measuring point hardware address and other information. The real-time library object address represents the storage location index of the measuring point in the real-time database.
[0061] 3) After the measurement point forwarding is completed, the measurement point forwarding program generates a measurement point forwarding event and sends it to the real-time data acquisition program.
[0062] 2. The real-time data acquisition program registers the list of measurement points that need to forward data values:
[0063] The real-time data acquisition program receives the measurement point forwarding event from the measurement point forwarding program, and responds to it by re-registering the measurement point list, that is, using the hash key table to re-register all the latest measurement points in the forwarding database. The registration list contains two formats, respectively <real-time database object address, forwarding database measurement point object address> and <measurement point hardware address, forwarding database measurement point object address>.
[0064] 3. The real-time data collection program will synchronously update the collected real-time data to the real-time database and forwarding database:
[0065] 1) For the control data sent by the lower device, after the real-time data acquisition program receives it, it will first write it into the real-time database storage buffer, and then determine whether the measuring point is in the forwarding measuring point subscription list <measuring point hardware address, forwarding database measuring point object address>: If it is, according to the measuring point hardware address, the forwarding database measuring point address of the measuring point is obtained, and it is written into the acquisition storage buffer of the forwarding database. Finally, according to the real-time database object address and the forwarding database measuring point object address, the information of the acquisition storage buffer is written into the real-time database and the forwarding database respectively.
[0066] 2) For the data sent manually from the upper computer screen, after the real-time data acquisition program receives it, it will first write it into the real-time database storage buffer, and then determine whether the measuring point is in the forwarding measuring point subscription list <real-time database object address, forwarding database measuring point object address>: If so, according to the real-time database object address, the forwarding database measuring point address of the measuring point is obtained, and written into the collection storage buffer of the forwarding database, and finally, according to the real-time database object address and the forwarding database measuring point object address, the information of the collection storage buffer is written into the real-time database and the forwarding database respectively.
[0067] In one embodiment of the present invention, see Figure 3 , a computer device is provided, the computer device includes a processor and a memory, the memory is used to store a computer program, the computer program includes program instructions, and the processor is used to execute the program instructions stored in the computer storage medium. The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. It is the computing core and control core of the terminal, which is suitable for implementing one or more instructions, and is specifically suitable for loading and executing one or more instructions in the computer storage medium to implement the corresponding method flow or corresponding function; the processor described in the embodiment of the present invention can be used for the operation of the method for synchronously updating multiple databases for data acquisition in an industrial control system.
[0068] The present invention also provides a storage medium, specifically a computer-readable storage medium (Memory), which is a memory device in a computer device for storing programs and data. It is understandable that the computer-readable storage medium here can include both built-in storage media in the computer device and, of course, extended storage media supported by the computer device. The computer-readable storage medium provides a storage space, which stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by a processor are also stored in the storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk memory. The processor can load and execute one or more instructions stored in the computer-readable storage medium to implement the corresponding steps of the method for synchronously updating multiple databases for data acquisition of an industrial control system in the above embodiment.
[0069] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0070] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0071] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1A function specified in one or more boxes.
[0072] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0073] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for synchronously updating multiple databases for data acquisition in an industrial control system, characterized in that: The following steps are involved: Generate a forwarding database and a mapping relationship between the forwarding database and the real-time database, then perform measurement point forwarding, and generate measurement point forwarding events to send to the real-time data acquisition program; When the real-time data acquisition program receives a measurement point forwarding event, it registers the measurement point list that needs to forward data values, and obtains a re-registered measurement point list; According to the re-registered measuring point list, the collected real-time data are synchronously updated to the real-time database and the forwarding database respectively.
2. The method for synchronously updating multiple databases of industrial control system data acquisition according to claim 1 is characterized in that: The step of performing measurement point forwarding and generating a measurement point forwarding event and sending it to the real-time data acquisition program specifically includes: Select the measurement points to be forwarded in the real-time database and mark them as true using the agreed field; The real-time database is traversed through the measuring point forwarding program, and the measuring point information and real-time database object addresses whose agreed fields are marked as true are forwarded; After the measurement point forwarding is completed, the measurement point forwarding program generates a measurement point forwarding event and sends it to the real-time data acquisition program.
3. The method for synchronously updating multiple databases of industrial control system data acquisition according to claim 2 is characterized in that: The measuring point information includes the measuring point name, measuring point type, and measuring point hardware address; the real-time library object address represents the storage location index of the measuring point in the real-time database.
4. The method for synchronously updating multiple databases of industrial control system data acquisition according to claim 1 is characterized in that: The step of registering a list of measuring points that need to forward data values when the real-time data acquisition program receives a measuring point forwarding event to obtain a re-registered list of measuring points specifically includes: when the real-time data acquisition program receives a measuring point forwarding event from a measuring point forwarding program, responding to it to re-register the measuring point list, and re-registering all the latest measuring points in the forwarding database using a hash key value table to obtain a re-registered list of measuring points.
5. The method for synchronously updating multiple databases of industrial control system data acquisition according to claim 4 is characterized in that: The measuring point list includes a first measuring point list and a second measuring point list; the first measuring point list stores real-time database object addresses and forwarding database measuring point object addresses; the second measuring point list stores measuring point hardware addresses and forwarding database measuring point object addresses.
6. The method for synchronously updating multiple databases of industrial control system data acquisition according to claim 1 is characterized in that: The real-time data includes control data sent by the lower computer device and data sent by the upper computer screen manually set.
7. The method for synchronously updating multiple databases of industrial control system data acquisition according to claim 6 is characterized in that: The step of synchronously updating the collected real-time data to the real-time database and the forwarding database according to the re-registered measuring point list specifically includes: When the real-time data acquisition program receives the control data sent by the lower computer device, the control data sent by the lower computer device is written into the real-time database storage buffer, and then it is determined whether the measuring point is in the second measuring point list. If it is in the second measuring point list, the forwarding database measuring point address of the measuring point is obtained according to the measuring point hardware address, and the forwarding database collection storage buffer is written. Finally, according to the real-time database object address and the forwarding database measuring point object address, the information of the collection storage buffer is written into the real-time database and the forwarding database respectively; When the real-time data acquisition program receives the data sent by the manual setting of the upper computer screen, it writes the data sent by the manual setting of the upper computer screen into the real-time database storage buffer, and then determines whether the measuring point is in the first measuring point list. If it is in the first measuring point list, the forwarding database measuring point address of the measuring point is obtained according to the real-time database object address, and it is written into the collection storage buffer of the forwarding database. Finally, according to the real-time database object address and the forwarding database measuring point object address, the information of the collection storage buffer is written into the real-time database and the forwarding database respectively.
8. An industrial control system data acquisition multi-database synchronous update system, characterized in that: include: The measuring point forwarding module is used to generate a forwarding database and a mapping relationship between the forwarding database and the real-time database, and then perform measuring point forwarding and generate a measuring point forwarding event to send to the real-time data acquisition program; The measuring point list re-entry module is used to register the measuring point list that needs to forward data values when the real-time data acquisition program receives the measuring point forwarding event, and obtain the re-registered measuring point list; The synchronous update module is used to synchronously update the collected real-time data to the real-time database and the forwarding database according to the re-registered measuring point list.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.