Monitoring system data storage method, device and storage medium

By adopting a cross-platform, multi-layered real-time database architecture in the ship monitoring system, the problem of storage and query efficiency of massive monitoring and alarm data has been solved, achieving efficient and secure data storage and query, and is suitable for multi-operating system environments.

CN117370313BActive Publication Date: 2026-07-21THE 711TH RES INST OF CHINA STATE SHIPBUILDING CORP
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
THE 711TH RES INST OF CHINA STATE SHIPBUILDING CORP
Filing Date
2023-10-25
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing technologies are insufficient for efficiently storing and retrieving the massive amounts of monitoring and alarm data from ship monitoring systems, and also present security and stability issues.

Method used

It adopts a cross-platform, multi-layered real-time database architecture, divided into a first storage area and a second storage area, which store historical monitoring data and alarm data respectively. Data compression and custom index tables are used to improve storage efficiency and query speed.

Benefits of technology

It enables efficient storage and rapid retrieval of massive monitoring and alarm data, improves system security and stability, and meets the requirements of cross-platform compatibility and domestically produced hardware.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117370313B_ABST
    Figure CN117370313B_ABST
Patent Text Reader

Abstract

The application discloses a monitoring system data storage method, device and storage medium. The method comprises the following steps: deploying a first storage area and a second storage area respectively; in the first storage area, establishing a historical monitoring data file of each measuring point according to at least a measuring point identifier and monitoring data of the measuring point, and establishing a historical alarm database according to at least the measuring point identifier and alarm data of the measuring point; in the second storage area, establishing a system measuring point table according to at least the measuring point identifier and a corresponding measuring point storage structure identifier; and establishing a system measuring point structure table according to at least the measuring point storage structure identifier, a storage item length, whether the storage item is stored into the historical monitoring data file, and whether the storage item has alarm data. The method can store massive real-time monitoring data, improve data storage and query efficiency, and store the historical monitoring data file and the historical alarm database in the first storage area, store the system measuring point table and the measuring point structure table in the second storage area, isolate the two storage areas from each other, and improve safety and stability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of monitoring technology, and more particularly to the field of ship monitoring technology, specifically relating to data storage methods and storage devices for monitoring systems. Background Technology

[0002] With the rapid development of big data and intelligent technologies, the level of information technology in ships is gradually increasing, and the data generated by ship operations is also growing daily, ushering in the era of big data for the shipbuilding industry. Uncovering the hidden value of data and utilizing the results of data analysis to provide users with business and operational decision support is crucial. How to organize and manage this data presents new challenges for the ship monitoring industry.

[0003] Real-time databases emerged with the development of large-scale industrial automation, representing the integration of database technology and the monitoring field. They solve the problems of real-time read / write operations and large-capacity data storage for diverse and massive datasets. Functions include the acquisition of various industrial interface data, compression, storage, and retrieval of massive monitoring data. Their content encompasses a range of concepts, theories, technologies, methods, and mechanisms, such as data models and their languages, and the structure and organization of databases.

[0004] The design of the data structure for data storage in a monitoring system is a core issue, as it directly determines the operational and storage efficiency, security, and reliability of the real-time database. Summary of the Invention

[0005] The technical objective of this application is to provide a data storage method and storage device for a monitoring system, so as to store a large amount of monitoring system data and improve storage efficiency and retrieval.

[0006] To achieve the above technical objectives, this application adopts the following technical solution.

[0007] Firstly, this application provides a data storage method for a monitoring system, including:

[0008] Deploy the first storage area and the second storage area respectively;

[0009] In the first storage area, at least historical monitoring data files for each measuring point are established based on the measuring point identifier and the monitoring data of the measuring point, and at least historical alarm databases are established based on the measuring point identifier and the alarm data of the measuring point;

[0010] In the second storage area, a system measurement point table for the measurement point is established based on at least the measurement point identifier and the corresponding measurement point storage structure identifier; a measurement point structure table for all the measurement points is established based on at least the measurement point storage structure identifier, the storage item length, whether the storage item is stored in the historical monitoring data file, and whether the storage item has alarm data. Each field in the measurement point structure table defines the information of a single storage item, and multiple storage items completely define the storage structure of a single measurement point.

