Optimization Method for HPLC Curve Storage and Search

By optimizing the HPLC curve storage and retrieval method, the problem of curve point loss when the network is unstable is solved, realizing efficient and versatile data storage and retrieval, supporting multiple protocols, ensuring no data loss, and improving network copying efficiency.

CN116192196BActive Publication Date: 2025-10-31ZHEJIANG XINXIANG ELECTRONIC TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211603366.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-13
Publication Date
2025-10-31
Estimated Expiration
2042-12-13

AI Technical Summary

Technical Problem

When the HPLC network is unstable, the load curve is prone to losing points. Existing curve storage methods are inefficient and have poor versatility, and cannot meet the requirements of high-frequency minute acquisition.

Method used

The system employs optimized methods for RTC clock maintenance, data item configuration, data curve acquisition and storage, and curve data copying, including clock synchronization, data item configuration, data block storage and copying for the CCO and STA modules. It supports compatibility with different protocols, uses unified encoding and index table management for the storage area, and reduces lookup time.

Benefits of technology

It achieves strong universality and high efficiency of curve data, supports multiple protocols, ensures no data loss, and improves network copying and transmission efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116192196B_ABST
    Figure CN116192196B_ABST
Patent Text Reader

Abstract

This invention discloses an optimized method for storing and searching HPLC curves, used for storing and searching load curve data. The method includes step S1: RTC clock maintenance. The CCO module periodically synchronizes its real-time clock with the concentrator and maintains its own RTC clock. After network setup, when the CCO module unicasts a curve acquisition start message to the STA module, it needs to carry the RTC clock and NTB time. The CCO module periodically broadcasts an RTC clock synchronization message to the STA module, and the STA module maintains its own RTC clock. Step S2: Data item configuration. The concentrator actively sends the acquisition data item content, and the CCO module synchronizes the data item content and sends it to the STA module via carrier wave. Compared with traditional curve storage methods, this optimized method for storing and searching HPLC curves has advantages such as strong versatility and higher efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power line carrier technology, specifically relating to an optimization method for storing and searching HPLC curves. Background Technology

[0002] In HPLC (wideband power line carrier) applications, load curves often suffer from data loss when the network is unstable. Furthermore, due to the significant latency of meter serial port interaction, existing concurrent data acquisition methods are often insufficient for higher-frequency, minute-by-minute data collection. Therefore, in practical applications, a method is often used where the STA (Stationary Data Acquisition) periodically acquires meter curve information and stores it locally, then waits for the CCO (Concurrent Control Operator) to read the data, thus meeting the data acquisition requirements. However, existing curve storage methods are inefficient and lack versatility.

[0003] Therefore, further improvements will be made to address the aforementioned issues. Summary of the Invention

[0004] The main objective of this invention is to provide an optimization method for storing and searching HPLC curves. Compared with traditional curve storage methods, this invention has the advantages of strong versatility and higher efficiency.

[0005] To achieve the above objectives, this invention provides an optimized method for storing and searching HPLC curve data, comprising the following steps:

[0006] Step S1: Perform RTC clock maintenance. The CCO module periodically synchronizes the real-time clock with the concentrator and maintains its own RTC clock. After the network is completed, when the CCO module unicasts the curve acquisition start message to the STA module, it needs to carry the RTC clock and NTB time. The CCO module periodically broadcasts the RTC clock synchronization message to the STA module and the STA module maintains its own RTC clock.

[0007] Step S2: Configure data items. The concentrator actively sends the data item content to be collected. The CCO module synchronizes the data item content and sends it to the STA module via carrier wave. The STA module interacts with the meter periodically according to the data item content to obtain the meter response message.

[0008] Step S3: Data curve acquisition and storage are performed. The STA module parses the meter response message and processes the meter response message according to the preset rules based on the issued configuration parameters, and stores the final data block in the local non-loss area.

[0009] Step S4: Perform curve data reading. The concentrator issues a curve reading instruction, so that after the STA module receives the carrier reading message, it reads the curve data with the corresponding timestamp from the power-off non-loss zone and performs frame assembly and reporting.

[0010] As a further preferred technical solution to the above technical solution, in step S1:

