A load curve data acquisition and pushing method and system

By adopting an active push mechanism in the AMI system, connecting to the electricity meter using the ANSI C12.18 protocol, and collecting data periodically according to a preset cycle and encapsulating it into DLMS messages for active transmission, the problems of high latency in load curve data and concentrated network traffic were solved, achieving near real-time data transmission and improving system efficiency.

CN122120329AActive Publication Date: 2026-05-29HUNAN TENGFA MICROELECTRONICS CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUNAN TENGFA MICROELECTRONICS CO LTD
Filing Date
2026-04-28
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing AMI systems suffer from high latency, concentrated network traffic, and heavy server load when collecting load curve data, making it impossible to achieve near real-time monitoring and efficient data transmission.

Method used

The system adopts an active push mechanism, connects to the electricity meter via the ANSI C12.18 protocol, reads configuration parameters, triggers data acquisition tasks at preset intervals, calculates storage size and offset, realizes cross-block reading, and encapsulates the data into DLMS, MQTT or CoAP messages to be actively sent to the AMI system master station.

Benefits of technology

It enables proactive, near real-time collection and push of load curve data, reducing network traffic concentration, lowering server load, and improving data timeliness and system efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122120329A_ABST
    Figure CN122120329A_ABST
Patent Text Reader

Abstract

The application is suitable for the technical field of smart grid, and relates to a load curve data acquisition and pushing method and system, which comprises the following steps: a communication module connects an electric meter through an ANSI C12.18 protocol, reads Table 61 configuration parameters and calculates Block storage size; a preset pushing period is used to trigger an acquisition task at a fixed time, and Table 63 is read to obtain a current Block state; the required interval data number is calculated according to the pushing period and interval time; if the current Block valid interval number is sufficient, a non-Block crossing reading process is performed; if the current Block valid interval number is insufficient, a Block crossing reading process is performed, and data is read from the previous Block and the current Block respectively and combined; the read load curve data is encapsulated into a pushing protocol message, and is actively sent to an AMI system master station. The application improves the real-time performance of data acquisition and the system efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of smart grid technology, and in particular relates to a method and system for acquiring and transmitting load curve data. Background Technology

[0002] The ANSI C12.19 standard in the ANSI C12 series defines the internal data model and table structure of the meter. Load curve data is typically stored in Table 61 (configuration table), Table 63 (status table), and Table 64 (data table). Load curve data records parameters such as electricity consumption, voltage, and current at fixed time intervals (e.g., 5 minutes) and is stored in a cyclic block structure, with each block containing multiple interval data.

[0003] Currently, AMI systems primarily collect load curve data using two methods: Method 1 is ANSI C12.18 local meter reading, where staff connect to the meter's optical port using a handheld device and read load curve data using the C12.18 protocol's Read command. This method relies on manual on-site operation, is inefficient, and cannot achieve remote real-time monitoring. Method 2 is ANSI C12.22 polling meter reading, where the AMI system periodically sends Read requests to the meters via the C12.22 network protocol, sequentially reading Table 63 to obtain the current status, and then reading Table 64 to obtain load curve data. The system polls all meters at fixed intervals (e.g., 15 minutes or 1 hour). While this method achieves remote data acquisition, it suffers from high data latency, data reporting depends on the polling cycle, and cannot achieve near real-time monitoring; network traffic is highly concentrated during the polling period, easily causing network congestion; the system needs to maintain the polling scheduling and connection status of a large number of meters, resulting in high resource consumption; and complex retry and supplementary data collection mechanisms are required when there are network fluctuations or meter response timeouts.

[0004] To address these issues, some international standards, such as IEC 62056 (DLMS / COSEM), have introduced a data notification mechanism, allowing devices to proactively report data to the master station. However, the ANSI C12 series standards themselves do not define proactive notification capabilities. Existing AMI systems, when compatible with ANSI C12 meters, can only use a passive polling method, failing to fully utilize the proactive advantages of protocols like DLMS.

[0005] In summary, how to achieve proactive, near real-time, low-load acquisition and reporting of load curve data while being compatible with the ANSI C12.19 protocol has become an urgent technical problem to be solved in the field of smart meter data acquisition. Summary of the Invention

[0006] To address the shortcomings of existing technologies, the purpose of this invention is to provide a method for acquiring and pushing load curve data, thereby solving the problems of high latency, concentrated network traffic, and heavy server load in existing AMI systems for acquiring load curve data.