[0011] In some embodiments, the method further includes:

[0012] A third storage area is deployed to store data configuration information, which includes at least the storage paths of the historical monitoring data files and the historical alarm database.

[0013] In some embodiments, the method further includes: each of the historical monitoring data files includes multiple data blocks;

[0014] In the second storage area, a historical data block index table is established. The historical data block index table includes at least the index number of the historical monitoring data file, the identifier of the data block, and the index number of the data block in the historical monitoring data file.

[0015] In some implementations, the historical alarm database includes a historical alarm table, and the method includes:

[0016] Determine the alarm table name of the historical alarm table; in the second storage area, establish a historical alarm partition table based at least on the index identifier and the alarm table name of the historical alarm table.

[0017] In some embodiments, the method further includes:

[0018] A system log table is created in the first storage area, and the system log table is used to store the system logs of the monitoring system.

[0019] Secondly, embodiments of this application also provide a data storage device for a monitoring system, comprising:

[0020] The first storage area is configured to store historical monitoring data files and historical alarm databases for each measuring point. The historical monitoring data files include at least the measuring point identifier and the monitoring data of the measuring point, and the historical alarm database includes at least the measuring point identifier and the alarm data of the measuring point.

[0021] The second storage area contains a measurement point structure table configured to store measurement points and a system measurement point table for all measurement points. The system measurement point table includes at least a measurement point identifier and a corresponding measurement point storage structure identifier. The measurement point structure table includes at least the measurement point storage structure identifier, the storage item length, an identifier indicating whether the storage item is stored in the historical monitoring data file, and an identifier indicating whether the storage item has alarm data. Each field in the measurement point structure table defines the information of a single storage item, and multiple storage items completely define the storage structure of a single measurement point.

[0022] In some embodiments, the device further includes a third storage area configured to store data configuration information, which includes at least the storage paths of the historical monitoring data files and the historical alarm database.

[0023] In some implementations, each of the historical monitoring data files includes multiple data blocks;

[0024] The second storage area is also configured to store a historical data block index table, which includes at least the index number of the historical monitoring data file, the identifier of the data block, and the index number of the data block in the historical monitoring data file.

[0025] In some implementations, the historical alarm database includes a historical alarm table, which has an alarm table name;

[0026] The second storage area is also configured to store a historical alarm partition table, which includes at least the index identifier of the historical alarm table and the name of the alarm table.

[0027] In some implementations, the first storage area is configured to store a system log table, which is used to store the system logs of the monitoring system.

[0028] In some implementations, the system measurement point table also includes the storage order of the measurement points in the data block.

[0029] In some embodiments, the second storage area is further configured with a version information table, which includes the version number of the data storage device, the last modification time, and the modification log.

[0030] Thirdly, embodiments of this application also provide a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the monitoring system data storage method provided in any possible implementation of the first aspect.

[0031] Compared with existing technologies, the data storage method for a monitoring system provided in this application establishes a cross-platform, multi-layered real-time database architecture based on the characteristics of historical monitoring data and alarm data change frequency, data query efficiency, and storage space limitations, as well as the operational requirements of domestically produced hardware and operating systems. The historical monitoring data file includes measurement point identifiers and measurement point monitoring data. The system measurement point table can be queried based on the measurement point identifier, and the measurement point structure table can be queried based on the system measurement point table. The measurement point structure table can determine whether the monitoring data of the storage item for the measurement point has been written to the historical monitoring data file or whether historical alarm data has been stored in the historical alarm database. A single measurement point can store multiple types of storage items, and each type of storage item can include multiple specific storage items. This method can store massive amounts of monitoring alarm data and improves data storage and query efficiency. The historical monitoring data file and historical alarm database are stored in the first storage area, while the system measurement point table and measurement point structure table are stored in the second storage area. The two storage areas are isolated and do not affect each other, improving security and stability. Attached Figure Description

[0032] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0033] Figure 1 This is a schematic diagram of the data storage method for the monitoring system provided in an embodiment of this application;

