Real-time database system

By designing a real-time database system that supports multiple data structures, combined with Redis open source database and event triggering technology, the problem of insufficient adaptability and scalability of the existing real-time database system is solved, and efficient and cost-effective real-time data management is achieved. Suitable for a variety of development platforms and system components.

CN119311743APending Publication Date: 2025-01-14ZHONGYE-CHANGTIAN INT ENG CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411407045.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-10
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

The existing real-time database system has shortcomings in adaptability, scalability and cost-effectiveness, and it is difficult to meet the needs of small and medium-sized projects.

Method used

A real-time database system supporting multiple data structures is designed, including data acquisition module, data processing module and system management module. Different types of point data are stored through hash, key value, LIST and other data structures, and event triggering is used. It improves data acquisition and write back performance and combines Redis open source database to achieve efficient and highly adaptable real-time data management.

Benefits of technology

It realizes efficient storage and processing of different types of points, supports real-time data reading/writing operations at second level, has strong adaptability, cost-effectiveness, scalability, is suitable for a variety of development platforms and system components, reducing projects cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119311743A_ABST
    Figure CN119311743A_ABST
Patent Text Reader

Abstract

The invention discloses a real-time database system, which is applied to the field of databases and comprises a real-time database supporting various data structures, a data acquisition module, a system management module, a data processing module and a data operation interface, the real-time database is respectively connected with the data operation interface, the data processing module and the data acquisition module, and the data acquisition module is respectively connected with the system management module and the data processing module; the real-time database is a real-time database which supports multiple data structures and is obtained by designing an open source database in advance according to the intermediate variables, the time sequence point locations, all parameters associated with the same service and the point locations actually existing in the lower computer system. The real-time database has the advantages of being large in supporting point capacity, high in adaptability to various development platforms and low in coupling with various system components, supports second-level real-time data reading / writing operation, and has universality, high adaptability, high cost performance and expandability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of databases, and in particular to a real-time database system. Background Art

[0002] Industrial real-time database is one of the key information management and data processing tools in modern industrial production. With the continuous improvement of industrial automation level and the development of intelligent production, the role of industrial real-time database is becoming increasingly prominent. In traditional industrial production, a large amount of data generated in the production process is often managed by manual records or simple data acquisition systems. The data processing and analysis efficiency is low, which easily leads to untimely and inaccurate information and cannot meet the needs of real-time monitoring and control. The emergence of industrial real-time database solves this problem. It is an efficient and reliable data management system that can collect, store, process and analyze a large amount of industrial data in real time, providing strong support for the monitoring, control and optimization of the production process.

[0003] At present, the real-time databases used in the industrial control industry are mainly self-developed or purchased. The self-developed real-time databases are mainly implemented through the shared memory method, which is highly personalized, not highly adaptable to different development platforms, and lacks scalability. The purchased real-time database undoubtedly increases the cost of the project, and for small and medium-sized projects, the cost-effectiveness of purchasing a real-time database is not high.

[0004] Therefore, how to develop a real-time database system with strong adaptability, high cost performance and scalability is a technical problem that needs to be solved urgently. Summary of the invention

[0005] In view of this, an object of the present invention is to provide a real-time database system, which solves the problems of poor adaptability, poor scalability and low cost performance of real-time databases in the prior art.

[0006] In order to solve the above technical problems, the present invention provides a real-time database system, comprising:

[0007] Supports real-time databases, data acquisition modules, system management modules, data processing modules and data operation interfaces with multiple data structures;

[0008] The real-time database is connected to the data operation interface, the data processing module and the data acquisition module respectively, and the data acquisition module is connected to the system management module and the data processing module respectively;

[0009] The real-time database is a real-time database supporting multiple data structures obtained by pre-designing an open source database for intermediate variables, time sequence points, all parameters associated with the same business, and points actually existing in the lower computer system.

[0010] Optionally, the acquisition module is used to load the point information of the point configuration information table to obtain real-time point data values, and save them in the real-time database.

[0011] Optionally, the data acquisition module includes:

[0012] An actual point information storage unit, used to store the real-time actual point attribute information in the real-time point data value in the real-time database through a hash structure;

[0013] An internal point information storage unit, used for storing the real-time internal point data values ​​for the intermediate variables in the real-time point data values ​​in the real-time database through a key value structure;

[0014] A time series data storage unit, used for storing the real-time time series point data values ​​in the real-time point data values ​​in the real-time database through a LIST structure;