[0011] The specific implementation for RTC clock maintenance in the CCO module is as follows:

[0012] Step S1.1: After the CCO module completes networking, it immediately requests a clock from the concentrator and updates the CCO's local RTC clock after the concentrator correctly responds with a clock.

[0013] Step S1.2: After synchronizing the local RTC clock of CCO (after the start curve acquisition is completed), the CCO module requests the clock from the concentrator at fixed intervals to calibrate its own clock, and performs clock synchronization on all STA modules in the network by adding a new HPLC broadcast calibration message (clock synchronization message);

[0014] The specific implementation for RTC real-time clock maintenance of the STA module is as follows:

[0015] Step S1.3: After receiving the downlink clock synchronization message from the CCO module, the STA module performs the following actions:

[0016] Step S1.3.1: Reconstruct the accurate real-time clock based on the RTC clock and NTB time;

[0017] Step S1.3.2: Update the local RTC clock of the STA module;

[0018] Step S1.3.3: Read the meter clock and calculate the time deviation T between the meter clock and the STA local real-time clock. If the clock deviation T is greater than 24 hours, the meter clock is considered abnormal and the STA module will not collect curves. The above T needs to be saved after power failure (i.e., saved to the non-loss area).

[0019] Step S1.3.4: Determine whether to start data acquisition. The conditions for starting data acquisition are that the STA data acquisition configuration task is valid, the meter clock is normal, and the acquisition cycle reaches the hour.

[0020] Step S1.4: After the STA module is reset or powered on again, the following actions are performed:

[0021] Step S1.4.1: Restore the clock deviation T from the non-loss zone after power failure. If the clock deviation T is less than or equal to 24 hours, the STA module reads the meter time and restores the STA local RTC clock according to the deviation value; otherwise, the meter clock is considered abnormal and data acquisition is not started.

[0022] As a further preferred technical solution to the above technical solution, in step S2:

[0023] When configuring the STA module to collect data items, the concentrator needs to actively synchronize the collected data items (content) to the CCO module each time the CCO module is powered on again. After synchronizing the status of the data items, the CCO module determines that the network is complete and selects the corresponding collection configuration item to unicast to the STA module according to the protocol type supported by the meter. The STA needs to periodically read and transfer the data according to the configured data item list. The CCO module compares the collected data items sent by the concentrator with the stored collected data items. If there is a change, the CCO module needs to resend the collected data items to the STA module via carrier wave.

[0024] As a further preferred technical solution to the above technical solution, in step S2:

[0025] Module data acquisition configuration: After receiving the module data acquisition configuration message from the concentrator, the CCO module sends the configuration information in the message to the corresponding STA module, including:

[0026] For the CCO module (other strategies), if the concentrator has already sent data item configurations to the CCO module, the CCO module needs to check every half hour whether a site has joined the network. If a site has joined the network, the module data acquisition configuration carrier message is resent for the site. For STA modules that do not support minute-by-minute acquisition and storage, if the CCO module fails to respond after multiple configurations, the configuration sending weight of this node is reduced, and the sending is delayed for a period of time.

[0027] For STA modules (other strategies), the STA module needs to store the configuration items to be sent. After each power-on or reset, according to the STA real-time clock maintenance strategy, if the conditions are met, the data acquisition will continue.

[0028] When the newly issued configuration item differs from the previously existing configuration item, the STA module needs to clear the locally stored minute collection data and re-collect the data using the new configuration item.

[0029] When the STA module receives the downlink data item configuration content for the first time, it needs to determine the data acquisition start flag. If it is not enabled, the STA module will proceed to the next step.

[0030] The STA module obtains the corresponding configuration items based on its own table type (single-phase or three-phase). If the STA module has already performed a data acquisition task, it needs to determine whether the list has been updated. If it has been updated, the STA module needs to store the configuration items and its own table address information in the non-data loss area. After the next power-on or reset, if the reread table address is different from the table address read in the non-data loss area, the previous configuration item list needs to be cleared and data acquisition should not be started.

[0031] As a further preferred technical solution to the above technical solution, in step S3, the curve data is collected as follows:

[0032] It supports a configuration method that does not parse the protocol. During the data item configuration phase, it uses the starting offset plus the content length to avoid the STA module processing the meter reply message, thereby ensuring compatibility with different protocol schemes.

[0033] Using the same timestamp encoding, the acquisition clock is selected as either a real-time RTC clock or a meter clock based on the acquisition clock type. If it is a meter clock, the STA module does not need RTC clock synchronization and directly uses the meter clock for acquisition. If it is a real-time RTC clock, the accurate RTC clock needs to be calculated based on the RTC clock and NTB time in the downlink carrier message, and the local RTC clock is updated. Then, the local RTC clock is used for acquisition. After each acquisition, the STA module reads the local RTC clock once, calculates the time until the next hour, and resets the timer waiting time to ensure that the next round of acquisition starts at the hour.

[0034] As a further preferred technical solution to the above technical solution, in step S3, the storage of curve data is as follows:

[0035] To optimize search efficiency, the STA module manages storage areas by using a unified numbering system. It uses two variables: the latest valid copy timestamp and the corresponding unit number. An algorithm is used to determine the starting position of the copied data item in the power-off non-loss area (without traversing the entire storage area, greatly reducing search time).

[0036] When copying stored data, the STA module sequentially collects data item identifiers in each round and creates an index table to record the location of each data item in the final storage area. When copying different data items, the location of the data can be found directly through the table.

[0037] To achieve the above objectives, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the HPLC curve storage and search optimization method.

[0038] To achieve the above objectives, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the HPLC curve storage and search optimization method.

[0039] The beneficial effects of this invention are as follows:

[0040] (1) High versatility. It can be applied not only to the 645 and 698 standard protocols, but also supports customer-defined table protocols, requiring only a small amount of packet processing adaptation in the concentrator;

[0041] (2) High flexibility. When configuring data items, the "starting offset + content length" method is adopted, which avoids the STA's processing of the meter's reply message and is compatible with different protocol schemes; it supports the selection of whether to use the local clock or the meter clock as the curve acquisition timestamp.

[0042] (3) No data loss in the curve. The STA collects meter data in real time and stores the data in the local non-loss zone when the power is off. When the network is stable or idle, the CCO can re-read the data to ensure that no data loss in the curve is achieved.

[0043] (4) More efficient. It supports minute-by-minute data collection. For some data items that do not have time-sensitive requirements, minute-by-minute data collection can be used to store them locally first. Then, a multi-point copying method is adopted to reduce the copying frequency and improve the network copying efficiency. It supports direct acquisition of raw data packets, which reduces redundant content in the packets and improves transmission efficiency. Attached Figure Description

[0044] Figure 1 This is a schematic diagram of the CCO module performing RTC clock maintenance based on the HPLC curve storage and search optimization method of the present invention.

[0045] Figure 2 This is a schematic diagram of the STA module of the present invention performing RTC real-time clock maintenance based on the HPLC curve storage and search optimization method. Detailed Implementation

[0046] The following description is intended to disclose the present invention and enable those skilled in the art to implement it. The preferred embodiments described below are merely examples, and other obvious variations will occur to those skilled in the art. The basic principles of the invention defined in the following description can be applied to other embodiments, modifications, improvements, equivalents, and other technical solutions that do not depart from the spirit and scope of the invention.

[0047] In the preferred embodiments of the present invention, those skilled in the art should note that the electricity meters, electronic devices, etc. involved in the present invention can be regarded as prior art.

[0048] Preferred embodiment.

[0049] This invention discloses an optimized method for storing and searching HPLC curves, used for storing and searching loading curve data, comprising the following steps:

[0050] Step S1: Perform RTC clock maintenance. The CCO module periodically synchronizes the real-time clock with the concentrator and maintains its own RTC clock. After the network is completed, when the CCO module unicasts the curve acquisition start message to the STA module, it needs to carry the RTC clock and NTB time. The CCO module periodically broadcasts the RTC clock synchronization message to the STA module and the STA module maintains its own RTC clock.

[0051] Step S2: Configure data items. The concentrator actively sends the data item content to be collected. The CCO module synchronizes the data item content and sends it to the STA module via carrier wave. The STA module interacts with the meter periodically according to the data item content to obtain the meter response message.