[0034] Figure 2 This is a schematic diagram of the overall data structure of an embodiment of this application;

[0035] Figure 3 This is a schematic diagram of the historical monitoring data storage and access process in the embodiments of this application;

[0036] Figure 4 This is an example of the storage content of the Metas table, which represents the measurement point structure in this application.

[0037] Figure 5 This is an example of the storage content of the system measurement point table Tags in this application embodiment;

[0038] Figure 6 This is an example of the contents of the historical data block index table in this application embodiment;

[0039] Figure 7 This is a schematic diagram of the structure of the historical monitoring data file in the embodiments of this application;

[0040] Figure 8This is a schematic diagram illustrating the process of querying historical monitoring data in an embodiment of this application;

[0041] Figure 9 This is a schematic diagram of the overall structure for storing and querying historical alarm data in this application embodiment;

[0042] Figure 10 This is a schematic diagram of the historical alarm data query process in the embodiments of this application;

[0043] Figure 11 This is a schematic diagram of the second storage area structure in an embodiment of this application;

[0044] Figure 12 This is a schematic diagram of server-side configuration information in an embodiment of this application;

[0045] Figure 13 This is a schematic diagram of client configuration information in an embodiment of this application;

[0046] Figure 14 This is a schematic diagram of a data storage method for a monitoring system provided in another embodiment of this application;

[0047] Figure label:

[0048] 11-First storage area, 12-Second storage area, 13-Third storage area, 111-Historical monitoring data file, 112-Historical alarm database, 113-System log table, 121-Measurement point structure table, 122-System measurement point table, 123-Historical data block index table, 124-Historical alarm partition table, 125-Database version information table, 131-Server configuration file, 132-Client configuration file. Detailed Implementation

[0049] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0050] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of one or more embodiments of this specification. The singular forms “a,” “described,” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more of the associated listed services.

[0051] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this specification, and similarly, second may also be referred to as first.

[0052] A monitoring system is a system used to monitor, record, and manage a specific environment, equipment, or process. A monitoring point (or measuring point) is a specific location or device selected and configured within the monitoring system to collect and monitor relevant data and information. By connecting and managing multiple monitoring points, a monitoring system achieves comprehensive monitoring and management of the monitored object. The monitoring system can generate alarms and notifications based on the data from the monitoring points. When the data from a monitoring point exceeds a preset threshold or an abnormal situation occurs, the monitoring system can trigger alarms and notifications to allow for timely action. For example, when the temperature at a monitoring point exceeds a set upper limit, the monitoring system can issue an alarm to notify relevant personnel to take action.

[0053] The monitoring system needs to store historical alarm data and historical monitoring data. Optionally, depending on actual needs and design, the monitoring system may also need to store system logs. The characteristics of the monitoring system data are shown in Table 1.

[0054] Table 1 Data Characteristics of the Monitoring System

[0055]

[0056] Historical alarm data is the most critical data. It not only needs to be stored in real-time, securely, and for extended periods, but also requires fast query capabilities. Based on 1000 records per day for three years, this amounts to approximately one million historical alarm records. In a typical relational database, once a table exceeds 500,000 rows, the query time is approximately 2-3 seconds, which is insufficient to meet query requirements.

[0057] Historical monitoring data is collected in real time, and the amount of data is very large and requires a lot of storage space.

[0058] System logs are general historical data used to store information about system service startup and shutdown, configuration changes, and runtime errors.

[0059] The applicant, through research on the frequency of change, importance, data query efficiency, and storage space limitations of historical monitoring data, historical alarm data, and system logs of the monitoring system, as well as the operational requirements of domestically produced hardware, operating system software, and database, has provided a data storage method for the monitoring system. This storage method implements a cross-platform, multi-layered real-time database multi-database architecture.

[0060] This embodiment first designs the overall data structure of the cross-platform real-time database, including the deployment of two storage areas, and designs the storage physical structure and data structure of each data area in detail according to the characteristics of each area.

[0061] Example 1