[0015] The key parameter sequence data storage unit is used to store all parameter point data values ​​associated with the same business in the real-time point data values ​​in the real-time database through a hash structure.

[0016] Optionally, the data acquisition module is specifically used to load the point information of the point configuration information table, obtain real-time point data values ​​by event triggering, and save them in the real-time database.

[0017] Optionally, the point configuration information table includes a primary key, a point name, a point type, an OPC Server code, a PLC point address, a data point update frequency, whether to store historical data, a frequency of storing historical data, a unit, and a unit description.

[0018] Optionally, the data processing module includes:

[0019] A minute average value calculation unit is used to establish a cache queue with a length of 60 for the target point, and calculate the average value in the cache queue once a second to obtain the minute average value of the point;

[0020] A data archiving unit, used to store the point minute average value in a database according to the archiving frequency in the point configuration information table;

[0021] The data write-back unit is used to write the write-back point information back to the lower computer system according to the business needs of the client.

[0022] Optionally, the data write-back unit includes:

[0023] A script writing subunit, used for writing a write-back script based on the Lua scripting language when the client's business needs require a data write-back function;

[0024] A sending subunit, used for sending the write-back script to the server of the real-time database, so that the server completes the polling scan and business logic of the point according to the write-back script, and outputs the write-back point information;

[0025] The write-back subunit is used to write the write-back point information back to the lower computer system.

[0026] Optionally, the system management module is used to modify, add or delete the point information in the point configuration information table online using SqlTableDependency technology.

[0027] Optionally, also include:

[0028] The historical database is used to store historical point information that has historical data storage requirements. The historical database is connected to the data processing module, the system management model and the data acquisition module respectively.

[0029] Optionally, the real-time database is a Redis real-time database that supports multiple data structures and is obtained by pre-designing the Redis open source database for intermediate variables, time series points, all parameters associated with the same business, and points actually existing in the lower computer system.

[0030] It can be seen that the system includes a real-time database, a data acquisition module, a data processing module and a data operation interface that support multiple data structures; the real-time database is connected to the data operation interface, the data processing module and the data acquisition module respectively, the system management module is connected to the data acquisition module, and the data processing module is connected to the data acquisition module; the real-time database is a real-time database that supports multiple data structures by designing the open source database in advance for intermediate variables, time sequence points, all parameters associated with the same business and the points actually existing in the lower computer system. The system includes a real-time database that supports multiple data structures, so that the real-time database can meet the multiple functional requirements of the client. For different types of points, the real-time database has a corresponding storage structure, and the function of the real-time database system is realized through the data acquisition module, the data processing module, the system management module and the data operation interface. The real-time database of the present invention has the characteristics of large supporting point capacity, strong adaptability to each development platform and low coupling with each system component, supports the read / write operation of second-level real-time data, has versatility, strong adaptability, high cost performance and scalability. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, 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 embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0032] Figure 1 A schematic diagram of the structure of a real-time database system provided by an embodiment of the present invention;

[0033] Figure 2 A structural diagram of another real-time database system provided by an embodiment of the present invention;

[0034] Figure 1 and Figure 2 In the figure, the reference numerals are described as follows:

[0035] 10-data processing module, 20-data operation interface, 30-system management module, 40-real-time database, 50-data acquisition module, 60-historical database. DETAILED DESCRIPTION

[0036] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution 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 only part of the embodiments of the present invention, not all of the embodiments. 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.

[0037] Industrial real-time database is one of the key information management and data processing tools in modern industrial production. With the continuous improvement of industrial automation level and the development of intelligent production, the role of industrial real-time database is becoming increasingly prominent. Industrial real-time database usually has the following characteristics:

[0038] (1) High performance: Able to process large-scale data and respond in real time, ensuring real-time monitoring and control of the production process.

[0039] (2) High reliability: It has data backup, fault tolerance and recovery mechanisms to ensure data security and reliability.

[0040] (3) Flexibility: It supports multiple data types and formats, has good scalability and adaptability, and can be customized and configured according to different production needs.

[0041] (4) Real-time: It can collect and process data in real time and provide real-time monitoring and analysis functions to help enterprises identify problems in a timely manner and make corresponding responses.

[0042] (5) Integration: Ability to integrate with other systems and equipment to achieve data sharing and information exchange, and improve the efficiency and level of production management.

[0043] In summary, the industrial real-time database is an efficient and reliable data management system that can collect, store, process and analyze a large amount of industrial data in real time, providing strong support for the monitoring, control and optimization of the production process. Therefore, the industrial real-time database plays an important role in industrial production, providing enterprises with powerful data management and information processing capabilities, helping to improve production efficiency, reduce costs, improve product quality, and promote the development of industrial production towards intelligence and digitalization.