[0007] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:

[0008] In a first aspect, the present invention provides a method for acquiring and transmitting load curve data, comprising the following steps:

[0009] S10. The communication module establishes a connection with the electricity meter through the ANSI C12.18 protocol and reads the configuration parameters in Table 61 of the ANSI C12.19 standard. The configuration parameters include the maximum number of intervals for a single block, the number of channels, the interval time, and the maximum number of blocks.

[0010] S20. Calculate the storage size of a single block based on the configuration parameters, including the block header length and the interval data length;

[0011] S30. The communication module triggers the collection task at a preset push cycle and reads Table 63 to obtain the current block index and the number of valid intervals in the current block.

[0012] S40. Calculate the number of interval data entries required for this push based on the preset push cycle and the interval time, and determine whether the number of valid intervals in the current block is greater than or equal to the required number of interval data entries;

[0013] S50. If the number of valid intervals in the current block is greater than or equal to the number of required interval data entries, then execute the non-block reading process to read the required number of interval data entries from the current block.

[0014] S60. If the number of valid intervals in the current block is less than the required number of interval data entries, then execute the cross-block reading process, read the interval data from the previous block and the current block respectively, and combine the read data into complete load curve data.

[0015] S70. Encapsulate the read load curve data into a push protocol message and actively send it to the AMI system master station.

[0016] Furthermore, in S20, calculating the storage size of a single block specifically includes:

[0017] Block length = 5 + number of channels × 4;

[0018] Total length of interval data = number of channels × 4 × maximum number of intervals per block;

[0019] The size of a single block = the length of the block header + the total length of the interval data.

[0020] Furthermore, in S50, the non-block-crossing read process specifically includes:

[0021] S501. Calculate the current block header offset based on the current block index and the size of a single block, and read the current block header;

[0022] S502. Calculate the offset of the interval data to be read based on the number of valid intervals in the current block, the number of required interval data entries, the number of channels, and the number of data bytes.

[0023] S503. Calculate the length of the interval data to be read based on the required number of interval data strips, the number of channels, and the number of data bytes;

[0024] S504. Read the interval data from the calculated offset position and combine it with the block head read in S501 to form complete load curve data.

[0025] Furthermore, in S60, the cross-block read process specifically includes:

[0026] S601. Calculate the previous block index based on the current block index. If the current block index is 0, then the previous block index is the maximum number of blocks minus 1.

[0027] S602. Calculate the offset of the previous block header, read the previous block header, and calculate the number of interval data entries to be read from the previous block based on the difference between the required number of interval data entries and the number of valid intervals in the current block.

[0028] S603. Calculate the offset and length of the data interval in the previous block, and read the corresponding data;

[0029] S604. Calculate the current block header offset, read the current block header, and calculate the offset and length of the interval data in the current block based on the number of valid intervals in the current block, and read the corresponding data.

[0030] S605. Combine the previous block header, the previous block interval data, the current block header, and the current block interval data in sequence to form complete load curve data.

[0031] Furthermore, in S601, the formula for calculating the previous Block index is as follows:

[0032] If LastBlock == 0, then FormerBlock = NumberofBlocksSet1-1;

[0033] If LastBlock > 0, then FormerBlock = LastBlock - 1;

[0034] Here, LastBlock is the index of the current block, NumberofBlocksSet1 is the maximum number of blocks, and FormerBlock is the index of the previous block.

[0035] Furthermore, the formula for calculating the interval data offset is as follows:

[0036] Interval data offset = Block header offset + Block header length + Number of offset intervals × Number of channels × Number of data bytes;

[0037] The offset interval number is the number of intervals offset backward from the current Block's starting position, and the number of data bytes is 4.

[0038] Furthermore, in S30, the preset push period is 1 hour, 2 hours, 4 hours or 24 hours.

[0039] Furthermore, the timer for triggering the data collection task is set to be delayed by 2 to 5 minutes after the hour to ensure that the meter has completed freezing the last interval data for the corresponding time period.

[0040] Furthermore, in S70, the push protocol message is a DLMS data notification message, an MQTT message, a CoAP message, or a vendor-specific protocol message.

[0041] Secondly, the present invention also provides a load curve data acquisition and push system, comprising:

[0042] Electricity meters conforming to ANSI C12.19 standards are used to store load curve data;