[0062] See Figure 1 and Figure 2 , Figure 1 This is a schematic diagram of a data storage method for a monitoring system provided in the embodiments of this specification. Figure 2 This is a schematic diagram of the overall data structure of an embodiment of this application. The data storage method of the monitoring system includes:

[0063] Step S101: Deploy the first storage area 11 and the second storage area 12 respectively;

[0064] Step S102: In the first storage area 11, at least a historical monitoring data file 111 for each measuring point is established based on the measuring point identifier and the monitoring data of the measuring point, and at least a historical alarm database 112 is established based on the measuring point identifier and the alarm data of the measuring point.

[0065] Step S103: In the second storage area 12, at least according to the measurement point identifier and the corresponding measurement point storage structure identifier, establish the system measurement point table 122 of the measurement points; at least according to the measurement point storage structure identifier, the length of the storage item, whether the monitoring data of the measurement point is stored in the historical monitoring data file 111, and whether the storage item has alarm data, establish the measurement point structure table 121 of all measurement points.

[0066] In the data storage method for the monitoring system provided in this embodiment, a historical monitoring data file 111 and a historical alarm database 112 are established in the first storage area 11. The historical monitoring data file 111 includes measurement point identifiers and measurement point monitoring data. A system measurement point table 122 and a measurement point structure table 121 are established in the second storage area 12. The system measurement point table 122 can be queried based on the measurement point identifier. Based on the system measurement point table 122, the measurement point storage structure identifier (corresponding to the measurement point type) corresponding to the measurement point identifier can be determined. Based on the measurement point storage structure identifier, the measurement point structure table 121 can be queried. Based on the measurement point structure table 121, it can be determined whether the measurement point monitoring data is stored in the historical monitoring data file 111 and whether the measurement point has alarm data. Historical monitoring data and historical alarm data are obtained based on the historical monitoring data file 111 and the historical alarm database 112. This method effectively stores the data of the monitoring system and improves the efficiency of data storage and retrieval. The historical monitoring data file and the historical alarm database are stored in the first storage area, and the system measurement point table and the measurement point structure table are stored in the second storage area. The two storage areas are isolated and do not affect each other, which improves security and stability.

[0067] In some embodiments, the method further includes establishing a system log table 113 in the first storage area 11 for storing system logs. The monitoring system data storage method provided in the specific embodiments stores historical alarm data, historical monitoring data, and system logs independently with different data structures, ensuring they do not interfere with each other. The first storage area 11, as a data area, can be used to store massive amounts of historical data, alarms, and logs.

[0068] Optionally, the historical monitoring data file 111, the historical alarm database 112, and the system log can be stored in three separate databases to maximize fault isolation.

[0069] In step S102 of this embodiment, the second storage area 12 can serve as the core library of the real-time database, and historical monitoring data is stored in the first storage area 11 using multiple historical monitoring data files 111. As an example, each historical monitoring data file 111 may include multiple data blocks; a historical data block index table 123 is established in the second storage area 12, and the historical data block index table 123 includes at least the index number of the historical monitoring data file 111, the identifier of the data block, and the index number of the data block in the historical monitoring data file 111.

[0070] In this embodiment, the method of "data compression storage + custom historical monitoring data file 111 + establishment of historical data block index table 123" is used to store data in units of compressed data blocks, and the historical data block index table 123 is established using an SQLite database. This reduces the data storage space while ensuring the efficiency of querying and storage.

[0071] The data structure of historical monitoring data includes historical monitoring data file 111 (Data000~DataXXX), historical data block index table 123, measuring point structure table 121 (Metas) and system measuring point table 122 (Tags).

[0072] In this embodiment, in step S102, the historical monitoring data file 111 is stored in the first storage area 11, and in step S103, the measurement point structure table 121 (Metas), the system measurement point table 122 (Tags), and the historical data block index table 123 are stored in the second storage area.

[0073] The Measurement Point Structure Table 121 (Metas) defines various storage formats for measurement points. Each storage format includes different storage items (the storage items may include the storage content and the data length of the storage items). For a detailed design example, see Table 2 Measurement Point Structure Table 121 (Metas).

[0074] Table 2 Measurement Point Structure Table 121 (Metas)