[0044] At present, the real-time databases used in the industrial control industry are mainly self-developed or purchased. The self-developed real-time databases are mainly implemented through the shared memory method, which is highly personalized and cannot be adapted to other development platforms, so the scalability is insufficient; and the purchased real-time databases undoubtedly increase the cost of the project, and for small and medium-sized projects, the cost-effectiveness of purchasing real-time databases is not high. Therefore, the present invention provides a real-time data set system that can solve the above problems. For details, please refer to Figure 1 , Figure 1 A structural diagram of a real-time database system provided by an embodiment of the present invention. It may include:

[0045] A real-time database 40, a data acquisition module 50, a system management module 30, a data processing module 10 and a data operation interface 20 supporting various data structures;

[0046] The real-time database 40 is connected to the data operation interface 20, the data processing module 10 and the data acquisition module 50 respectively, and the data acquisition module 50 is connected to the system management module 30 and the data processing module 10 respectively;

[0047] The real-time database 40 is a real-time database 40 that supports multiple data structures and is pre-designed for an open source database with respect to intermediate variables, time sequence points, all parameters associated with the same business, and points actually existing in the lower computer system.

[0048] In this embodiment, the real-time database 40 is connected to the data operation interface 20, the data processing module 10 and the data acquisition module 50 respectively, and the data acquisition module 50 is connected to the system management module 30 and the data processing module 10 respectively, so as to form a real-time database system. Among them, the real-time database 40 supports multiple data structures, such as the internal point data structure set for the intermediate variables, the time sequence data structure set for the time sequence point, the key parameter sequence data structure set for all parameters associated with the same business, and the actual point data structure set for the actual point in the lower computer system, so as to form a real-time database 40 supporting multiple data structures.

[0049] The real-time database 40 is described below:

[0050] A real-time database 40 supporting multiple data structures is obtained by pre-designing the open source database for intermediate variables, time series points, all parameters associated with the same business, and points actually existing in the lower computer system. This embodiment does not limit the open source database. For example, it can be a Redis (a high-performance key-value pair storage system) database, or it can also be a MongoDB (a non-relational database); or it can also be an HBase (a distributed, scalable database) database. This embodiment can be based on any open source database to obtain a real-time database 40, which can realize the storage and call of real-time data, and realize the reading and writing back of data through a unified data operation interface 20.

[0051] Redis (Remote Dictionary Server) is an open source, memory-based data storage system and a type of key-value database. It supports a variety of data structures, including strings, hash tables, lists, sets, sorted sets, etc. It provides a wealth of data operation commands and is suitable for data storage and processing requirements in various scenarios. At the same time, Redis has efficient data storage and processing capabilities, can process large-scale data and respond in real time, and is suitable for various high-performance, high-concurrency application scenarios. Therefore, this embodiment can implement corresponding storage structures for different types of data points according to functional requirements based on the open source, data structure diversity and high-performance characteristics of the Redis database, and implement the functions of the real-time database system through the data acquisition module 50, the data processing module 10, the system management module 30 and the data operation interface 20.

[0052] In this embodiment, the real-time database 40 can be obtained by structural design based on the open source memory database Redis. The storage structure of the real-time database 40 mainly includes: (1) actual point data structure, (2) internal point data structure, (3) time series data structure and (4) key parameter series data structure according to different points.

[0053] (1) Actual point data structure:

[0054] The actual points are set for the points that actually exist in the lower computer system (PLC (Programmable Logic Controller), DCS (Distributed Control System), Scada (Supervisory Control and Data Acquisition), etc.). In the database, key and field are two basic and important concepts, which together define the structure and integrity of the data. The key is mainly used to uniquely identify and associate data, while the field is the column of the database table, which is used to store specific data items. The actual points are stored using a hash structure. The key is set according to the tag_Name (point name) in the point configuration information table. For specific Field information, please refer to Table 1.

[0055] Table 1 Field information of actual point data structure

[0056]

[0057] (2) Internal point data structure:

[0058] Internal points are set for intermediate variables, using the simplest key / value structure, with the internal variable name as the key value. Intermediate variables are also hidden points.

[0059] (3) Time series data structure:

[0060] The time series sequence is mainly used to display real-time curves. It adopts the LIST structure (the LIST structure refers to the linear list (List) in the data structure and its specific implementation in the programming language) and uses the data point name as the key value. The corresponding Value is the time series value.