[0043] The communication module is connected to the electricity meter via the ANSI C12.18 protocol. It is used to read the load curve data of the electricity meter and convert it into DLMS push messages, which are then sent to the AMI system master station.

[0044] The AMI system master station is connected to the communication module and is used to receive load curve data actively pushed by the communication module.

[0045] Compared with the prior art, the load curve data acquisition and push method and system provided by the present invention have at least the following advantages:

[0046] Existing technologies such as AMI systems suffer from high latency, concentrated network traffic, and heavy server load when collecting load curve data. This invention addresses these issues with an active push mechanism, enabling load curve data to be automatically reported within 2-5 minutes after each push cycle, significantly improving data timeliness compared to traditional polling methods (typically 15 minutes to 1 hour). Furthermore, the active push from the electricity meter disperses network traffic, avoiding network congestion caused by concentrated polling in AMI systems. The server no longer needs to maintain extensive polling scheduling, resulting in significantly reduced CPU and memory usage. The standardized offset calculation formula and robust cross-block processing logic ensure accurate data reading regardless of whether the data is distributed across a single block or multiple blocks, preventing data loss, duplication, or misalignment. This invention achieves active, timed push of load curve data under the ANSI C12.19 protocol, resolving the problems of high latency, concentrated network load, and heavy server pressure associated with traditional polling methods, thus improving the real-time performance and system efficiency of data acquisition. Attached Figure Description

[0047] To more clearly illustrate the solution of the present invention, a brief introduction will be given to the drawings used in the description of the embodiments below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0048] Figure 1 A flowchart illustrating a method for acquiring and pushing load curve data is provided in an embodiment of the present invention.

[0049] Figure 2 This is an architecture diagram of a load curve data acquisition and push system provided in an embodiment of the present invention. Detailed Implementation

[0050] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. For example, terms such as “length,” “width,” “upper,” “lower,” “left,” “right,” “front,” “rear,” “vertical,” “horizontal,” “top,” “bottom,” “inner,” and “outer” indicate orientations or positions based on the accompanying drawings and are for ease of description only, and should not be construed as limiting the technical solution. The terms “comprising” and “having,” and any variations thereof, in the specification, claims, and accompanying drawings of this invention, are intended to cover non-exclusive inclusion. The terms “first,” “second,” etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish different objects and not to describe a particular order. In the specification, claims, and accompanying drawings of this invention, when an element is referred to as “fixed to,” “mounted to,” “set on,” or “connected to” another element, it may be directly or indirectly located on that other element. For example, when an element is referred to as “connected to” another element, it may be directly or indirectly connected to that other element. Furthermore, the reference to "embodiment" herein means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0051] This invention provides a method for acquiring and pushing load curve data, applied to the process of acquiring load curve data in a smart grid AMI system. The method includes the following steps:

[0052] S10. The communication module establishes a connection with the meter via the ANSI C12.18 protocol and reads the configuration parameters from Table 61 of the ANSI C12.19 standard. These parameters include the maximum number of intervals per block, the number of channels, the interval time, and the maximum number of blocks. S20. The module calculates the storage size of a single block based on the configuration parameters, including the block header length and the interval data length. S30. The communication module triggers a data collection task periodically according to a preset push cycle and reads the Table 61. S3. Obtain the current Block index and the number of valid intervals in the current Block; S40. Calculate the number of interval data entries required for this push based on the preset push cycle and interval time, and determine whether the number of valid intervals in the current Block is greater than or equal to the required number of interval data entries; S50. If the number of valid intervals in the current Block is greater than or equal to the required number of interval data entries, execute the non-cross-block reading process to read the required number of interval data entries from the current Block; S60. If the number of valid intervals in the current Block is less than the required number of interval data entries, execute the cross-block reading process to read interval data from the previous Block and the current Block respectively, and combine the read data into complete load curve data; S70. Encapsulate the read load curve data into a push protocol message and actively send it to the AMI system master station.

[0053] This invention enables proactive, timed push of load curve data under the ANSI C12.19 protocol, solving the problems of high data latency, concentrated network load, and high server pressure in traditional polling methods, thereby improving the real-time performance of data acquisition and system efficiency.

[0054] To enable those skilled in the art to better understand the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.

[0055] This invention provides a method for acquiring and pushing load curve data, applied in the process of acquiring load curve data in a smart grid AMI system, such as... Figure 1 As shown, in this embodiment, the load curve data acquisition and push method includes the following steps:

[0056] S10. The communication module establishes a connection with the electricity meter through the ANSI C12.18 protocol and reads the configuration parameters in Table 61 of the ANSI C12.19 standard. The configuration parameters include the maximum number of intervals (NumberofIntervalsSet1), the number of channels (NumberofChannelsSet1), the interval time (MaximumIntervalTimeSet1), and the maximum number of blocks (NumberofBlocksSet1).

[0057] Specifically, in this embodiment, the maximum number of intervals for a single block is 288, the number of channels is 4, and the interval time is 5 minutes.

[0058] S20. Calculate the storage size of a single block based on the configuration parameters, including the block header length and the interval data length.

[0059] Specifically, in this embodiment, the formula for calculating the storage size of a single block is as follows:

[0060] BlockHeadLen = 5 + Number of ChannelsSet1 × 4;

[0061] Total length of interval data (IntervalDataLen_per_block) = Number of channels (NumberofChannelsSet1) × 4 × Maximum number of intervals per block (NumberofIntervalsSet1);

[0062] The size of a single block (BlockSize) = the length of the block header (BlockHeadLen) + the total length of the interval data (IntervalDataLen_per_block).

[0063] In this embodiment, the number of channels is 4 and the maximum interval is 288, then:

[0064] BlockHeadLen = 5 + 4 × 4 = 21 bytes;

[0065] IntervalDataLen_per_block = 4 × 4 × 288 = 4608 bytes;

[0066] BlockSize = 21 + 4608 = 4629 bytes.

[0067] S30. The communication module triggers the collection task at a preset push cycle and reads Table 63 to obtain the current block index and the number of valid intervals in the current block.

[0068] Specifically, in this embodiment, the preset push cycle is 1 hour, 2 hours, 4 hours or 24 hours, the interval is 5 minutes, 15 minutes or 30 minutes, and the time to trigger the data collection task is set to be delayed by 2 to 5 minutes after the hour to ensure that the meter has completed the freezing of the last interval data of the corresponding time period and to avoid reading incomplete data. If the push cycle is 2 hours, the data collection task is triggered at 0:02, 2:02, 4:02 and other times (delayed by 2-5 minutes after the hour).

[0069] S40. Calculate the number of interval data entries required for this push based on the preset push cycle and interval time, and determine whether the number of valid intervals in the current block is greater than or equal to the required number of interval data entries.

[0070] Specifically, in this embodiment, Table 63 is read to obtain the current state. LastBlock is the latest block index (0-NumberofBlocksSet1-1), and NumberValidIntervals is the number of valid intervals in the current block (0-288). The formula for calculating the number of interval data entries required for this push is as follows:

[0071] IntervalCount = Push period (minutes) / MaximumIntervalTimeSet1;

[0072] For example, with a 2-hour push cycle and a 5-minute interval, IntervalCount = 120 / 5 = 24 messages.

[0073] S50. If the number of valid intervals (NumberValidIntervals) in the current Block is greater than or equal to the number of interval data entries required (IntervalCount), it means that the current Block has sufficient data. The non-block reading process is executed to read the required number of interval data entries from the current Block.

[0074] Specifically, in this embodiment, the non-block read process includes:

[0075] S501. Calculate the current block header offset based on the current block index and the size of a single block, and read the current block header, reading the BlockHeadLen bytes from the BlockHeadOffset position in Table64.

[0076] The formula is BlockHeadOffset = LastBlock × BlockSize;

[0077] S502. Calculate the offset of the interval data to be read based on the number of valid intervals in the current block, the number of required interval data entries, the number of channels, and the number of data bytes.

[0078] The formula is:

[0079] IntervalDataOffset = BlockHeadOffset + BlockHeadLen + (NumberValidIntervals - IntervalCount) × NumberofChannelsSet1 × Number of data bytes.

[0080] S503. Calculate the length of the interval data to be read based on the required number of interval data strips, the number of channels, and the number of data bytes;

[0081] The formula is:

[0082] IntervalDataLen = IntervalCount × NumberofChannelsSet1 × Number of data bytes;

[0083] S504. Read the interval data IntervalDataLen from the calculated offset (IntervalDataOffset) position and combine it with the block header read in S501 to form the complete load curve data. Combined data: Complete data = Block header + Interval data.

[0084] S60. If the number of valid intervals (NumberValidIntervals) in the current block is less than the required number of interval data entries (IntervalCount), it means that the current block has insufficient data. Execute the cross-block reading process, read interval data from the previous block and the current block respectively, and combine the read data into complete load curve data.