[0075]

[0076] In the example shown in Table 2, each field in the measurement point structure table 121 (Metas) defines the information of a single storage item. Multiple storage items completely define the storage structure of a single measurement point. Generally, each measurement point includes three storage items: measurement point value (value), alarm flag (alarm), or alarm limit (limit). The fields of this table include the measurement point storage structure identifier MetaID, storage item name, storage item index (Index), data type (DataType), storage item length (DataLen), value identifier (IsValue), and alarm flag (IsAlarm). The value identifier (IsValue) indicates whether the data is stored in the historical monitoring data file 111 (or data block); if so, the value identifier is 1. The alarm flag (IsAlarm) indicates whether there is alarm data; when the alarm flag (IsAlarm) is 1, it means that when this item changes, the historical alarm table (Events) is also recorded. Figure 4 Example of storing content for measurement point structure table 121 (Metas), such as Figure 4 As shown, this system stores two types of measurement points: measurement point storage structure identifiers MetaID 1 and 2, respectively. MetaID 1 corresponds to the first type of measurement point, and MetaID 2 corresponds to the second type. The measurement point storage content for MetaID 1 includes two storage items: the measurement point value (value) and the alarm identifier (alarm), each occupying 1 byte (field DataLen). The measurement point storage content for MetaID 2 includes three storage items: the measurement point value (value), the alarm identifier (alarm), and the alarm limit (limit), occupying 4, 1, and 4 bytes respectively (field DataLen).

[0077] The system measurement point table 122 (Tags) is used to store detailed information about all measurement points in the system, including fields such as measurement point ID, storage structure identifier MetaID, and data storage frequency. For a detailed design example, see Table 3, Storage Measurement Point Table Tags.

[0078] Table 3 System Measurement Points Table 122 (Tags)

[0079]

[0080] In this embodiment, the fields of the system measurement point table 122 (Tags) include: Measurement Point ID (Measurement Point Identifier): a unique identifier for the system measurement point; Measurement Point Storage Structure Identifier: the MetaID corresponding to the measurement point structure table 121 (Metas); and Storage Index StoreIndex, which identifies the storage order of this measurement point data in the data block. Optionally, the fields of the system measurement point table 122 (Tags) also include: Enabled flag, Resolution of numerical change, Deadband of data change, Precise of numerical display accuracy, and LastUpdate of measurement point definition change time.

[0081] Example of the content stored in System Measurement Point Table 122 (Tags) Figure 5 As shown.

[0082] Historical data block index table 123 is used to store the index information of historical data blocks, including fields such as the ID number, synchronization identifier, block start time, block end time and storage location of each data block. For a detailed design example, see Table 4 Historical data block index table 123.

[0083] Table 4 Historical Data Block Index Table 123

[0084]

[0085] Example of the contents of historical data block index table 123 Figure 6 As shown.

[0086] A schematic diagram of the historical monitoring data storage and access process is shown below. Figure 3 As shown. In this embodiment, after the system collects real-time monitoring data, it first caches it in memory. Every 2 minutes (configurable), the data blocks in memory are compressed using a compression algorithm (such as Lz4 compression algorithm, but not limited to this) and then stored in the corresponding historical monitoring data file 111 (such as DataXXX) on the disk. A new index record is created in the historical data block index table 123, which can identify the data block's ID number, block synchronization identifier, block type, start time, end time, storage file index number, file index, storage location, storage length, and block version information (see Table 4 Historical Data Block Index Table 123 for details).

[0087] In a specific embodiment, the historical monitoring data files 111 are sequentially numbered starting from 0, with the first file named Data000. The size of each file is configurable (default 64MB). The data file format includes a custom .db suffix and consists of multiple compressed data blocks. Each data block stores real-time information from multiple data collection points, such as timestamps, point IDs, measured values ​​(i.e., point values), alarm identifiers, and alarm limits. The point identifier (i.e., point ID) and the point storage structure identifier (i.e., point type) are the basic information of the point. The point ID corresponds to the ParaID in the system point table 122 (Tags). The actual number of bytes stored for each point is defined by the point structure table 121 (Metas). The data structure of the historical data files is as follows: Figure 7 As shown.