[0061] (4) Key parameter sequence data structure:

[0062] The key parameter sequence is used to store parameters related to the same business. These parameters are stored in a continuous address area to facilitate one-time reading by the program. The hash structure is used to implement it. The parameter type plus the List suffix is ​​used as the key value, such as FloatList, BoolList, IntList, and the corresponding Field is the address index and the corresponding value. Among them, FloatList, BoolList, and IntList are classes or modules used to process list objects of different data types.

[0063] The real-time database 40 in this embodiment supports multiple data structures, by setting an internal point data structure for intermediate variables, setting a time series data structure for time series points, setting a key parameter sequence data structure for all parameters associated with the same business, and setting an actual point data structure for the points actually existing in the lower computer system. Such a real-time database 40 has the characteristics of large supporting point capacity, strong adaptability to various development platforms, and low coupling with various system components, and supports read / write operations of real-time data in seconds. In addition, it is designed based on an open source database and has high cost performance.

[0064] The data acquisition module 50 is described below:

[0065] The data acquisition module 50 loads the point information of the point configuration information table to obtain real-time point data values ​​and saves them in the real-time database 40 .

[0066] Specifically, this embodiment can store the data point information to be collected in the point configuration information table, where the point configuration information table may include the primary key, point name, point type, OPC Server (OPC server is a server software based on the OPC specification, mainly used to realize data exchange and integrated communication in industrial automation systems) code, PLC (programmable logic controller) point address, data point update frequency, whether to store historical data, the frequency of storing historical data, units and unit descriptions. For details, please refer to Table 2, which is the point configuration information table:

[0067] Table 2 Point configuration information table

[0068]

[0069] The data acquisition module 50 loads the point information of the point configuration information table, obtains the real-time point data value through the OPC communication protocol (OPC UA (Open Platform Communications Unified Architecture) and OPCDA (OPC Data Access, used to achieve efficient and real-time data exchange between automation equipment)), and saves it in the real-time database 40. Further, in order to ensure the performance of the data acquisition module 50, the data acquisition module 50 loads the point information of the point configuration information table, obtains the real-time point data value by event triggering, and saves it in the real-time database 40.

[0070] Specifically, this embodiment adopts an event triggering method to obtain real-time position, rather than a synchronous or asynchronous timing reading method, which can effectively improve the performance of the data acquisition module 50.

[0071] The real-time database 40 in this embodiment supports multiple data structures. Accordingly, the data acquisition module 50 may specifically include:

[0072] An actual point information storage unit, used to store the real-time actual point attribute information in the real-time point data value in the real-time database 40 through a hash structure;

[0073] An internal point information storage unit, used to store the real-time internal point data values ​​for the intermediate variables in the real-time point data values ​​in the real-time database 40 through a key value structure;

[0074] A time series data storage unit, used for storing the real-time time series point data values ​​in the real-time point data values ​​in the real-time database 40 through a LIST structure;

[0075] The key parameter sequence data storage unit is used to store all parameter point data values ​​associated with the same service in the real-time point data values ​​in the real-time database 40 through a hash structure.

[0076] Specifically, in this embodiment, when the data acquisition module 50 loads the point configuration information table, it is necessary to use different storage structures to store the acquired real-time point data values ​​in the real-time database 40 according to the categories of the real-time point data values. In this embodiment, the real-time database 40 supports a key parameter sequence storage structure, so that when the user reads the business data in the real-time database 40, all parameter point data values ​​associated with the business can be directly sent to the user end.

[0077] The data processing module 10 is described below:

[0078] The data processing module 10 in this embodiment is used to process data, and this embodiment does not limit the specific processing content. For example, it can be used to archive real-time data; or it can be used to write back real-time data; or it can be used to calculate real-time data. Specifically, the data processing module 10 may include:

[0079] The minute average value calculation unit is used to establish a cache queue with a length of 60 for the target point, calculate the average value in the cache queue once a second, and obtain the minute average value of the point.

[0080] Specifically, the minute average value calculation unit establishes a cache queue with a length of 60 for the points whose IsToDB (whether to store historical data) in the point configuration information table is True, and performs queue entry and dequeue operations once a second to maintain the queue length of 60 unchanged. When the queue length is less than 60, only queue entry operations are performed, and no dequeue operations are performed. The average value is calculated once a second and written to the avgValue (minute average value calculation value) field of the corresponding point 40 in the real-time database.