[0052] Step S3: Data curve acquisition and storage are performed. The STA module parses the meter response message and processes the meter response message according to the preset rules based on the issued configuration parameters, and stores the final data block in the local non-loss area.

[0053] Step S4: Perform curve data reading. The concentrator issues a curve reading instruction, so that after the STA module receives the carrier reading message, it reads the curve data with the corresponding timestamp from the power-off non-loss zone and performs frame assembly and reporting.

[0054] Specifically, in step S1:

[0055] The specific implementation for RTC clock maintenance in the CCO module is as follows:

[0056] Step S1.1: After the CCO module completes networking, it immediately requests a clock from the concentrator and updates the CCO's local RTC clock after the concentrator correctly responds with a clock.

[0057] Step S1.2: After synchronizing the local RTC clock of CCO (after the start curve acquisition is completed), the CCO module requests the clock from the concentrator at fixed intervals to calibrate its own clock, and performs clock synchronization on all STA modules in the network by adding a new HPLC broadcast calibration message (clock synchronization message);

[0058] The specific implementation for RTC real-time clock maintenance of the STA module is as follows:

[0059] Step S1.3: After receiving the downlink clock synchronization message from the CCO module, the STA module performs the following actions:

[0060] Step S1.3.1: Reconstruct the accurate real-time clock based on the RTC clock and NTB time;

[0061] Step S1.3.2: Update the local RTC clock of the STA module;

[0062] Step S1.3.3: Read the meter clock and calculate the time deviation T between the meter clock and the STA local real-time clock. If the clock deviation T is greater than 24 hours, the meter clock is considered abnormal and the STA module will not collect curves. The above T needs to be saved after power failure (i.e., saved to the non-loss area).

[0063] Step S1.3.4: Determine whether to start data acquisition. The conditions for starting data acquisition are that the STA data acquisition configuration task is valid, the meter clock is normal, and the acquisition cycle reaches the hour.

[0064] Step S1.4: After the STA module is reset or powered on again, the following actions are performed:

[0065] Step S1.4.1: Restore the clock deviation T from the non-loss zone after power failure. If the clock deviation T is less than or equal to 24 hours, the STA module reads the meter time and restores the STA local RTC clock according to the deviation value; otherwise, the meter clock is considered abnormal and data acquisition is not started.

[0066] It is worth mentioning that the STA module must prioritize carrier layer meter reading data tasks. Specifically, when the STA module has already started a periodic meter reading task, and detects a meter reading task at the carrier layer (which could be for services such as fee control or daily freeze), it must pause the task after reading the current data item, process the meter reading task promptly, and then resume execution of the periodic task at the breakpoint after processing the meter reading task. When the STA module loses power, it must ensure that the curve data from the previous collection cycle is saved in the power-off non-loss zone.

[0067] Preferably, according to the HPLC-related protocol, the CCO module periodically requests a real-time clock from the concentrator. After obtaining the real-time clock, the HPLC module initiates a time synchronization command and forwards it to all STA modules. Upon receiving the message, the STA module does not send a synchronization message to the energy meter, but only performs synchronization on its local RTC module.

[0068] More specifically, in step S2:

[0069] When configuring the STA module to collect data items, the concentrator needs to actively synchronize the collected data items (content) to the CCO module each time the CCO module is powered on again. After synchronizing the status of the data items, the CCO module determines that the network is complete and selects the corresponding collection configuration item to unicast to the STA module according to the protocol type supported by the meter. The STA needs to periodically read and transfer the data according to the configured data item list. The CCO module compares the collected data items sent by the concentrator with the stored collected data items. If there is a change, the CCO module needs to resend the collected data items to the STA module via carrier wave.

[0070] Furthermore, in step S2:

[0071] Module data acquisition configuration: After receiving the module data acquisition configuration message from the concentrator, the CCO module sends the configuration information in the message to the corresponding STA module, including:

[0072] For the CCO module (other strategies), if the concentrator has already sent data item configurations to the CCO module, the CCO module needs to check every half hour whether a site has joined the network. If a site has joined the network, the module data acquisition configuration carrier message is resent for the site. For STA modules that do not support minute-by-minute acquisition and storage, if the CCO module fails to respond after multiple configurations, the configuration sending weight of this node is reduced, and the sending is delayed for a period of time.