[0088] When querying historical monitoring data, first, the historical data block index table 123 is queried based on the query time to obtain the corresponding historical monitoring data file index (FileIndex) 111. Then, the corresponding historical monitoring data file 111 is queried based on the historical monitoring data file index (FileIndex) to obtain the corresponding data block set (Blocks). The data blocks are read and decompressed. Data is filtered based on the queried measurement point ID to obtain the corresponding measurement point set. Next, the system measurement point table 122 (Tags) is queried based on the measurement point ID to obtain the measurement point storage structure identifier (MetaID). Finally, the measurement point structure table 121 (Metas) is queried based on the measurement point storage structure identifier (MetaID) to obtain the storage item and data length of each storage item for that measurement point. This allows the measurement point value, alarm identifier, and alarm limit of the measurement point storage item to be parsed, and the parsed query result to be obtained. The process is as follows: Figure 8 As shown.

[0089] In this embodiment, step S102 stores historical alarm data in the first storage area 11. This historical alarm data is important historical data for the monitoring system, with a relatively small data volume (generally no more than a thousand records per day), high access frequency, and high requirements for query speed. As an example, the cross-platform lightweight database SQLite can be used for design and implementation. As in this embodiment, a historical alarm database 112 is configured in the first storage area 11. The historical alarm database 112 includes a historical alarm table named Events. Detailed design of the historical alarm table is shown in Table 5.

[0090] Table 5 Historical Alarm Table (Events)

[0091]

[0092] In this embodiment, the data storage method of the monitoring system further includes: establishing a historical alarm partition table 124 in the second storage area 12, at least based on the index identifier and alarm table name of the historical alarm table. The historical alarm partition table 124 is used to store the partition information of historical alarms, including fields such as alarm table index, alarm table name, alarm start time, and alarm end time. The historical alarm partition table 124 is shown in Table 6.

[0093] Table 6 Historical Alarm Partition Table 124

[0094]

[0095] When storing alarms generated in real time by the system, it first checks whether the number of rows in the current historical alarm table (Events) exceeds the set value. If it does, it directly inserts the alarm into the current historical alarm table. If it does not exceed the set value, it creates a new historical alarm table (Events) and updates the historical alarm partition table 124 (alarmPartition).

[0096] The overall structure for storing and querying historical alarms is as follows: Figure 9 As shown. When querying historical alarms, first query the historical alarm partition table 124 (alarmPartition) based on the query time to obtain the name of the corresponding alarm table (field alarmTableName). Then, query the corresponding historical alarm based on the alarm table name (EventsX) to obtain the measurement point ID (paraID), alarm time (alarmTime), and alarm data (alarmData) of the historical alarm. The alarm data (alarmData) includes various storage structures. The specific parsing of the content needs to be performed according to the measurement point structure table 121 (Metas). The historical alarm query process is shown in [link to documentation]. Figure 10 .

[0097] In some embodiments, to ensure data security and query efficiency, the second storage area 12 (i.e., the real-time database core library) is designed and implemented using the cross-platform lightweight database SQLite. The second storage area 12 includes a measurement point structure table 121 (Metas), a storage measurement point table (Tags), a historical data block index table 123 (Blocks), and a historical alarm partition table 124 (alarm Partition). Figure 11 As shown.

[0098] Optionally, the second storage area 12 also includes a database version information table 125. The database version information table 125 (dbLog) is used for the version information of the current database structure, including the database version number, last modification time, and modification log field. For detailed design of the data table, see Table 7 Database Version Information Table 125 (dbLog).

[0099] Table 7 Database Version Information Table 125 (dbLog)

[0100]

[0101] In some embodiments, a system log table 113 is established in the first storage area 11. The system log table 113 is used to store system service start-up and shutdown, configuration changes and runtime error information. It is designed and implemented using the cross-platform lightweight database SQLite. The detailed design of the system log table 113 is shown in Table 8, System Log Table 113 (dbLog).

[0102] Table 8 System Log Table 113 (dbLog)

[0103]

