An apparatus parameter structured storage system for a central air conditioning system

By constructing a structured storage system for equipment parameters of a central air conditioning system, and using a timetable and record table design combined with transaction atomicity, the problems of low storage efficiency and difficulty in data analysis in the central air conditioning system are solved, achieving high-efficiency storage and query performance.

CN117271524BActive Publication Date: 2026-03-03GUIZHOU HUITONG HUACHENG
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311384893.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-24
Publication Date
2026-03-03
Estimated Expiration
2043-10-24

AI Technical Summary

Technical Problem

The existing equipment parameter storage scheme for central air conditioning systems suffers from excessively large number of rows in a single table database, affecting storage and query efficiency, making data analysis difficult, and the lack of time-point aligned storage leads to inconsistent records.

Method used

A structured storage system for equipment parameters is constructed, including timetables and record tables. Utilizing database rules and transaction atomicity, multiple target devices and parameters are stored according to preset record time rules, and different frequencies and periods are used for storage of basic records, key records, and status records.

Benefits of technology

It achieves more efficient storage and query performance, reaching millisecond-level storage and query speeds, providing complete time-point aligned records, and solving storage space waste and data analysis challenges.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117271524B_ABST
    Figure CN117271524B_ABST
Patent Text Reader

Abstract

The application discloses a device parameter structured storage system for a central air conditioning system, and relates to the field of databases.The system comprises a construction module, a storage module, a query module and a display module.The construction module is used for constructing a device parameter storage database according to database rules, database table rules and database table field rules.The storage module is connected with the construction module and is used for acquiring target parameters of target devices of the central air conditioning system and storing the target parameters into the device parameter storage database.The query module is connected with the storage module and is used for finding corresponding target devices and target parameters according to input query conditions.The display module is connected with the query module and is used for displaying the corresponding target devices and the corresponding target parameters.The application can improve the storage efficiency of parameters of the central air conditioning system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of databases, and in particular to a structured storage system for equipment parameters of a central air conditioning system. Background Technology

[0002] In existing conventional solutions, the storage of various parameters of central air conditioning system equipment is almost entirely based on a tag-based storage scheme, which has the following problems: 1. The number of rows in a single database table is extremely large, severely impacting storage and query efficiency. 2. Storing each row with an independent tag makes data analysis difficult. 3. The lack of time-point alignment in storage results in inconsistent records in chronological order. Summary of the Invention

[0003] The purpose of this invention is to provide a structured storage system for equipment parameters of a central air conditioning system, which can improve the storage efficiency of parameters of the central air conditioning system.

[0004] To achieve the above objectives, the present invention provides the following solution:

[0005] A structured storage system for equipment parameters of a central air conditioning system, the storage system comprising:

[0006] The construction module is used to construct a device parameter storage database according to database rules, database table rules, and database table field rules; wherein, the device parameter storage database includes a time schedule and a record table; the time schedule is the main table of the device parameter storage database; the record table is constrained by the time schedule and uses time as the primary key and foreign key constraint, and is used to record multiple target devices and multiple target parameters in each target device according to preset recording time rules;

[0007] A storage module, connected to the construction module, is used to acquire target parameters of each target device of the central air conditioning system and store each target parameter in the device parameter storage database.

[0008] The query module, connected to the storage module, is used to find the corresponding target device and target parameters based on the input query conditions;

[0009] The display module, connected to the query module, is used to display the corresponding target device and the corresponding target parameters.

[0010] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects:

[0011] This invention constructs a device parameter storage database based on database rules, database table rules, and database table field rules. The device parameter storage database includes a timetable and a record table. The timetable is the main table of the device parameter storage database. The record table, constrained by the timetable and with time as the primary key and foreign key constraints, records multiple target devices and multiple target parameters within each target device according to preset recording time rules. This comprehensively considers storage space and storage capacity, achieving more efficient storage and query performance, reaching millisecond levels in actual tests. Furthermore, it provides complete records aligned to time points for time-series analysis. This solves the problem of excessive storage space occupied by transaction logs during the deletion of a large number of periodic records (critical records), thus improving the storage efficiency of parameters in central air conditioning systems. Attached Figure Description

[0012] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0013] Figure 1 This is a schematic diagram of the structured storage system module for equipment parameters in a central air conditioning system according to the present invention;

[0014] Figure 2 This is a flowchart illustrating how the present invention stores target parameters into a device parameter storage database according to basic recording time rules;

[0015] Figure 3 This is a diagram illustrating the effect of the invention based on the basic recording time rules;

[0016] Figure 4 This is a flowchart illustrating how the present invention stores target parameters into a device parameter storage database according to key recording time rules;

[0017] Figure 5 This is a diagram illustrating the effect of the invention based on key recording time rules;

[0018] Figure 6 This is a flowchart illustrating how the present invention stores target parameters into a device parameter storage database according to a state recording time rule;

[0019] Figure 7 This is a diagram illustrating the effect of the present invention based on the time rules for recording states. Detailed Implementation

[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0021] The purpose of this invention is to provide a structured storage system for equipment parameters of a central air conditioning system, which can improve the storage efficiency of parameters of the central air conditioning system.

[0022] Among them, the central air conditioning equipment management system is a system for centralized monitoring, management and control of the equipment status and main process parameters of relevant subsystems within the scope of central air conditioning.