[0073] For STA modules (other strategies), the STA module needs to store the configuration items to be sent. After each power-on or reset, according to the STA real-time clock maintenance strategy, if the conditions are met, the data acquisition will continue.

[0074] When the newly issued configuration item differs from the previously existing configuration item, the STA module needs to clear the locally stored minute collection data and re-collect the data using the new configuration item.

[0075] When the STA module receives the downlink data item configuration content for the first time, it needs to determine the data acquisition start flag. If it is not enabled, the STA module will proceed to the next step.

[0076] The STA module obtains the corresponding configuration items based on its own table type (single-phase or three-phase). If the STA module has already performed a data acquisition task, it needs to determine whether the list has been updated. If it has been updated, the STA module needs to store the configuration items and its own table address information in the non-data loss area. After the next power-on or reset, if the reread table address is different from the table address read in the non-data loss area, the previous configuration item list needs to be cleared and data acquisition should not be started.

[0077] Furthermore, in step S3, the curve data is collected:

[0078] It supports a configuration method that does not parse the protocol. During the data item configuration phase, it uses the starting offset plus the content length to avoid the STA module processing the meter reply message, thereby ensuring compatibility with different protocol schemes.

[0079] Using the same timestamp encoding, the acquisition clock is selected as either a real-time RTC clock or a meter clock based on the acquisition clock type. If it is a meter clock, the STA module does not need RTC clock synchronization and directly uses the meter clock for acquisition. If it is a real-time RTC clock, the accurate RTC clock needs to be calculated based on the RTC clock and NTB time in the downlink carrier message, and the local RTC clock is updated. Then, the local RTC clock is used for acquisition. After each acquisition, the STA module reads the local RTC clock once, calculates the time until the next hour, and resets the timer waiting time to ensure that the next round of acquisition starts at the hour.

[0080] The timer wait duration is calculated using the following formula:

[0081] Ttmr=TPrtc%(Tperiod*60);

[0082] Where Ttmr is the timer wait duration in seconds; TPrtc is the local RTC clock timestamp in seconds; and Tperiod is the STA acquisition period in minutes.

[0083] BCD encoding, format YYMMDDhhmmss (little-endian transmission);

[0084] Generally, in the DL645-2007 energy meter communication protocol, the date and time are BCD encoded and stored in YYMMDDhhmmss (little-endian) format, totaling 6 bytes; in the DL698.45 energy meter communication protocol, the date and time are bin encoded and stored in YYYYMMDDhhmmss (big-endian) format, totaling 7 bytes. To avoid inconsistencies in date and time between different protocols, the date and time are uniformly encoded as a 4-byte bin format, representing the number of seconds elapsed from January 1, 2000, 00:00:00 to the clock's set time.

[0085] Using a unified timestamp encoding not only reduces the number of bytes stored, but also serves as a benchmark for converting dates and times between different protocols.

[0086] Preferably, the storage of the collected data items is as follows:

[0087] The STA module sequentially retrieves one data identifier at a time from the configuration items and frames the corresponding protocol messages to read the meter data.

[0088] The copied reply content is stored using a unified structure, as follows:

[0089]

[0090] If the meter correctly replies with a message, the STA sets the valid variable of the current data identifier structure to true; at the same time, it truncates the reply message according to the "reply content start offset" and "reply content length" in the configuration list to obtain the valid content data[length], where length is the "reply content length".

[0091] If the meter returns an abnormal response, STA sets the valid variable corresponding to the current data identifier to false, indicating that this data item is invalid; and sets length to 0.

[0092] When copying data, the position of any data item identifier can be located by indexing the parameters of the _sample structure, and the corresponding data format is returned based on the parameter result. For example, when the structure variable valid is false, the DL698.45 table protocol is filled with NULL, while the DL645-2007 table protocol is filled with length 0xFF.

[0093] For the storage of data blocks:

[0094] After the meter replies with a message, the STA fills in the content of the _sample structure corresponding to each data item identifier. After all data items have been collected in one round, the STA concatenates all _samples in sequence and adds a collection timestamp as a valid data block, which is then saved to the local non-loss-of-power area.

[0095] The data block storage format is as follows:

[0096]

[0097]

[0098] MAX_ID_NUM represents the total number of data item identifiers collected. In practical applications, the data content in the storage area may be tampered with when the module loses power or is written abnormally. Therefore, a sum_mark checksum flag is added. By summing the data content and comparing it with this checksum variable, the validity of the data block storage data can be identified.

[0099] Preferably, in step S3, the storage of curve data is as follows:

[0100] To optimize search efficiency, the STA module manages storage areas by using a unified numbering system. It uses two variables: the latest valid copy timestamp and the corresponding unit number. An algorithm is used to determine the starting position of the copied data item in the power-off non-loss area (without traversing the entire storage area, greatly reducing search time).

[0101] The specific implementation is as follows: A unified space of 2n (22 >= MAX_DATA_LEN + 5) bytes is reserved in the area where the STA does not lose power when powered off, where MAX_DATA_LEN is the size of the space required to store all data identifiers after one round of collection.

[0102] Since the size of the total power-off non-loss storage area MAX_STORE_REGION_LEN is fixed, the maximum number of storage blocks can be obtained. The formula is as follows:

[0103] MAX_STORE_BLOCK_NUM = MAX_STORE_REGION_LEN / 2n

[0104] Correspondingly, the power-off non-loss storage area is numbered in units of 2n bytes, and the serial number range is: 1 to MAX_STORE_BLOCK_LEN.

[0105] When reading the curve data, the STA analyzes the reading date and time in the downlink message and converts it into a timestamp. The latest storage block offset is obtained through calculation. The formula is as follows:

[0106] OFFESTstore = (TPlast - TPrm) / Tperiod / 60;

[0107] Among them, OFFESTstore is the latest storage block offset; TPlast is the latest valid reading timestamp; TPrm is the reading data item timestamp; Tperiod is the STA collection period, in minutes.

[0108] After obtaining the latest storage block offset, the starting position of the reading data item in the power-off non-loss area is obtained through calculation. The formula is as follows:

[0109] ADDRrm = REGIONbase + (SEQlast - OFFESTstore) * 2n;

[0110] Among them, ADDRrm is the starting position of the reading data item in the power-off non-loss area; REGIONbase is the starting position of the power-off non-loss area; SEQlast is the unit serial number corresponding to the latest valid reading timestamp; OFFESTstore is the latest storage block offset; 2n is the pre-allocated unit space size.

[0111] When SEQlast < OFFESTstore, it means that circular writing has occurred in the storage area. At this time, the starting position of the reading data item in the power-off non-loss area is calculated as follows:

[0112] ADDRrm=REGIONbase+(MAX_STORE_BLOCK_NUM+SEQlast-OFFESTstore)*2n

[0113] Considering that the number of read points for downlink 645 or 698 messages is generally greater than 1, once the starting timestamp is hit without creating a breakpoint, subsequent points can be continuously incremented at fixed offset positions in the storage area. Furthermore, since the read times are generally continuous, once the timestamp of the previous read message is hit, its position can be saved. When the timestamp of the next read message is received, the previous timestamp information can be directly used for offset calculation, reducing computational complexity.

[0114] After the STA is reset or powered on again, it traverses the entire storage area to obtain a new valid storage starting block and records the latest valid copy timestamp and its corresponding cell number. When the STA completes the acquisition of a new round of data items, it updates the corresponding parameters.

[0115] In summary, STA manages storage areas by using a unified numbering system. It uses two variables: the latest valid copy timestamp and its corresponding cell number. An algorithm is used to determine the starting position of the copied data item in the power-off non-loss area, without having to traverse the entire storage area, thus greatly reducing the search time.

[0116] When copying stored data, the STA module sequentially collects data item identifiers in each round and creates an index table to record the location of each data item in the final storage area. When copying different data items, the location of the data can be found directly through the table.

[0117] Specifically, when copying 645 or 698 messages, the data item identifier usually contains multiple identifiers. If the data content is obtained based on the offset after each data read from the storage area, the efficiency will be relatively low.