[0085] Specifically, in this embodiment, the cross-block read process includes:

[0086] S601. Calculate the previous block index based on the current block index. If the current block index is 0, then the previous block index is the maximum number of blocks minus 1.

[0087] The formula for calculating the previous block index is as follows:

[0088] If LastBlock == 0, then FormerBlock = NumberofBlocksSet1-1;

[0089] If LastBlock > 0, then FormerBlock = LastBlock - 1;

[0090] Here, LastBlock is the index of the current block, NumberofBlocksSet1 is the maximum number of blocks, and FormerBlock is the index of the previous block.

[0091] S602. Calculate the offset of the previous block header using the following formula:

[0092] FormerBlockHeadOffset=FormerBlock×BlockSize;

[0093] Read the header of the previous block, read the BlockHeadLen bytes from FormerBlockHeadOffset in Table64, and calculate the number of interval data rows to be read from the previous block based on the difference between the required number of interval data rows and the number of valid intervals in the current block. The formula is as follows:

[0094] FormerIntervalCount=IntervalCount-NumberValidIntervals.

[0095] S603. Calculate the offset and length of the data interval in the previous block, and read the corresponding data;

[0096] The offset formula is:

[0097] FormerIntervalDataOffset = FormerBlockHeadOffset + BlockHeadLen + (NumberofIntervalsSet1 - FormerIntervalCount) × NumberofChannelsSet1 × Number of data bytes;

[0098] The length formula is:

[0099] FormerIntervalDataLen = FormerIntervalCount × NumberofChannelsSet1 × Number of data bytes;

[0100] The data is read from the FormerIntervalDataOffset, which reads the FormerIntervalDataLen bytes.

[0101] S604. Calculate the current block header offset, read the current block header (only when NumberValidIntervals>0), and calculate the offset and length of the interval data in the current block based on the number of valid intervals in the current block, and read the corresponding data.

[0102] Calculate the current block header offset:

[0103] BlockHeadOffset=LastBlock×BlockSize;

[0104] Read the current block header: Read the BlockHeadLen bytes from the BlockHeadOffset in Table64;

[0105] Calculate the current block interval data offset:

[0106] CurrentIntervalDataOffset=BlockHeadOffset+BlockHeadLen;

[0107] Calculate the data length:

[0108] CurrentIntervalDataLen=NumberValidIntervals×NumberofChannelsSet1×4;

[0109] Read data: Read the CurrentIntervalDataLen bytes from CurrentIntervalDataOffset.

[0110] S605. Combine the previous block header, the previous block interval data, the current block header, and the current block interval data in sequence to form complete load curve data.

[0111] Special case: When NumberValidIntervals == 0 (just as the block is being switched), only the data from the previous block is included.

[0112] S70. Encapsulate the read load curve data into a push protocol message and actively send it to the AMI system master station.

[0113] Specifically, in this embodiment, the push protocol message is a DLMS data notification message, an MQTT message (applicable to IoT scenarios), a CoAP message (applicable to low-power scenarios), or a vendor-specific proprietary protocol message (applicable to specific AMI systems).

[0114] Furthermore, in this embodiment, the accuracy of the offset calculation is as follows: the provided offset calculation formula fully considers the influence of the Block header length (5 + number of channels × 4), the length of each interval data (number of channels × 4), and the position calculated from the latest data backward.

[0115] Furthermore, in this embodiment, the Block index reversal process is handled by determining whether LastBlock is 0, thus correctly handling the cyclic case where the index reverses from 119 to 0.

[0116] When LastBlock=0, FormerBlock=NumberofBlocksSet1 -1 (flipped);

[0117] When LastBlock > 0, FormerBlock = LastBlock - 1 (normal).

[0118] Furthermore, in this embodiment, boundary case handling: for the special case of NumberValidIntervals=0 (exactly the moment of block switching), only the data of the previous block is read, and the interval data of the current block is not read to avoid reading empty data.

[0119] Example 1

[0120] Reading without crossing blocks

[0121] Scenario settings: The meter model is Libra 3C, the push cycle is 2 hours, the interval is 5 minutes, the number of channels is 4, and the maximum interval per meter is 288.

[0122] 1. Initialization phase:

[0123] Read Table 61;

[0124] BlockHeadLen = 5 + 4 × 4 = 21 bytes;