[0023] Atomicity of database transactions: Multiple database operations within a transaction form an indivisible atomic unit. The entire transaction is committed only if all operations succeed. If any database operation within a transaction fails, all operations already executed must be rolled back, returning the database to its initial state.

[0024] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0025] Example 1

[0026] like Figure 1 As shown, the present invention provides a structured storage system for equipment parameters of a central air conditioning system, comprising:

[0027] The construction module is used to build a device parameter storage database based on database rules, database table rules, and database table field rules. The device parameter storage database includes a timetable and a record table. The timetable is the main table of the device parameter storage database. The record table is constrained by the timetable and uses time as the primary key and foreign key constraint to record multiple target devices and multiple target parameters in each target device according to preset recording time rules.

[0028] The storage module, connected to the construction module, is used to obtain the target parameters of each target device in the central air conditioning system and store each target parameter in the device parameter storage database.

[0029] The query module, connected to the storage module, is used to find the corresponding target device and target parameters based on the input query conditions.

[0030] The display module, connected to the query module, is used to display the corresponding target device and the corresponding target parameters.

[0031] The storage module includes:

[0032] The acquisition submodule is used to acquire the target parameters of each target device in the central air conditioning system.

[0033] The storage submodule is used to store each target parameter into the device parameter storage database.

[0034] In addition, the storage system also includes:

[0035] The data addition module, connected to the storage module, is used to receive the input target parameters and store them in the device parameter storage database.

[0036] The verification module, connected to the construction module, is used to determine whether the device parameter storage database is constructed according to preset rules. When the device parameter storage database is not constructed according to preset rules, it is reconstructed according to preset rules. The preset rules include database rules, database table rules, and database table field rules.

[0037] As a specific implementation method, the preset recording time rules include basic recording time rules, key recording time rules, and status recording time rules. The basic recording time rules record continuously according to the system time, with a frequency of minutes and a preset basic interval time as the recording period. The key recording time rules record continuously according to the system time, with a frequency of seconds, a preset key interval time as the first recording period, and a day as the second recording period. The status recording time rules record change data when the target parameter changes, with a frequency of seconds and a preset status interval time as the recording period. The change data includes data before the change and data after the change. The preset basic interval time is an integer multiple of minutes, and the preset key interval time and preset status interval time are integer multiples of seconds.

[0038] In practical applications, taking the equipment in Table 1 as an example:

[0039] Table 1. Statistical Table of Equipment and Parameters of Central Air Conditioning System

[0040]

[0041]

[0042] As shown in Table 1, the relationship exists: Device Class - Device - Parameter. There are n types of devices, m devices in each type, and k parameters in each device. The number of databases is calculated as one database per month; the database capacity is directly related to the number of devices and parameters. The number of tables is calculated as: m devices + 1 timetable. The total number of fields is: 1 timetable + (1 device table + k device tables) * m; while the number of tables containing key records is: (m + 1) × days. With limited hardware resources, this storage capacity directly impacts the software's storage and query performance.

[0043] The structured storage system for device parameters provided by this invention stores parameters "based on the inherent definition of the device," meaning that the parameters of each device are complete and indivisible. The devices and parameters to be stored are configurable (set as needed, i.e., define the device and its parameters), and the records stored in the database are complete sets of parameters that can independently characterize the device.

[0044] Basic records are obtained by recording according to the basic recording time rules; critical records are obtained by recording according to the critical recording time rules; and status records are obtained by recording according to the status recording time rules. In terms of storage capacity, basic records > critical records > status records. In terms of storage frequency, critical records > basic records > status records. From the application perspective of basic records, critical records, and status records, these three types of records complement each other. Basic records are low-frequency, continuous storage that can characterize the trend of parameters over continuous time, and thus characterize the status or performance trend of the device (such as whether there is performance degradation). Critical records are high-frequency, short-term (maximum 15 days) parameter trends, mainly providing a basis for recent data analysis or fault diagnosis (such as the cause of equipment failure). Status records are low-frequency, discrete records that mainly record changes in the device status, characterizing the operating status of the device and system (such as start-up, stop, fault, standby, etc.).

[0045] Basic records are obtained by storing target devices and target parameters according to the basic record time rules. Critical records are obtained by storing target devices and target parameters according to the critical record time rules. Status records are obtained by storing target devices and target parameters according to the status record time rules.

[0046] As a specific implementation method, such as Figure 2 As shown, each target parameter is stored in the device parameter storage database according to the basic recording time rules, specifically including:

[0047] Obtain the current operating time of the central air conditioning system; the operating time includes year, month, day, hour, minute, and second.

[0048] Determine whether the year and month in the current operating time of the central air conditioning system are the same as the year and month in the time when the target equipment and target parameters were last recorded.

[0049] When the year and month in the current operating time of the central air conditioning system are different from the year and month in the time when the target equipment and target parameters were last recorded, it is determined whether there is an existing equipment parameter storage database. The existing equipment parameter storage database includes an existing time table and an existing record table. The existing time table is a table with the year and month corresponding to the current operating time of the central air conditioning system as the primary key and foreign key constraint. The existing record table is a table that records multiple target equipment and multiple target parameters of each target equipment according to the year and month corresponding to the current operating time of the central air conditioning system and according to the preset recording time rules.

[0050] If the existing device parameter storage database does not exist, construct the existing device parameter storage database.