[0118] Since STA sequentially collects data item identifiers in each round, an index table can be created to record the location of each data item in the final storage area. When copying different data items, the location of the data can be found directly through the table, reducing the amount of computation.

[0119] Define the data item index as follows:

[0120]

[0121] Where MAX_ID_NUM is the total number of data item identifiers collected; LEN is the length of the data item identifier id.

[0122] For example, when reading the identifier id of a data item, the STA compares the IDs to obtain the index of the data item ID in the _id_list, and then uses array subscripts to obtain the offset value. When the uplink packet is in the frame, the STA uses data offset to obtain the _sample content corresponding to the data item identifier id from the read data block space.

[0123] When the collection type is 01H to 04H, the STA needs to index the matching data item identifier from the data block according to the "response content length" field in the data item configuration, and then assemble the relevant protocol frame message for reporting.

[0124] When the acquisition type is 05H, the STA does not need to process the data blocks; it can directly fill the corresponding data field content and frame and report it. To improve the reading efficiency, the uplink data packets can be merged into packets of the maximum supported length before transmission.

[0125] The present invention also discloses an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the HPLC curve storage and search optimization method.

[0126] The present invention also discloses a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the HPLC curve storage and search optimization method.

[0127] It is worth mentioning that the technical features of electricity meters, electronic devices and other related technologies involved in this patent application should be regarded as prior art. The specific structure, working principle and possible control methods and spatial arrangement of these technical features can be adopted using conventional choices in the field, and should not be regarded as the inventive point of this patent. This patent will not be further elaborated in detail.

[0128] For those skilled in the art, modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this invention should be included within the protection scope of this invention.

Claims

1. An optimized method for storing and searching HPLC curves, used for storing and searching loading curve data, characterized in that, Includes the following steps: Step S1: Perform RTC clock maintenance. The CCO module periodically synchronizes the real-time clock with the concentrator and maintains its own RTC clock. After the network is completed, when the CCO module unicasts the curve acquisition start message to the STA module, it needs to carry the RTC clock and NTB time. The CCO module periodically broadcasts the RTC clock synchronization message to the STA module and the STA module maintains its own RTC clock. Step S2: Configure data items. The concentrator actively sends the data item content to be collected. The CCO module synchronizes the data item content and sends it to the STA module via carrier wave. The STA module interacts with the meter periodically according to the data item content to obtain the meter response message. Step S3: Data curve acquisition and storage are performed. The STA module parses the meter response message and processes the meter response message according to the preset rules based on the issued configuration parameters, and stores the final data block in the local non-loss area. In step S3, the curve data is acquired: It supports a configuration method that does not parse the protocol. During the data item configuration phase, it uses the starting offset plus the content length to avoid the STA module processing the meter reply message, thereby ensuring compatibility with different protocol schemes. Using the same timestamp encoding, the acquisition clock is selected as either a real-time RTC clock or a meter clock based on the acquisition clock type. If it is a meter clock, the STA module does not need to synchronize with the RTC clock and directly uses the meter clock for acquisition. If it is a real-time RTC clock, the accurate RTC clock needs to be calculated based on the RTC clock and NTB time in the downlink carrier packet, and the local RTC clock needs to be updated. Then, the local RTC clock is used for acquisition. After each acquisition, the STA module reads the local RTC clock once, calculates the time until the next hour, and resets the timer waiting time to ensure that the next round of acquisition starts at the hour. Step S4: Perform curve data reading. The concentrator issues a curve reading instruction, so that after the STA module receives the carrier reading message, it reads the curve data with the corresponding timestamp from the power-off non-loss zone and performs frame assembly and reporting.