[0125] IntervalDataLen_per_block = 4 × 4 × 288 = 4608 bytes;

[0126] BlockSize = 4629 bytes.

[0127] 2. Trigger the data collection task:

[0128] Read Table 63: LastBlock=10, NumberValidIntervals=156.

[0129] 3. Calculate the required number of entries:

[0130] IntervalCount = 120 / 5 = 24 entries.

[0131] 4. Judgment: NumberValidIntervals(156) >= IntervalCount(24), does not cross Blocks.

[0132] 5. Calculate the offset:

[0133] BlockHeadOffset = 10 × 4629 = 46290 bytes;

[0134] IntervalDataOffset = 46290 + 21 + (156-24) × 16 = 48423 bytes;

[0135] IntervalDataLen = 24 × 16 = 384 bytes.

[0136] 6. Read data:

[0137] Read 21 bytes (block header) from position 46290;

[0138] Read 384 bytes (interval data) from position 48423.

[0139] 7. Encapsulate DLMS messages and push them.

[0140] Conclusion: 24 data entries (405 bytes in total) were successfully read within 2 hours and actively pushed to the AMI system.

[0141] Example 2

[0142] Scenario settings: The configuration is the same as in Example 1, but the result of reading Table 63 is LastBlock=9 and NumberValidIntervals=15;

[0143] 1. Calculate the required number of entries:

[0144] IntervalCount = 24 entries.

[0145] 2. Determine if NumberValidIntervals(15) < IntervalCount(24), then it must cross a block.

[0146] 3. Locate the previous block: FormerBlock = 9-1=8.

[0147] 4. Read from Block 8:

[0148] FormerBlockHeadOffset = 8 × 4629 = 37032 bytes;

[0149] FormerIntervalCount = 24-15 = 9 items;

[0150] FormerIntervalDataOffset = 37032 + 21 + (288-9)×16 = 41517 bytes;

[0151] FormerIntervalDataLen = 9 × 16 = 144 bytes;

[0152] Read the 21-byte header of Block 8 plus 144 bytes of interval data.

[0153] 5. Read from Block 9:

[0154] BlockHeadOffset = 9 × 4629 = 41661 bytes;

[0155] CurrentIntervalDataOffset = 41661 + 21 = 41682 bytes;

[0156] CurrentIntervalDataLen = 15 × 16 = 240 bytes;

[0157] Read the 21-byte header of Block 9 plus 240 bytes of interval data.

[0158] 6. Combined data:

[0159] Complete data = Block8 header (21) + Block8 data (144) + Block9 header (21) + Block9 data (240);

[0160] Total length = 426 bytes.

[0161] Conclusion: Successfully read 24 data entries across blocks, ensuring data continuity.

[0162] Compared with existing technologies, the load curve data acquisition and push method and system described in the above embodiments suffer from high latency, concentrated network traffic, and heavy server load in existing AMI systems. This invention, through an active push mechanism, allows load curve data to be automatically reported within 2-5 minutes after each push cycle, significantly improving data timeliness compared to traditional polling methods (typically 15 minutes to 1 hour). The active push from the electricity meter in this invention disperses network traffic, avoiding network congestion caused by concentrated polling in AMI systems. The server does not need to maintain a large amount of polling scheduling, significantly reducing CPU and memory usage. The standardized offset calculation formula and comprehensive cross-block processing logic in this invention ensure accurate reading regardless of whether data is distributed across a single block or multiple blocks, avoiding data loss, duplication, or misalignment. This invention achieves active, timed push of load curve data under the ANSI C12.19 protocol, solving the problems of high data latency, concentrated network load, and heavy server pressure in traditional polling methods, thus improving the real-time performance of data acquisition and system efficiency.

[0163] Obviously, the embodiments described above are merely preferred embodiments of the present invention, and not all embodiments. The accompanying drawings illustrate preferred embodiments of the present invention, but do not limit the scope of the patent. The present invention can be implemented in many different forms; rather, these embodiments are provided to provide a more thorough and complete understanding of the disclosure of the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing specific embodiments, or make equivalent substitutions for some of the technical features. Any equivalent structures made using the content of this specification and drawings, directly or indirectly applied to other related technical fields, are similarly within the scope of patent protection of this invention.

Claims