[0051] If the existing equipment parameter storage database exists, determine whether the year, month, day, hour, and minute of the current running time of the central air conditioning system are the same as the year, month, day, hour, and minute of the last time the target equipment and target parameters were recorded.

[0052] If the year, month, day, hour, and minute of the current operating time of the central air conditioning system are the same as the year, month, day, hour, and minute of the last time the target equipment and target parameters were recorded, continue to obtain the current operating time of the central air conditioning system.

[0053] When the year, month, day, hour, and minute of the current operating time of the central air conditioning system are different from the year, month, day, hour, and minute of the last time the target equipment and target parameters were recorded, and the corresponding preset recording time rules are met, and the record corresponding to the current operating time does not exist in the database, the target equipment and target parameters corresponding to the current operating time of the central air conditioning system will be stored in the equipment parameter storage database.

[0054] In addition, the process of "obtaining the current operating time of the central air conditioning system" also includes:

[0055] Initialize the system by retrieving the currently existing target devices and parameters, resulting in device objects, parameter objects, and their corresponding quantities. Initialize the year, month, day, hour, and minutes of the last recorded storage time to the current time.

[0056] Initialize the system by obtaining the current running time (year and month) based on the device object, parameter object, and corresponding quantity; and construct the device parameter storage database using database rules, database table rules, and database table field rules.

[0057] When the year, month, day, hour, and minute of the current operating time of the central air conditioning system differ from the year, month, day, hour, and minute of the last time the target equipment and target parameters were recorded, the target equipment and target parameters corresponding to the current operating time of the central air conditioning system are stored in the equipment parameter storage database. The specific implementation method is as follows:

[0058] Format the schedule SQL insert statement; format the SQL with the current time (year, month, day, hour, minute). Format the device record table SQL insert statement; iterate through all devices and their parameters, retrieve the values ​​of the device parameters, and format the SQL statement.

[0059] Start a database transaction, execute (insert) statements (timetable insert, device record table insert) as needed and in batches, and commit the transaction; update the previous record storage time (year, month, day, hour, minute) with the current time (year, month, day, hour, minute).

[0060] In practical applications, when storing data according to the basic record rules, independent databases are used, combined with time (month) database partitioning, and tables are created based on target devices, with target parameters used as table fields. Table 1 is converted into a basic record database design, as shown in Table 2:

[0061] Table 2 Basic Record Database Record Table

[0062]

[0063] In Table 2, Chinese names are used to clearly represent the meaning of devices and parameters during use. However, these names need to be converted according to certain rules when stored in the database. Specifically, this invention is based on the application of commercial database software, such as SQL Server and PostgreSQL.

[0064] The basic recording time rules specifically include:

[0065] Database rules: Use "basic_db_" as the database name prefix, format the storage time (month) as "yyyyMM" (y year, M month) as the database name suffix, and then create the database with a name like "basic_db_202301".

[0066] Database table rules: The main database table is named "basic_time" with the time schedule and "record_time" as the primary key field. Record tables are named with "basic_" as the prefix and the device's auto-incrementing number as the suffix. The device's auto-incrementing number in the record table is globally unique and cannot be repeated. The device record table is then created with a name like "basic_1".

[0067] Database table field rules: Record table fields are prefixed with "fld_", and device parameters are suffixed with auto-incrementing natural numbers. Natural numbers in table fields are unique and cannot be repeated within the table. The structure of device record tables is based on table field names like "fld_1". Each device record table also has a primary key field named "record_time", but this is a foreign key field associated with and constrained by the time schedule "basic_time".". The primary key constraint means the record table is affected by the time schedule; inserting a record with a time that doesn't exist in the time schedule will fail. The purpose is to ensure that all records are complete and time-aligned.

[0068] Running the database according to the rules for databases, database tables, and table fields will produce a database structure like Table 3 and Table 4:

[0069] Table 3 Timetable

[0070] record_time 2023-01-0110:01 2023-01-0110:02

[0071] The core of the timetable is the "record_time" field, which stores the time when each device record is generated.

[0072] Table 4 Equipment Record Sheet

[0073] record_time fld_1 fld_2 fld_k 2023-01-0110:01 Parameter value 1 Parameter value 1 Parameter value 1 2023-01-0110:02 Parameter value 2 Parameter value 2 Parameter value 2

[0074] In the device record table, the time "record_time" is constrained by the foreign key "basic_time"."record_time", ensuring that the record time is always consistent with the time table. Furthermore, regardless of the number of devices currently existing, each device record table generated by a device, although its table structure (number of fields, columns) may differ, will always have records (rows) stored in each table that, except for the values, will have consistent time and row number alignment.

[0075] As shown in Tables 3 and 4, the recording time rules for device parameters are as follows: Data is stored in the current storage time format "yyyy-MM-dd hh:mm" (y year, M month, d day, h hour, m minute); and the time is aligned to the whole minute. Regarding the whole-minute alignment, the storage period can only be a specific period, which can be designed to be selected as needed. The period can be 1 minute, 2 minutes, 5 minutes, 10 minutes, 15 minutes, or 30 minutes. A period that is too long results in a large storage interval, rendering the recording meaningless. When the storage period is 1 minute, the recording time is aligned to 0 minutes, 1 minute, 2 minutes...59 minutes, with all recording times being the same; when the storage period is 2 minutes, the recording time is aligned to 0 minutes, 2 minutes, 4 minutes...58 minutes, with all recording times being the same.