[0081] The data archiving unit is used to store the point minute average value in the database according to the archiving frequency in the point configuration information table.

[0082] Specifically, data archiving mainly implements storing the minute average value of the point in the database according to the archiving frequency in the point configuration information table, that is, when the value of IsToDB is True, the value of the corresponding point is stored in the database at intervals set by the setting value of DBlogRate (the frequency of storing historical data). It should be noted that the database here is not the real-time database 40 in this embodiment, but a relational database.

[0083] The data write-back unit is used to write the write-back point information back to the lower computer system according to the client's business needs.

[0084] Specifically, the data write-back function is that the system writes back the write-back value (i.e., write-back point information) to the lower computer system according to the client's business needs. The user writes the write-back point information into the real-time database 40 by calling the data write-back interface in the data operation interface 20, that is, the writeFlag (write-back flag) of the corresponding point is set to True, and the updateValue (write-back value) is set to the value to be written back. The data write-back unit polls the real-time database 40 to obtain the point information with the writeFlag value of True, and writes the data back to the lower computer system at one time through the OPC write-back interface in the data processing module 10.

[0085] Furthermore, in order to improve the write-back rate, the data write-back unit may include:

[0086] The script writing subunit is used to write the write-back script based on the Lua scripting language when the client's business needs require data write-back function;

[0087] The sending subunit is used to send the write-back script to the server of the real-time database 40, so that the server completes the polling scan and business logic of the point according to the write-back script and outputs the write-back point information;

[0088] The write-back subunit is used to write the write-back point information back to the lower computer system.

[0089] Specifically, the above-mentioned data write-back function needs to poll and scan the key value in the real-time database 40. The traditional method is to read the point information one by one in a loop on the functional module end, and then record the relevant information of the corresponding point according to whether the value of writeFlag (write-back flag) is True, and finally complete the data write-back. This method requires multiple data interactions with the server end of the real-time database 40 each time. When the number of data points in the real-time database 40 reaches a certain level (1000 points), the performance of the write-back function module will be very poor. This is caused by the underlying communication protocol of the real-time database 40. The present invention uses a scripting language based on Lua (a lightweight scripting language, written in C language, with the advantages of providing simplicity, efficiency and embeddability) in the data write-back unit, that is, the Lua scripting language is used to write the business logic of obtaining the write-back point information on the functional module side, and the write-back script is sent to the server side of the real-time database 40 through the corresponding interface. The polling scan and business logic of the points are completed on the server side, and the processing results are returned at one time. In this way, data interaction is performed with the real-time database 40 and the functional module only once in each write-back judgment cycle, which greatly improves the performance of the entire system.

[0090] The system management module 30 is described below:

[0091] The system management module 30 is used to modify, add or delete the point information in the point configuration information table online by using the SqlTableDependency technology.

[0092] Specifically, the system management module 30 mainly implements the online modification function of the point configuration information table. In the actual project implementation process, it is often necessary to add, modify and delete the point information. The present invention uses SqlTableDependency technology to realize the online modification of the point information. SqlTableDependency is a database real-time change notification library, which can help developers realize the function of obtaining change notifications in real time when the table in the SQL Server (a relational database) database changes. Through the SqlTableDependency technology, when the system management module 30 modifies the point information, the user does not need to restart the data acquisition module 50, and it can automatically trigger the restart loading of the point configuration information, thereby realizing the online modification of the point information, and having a good real-time and performance experience. This method ensures the real-time and continuity functional requirements of the real-time database 40.

[0093] The data operation interface 20 is described below:

[0094] The data operation interface 20 implements the read / write operation of the point information of different data structures in the real-time database 40 by encapsulating the relevant functions for external programs or modules to call.

[0095] Furthermore, the real-time database system of this embodiment may also include a historical database 60 .

[0096] The historical database 60 may be a Redis historical database for storing historical point information that requires historical data storage. The historical database 60 is connected to the data processing module 10 , the system management model 30 and the data acquisition module 50 , respectively.

[0097] The historical database 60 in the real-time database system can meet the historical database storage needs of the user. Of course, the data structure of the historical database 60 can be a simple data structure, and the historical database 60 that supports multiple data structures can also be obtained by referring to the implementation method of the real-time database as above. It should be further explained that the data structure in this embodiment can be understood as a storage structure.