1. A method for acquiring and transmitting load curve data, characterized in that, Includes the following steps: S10. The communication module establishes a connection with the electricity meter through the ANSI C12.18 protocol and reads the configuration parameters in Table 61 of the ANSI C12.19 standard. The configuration parameters include the maximum number of intervals for a single block, the number of channels, the interval time, and the maximum number of blocks. S20. Calculate the storage size of a single block based on the configuration parameters, including the block header length and the interval data length; S30. The communication module triggers the collection task at a preset push cycle and reads Table 63 to obtain the current block index and the number of valid intervals in the current block. S40. Calculate the number of interval data entries required for this push based on the preset push cycle and the interval time, and determine whether the number of valid intervals in the current block is greater than or equal to the required number of interval data entries; S50. If the number of valid intervals in the current block is greater than or equal to the number of required interval data entries, then execute the non-block reading process to read the required number of interval data entries from the current block. S60. If the number of valid intervals in the current block is less than the required number of interval data entries, then execute the cross-block reading process, read the interval data from the previous block and the current block respectively, and combine the read data into complete load curve data. S70. Encapsulate the read load curve data into a push protocol message and actively send it to the AMI system master station.

2. The method for acquiring and pushing load curve data according to claim 1, characterized in that, In step S20, calculating the storage size of a single block specifically includes: Block length = 5 + number of channels × 4; Total length of interval data = number of channels × 4 × maximum number of intervals per block; The size of a single block = the length of the block header + the total length of the interval data.

3. The method for acquiring and pushing load curve data according to claim 1, characterized in that, The non-block read process in S50 specifically includes: S501. Calculate the current block header offset based on the current block index and the size of a single block, and read the current block header; S502. Calculate the offset of the interval data to be read based on the number of valid intervals in the current block, the number of required interval data entries, the number of channels, and the number of data bytes. S503. Calculate the length of the interval data to be read based on the required number of interval data strips, the number of channels, and the number of data bytes; S504. Read the interval data from the calculated offset position and combine it with the block head read in S501 to form complete load curve data.

4. The method for acquiring and pushing load curve data according to claim 1, characterized in that, In S60, the cross-block read process specifically includes: S601. Calculate the previous block index based on the current block index. If the current block index is 0, then the previous block index is the maximum number of blocks minus 1. S602. Calculate the offset of the previous block header, read the previous block header, and calculate the number of interval data entries to be read from the previous block based on the difference between the required number of interval data entries and the number of valid intervals in the current block. S603. Calculate the offset and length of the data interval in the previous block, and read the corresponding data; S604. Calculate the current block header offset, read the current block header, and calculate the offset and length of the interval data in the current block based on the number of valid intervals in the current block, and read the corresponding data. S605. Combine the previous block header, the previous block interval data, the current block header, and the current block interval data in sequence to form complete load curve data.

5. The method for acquiring and pushing load curve data according to claim 4, characterized in that, In step S601, the formula for calculating the previous Block index is as follows: If LastBlock == 0, then FormerBlock = NumberofBlocksSet1-1; If LastBlock > 0, then FormerBlock = LastBlock - 1; Here, LastBlock is the index of the current block, NumberofBlocksSet1 is the maximum number of blocks, and FormerBlock is the index of the previous block.

6. A method for acquiring and pushing load curve data according to claim 3 or 4, characterized in that, The formula for calculating the interval data offset is as follows: Interval data offset = Block header offset + Block header length + Number of offset intervals × Number of channels × Number of data bytes; The offset interval number is the number of intervals offset backward from the current Block's starting position, and the number of data bytes is 4.

7. The method for acquiring and pushing load curve data according to claim 1, characterized in that, In S30, the preset push period is 1 hour, 2 hours, 4 hours or 24 hours.

8. The method for acquiring and pushing load curve data according to claim 7, characterized in that, The timer for triggering the data collection task is set to be delayed by 2 to 5 minutes after the hour to ensure that the meter has completed freezing the last interval data for the corresponding time period.

9. The method for acquiring and pushing load curve data according to claim 1, characterized in that, In S70, the push protocol message is a DLMS data notification message, an MQTT message, a CoAP message, or a vendor-specific protocol message.

10. A system employing the method as described in any one of claims 1 to 9, characterized in that, include: Electricity meters conforming to ANSI C12.19 standards are used to store load curve data; The communication module is connected to the electricity meter via the ANSI C12.18 protocol. It is used to read the load curve data of the electricity meter and convert it into DLMS push messages, which are then sent to the AMI system master station. The AMI system master station is connected to the communication module and is used to receive load curve data actively pushed by the communication module.