[0076] At any given moment (year, month, day, hour, minute), both the timetable and all device record tables will store one record. Therefore, the total number of records stored at this time is m+1 (m records for the number of devices + 1 record for the timetable); and all records must be complete in time, complete in parameters, and indivisible.

[0077] Current technologies align records based on storage periods. For example, with a storage period of 2 minutes, if the software starts at 10:01 AM on January 1st, its next storage time will be 10:03 AM, and the time after that, 10:05 AM. However, if the software is closed and then restarted at 10:00 AM on January 5th, its next storage time will be 10:02 AM, and the time after that, 10:04 AM. In this case, records stored in the same period are misaligned due to the different start times. This scenario makes it difficult to intuitively and conveniently compare and analyze data in chronological order, as records exist at some points in time while they are not at others.

[0078] Taking the timer-triggered execution (1 second) as an example, the core of the execution logic is the INSERT statement in the formatted schedule and device record table, utilizing the atomicity of database transactions:

[0079] 1. First, insert the timetable data, then insert the device record data. This ensures that at any given moment (year, month, day, hour, minute), all devices will have a stored record. The record times in the timetable and device record tables must be aligned and constrained by the timetable's primary key.

[0080] 2. Batch execution of transactions can significantly improve storage performance.

[0081] Initialize the software, acquire the device and parameters (this is a data structure designed in memory), provide the software's user interface, and implement the definition and configuration of the device and parameters (interface operations include adding, editing, deleting, etc.).

[0082] The effect diagram of this invention according to the basic recording time rules is as follows: Figure 3 As shown in the diagram, this illustration illustrates the basic record. The diagram is a screenshot of the "sensor" type:

[0083] The first column displays the name. "Sensor" is a first-level node, representing the device type. "Class Attributes" and "Device Instance" are second-level nodes, representing the parameters possessed by this device type and the actual physical device, respectively.

[0084] Column 2, Basic Records. For "Class Attributes," i.e., parameters, there exists a database table field name in the form of "fld_1".

[0085] As a specific implementation method, such as Figure 4 As shown, each target parameter is stored in the device parameter storage database according to the key recording time rules, specifically including:

[0086] Obtain the current operating time of the central air conditioning system; the operating time includes year, month, day, hour, minute, and second.

[0087] Determine whether the year, month, and day in the current operating time of the central air conditioning system are the same as the year, month, and day in the time when the target equipment and target parameters were last recorded.

[0088] When the year, month, and day in the current operating time of the central air conditioning system are different from the year, month, and day in the time when the target equipment and target parameters were last recorded, determine whether there is a timetable and equipment record table for the year, month, and day in the current operating time of the central air conditioning system.

[0089] If the timetable and equipment record table for the year, month, and day of the current operation time of the central air conditioning system does not exist, create the timetable and equipment record table in the equipment parameter storage database.

[0090] If a timetable and equipment record table for the year, month, and day of the current operating time of the central air conditioning system exists, calculate the time difference between the year, month, and day of the current operating time of the central air conditioning system and the year, month, and day of the existing timetable and equipment record table.

[0091] When the time difference exceeds the set threshold, delete the corresponding existing expired time schedule and equipment record table, and use the year, month, and day of the current operating time of the central air conditioning system as the starting recording time of the time schedule and equipment record table.

[0092] When the year, month, and day in the current operating time of the central air conditioning system are the same as the year, month, and day in the time when the target equipment and target parameters were last recorded, determine whether the year, month, day, hour, minute, and second in the current operating time of the central air conditioning system are the same as the year, month, day, hour, minute, and second in the time when the target equipment and target parameters were last recorded.

[0093] If the year, month, day, hour, minute, and second in the current operating time of the central air conditioning system are the same as the year, month, day, hour, minute, and second in the time when the target equipment and target parameters were last recorded, continue to obtain the current operating time of the central air conditioning system.

[0094] When the year, month, day, hour, minute, and second of the current running time of the central air conditioning system are different from the year, month, day, hour, minute, and second of the last time the target device and target parameters were recorded, and the corresponding preset recording time rules are met, and the record corresponding to the current running time does not exist in the database, the target device and target parameters corresponding to the current running time of the central air conditioning system will be stored in the device parameter storage database.

[0095] In addition, the process of "obtaining the current operating time of the central air conditioning system" also includes:

[0096] Initialize the system by retrieving the currently existing target devices and parameters, resulting in device objects, parameter objects, and their corresponding quantities. Reset the last recorded storage time (year, month, day, hour, minute) to the current time.

[0097] Initialize the system by obtaining the current running time (year and month) based on the device object, parameter object, and corresponding quantity; and construct the device parameter storage database using database rules, database table rules, and database table field rules.

[0098] When the year, month, day, hour, minute, and second of the current operating time of the central air conditioning system differ from the year, month, day, hour, minute, and second of the last time the target equipment and target parameters were recorded, the target equipment and target parameters corresponding to the current operating time of the central air conditioning system are stored in the equipment parameter storage database. The specific implementation method is as follows:

[0099] Format the timetable SQL insert statement; format the SQL with the current time (year, month, day, hour, minute).

[0100] Format the device record table using SQL insert statements; iterate through all devices and their parameters, retrieve the values ​​of the device parameters, and format the SQL statements.