[0104] In a specific implementation, a "data table + automatic deletion" approach can be used to achieve high query efficiency when data is stored for at least 3 months. The system log is a separate SQLite database (RDLog.db).

[0105] Based on the above embodiments, such as Figure 12 As shown, the data storage method of the monitoring system also includes step S104: deploying a third storage area 13 (as a configuration area), in which data configuration information is stored, and the data configuration information includes at least the storage paths of the historical monitoring data file 111 and the historical alarm database 112.

[0106] Optionally, the data storage method provided in the specific embodiment further includes setting up a client for data display. Data configuration information includes a server configuration file 131 (e.g., Figure 12 (as shown) and client configuration file 132 (as shown) Figure 13 As shown, the data storage configuration includes information such as the storage path of historical data, data storage frequency, configuration file path, and communication parameters. The client display configuration includes information such as the configuration file path, software interface display mode, and line display color. The configuration area is designed and implemented using an INI configuration file, which users can open and configure on various platforms. By storing data configuration information in the third storage area 13, customization of data storage parameters and data display is supported, including information such as the storage path of historical data, data storage frequency, and software interface display mode.

[0107] By setting up a third storage area 13 to store software configuration information, users can meet the personalized storage needs of each project through configuration data settings.

[0108] The monitoring system data storage method proposed in this application supports high-frequency data storage and fast data retrieval of historical data, historical alarms and system logs. It has cross-platform characteristics and can be customized according to actual project needs.

[0109] The data storage method for monitoring systems proposed in this application can be applied to multiple operating systems, has cross-platform characteristics, and meets the requirements of software localization. It is designed for the change frequency, importance, and query requirements of three types of monitoring system data, with low requirements for hardware equipment. It can achieve high-frequency data storage (1 storage per 1ms) and fast data query (<1s) on ordinary industrial control computers. It has strong versatility and powerful customization features.

[0110] It is understood that the above measurement point structure table 121, system measurement point table 122, historical data block index table 123, and historical alarm partition table 124 are only shown as examples. In specific embodiments, the fields in each table can be set according to actual needs, and the measurement point structure can be customized. Multiple storage structures of different lengths, such as switch quantities and analog quantities, can be defined. This application supports importing different measurement point information and measurement point grouping information for each project.

[0111] Example 2

[0112] Corresponding to the above-described data storage method for monitoring systems, this application also provides a data storage device for monitoring systems, comprising:

[0113] The first storage area 11 is configured to store historical monitoring data files 111 and historical alarm databases 112 for each measuring point. The historical monitoring data files 111 include at least the measuring point identifier and the monitoring data of the measuring point, and the historical alarm database 112 includes at least the measuring point identifier and the alarm data of the measuring point.

[0114] The second storage area 12 is configured with a measurement point structure table 121 for storing measurement points and a system measurement point table 122 for all measurement points. The system measurement point table 122 includes at least a measurement point identifier and a corresponding measurement point storage structure identifier. The measurement point structure table 121 includes at least a measurement point storage structure identifier, an identifier indicating whether the monitoring data of the measurement point is stored in the first storage area 11, and an identifier indicating whether it has alarm data.

[0115] Optionally, the monitoring system data storage device further includes a third storage area 13, which is configured to store data configuration information. The data configuration information includes at least the storage paths of the historical monitoring data file 111 and the historical alarm database 112.

[0116] It should be noted that the functions of each functional module of the monitoring system data storage device in this application embodiment can be specifically implemented according to the methods in the above method embodiments. The specific implementation process can be referred to the relevant descriptions in the above method embodiments, which will not be repeated here.

[0117] Furthermore, Embodiment 3 of this application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the monitoring system data storage method described above.

[0118] The above are merely preferred embodiments of this application and are not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application are included within the scope of protection of this application.

Claims

1. A data storage method for a monitoring system, characterized in that, include: The first storage area (11) and the second storage area (12) are deployed respectively; In the first storage area (11), at least historical monitoring data files (111) of each measuring point are established based on the measuring point identifier and the monitoring data of the measuring point, and a historical alarm database (112) is established based on the measuring point identifier and the alarm data of the measuring point. In the second storage area (12), at least according to the measurement point identifier and the corresponding measurement point storage structure identifier, a system measurement point table (122) for storing information of all the measurement points is established; at least according to the measurement point storage structure identifier, storage item length, whether the storage item is stored in the historical monitoring data file (111), and whether the storage item has alarm data, a measurement point structure table (121) for all the measurement points is established, wherein the measurement point structure table (121) defines a variety of storage formats for measurement points, each storage format includes different storage items, each field in the measurement point structure table (121) defines the information of a single storage item, and multiple storage items completely define the storage structure of a single measurement point.

2. The data storage method for a monitoring system according to claim 1, characterized in that, The method further includes: Deploy a third storage area (13) to store data configuration information, the data configuration information including at least the storage paths of the historical monitoring data file (111) and the historical alarm database (112).

3. The data storage method for a monitoring system according to claim 1, characterized in that, The method further includes: Each of the aforementioned historical monitoring data files (111) includes multiple data blocks; In the second storage area (12), a historical data block index table (123) is established. The historical data block index table (123) includes at least the index number of the historical monitoring data file (111), the identifier of the data block, and the index number of the data block in the historical monitoring data file (111).

4. The data storage method for a monitoring system according to claim 1, characterized in that, The historical alarm database (112) includes a historical alarm table, and the method includes: Determine the alarm table name of the historical alarm table; in the second storage area (12), establish a historical alarm partition table (124) based at least on the index identifier of the historical alarm table and the alarm table name.

5. The data storage method for a monitoring system according to claim 1, characterized in that, The method further includes: A system log table (113) is established in the first storage area (11), and the system log table (113) is used to store the system log of the monitoring system.

6. A data storage device for a monitoring system, characterized in that, include: The first storage area (11) is configured to store historical monitoring data files (111) and historical alarm databases (112) for each measuring point. The historical monitoring data files (111) include at least the measuring point identifier and the monitoring data of the measuring point, and the historical alarm databases (112) include at least the measuring point identifier and the alarm data of the measuring point. The second storage area (12) is configured with a measurement point structure table (121) for storing measurement points and a system measurement point table (122) for storing information of all measurement points. The system measurement point table (122) includes at least a measurement point identifier and a corresponding measurement point storage structure identifier. The measurement point structure table (121) includes at least the measurement point storage structure identifier, the storage item length, whether the storage item is stored in the historical monitoring data file (111), and whether the storage item has an alarm data identifier. The measurement point structure table (121) defines various types of storage formats for measurement points. Each storage format includes different storage items. Each field in the measurement point structure table (121) defines the information of a single storage item. Multiple storage items completely define the storage structure of a single measurement point.

7. The data storage device for a monitoring system according to claim 6, characterized in that, The device further includes a third storage area (13), which is configured to store data configuration information, including at least the storage paths of the historical monitoring data file (111) and the historical alarm database (112).

8. The data storage device for the monitoring system according to claim 6, characterized in that, Each of the aforementioned historical monitoring data files (111) includes multiple data blocks; The second storage area (12) is also configured to store a historical data block index table (123), which includes at least the index number of the historical monitoring data file (111), the identifier of the data block, and the index number of the data block in the historical monitoring data file (111).

9. The data storage device for a monitoring system according to claim 6, characterized in that, The historical alarm database (112) includes a historical alarm table, which has an alarm table name; The second storage area (12) is also configured to store a historical alarm partition table (124), which includes at least the index identifier of the historical alarm table and the name of the alarm table.

10. The data storage device for the monitoring system according to claim 6, characterized in that, The first storage area (11) is configured to store a system log table (113), which is used to store the system logs of the monitoring system.

11. The data storage device for a monitoring system according to claim 8, characterized in that, The system measurement point table (122) also includes the storage order of the measurement points in the data block.

12. The data storage device for a monitoring system according to claim 6, characterized in that, The second storage area (12) is also configured to store a database version information table (125), which includes the database version number, last modification time, and modification log.

13. A computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the monitoring system data storage method as described in any one of claims 1 to 5.