2. The optimization method for storing and searching HPLC curves according to claim 1, characterized in that, In step S1: The specific implementation for RTC clock maintenance in the CCO module is as follows: Step S1.1: After the CCO module completes networking, it immediately requests a clock from the concentrator and updates the CCO's local RTC clock after the concentrator correctly responds with a clock. Step S1.2: After synchronizing the local RTC clock of the CCO, the CCO module requests a clock from the concentrator at fixed intervals to calibrate its own clock, and performs clock calibration on all STA modules in the network by adding a new HPLC broadcast calibration message; The specific implementation for RTC real-time clock maintenance of the STA module is as follows: Step S1.3: After receiving the downlink clock synchronization message from the CCO module, the STA module performs the following actions: Step S1.3.1: Reconstruct the accurate real-time clock based on the RTC clock and NTB time; Step S1.3.2: Update the local RTC clock of the STA module; Step S1.3.3: Read the meter clock and calculate the time deviation T between the meter clock and the STA local real-time clock. If the clock deviation T is greater than 24 hours, the meter clock is considered abnormal and the STA module will not collect curves. The above T needs to be saved after power failure. Step S1.3.4: Determine whether to start data acquisition. The conditions for starting data acquisition are that the STA data acquisition configuration task is valid, the meter clock is normal, and the acquisition cycle reaches the hour. Step S1.4: After the STA module is reset or powered on again, the following actions are performed: Step S1.4.1: Restore the clock deviation T from the non-loss zone after power failure. If the clock deviation T is less than or equal to 24 hours, the STA module reads the meter time and restores the STA local RTC clock according to the deviation value; otherwise, the meter clock is considered abnormal and data acquisition is not started.

3. The optimization method for storing and searching HPLC curves according to claim 2, characterized in that, In step S2: The STA module is configured to collect data items. Each time the CCO module is powered on again, the concentrator needs to actively synchronize the collected data items to the CCO module. After synchronizing the status of the data items, the CCO module determines that the network is complete. Based on the protocol type supported by the meter, it selects the corresponding collection configuration item and unicasts it to the STA module. The STA needs to periodically read and store the configured data item list. The CCO module compares the collected data items sent by the concentrator with the stored collected data items. If there is a change, the CCO module needs to resend the collected data items to the STA module via carrier wave.

4. The optimization method for storing and searching HPLC curves according to claim 3, characterized in that, In step S2: Module data acquisition configuration: After receiving the module data acquisition configuration message from the concentrator, the CCO module sends the configuration information in the message to the corresponding STA module, including: For the CCO module, if the concentrator has already sent data item configurations to the CCO module, the CCO module needs to check every half hour whether a site has joined the network. If a site has joined the network, the module data acquisition configuration carrier message is resent for the site. For STA modules that do not support minute-by-minute acquisition and storage functions on site, if the CCO module fails to respond after multiple timeouts after sending configurations, the configuration sending weight of this node is reduced, and the sending is delayed for a period of time before being sent again. For the STA module, the STA module needs to store the configuration items to be sent. After each power-on or reset, according to the STA real-time clock maintenance strategy, if the conditions are met, the data acquisition will continue. When the newly issued configuration item differs from the previously existing configuration item, the STA module needs to clear the locally stored minute collection data and re-collect the data using the new configuration item. When the STA module receives the downlink data item configuration content for the first time, it needs to determine the data acquisition start flag. If it is not enabled, the STA module will proceed to the next step. The STA module obtains the corresponding configuration items based on its own table type. If the STA module has already had a data collection task, it needs to determine whether the list has been updated. If it has been updated, the STA module needs to store the configuration items and its own table address information in the non-loss-of-data area. When the module is powered on or reset again, if the table address read again is different from the table address read in the non-loss-of-data area, the previous configuration item list needs to be cleared and data collection should not be started.

5. The optimization method for storing and searching HPLC curves according to claim 4, characterized in that, In step S3, the curve data is stored as follows: To optimize search efficiency, the STA module manages storage areas by using a unified numbering system. It uses two variables: the latest valid copy timestamp and the corresponding unit number, and employs an algorithm to determine the starting position of the copied data item in the power-off non-loss area. When copying stored data, the STA module sequentially collects data item identifiers in each round and creates an index table to record the location of each data item in the final storage area. When copying different data items, the location of the data can be found directly through the table.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the HPLC curve storage and search optimization method as described in any one of claims 1 to 5.

7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the HPLC curve storage and search optimization method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Minute-level data acquisition method and device based on HPLC (High Performance Liquid Chromatography) technology

    CN114172542A

  • Meter reading method based on broadband carrier communication network

    WO2022021926A1