[0101] Start a database transaction, execute (insert) statements (timetable insert, device record table insert) as needed and in batches, and commit the transaction; update the previous record storage time (year, month, day, hour, minute) with the current time (year, month, day, hour, minute).

[0102] In practical applications, when storing parameters according to the key record time rules, the independent database is divided into tables based on device and time (day) periodically, with parameters used as table fields. Table 1 is converted into a key record database, as shown in Table 5.

[0103] Table 5 Key Records Database Record Table

[0104]

[0105]

[0106] As shown in Table 5, to clearly represent the meaning of the devices and parameters, Chinese names are used. When storing devices and parameters in the database, they need to be converted according to the rules. The key record time rules specifically include the following:

[0107] 1. Database rules. Create the database using "critical_db" (fixed).

[0108] 2. Database Table Rules. First, a timetable in the form of "critical_time_" is created, with the time format "yyyMMdd" as the suffix, forming a table like "critical_time_20230101". This table serves as the main database table, with "record_time" as the primary key field. Second, a record table is created, with "critical_" as the prefix and the device's auto-incrementing number as the suffix. The device numbers in the record table must be globally unique and cannot be repeated. This table is then formatted with the time (year, month, day) "yyyMMdd" as the suffix, forming a record table like "critical_1_20230101".

[0109] 3. Database Table Time (Day) Rules. Both the time schedule and device record tables are formatted with time (day, year, month, day) as the table suffix. Because the storage volume (seconds) of critical records can be very large, long-term storage would inevitably put enormous pressure on the storage container (hard drive) and the storage and query performance of the software. Therefore, critical records are designed for periodic (day) storage, with selectable periods of 1, 2, 3, 5, 7, and 15 days. When the table's time (with time in the suffix) exceeds the valid period, the expired time schedule and device record tables will be deleted.

[0110] 4. Database Table Field Rules. First, table fields are prefixed with "col_", and device parameters are suffixed with auto-incrementing natural numbers. Natural numbers in table fields are unique and cannot be repeated within the table. The structure of the device record table is created using table field names like "col_1". Second, each device record table also has a primary key field named "record_time", but this record time is a foreign key field, associated with and constrained by the primary key "critical_time".

[0111] Running according to the rules of database, database table, and table field will produce a database structure like Table 6 and Table 7. The core of the timetable is the "record_time" field, which stores the time when each device record is generated.

[0112] Table 6 Timetable

[0113]

[0114]

[0115] Table 7 Equipment Record Sheet

[0116] record_time col_1 col_2 col_k 2023-01-0110:01:00 Parameter value 1 Parameter value 1 Parameter value 1 2023-01-0110:01:01 Parameter value 2 Parameter value 2 Parameter value 2

[0117] In the device record table, the time "record_time" is constrained by the foreign key "critical_time"."record_time", ensuring that the record time is always consistent with the time table. Furthermore, regardless of the number of devices currently existing, each device record table generated by a device, although its table structure (number of fields, columns) may differ, will always have records (rows) stored in each table that, except for the values, have consistent time and row number alignment.

[0118] As can be seen from Tables 6 and 7, the recording time rules for device parameters are as follows: the data is stored in the current storage time format "yyyy-MM-dd hh:mm:ss" (y year, M month, d day, h hour, m minute, s second); at the same time, the time is aligned to the whole second.

[0119] Regarding hourly alignment, the storage period can only be a specific period. The design allows for selectable periods of 1 second, 2 seconds, 5 seconds, and 10 seconds. A period that is too long results in excessively large storage intervals, rendering record storage meaningless. When the storage period is 1 second, the recording time is aligned at 0 seconds, 1 second, 2 seconds...59 seconds, ensuring all recording times are identical. When the storage period is 2 seconds, the recording time is aligned at 0 seconds, 2 seconds, 4 seconds...58 seconds, again ensuring all recording times are identical. This ensures that at the same instant (year, month, day, hour, minute, second), both the timetable and all device record tables will store one record. Therefore, the total number of records stored is m+1 (m records for devices + 1 record for the timetable); and all records must be time-complete, parameter-complete, and indivisible.

[0120] Existing technologies are designed for alignment based on storage periods. For example, with a storage period of 2 seconds, if the software starts at 10:01:01 on January 1st, its next storage time will be 10:01:03, and the time after that, 10:01:05. However, if the software closes and restarts at 10:01:00 on January 5th, its next storage time will be 10:01:02, and the time after that, 10:01:04. In this case, records stored in the same period are misaligned due to the different startup times. This scenario makes it difficult to intuitively and conveniently compare and analyze data in chronological order, as records exist at some points in time while they are not at others.

[0121] The execution is triggered by a timer (every 1 second). The core of the execution logic is to use INSERT statements in the formatted schedule and device record tables, leveraging the atomicity of database transactions.

[0122] 1. Executing the timetable insertion first, followed by the device record table insertion, ensures that all devices have a stored record at the same time (year, month, day, hour, minute, second). The record times in the timetable and device record tables must be aligned and constrained by the timetable's primary key.

[0123] 2. Batch execution of transactions can significantly improve storage performance.

[0124] 3. For handling expired tables, directly deleting the table is far more efficient than the conventional method of deleting expired records.