[0098] The real-time database system provided by the embodiment of the present invention is applied, and the system includes a real-time database 40 supporting multiple data structures, a data acquisition module 50, a system management module 30, a data processing module 10 and a data operation interface 20; the real-time database 40 is respectively connected to the data operation interface 20, the data processing module 10 and the data acquisition module 50, and the data acquisition module 50 is respectively connected to the system management module 30 and the data processing module 10; the real-time database 40 is a real-time database 40 supporting multiple data structures obtained by pre-designing the open source database for intermediate variables, time series points, all parameters associated with the same business and points actually existing in the lower computer system. The system includes a real-time database 40 supporting multiple data structures, so that the real-time database 40 can meet the multiple functional requirements of the client. For different types of points, the real-time database 40 has a corresponding storage structure, and the functions of the real-time database system are realized through the data acquisition module 50, the data processing module 10, the system management module 30 and the data operation interface 20. The real-time database of the present invention has the characteristics of large supporting point capacity, strong adaptability to various development platforms and low coupling with various system components, supports read / write operations of real-time data in seconds, and has versatility, strong adaptability, high cost performance and scalability. In addition, the use of event triggering to obtain real-time point data values ​​is beneficial to ensuring the performance of the data acquisition module 50; and the server side of the real-time database 40 is used to execute the script to complete the polling scan and business logic of the point, and return the processing results at one time, so that in each write-back judgment cycle, the real-time database 40 only interacts with the functional module once, which greatly improves the performance of the entire system.

[0099] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0100] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0101] Finally, it should be noted that, in this article, relationships such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises" or any other variations are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0102] The above is a detailed introduction to a real-time database system provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A real-time database system, characterized in that: include: Supports real-time databases, data acquisition modules, system management modules, data processing modules and data operation interfaces with multiple data structures; The real-time database is connected to the data operation interface, the data processing module and the data acquisition module respectively, and the data acquisition module is connected to the system management module and the data processing module respectively; The real-time database is a real-time database supporting multiple data structures obtained by pre-designing an open source database for intermediate variables, time sequence points, all parameters associated with the same business, and points actually existing in the lower computer system.

2. The real-time database system according to claim 1, characterized in that: The acquisition module is used to load the point information of the point configuration information table to obtain real-time point data values, and save them in the real-time database.

3. The real-time database system according to claim 2, characterized in that: The data acquisition module comprises: An actual point information storage unit, used to store the real-time actual point attribute information in the real-time point data value in the real-time database through a hash structure; An internal point information storage unit, used for storing the real-time internal point data values ​​for the intermediate variables in the real-time point data values ​​in the real-time database through a key value structure; A time series data storage unit, used for storing the real-time time series point data values ​​in the real-time point data values ​​in the real-time database through a LIST structure; The key parameter sequence data storage unit is used to store all parameter point data values ​​associated with the same business in the real-time point data values ​​in the real-time database through a hash structure.

4. The real-time database system according to claim 2, characterized in that: The data acquisition module is specifically used to load the point information of the point configuration information table, obtain the real-time point data value by event triggering, and save it in the real-time database.

5. The real-time database system according to claim 2, characterized in that: The point configuration information table includes the primary key, point name, point type, OPC Server code, PLC point address, data point update frequency, whether to store historical data, the frequency of storing historical data, unit and unit description.

6. The real-time database system according to claim 1, characterized in that: The data processing module comprises: A minute average value calculation unit is used to establish a cache queue with a length of 60 for the target point, and calculate the average value in the cache queue once a second to obtain the minute average value of the point; A data archiving unit, used to store the point minute average value in a database according to the archiving frequency in the point configuration information table; The data write-back unit is used to write the write-back point information back to the lower computer system according to the business needs of the client.

7. The real-time database system according to claim 6, characterized in that: The data write-back unit comprises: A script writing subunit, used for writing a write-back script based on the Lua scripting language when the client's business needs require a data write-back function; A sending subunit, used for sending the write-back script to the server of the real-time database, so that the server completes the polling scan and business logic of the point according to the write-back script, and outputs the write-back point information; The write-back subunit is used to write the write-back point information back to the lower computer system.

8. The real-time database system according to claim 1, characterized in that: The system management module is used to modify, add or delete the point information in the point configuration information table online using the SqlTableDependency technology.

9. The real-time database system according to claim 1, characterized in that: Also includes: The historical database is used to store historical point information that has historical data storage requirements. The historical database is connected to the data processing module, the system management model and the data acquisition module respectively.

10. The real-time database system according to claim 1, characterized in that: The real-time database is a Redis real-time database that supports multiple data structures and is designed in advance for the Redis open source database with respect to intermediate variables, time sequence points, all parameters associated with the same business, and points actually existing in the lower computer system.