[0125] Initialization involves acquiring the target device and its target parameters, providing a user interface, and defining and configuring the target device and its target parameters (interface operations include adding, editing, and deleting). Figure 5 The screenshot is taken using the "sensor" type. Figure 5 Explain the key records:

[0126] (1) Column 1 displays the name. “Sensor” is a first-level node, representing the device type. “Class Attributes” and “Device Instance” are second-level nodes, representing the parameters of this device type and the objectively existing physical device, respectively.

[0127] (2) Column 3, key records. For "class attributes", i.e. parameters, there is a database table field name in the form of "col_1"; for "device instances", i.e. the memory representation of the objective device.

[0128] Note that the memory structures of critical records and basic records are very similar, but they differ in field names, table names, database names, database creation rules, and table creation rules.

[0129] As a specific implementation method, such as Figure 6 As shown, each target parameter is stored in the device parameter storage database according to the status recording time rules, specifically including:

[0130] Obtain the current operating time of the central air conditioning system; the operating time includes year, month, day, hour, minute and second.

[0131] Determine whether the year, month, day, hour, minute, and second in the current operating time of the central air conditioning system are the same as the year, month, day, hour, minute, and second in the time when the target equipment and target parameters were last recorded.

[0132] When the year, month, day, hour, minute, and second in the current operating time of the central air conditioning system are the same as the year, month, day, hour, minute, and second in the time when the target device and target parameters were last recorded, the current operating time of the central air conditioning system is continued to be obtained.

[0133] When the year, month, day, hour, minute, and second of the current operating time of the central air conditioning system are different from the year, month, day, hour, minute, and second of the time when the target equipment and target parameters were last recorded, it is determined whether the third time difference is equal to the preset state interval time; the third time difference is the time difference between the year, month, day, hour, minute, and second of the current operating time of the central air conditioning system and the year, month, day, hour, minute, and second of the time when the target equipment and target parameters were last recorded.

[0134] When the third time difference is not equal to the preset state interval time, the current running time of the central air conditioning system continues to be obtained.

[0135] When the third time difference equals the preset state interval time, it is determined whether the target parameters corresponding to the year, month, day, hour, minute, and second in the current operating time of the central air conditioning system are equal to the target parameters recorded last time.

[0136] When the target parameters corresponding to the year, month, day, hour, minute, and second in the current operating time of the central air conditioning system are not equal to the target parameters recorded last time, the target parameters recorded last time are used as the current target parameters, the target parameters recorded last time are used as the value before the change, the target parameters corresponding to the year, month, day, hour, and second in the current operating time of the central air conditioning system are used as the value after the change, and the value before the change and the value after the change of the target parameters are stored in the equipment parameter storage database.

[0137] In addition, the process of "obtaining the current operating time of the central air conditioning system" also includes:

[0138] Initialize the system by retrieving the currently existing target devices and parameters, resulting in device objects, parameter objects, and their corresponding quantities. Reset the last recorded storage time (year, month, day, hour, minute) to the current time.

[0139] Initialize the system by obtaining the current running time (year and month) based on the device object, parameter object, and corresponding quantity; and construct the device parameter storage database using database rules, database table rules, and database table field rules.

[0140] When the target parameters corresponding to the year, month, day, hour, and second in the current operating time of the central air conditioning system are not equal to the previously recorded target parameters, the previously recorded target parameters are used as the current target parameters, and the previously recorded target parameters are used as the values ​​before the change. The target parameters corresponding to the year, month, day, hour, and second in the current operating time of the central air conditioning system are used as the values ​​after the change. The values ​​before and after the change of the target parameters are stored in the equipment parameter storage database. The specific implementation method is as follows:

[0141] It iterates through all devices and all their parameters; it checks if the previous and current values ​​of a device parameter are equal; if they are equal, it ignores the parameter; if they are not equal, it formats the INSERT statement and sets the previous value of the parameter to the current value. This yields the SQL INSERT statements for all parameters that have changed. Specifically, the previous value is the device parameter value retrieved, the "current value" at a past moment, and the value cached for use as a factor. After each check, the current value is assigned the "current value of the previous parameter," which is the minuend; the current value is the current value of the device parameter. Factors are the subtrahend and minuend in mathematics.

[0142] Start a database transaction, execute (insert) statements (timetable insert, device record table insert) as needed and in batches, and commit the transaction; update the previous record storage time (year, month, day, hour, minute) with the current time (year, month, day, hour, minute).

[0143] In practical applications, parameters are stored according to the time rules of status recording, with independent databases, separate tables for each device, and the values ​​before and after parameter changes stored as fields. Table 1 is converted into a status record database design, as shown in Table 8:

[0144] Table 8 Status Record Database Record Table

[0145]

[0146]

[0147] As shown in Tables 8 and 9, the structure of the status record database and database tables is fixed. When storing devices and parameters in the database, they need to be converted according to rules. The specific rules for status record time are as follows:

[0148] 1. Database rules. Create the database using "state_db" (fixed).

[0149] 2. Database table rules. Record tables are created with "state_" as the prefix and the device class as the auto-incrementing number in natural order as the suffix. The device class number in each record table must be globally unique and cannot be repeated. The device record table is then created with a name like "basic_1".

[0150] 3. Database Table Field Rules. As shown in Table 8, each equipment class record table contains (at least) 5 fixed fields. Following the database, table, and field rules will generate database structures like Tables 6 and 7:

[0151] Table 9 Equipment Record Sheet

[0152]

[0153] Each record in the device log table is generated on a change-triggered basis, meaning a new record is only created when a value (detected every second) changes. Each device log table stores the change process of all parameters for a specified device. Although the records in the table are not time-aligned globally, at a given point in time where a change occurs, as long as a record exists at that point, the records that changed at that point are aligned at that time. Note that, unlike the aforementioned basic and critical records, status records do not require time alignment.

[0154] Execution is triggered periodically (every 1 second) by a timer. The core of the execution logic is to detect whether the device parameters have changed, and then format the INSERT statement for the changed parameters, utilizing the atomicity of database transactions.

[0155] 1. All changes in device parameters at a given moment are aligned at that point in time.

[0156] 2. Batch execution of transactions can significantly improve storage performance.

[0157] Initialize the software, acquire the device and parameters (this is a data structure designed in memory), provide the software's user interface, and implement the definition and configuration of the device and parameters (interface operations include adding, editing, deleting, etc.).

[0158] Figure 7 The screenshot is taken using the "sensor" type. Figure 7 The status record is described as follows:

[0159] (1) Column 1 displays the name. “Sensor” is a first-level node, representing the device type. “Class Attributes” and “Device Instance” are second-level nodes, representing the parameters of this device type and the objectively existing physical device, respectively.

[0160] (2) Column 3, Status Records. For “Class Attributes”, i.e., parameters, database tables are created according to the status record time rules, one table per type, and device status records are stored in a record table of one device class.

[0161] Taking the central air conditioning system in Table 1 of this invention as an example, the average storage time for basic records is about 400 milliseconds; the average storage time for critical records is about 300 milliseconds; and the average storage time for status records is about 300 milliseconds. Therefore, millisecond-level storage is entirely achievable, and it is sufficient for applications at the minute and second levels. As for critical records, since deletion is performed by table, it only takes about 1 second to complete and no additional transaction logs are generated.

[0162] This invention has the following advantages: 1. The parameters of this invention are stored using a device-structured storage method. This greatly improves performance in storage and querying during data analysis applications and makes the analysis methods easier to use. 2. This invention significantly improves rolling performance in the periodic storage of key records and the function of storing expired records, without generating a large number of transaction logs that would otherwise occupy excessive disk space. 3. The time-point alignment method of this invention facilitates easier comparative analysis in time-series analysis.

[0163] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0164] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A structured storage system for equipment parameters in a central air conditioning system, characterized in that, The storage system includes: The construction module is used to construct a device parameter storage database according to database rules, database table rules, and database table field rules; wherein, the device parameter storage database includes a time schedule and a record table; the time schedule is the main table of the device parameter storage database; the record table is constrained by the time schedule and uses time as the primary key and foreign key constraint, and is used to record multiple target devices and multiple target parameters in each target device according to preset recording time rules; A storage module, connected to the construction module, is used to acquire target parameters of each target device in the central air conditioning system and store each target parameter in the device parameter storage database. The storage module further includes: acquiring the current operating time of the central air conditioning system; the operating time includes year, month, day, hour, minute, and second; determining whether the year and month in the current operating time of the central air conditioning system are the same as the year and month in the last time the target devices and target parameters were recorded; if the year and month in the current operating time of the central air conditioning system are different from the year and month in the last time the target devices and target parameters were recorded, determining whether a constructed device parameter storage database exists; the constructed device parameter storage database includes a constructed time table and a constructed record table; the constructed time table is a table with the year and month corresponding to the current operating time of the central air conditioning system as the primary key and foreign key constraints; the constructed record table is a table that records multiple target devices and multiple target parameters of each target device according to a preset recording time rule based on the year and month corresponding to the current operating time of the central air conditioning system; if the constructed device parameter storage database does not exist... The existing equipment parameter storage database is constructed. When the existing equipment parameter storage database exists, it is determined whether the year, month, day, hour, and minute of the current operating time of the central air conditioning system are the same as the year, month, day, hour, and minute of the last time the target equipment and target parameters were recorded. If the year, month, day, hour, and minute of the current operating time of the central air conditioning system are the same as the year, month, day, hour, and minute of the last time the target equipment and target parameters were recorded, the current operating time of the central air conditioning system is continuously acquired. If the year, month, day, hour, and minute of the current operating time of the central air conditioning system are different from the year, month, day, hour, and minute of the last time the target equipment and target parameters were recorded, and the first time difference is equal to the preset basic interval time, and the record corresponding to the current operating time does not exist in the database, the target equipment and target parameters corresponding to the current operating time of the central air conditioning system are stored in the equipment parameter storage database. The first time difference is the time difference between the year, month, day, hour, and minute of the current operating time of the central air conditioning system and the year, month, day, hour, and minute of the last time the target equipment and target parameters were recorded. The query module, connected to the storage module, is used to find the corresponding target device and target parameters based on the input query conditions; The display module, connected to the query module, is used to display the corresponding target device and the corresponding target parameters.

2. The structured storage system for equipment parameters of a central air conditioning system according to claim 1, characterized in that, The preset recording time rules include basic recording time rules, key recording time rules, and status recording time rules. The basic recording time rule records continuously according to system time, with a frequency of minutes and a preset basic interval time as the recording period. The key recording time rule records continuously according to system time, with a frequency of seconds, a preset key interval time as the first recording period, and a day as the second recording period. The status recording time rule records change data when target parameters change, with a frequency of seconds and a preset status interval time as the recording period, according to system time. The change data includes data before the change and data after the change. The preset basic interval time is an integer multiple of minutes. The preset key interval time and the preset status interval time are integer multiples of seconds.

3. The structured storage system for equipment parameters of a central air conditioning system according to claim 1, characterized in that, The storage module includes: The acquisition submodule is used to acquire the target parameters of each target device in the central air conditioning system; The storage submodule is used to store each of the target parameters into the device parameter storage database.

4. The structured storage system for equipment parameters of a central air conditioning system according to claim 1, characterized in that, The storage system also includes: The data addition module, connected to the storage module, is used to receive the input target parameters and store the target parameters in the device parameter storage database.

5. The structured storage system for equipment parameters of a central air conditioning system according to claim 2, characterized in that, The storage system also includes: A verification module, connected to the construction module, is used to determine whether the device parameter storage database is constructed according to preset rules, and when the device parameter storage database is not constructed according to the preset rules, the device parameter storage database is reconstructed according to the preset rules; the preset rules include database rules, database table rules, and database table field rules.

6. The structured storage system for equipment parameters of a central air conditioning system according to claim 2, characterized in that, The storage module also includes: Obtain the current operating time of the central air conditioning system; the operating time includes year, month, day, hour, minute, and second; Determine whether the year, month, and day in the current operating time of the central air conditioning system are the same as the year, month, and day in the time when the target equipment and target parameters were last recorded; When the year, month, and day in the current operating time of the central air conditioning system are different from the year, month, and day in the time when the target equipment and target parameters were last recorded, determine whether there is a timetable and equipment record table for the year, month, and day in the current operating time of the central air conditioning system. When the timetable and equipment record table for the year, month, and day of the current operating time of the central air conditioning system do not exist, the timetable and equipment record table are created in the equipment parameter storage database. If a timetable and equipment record table for the year, month, and day of the current operating time of the central air conditioning system exists, calculate the time difference between the year, month, and day of the current operating time of the central air conditioning system and the year, month, and day of the existing timetable and equipment record table. When the time difference is greater than the set threshold, delete the corresponding existing expired time schedule and equipment record table, and use the year, month and day of the current running time of the central air conditioning system as the start recording time of the time schedule and equipment record table; When the year, month, and day in the current operating time of the central air conditioning system are the same as the year, month, and day in the time when the target equipment and target parameters were last recorded, determine whether the year, month, day, hour, minute, and second in the current operating time of the central air conditioning system are the same as the year, month, day, hour, minute, and second in the time when the target equipment and target parameters were last recorded. When the year, month, day, hour, minute, and second in the current operating time of the central air conditioning system are the same as the year, month, day, hour, minute, and second in the time when the target device and target parameters were last recorded, the current operating time of the central air conditioning system continues to be obtained; When the year, month, day, hour, minute, and second of the current operating time of the central air conditioning system are different from the year, month, day, hour, minute, and second of the last time the target device and target parameters were recorded, and the second time difference is equal to the preset key interval time and the record corresponding to the current operating time does not exist in the database, the target device and target parameters corresponding to the current operating time of the central air conditioning system are stored in the device parameter storage database; the second time difference is the time difference between the year, month, day, hour, minute, and second of the current operating time of the central air conditioning system and the year, month, day, hour, minute, and second of the last time the target device and target parameters were recorded.

7. The structured storage system for equipment parameters of a central air conditioning system according to claim 2, characterized in that, The storage module also includes: Obtain the current operating time of the central air conditioning system; the operating time includes year, month, day, hour, minute, and second; Determine whether the year, month, day, hour, minute, and second in the current operating time of the central air conditioning system are the same as the year, month, day, hour, minute, and second in the time when the target equipment and target parameters were last recorded; When the year, month, day, hour, minute, and second in the current operating time of the central air conditioning system are the same as the year, month, day, hour, minute, and second in the time when the target device and target parameters were last recorded, the current operating time of the central air conditioning system continues to be obtained; When the year, month, day, hour, minute, and second of the current operating time of the central air conditioning system are different from the year, month, day, hour, minute, and second of the time when the target equipment and target parameters were last recorded, it is determined whether the third time difference is equal to the preset state interval time; the third time difference is the time difference between the year, month, day, hour, minute, and second of the current operating time of the central air conditioning system and the year, month, day, hour, minute, and second of the time when the target equipment and target parameters were last recorded. When the third time difference is not equal to the preset state interval time, continue to obtain the current operating time of the central air conditioning system; When the third time difference is equal to the preset state interval time, it is determined whether the target parameters corresponding to the year, month, day, hour, minute and second in the current running time of the central air conditioning system are equal to the target parameters recorded last time. When the target parameters corresponding to the year, month, day, hour, minute, and second in the current operating time of the central air conditioning system are not equal to the target parameters recorded last time, the target parameters recorded last time are used as the current target parameters, and the target parameters recorded last time are used as the values ​​before the change. The values ​​before and after the change of the target parameters in the current operating time of the central air conditioning system are stored in the equipment parameter storage database.

Citation Information

Patent Citations

  • Management of temporal data by means of a canonical schema

    US20110320419A1