An edge-computing-based real-time data acquisition terminal method

By performing protocol verification and merging of field source identifiers on the electricity meter message frames, the problem of inaccurate field update status criteria in the smart grid is solved, and priority scheduling and re-acquisition sequence generation at the field cluster level are realized, improving the timeliness of acquisition scheduling and resource controllability.

CN121924150BActive Publication Date: 2026-06-26HANGZHOU HUALONG ELECTRONIC TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HANGZHOU HUALONG ELECTRONIC TECH CO LTD
Filing Date
2026-03-26
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

In smart grid metering and energy management scenarios, existing technologies lack precise criteria for field update status and a mechanism for merging field source identifiers, leading to unstable collection request organization and difficulty in achieving consistent priority scheduling and re-collection sequence generation at the field cluster level.

Method used

By collecting the original message frames from the electricity meter, performing protocol verification and parsing, a field-based collection basic record is formed. The current obsolescence duration and the most recent successful collection interval of the field are calculated to form an expired field set. Field clusters are constructed by merging fields with the same source identifier, the minimum supporting field set is determined, a field cluster collection request sequence is generated, and a collection request is generated by applying load constraints in combination with the operation statistics record.

Benefits of technology

It enables calculable filtering and re-collection of expired fields, improving the timeliness and resource controllability of edge-side collection scheduling, and ensuring the orderly sending of collection requests and the priority scheduling of field clusters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121924150B_ABST
    Figure CN121924150B_ABST
Patent Text Reader

Abstract

The application discloses a kind of real-time data acquisition terminal methods based on edge computing, it is related to edge computing data acquisition technical field, including, based on field acquisition basic record, calculate field current stale length and field recent successful acquisition interval, form expiration field set and expiration field determination record;The expiration field set is merged according to the field homology identification in field acquisition basic record, constructs field cluster expiration field set and determines minimum support field set, generates field cluster construction record;According to field cluster construction record and in combination with expiration field determination record, calculate field cluster acquisition priority, generate field cluster acquisition request sequence by running statistical record to impose bearing constraint, and send acquisition request message frame in control cycle, to expiration field executes reacquisition.The application realizes the ordered scheduling of acquisition request message frame in control cycle and field reacquisition under bearing constraint.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of edge computing data acquisition technology, and in particular to a real-time data acquisition terminal method based on edge computing. Background Technology

[0002] In smart grid metering and energy management scenarios, real-time data acquisition terminals are typically deployed at the edge to collect and aggregate continuous data streams from multiple energy meters and multiple data fields. Conventional methods often rely on established communication protocols to complete message access and parsing, structure the field data, write it into a cache, and send it up according to a strategy. At the same time, they maintain operational statistics such as communication load, parsing load, and cache status to support the stable operation of the acquisition link and subsequent scheduling and control.

[0003] However, existing methods still have two limitations: First, field update status is mostly characterized by a fixed polling period or a single timeout rule, lacking a quantitative criterion that links the current obsolescence duration of a field with the interval between the most recent successful collection of the field, making it difficult to make comparable rankings of the expiration levels of different fields; Second, collection request organization is mostly based on direct assembly of field lists, with few introduction of merging mechanisms for field origin identifiers and minimum supporting field constraints, and insufficient coupling with cache carrying capacity, parsing carrying capacity, and communication load budget, resulting in weak consistency between field cluster-level priority scheduling and re-collection sequence generation. Summary of the Invention

[0004] In view of the aforementioned existing problems, the present invention is proposed.

[0005] Therefore, this invention provides a real-time data acquisition terminal method based on edge computing, which solves the problems of priority scheduling of expiring field clusters and unstable generation of re-acquisition request sequences under operational constraints.

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

[0007] This invention provides a real-time data acquisition terminal method based on edge computing, which includes acquiring the original message frames of the electricity meter and completing the protocol verification and parsing, forming a field-based acquisition basic record containing field source identifiers and synchronously updating the operation statistics record.

[0008] Based on the field-based collection of basic records, the current obsolescence duration of the fields and the interval of the most recent successful collection of the fields are calculated to form a set of expired fields and an expired field determination record.

[0009] The expired field set is merged according to the field origin identifier in the field-based collection basic record, and a field cluster expired field set is constructed. The minimum supporting field set is determined, and a field cluster construction record is generated.

[0010] The field cluster is constructed based on the field cluster and the expiration field determination record is combined to calculate the field cluster collection priority. The field cluster collection request sequence is generated by applying the bearing constraint through the running statistical record and sending the collection request message frame within the control period to perform re-collection of the expiration field.

[0011] As a preferred embodiment of the real-time data acquisition terminal method based on edge computing described in this invention, the original message frame of the electricity meter includes at least electricity meter identification information, protocol control information, field value content, and message verification information.

[0012] As a preferred embodiment of the real-time data acquisition terminal method based on edge computing described in this invention, the following steps are included: The protocol verification and parsing process, forming a field-based acquisition base record containing field origin identifiers, involves performing message structure identification, field value extraction, and message verification operations on the original message frame from the electricity meter to obtain field numbers, field values, verification result information, and message structure identification results, and recording the message reception time as the acquisition time record; reading the electricity meter identification information to obtain the electricity meter number, and combining the electricity meter number with the field number to generate a field index pair; associating and combining the field index pair, field values, acquisition time record, and verification result information to form a field-based acquisition base record; generating a field origin identifier based on the message structure identification result, and storing the field origin identifier and field index pair together.

[0013] As a preferred embodiment of the real-time data acquisition terminal method based on edge computing described in this invention, the update of the running statistics record includes updating the running statistics record when the field-based acquisition basic record is written to the sequential cache. The running statistics record includes a record of the number of valid communication bytes, a record of the number of protocol verification and parsing attempts, a record of the number of times the field-based acquisition basic record is generated, and a record of the number of remaining available cache entries. At the end of the control cycle, the record of the number of valid communication bytes, the record of the number of times the protocol verification and parsing attempts, and the record of the number of times the field-based acquisition basic record is generated are written to the statistics field of the previous control cycle, and the record of the number of remaining available cache entries is written to the current cache status field.

[0014] As a preferred embodiment of the real-time data acquisition terminal method based on edge computing described in this invention, the calculation of the current stale duration of the field and the most recent successful acquisition interval of the field includes: merging the field-based acquisition base records according to field indexes to form a field index pair merging sequence; extracting the most recent successful acquisition time record and the penultimate successful acquisition time record from the field index pair merging sequence based on the verification result information; taking the acquisition time record of the field-based acquisition base record at the end of the field index pair merging sequence as the judgment time record; obtaining the current stale duration of the field from the difference between the judgment time record and the most recent successful acquisition time record, and obtaining the most recent successful acquisition interval of the field from the difference between the most recent successful acquisition time record and the penultimate successful acquisition time record.

[0015] As a preferred embodiment of the real-time data acquisition terminal method based on edge computing described in this invention, the step of forming the expiration field set and the expiration field determination record includes: comparing the current stale duration of a field with the interval of the most recent successful acquisition of the field; writing field index pairs whose current stale duration is not less than the interval of the most recent successful acquisition of the field into the expiration field set; generating an expiration field determination record, which includes at least a field index pair, a determination time record, a record of the most recent successful acquisition time, a record of the second-to-last successful acquisition time, the current stale duration of the field and the interval of the most recent successful acquisition of the field, and storing the expiration field determination record in association with the expiration field set.

[0016] As a preferred embodiment of the real-time data acquisition terminal method based on edge computing described in this invention, the construction of the field cluster expired field set includes: matching the expired field index pairs in the expired field set with the expired field judgment records, and extracting the record of the most recent successful acquisition time; using the expired field index pairs and the record of the most recent successful acquisition time as the matching key, locating the field-based acquisition basic records in the field-based acquisition basic records that indicate that the verification has passed the field-based acquisition basic records and extracting the field homology identifier; merging the expired field index pairs with the same field homology identifier, and using the field homology identifier value as the field cluster number to generate the field cluster expired field set.

[0017] As a preferred embodiment of the real-time data acquisition terminal method based on edge computing described in this invention, the step of determining the minimum supporting field set and generating a field cluster construction record includes: filtering the expired field index pairs that meet the required field identifiers within the field cluster expired field set based on a unified field dictionary to form a required field set; when the required field set is empty, determining the cluster guiding field index pairs according to the lexicographical order rules of minimum field code length in bytes, minimum field number, and minimum electricity meter number; merging the cluster guiding field index pairs into the required field set to form the minimum supporting field set; and writing the field cluster number, the field cluster expired field set, and the minimum supporting field set into the field cluster construction record.

[0018] As a preferred embodiment of the real-time data acquisition terminal method based on edge computing described in this invention, the calculation of field cluster acquisition priority includes: associating the minimum supporting field set in the field cluster construction record with the due date field determination record by field index pairing, obtaining the current stale duration and the most recent successful acquisition interval of the field corresponding to each field index pair in the minimum supporting field set; using the ratio of the current stale duration to the most recent successful acquisition interval as the field-level overdue ratio, and using the maximum value of the field-level overdue ratio in the minimum supporting field set as the field cluster acquisition priority value; sorting the field cluster numbers according to the field cluster acquisition priority value to form a field cluster priority sequence.

[0019] As a preferred embodiment of the real-time data acquisition terminal method based on edge computing described in this invention, the step of applying load constraints to generate a field cluster acquisition request sequence and sending acquisition request message frames within a control period includes: reading the running statistics record to obtain the number of remaining available cache entries and determining the upper limit of the number of entries; reading the running statistics record to obtain the protocol verification and parsing count record and determining the upper limit of the number of entries; calculating the load budget based on the number of valid communication bytes and the protocol verification and parsing count record in the running statistics record; traversing the field cluster numbers according to the field cluster priority sequence, constructing a record based on the field cluster to generate a set of request field index pairs, and solidifying the request field index pair set when the number of elements in the request field index pair set does not exceed the upper limit of the number of entries and the total number of bytes of the corresponding field encoding length in the request field number list does not exceed the load budget; generating field cluster acquisition request records from the solidified request field index pair set and writing them into the field cluster acquisition request sequence in the generation order, wherein the number of entries in the field cluster acquisition request sequence does not exceed the upper limit of the number of entries; converting the field cluster acquisition request sequence into acquisition request message frames and sending them within a control period.

[0020] The beneficial effects of this invention are as follows: by associating the current obsolescence duration of a field with the interval between the most recent successful collection of the field and writing it into the expiration field determination record, the calculable filtering of the expiration field set and the quantitative characterization of the field-level overdue ratio are realized; by merging the field origin identifiers to obtain the expiration field set of the field cluster and determining the minimum supporting field set, and by combining the field cluster collection priority and the running statistics record to apply the bearing constraint to generate the field cluster collection request sequence, the orderly sending of collection request message frames and the re-collection of expiration fields within the control period are realized, thereby improving the timeliness and resource controllability of edge-side collection scheduling. Attached Figure Description

[0021] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. 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.

[0022] Figure 1 This is a flowchart of a real-time data acquisition terminal method based on edge computing.

[0023] Figure 2 This is a flowchart for generating basic records for field-based data collection and updating statistical records.

[0024] Figure 3 A flowchart for calculating the expiration field and constructing the field cluster.

[0025] Figure 4 A flowchart for calculating the collection priority of field clusters and generating collection request sequences.

[0026] Figure 5 Comparison curves showing the successful re-collection rate of expired fields under different load intensities and protocol verification failure rates. Detailed Implementation

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

[0028] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0029] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.

[0030] Reference Figures 1-5 This is one embodiment of the present invention, which provides a real-time data acquisition terminal method based on edge computing, including the following steps:

[0031] S1. Collect the original message frames of the electricity meter and complete the protocol verification and parsing to form a field-based collection basic record containing the field source identifier and update the operation statistics record synchronously.

[0032] Furthermore, the data acquisition terminal receives the original message frames sent by the energy meter through the communication link established with the energy meter. The original message frame of the energy meter refers to the complete communication message sent by the energy meter periodically or on demand according to the communication protocol. The original message frame of the energy meter includes at least the energy meter identification information, protocol control information, field value content, and message verification information. The field value content consists of a sequence of byte codes for several fields. When receiving the original message frame of the energy meter, the data acquisition terminal records the message reception time as the data acquisition time record.

[0033] After receiving the original message frame from the electricity meter, the acquisition terminal performs protocol verification and parsing. Protocol verification and parsing includes message structure identification, field boundary identification, field order identification, field length identification, field value extraction, and message verification operation. Message structure identification is used to determine the start identifier position, end identifier position, address content position, control content position, field value content position, and verification content position in the original message frame from the electricity meter. Field boundary identification, field order identification, and field length identification are used to determine the start and end positions of the encoded byte sequence of each field within the field value content position. Field value extraction is used to obtain the encoded byte sequence of the field and split it into field number byte segment and field value byte segment. The field number byte segment is used to generate the field number, and the field value byte segment is used to generate the field value. Message verification operation is used to perform verification operation on the message verification information and output the verification result information.

[0034] It should be noted that various communication protocols can be used between the electricity meter and the data acquisition terminal. These protocols differ in message structure, field encoding method, and verification method. This embodiment uses a general electricity meter communication protocol as an example. The example communication protocol adopts a message organization format of start identifier, address content, control content, field value content, verification content, and end identifier. The data acquisition terminal locates the start identifier, address content, control content, field value content, verification content, and end identifier positions in the original message frame of the electricity meter in sequence according to the message organization format of the example communication protocol.

[0035] The example communication protocol includes at least the following: message organization format description, field value order description, field value byte length description, field encoding method description, and checksum calculation method description. Using the field value order and byte length descriptions, the protocol extracts the field encoding byte sequence segment by segment within the field value location. Using the field encoding method description, the protocol restores the field encoding byte sequence to its field value. Using the checksum calculation method description, the protocol performs a checksum operation on the checksum and obtains the checksum result.

[0036] This invention mainly describes the process by which a data acquisition terminal performs structured processing on field values ​​and maintains operational statistics records at the edge. The example communication protocol provides message organization, field encoding, and verification operation methods. This invention does not involve the compilation or modification of the communication protocol, nor does it change the message organization, field encoding, or verification operation methods. The data acquisition terminal completes the parsing and verification of the original message frames of the electricity meter through the example communication protocol.

[0037] Furthermore, after completing the protocol verification and parsing and obtaining the field values, the meter number and field number in the meter identification information are combined to generate a field index pair. The field index pair is used to uniquely point to the meter and field type corresponding to the field value. The field index pair, field value, collection time record, and verification result information are associated and combined to form a field-based collection basic record. The field-based collection basic record is written to the sequential cache according to the time order of the collection time record. The sequential cache is used to maintain the generation order and generation time of the field-based collection basic record.

[0038] During the formation of the basic records for field-based data collection, a field-same-origin identifier is added to the basic records. The field-same-origin identifier is derived from the message structure identification result obtained from the protocol verification and parsing. The field-same-origin identifier is used to characterize the message or business affiliation relationship of the corresponding field value of the field index. The field-same-origin identifier adopts one of the following: frame number, register segment number, verification content coverage field number, or business block number, and is stored in association with the field index pair. This ensures that the basic records for field-based data collection also contain the field-same-origin identifier, which facilitates the same-origin merging process of the basic records for field-based data collection.

[0039] The verification result information is written into the field-based data collection basic record. The verification result information is used to distinguish the field values ​​from the original message frames of the energy meters that passed the verification and the field values ​​from the original message frames of the energy meters that failed the verification. The verification result information is stored in a bound pair with the field index, so that the field-based data collection basic record maintains a consistent correspondence between the field values ​​and the verification result information.

[0040] Furthermore, when the field-based acquisition basic records are written to the sequential cache, the operation statistics records are updated synchronously. The operation statistics records include control cycle duration records, effective communication byte count records, protocol verification and parsing count records, field-based acquisition basic record generation count records, sequential cache occupied entry count records, and remaining available cache entry count records. The control cycle duration record is used to characterize the time span of one statistical cycle. The effective communication byte count record is used to accumulate the number of bytes of the original energy meter message frames received and verified within the statistical control cycle. The protocol verification and parsing count record is used to accumulate the number of times protocol verification and parsing were completed within the statistical control cycle. The field-based acquisition basic record generation count record is used to accumulate the number of times field-based acquisition basic records were formed within the statistical control cycle. The sequential cache occupied entry count record is used to characterize the number of field-based acquisition basic record entries that have been written to the sequential cache. The remaining available cache entry count record is used to characterize the number of entries that are not occupied in the sequential cache.

[0041] Furthermore, at the end of the control cycle, the cumulative number of valid communication bytes, the number of protocol verification and parsing attempts, and the number of times the field-based acquisition basic record is generated are written into the previous control cycle statistics field of the running statistics record. The number of sequential cache entries occupied and the number of remaining available cache entries are written into the current cache status field of the running statistics record, so that the running statistics record simultaneously contains the communication load and processing load information of the previous control cycle as well as the current cache occupancy information.

[0042] S2. Based on the field-based collection of basic records, calculate the current obsolescence duration of the field and the interval of the most recent successful collection of the field to form a set of expired fields and an expired field determination record.

[0043] Furthermore, field index pairs, collection time records, and verification result information are read from the field-based collection base records, and the field-based collection base records are merged according to the field index pairs. Field-based collection base records with the same field index pairs are grouped into the same field index pair merging sequence. The field index pair merging sequence is arranged in chronological order of the collection time records to support backtracking extraction of successful collection time records.

[0044] Furthermore, a successful acquisition time record extraction operation is performed in the merged sequence of field index pairs. The successful acquisition time record extraction operation starts from the end of the merged sequence of field index pairs and traverses backward. When a field-based acquisition base record whose verification result information indicates that the verification has passed is encountered, the acquisition time record is recorded as a successful acquisition time record. The first successful acquisition time record obtained by the successful acquisition time record extraction operation is recorded as the most recent successful acquisition time record, and the second successful acquisition time record obtained by the successful acquisition time record extraction operation is recorded as the penultimate successful acquisition time record. Field-based acquisition base records whose verification result information in the merged sequence of field index pairs indicates that the verification has failed are not included in the update of the most recent successful acquisition time record and the penultimate successful acquisition time record.

[0045] Furthermore, after completing the extraction of the most recent successful acquisition time record, a judgment time record is generated. The judgment time record is the acquisition time record of the field index of the field-based acquisition base record at the end of the merged sequence.

[0046] The current stale duration of a field is obtained by measuring the difference between the time record of determination and the time record of the most recent successful acquisition. The current stale duration of a field is used to characterize the time span that the corresponding field value of the field index pair has experienced since the time record of the most recent successful acquisition. The most recent successful acquisition interval of a field is obtained by measuring the difference between the time record of the most recent successful acquisition and the time record of the second-to-last successful acquisition. The most recent successful acquisition interval of a field is used to characterize the time span between the two most recent successful acquisitions of the field index pair.

[0047] It should be noted that when no successful acquisition time record is extracted from the merge sequence of the field index, the control cycle duration record in the running statistics record is taken as the backtracking duration; with the judgment time record as a reference, the backtracking duration is pushed back in the past direction on the time axis to obtain the most recent successful acquisition time record; with the most recent successful acquisition time record as a reference, the backtracking duration is pushed back in the past direction on the time axis to obtain the penultimate successful acquisition time record, and the penultimate successful acquisition time record is used to form the most recent successful acquisition interval of the field with the most recent successful acquisition time record.

[0048] When the field index only extracts the record of the most recent successful collection time from the merge sequence and does not extract the record of the second to last successful collection time, the field's most recent successful collection interval is taken from the control cycle duration record in the running statistics record, so that the comparison operation between the field's current stale duration and the field's most recent successful collection interval has an executable time reference.

[0049] When the most recent successful data collection interval for a field is zero, the most recent successful data collection interval for a field is also taken from the control cycle duration record in the running statistics record.

[0050] Furthermore, after obtaining the current obsolescence duration of a field and the interval between the most recent successful data collection, an expiration determination operation is performed. The expiration determination operation compares the current obsolescence duration of a field with the interval between the most recent successful data collection. Field index pairs whose current obsolescence duration is not less than the interval between the most recent successful data collection are recorded as expired field index pairs and written into the expired field set. Field index pairs whose current obsolescence duration is less than the interval between the most recent successful data collection are not written into the expired field set.

[0051] Key quantities in the process of forming the expiration field set are written into the expiration field determination record. The expiration field determination record includes at least the field index pair, determination time record, most recent successful collection time record, penultimate successful collection time record, current stale duration of the field, most recent successful collection interval of the field, and expiration determination result identifier. The expiration field determination record is stored in association with the expiration field set, so that the expiration field set contains a list of expiration field index pairs, and the expiration field determination record contains the expiration determination process information corresponding to the expiration field index pairs.

[0052] S3. Merge the expired field set according to the field source identifier in the field-based collection basic record, construct the field cluster expired field set and determine the minimum supporting field set, and generate the field cluster construction record.

[0053] Furthermore, the expiration field index pairs in the expiration field set are matched one by one to the expiration field determination records, and the record of the most recent successful collection time corresponding to the expiration field index pair is extracted. Using the most recent successful collection time record and the expiration field index pair as the matching key, the verification result information indicating the field-based collection base record that passed the verification is located in the field-based collection base record, and the field homology identifier is extracted. Expiration field index pairs with the same field homology identifier are grouped into the same field cluster number, and the field cluster number is taken from the value of the field homology identifier, forming a field cluster expiration field set, represented as:

[0054] ;

[0055] ;

[0056] in, Number the electricity meter. Number the field. For the expiration field index pair, For the set of expiration fields, Index pairs for expiration fields The corresponding field is the same-origin identifier. Number the field clusters, Number the field cluster The corresponding set of fields that have reached their expiration date. It belongs to the relation symbol. For logic and symbols.

[0057] Furthermore, within the set of fields due to each field cluster, a unified field dictionary is used to match the field number with the required field identifier, and the required field identifier is set to a value. The expiration field index is imported into the required field set, resulting in the required field set corresponding to the field cluster number, represented as:

[0058] ;

[0059] in, Number the field The corresponding required field identifier, Identify the required values ​​for the required fields. Number the field cluster The corresponding set of required fields.

[0060] It should be noted that the unified field dictionary, as a field attribute lookup table, is stored in the acquisition terminal's storage medium. The unified field dictionary is compiled from the field value content arrangement order, field value byte length, and field encoding method descriptions in the example communication protocol. The unified field dictionary uses the field number as the search key and records the field encoding length in bytes corresponding to the field number, the field encoding method description, and the required field identifier. The field encoding length in bytes is used to limit the truncation span of the field encoding byte sequence; the field encoding method description is used to restore the field encoding byte sequence to the field value; and the required field identifier is used to characterize the supporting attributes of the field number in the field cluster packet. The required field identifier value is... This indicates that the field number serves as the packet anchor within the field cluster, and the required field identifier value is... This indicates that the field number serves as a supplementary field within the field cluster.

[0061] Furthermore, to ensure that a packageable supporting field can still be formed even when the required field set is empty, a cluster-guided field index pair is determined within the field set of the field cluster's expiration date. The cluster-guided field index pair is uniquely determined using a lexicographical order rule: minimum field code length in bytes, minimum field number, and minimum electricity meter number. This cluster-guided field index pair is then incorporated into the required field set to form the minimum supporting field set, represented as:

[0062] ;

[0063] ;

[0064] in, Number the field cluster The corresponding cluster-guided field index pair, Number the field The corresponding field encoding length in bytes. For lexicographical comparison of triples, The operator that takes the value of the argument that minimizes the lexicographically smallest triplet. Number the field cluster The corresponding minimum set of supporting fields, The union symbol for sets. It is a single-element collection consisting of cluster-guided field index pairs.

[0065] Furthermore, the field cluster number, the set of field clusters due for expiration, and the minimum supporting field set are written into the field cluster construction record.

[0066] S4. Construct records based on field clusters and calculate field cluster collection priorities by combining them with records of expired fields. Generate field cluster collection request sequences by applying carrying constraints through running statistical records and sending collection request message frames within the control period to perform re-collection of expired fields.

[0067] Furthermore, the minimum supporting field set in the field cluster construction record is associated with the due date field determination record through field index pairs to obtain the current stale duration and the most recent successful collection interval for each field index pair within the minimum supporting field set. The field-level overdue ratio is calculated using the current stale duration and the most recent successful collection interval, and the maximum field-level overdue ratio within the minimum supporting field set is used as the field cluster collection priority value to characterize the urgency of field cluster collection, expressed as:

[0068] ;

[0069] ;

[0070] in, Determine the field index pair in the record for the due date field. The corresponding field is the current obsolescence duration. Determine the field index pair in the record for the due date field. The corresponding field is the most recently successfully collected interval. For field-level overdue ratios, Number the field cluster The corresponding field clusters are collected based on priority values. This is the operator for finding the maximum value.

[0071] The field cluster numbers in the field cluster construction record are sorted from largest to smallest according to the field cluster acquisition priority value to form a field cluster priority sequence. When field cluster acquisition priority values ​​are the same, the minimum supporting field set packet length is calculated. The minimum supporting field set packet length represents the cumulative result of the number of bytes corresponding to the field encoding length of all field numbers within the minimum supporting field set. The minimum supporting field set packet length is used as the second sorting criterion from smallest to largest, so that the field cluster priority sequence prioritizes field clusters with lower packet overhead when the acquisition urgency is the same. This is expressed as:

[0072] ;

[0073] in, Number the field cluster The corresponding minimum supporting field set packet length.

[0074] Furthermore, the number of remaining available cache entries in the current cache status field of the running statistics record is used as the upper limit of the number of new field-based collection basic record entries allowed in this control period, and the number of sequential cache occupied entries in the current cache status field of the running statistics record is read; during the generation of the field cluster collection request sequence, when performing a load constraint check on the number of elements in the request field index set, the cache entry occupancy status is updated synchronously based on the number of remaining available cache entries and the number of sequential cache occupied entries; the number of specification verification and parsing counts in the statistics field of the previous control period of the running statistics record is used as the upper limit of the number of collection request message frames allowed to be triggered in this control period, so that the generation process of the field cluster collection request sequence simultaneously satisfies the cache load constraint and the parsing load constraint.

[0075] It should be noted that the protocol verification and parsing count record in the statistics field of the previous control cycle of the running statistics record is used as the upper limit of the number of acquisition request message frames allowed to be triggered in the current control cycle because the protocol verification and parsing count record represents the scale of protocol verification and parsing processing actually completed by the acquisition terminal under the existing communication load and processing load conditions in the previous control cycle. When the protocol verification and parsing count record in the statistics field of the previous control cycle of the running statistics record is high, it means that the protocol verification and parsing process completed the parsing of a large number of message frames in the control cycle in the previous control cycle, and the acquisition terminal has a large processing margin for the protocol verification and parsing process. When the number of protocol verification and parsing records in the statistics field of the previous control cycle in the running statistics record is low, it indicates that the protocol verification and parsing process completed the parsing of fewer message frames within the control cycle in the previous control cycle, and the processing margin of the acquisition terminal for the protocol verification and parsing process is small. Therefore, the upper limit of the number of acquisition request message frames allowed to be triggered in the current control cycle is determined by the number of protocol verification and parsing records in the statistics field of the running statistics record of the previous control cycle. The number of acquisition request message frames triggered is adjusted synchronously with the protocol verification and parsing processing margin, and the number of acquisition request sequences in the field cluster is consistent with the scale of protocol verification and parsing processing that the acquisition terminal can bear.

[0076] To avoid communication congestion caused by excessive load on the acquisition request message frame, the average effective byte count per frame is calculated by combining the effective communication byte count record from the previous control cycle's statistics field in the operation statistics record with the protocol check parsing count record from the previous control cycle's statistics field. This average effective byte count per frame is then used as the load budget for the acquisition request message frame, expressed as:

[0077] ;

[0078] in, This is a record of the number of valid communication bytes in the statistics field of the previous control cycle of the running statistics record. This is the record of the number of specification validations and parsings in the statistics field of the previous control cycle of the runtime statistics record. The average number of effective bytes per frame is used as the load budget for the acquisition request message frame. The load budget is used to constrain the total number of bytes of the encoding length of the corresponding fields in the request field number list.

[0079] The expiration field sets of each field cluster in the field cluster priority sequence are merged into an energy meter field cluster expiration field set according to the energy meter number, so that one collection request message frame corresponds to only one energy meter number. Within each energy meter field cluster expiration field set, the field index pairs in the field cluster construction record that match the minimum supporting field set and the energy meter number are first taken to form the minimum supporting field set of the energy meter, and the minimum supporting field set of the energy meter is written into the request field index pair set. When the minimum supporting field set of the energy meter is empty, the field index pairs in the cluster guide field index pair in the field cluster construction record that match the energy meter number are taken as the minimum supporting field set of the energy meter, so that the request field index pair set contains at least one supporting field index pair under each energy meter number.

[0080] After the minimum supporting field set of the electricity meter is written into the request field index pair set, the remaining expired field index pairs in the expired field set of the electricity meter field cluster that have not yet entered the request field index pair set are arranged in descending order of field-level expiration ratio and appended sequentially. This ensures that the request field index pair set prioritizes covering more urgent fields while ensuring the supporting field index pairs are covered. During the appending process, a dual load constraint check is performed: the number of elements in the request field index pair set does not exceed the maximum number of entries allowed by the number of remaining available cache entries, and the total number of bytes of the field encoding length corresponding to the request field index pair set does not exceed the load budget. When any load constraint reaches its limit, the appending stops and the current request field index pair set is solidified.

[0081] Furthermore, a field cluster acquisition request record is generated from the set of fixed request field index pairs under each electricity meter number. The field cluster acquisition request record includes at least the field cluster number, the electricity meter number, the list of request field numbers, and the set of request field index pairs. The field cluster acquisition request records are written into the field cluster acquisition request sequence in the order of generation, and the writing is terminated when the number of field cluster acquisition request sequence entries reaches the upper limit of the allowed number of protocol verification and parsing count records in the statistical field of the previous control cycle of the operation statistics record. This ensures that the number of acquisition request message frames triggered within the control cycle does not exceed the protocol verification and parsing count records in the statistical field of the previous control cycle of the operation statistics record.

[0082] The field cluster acquisition request sequence is converted into acquisition request message frames one by one and sent within the control cycle. The acquisition request message frame contains the energy meter identification information, protocol control information and a list of requested field numbers. The original message frame returned by the energy meter enters the protocol verification and parsing process and forms a field-based acquisition basic record, which updates the record of the most recent successful acquisition in the expired field determination record. This allows the current obsolescence duration of the field and the interval of the most recent successful acquisition of the field to be recalculated in the next control cycle, and the expired field set and field cluster construction record to be updated in the next control cycle.

[0083] It should also be noted that, in order to verify the computable filtering capability of the acquisition terminal for the set of expired fields under different load conditions, and the coverage performance of re-acquisition scheduling of expired fields based on the records determined by the expired fields, a comparative simulation experiment was conducted, and the simulation results are plotted as follows. Figure 5 As shown.

[0084] The simulation object is the communication and data acquisition process between the data acquisition terminal and multiple energy meters. During the simulation, the process is carried out in a cyclical manner according to the control cycle: receiving the original message frames from the energy meters, completing protocol verification and field parsing, forming a basic record of field-based data acquisition and updating the operation statistics record; calculating the current obsolescence duration of the field and the interval of the most recent successful acquisition of the field, generating an expired field determination record; filtering the set of expired fields based on the expired field determination record; generating and sending acquisition request message frames within the control cycle, performing re-acquisition on the expired fields; and counting whether the expired fields were successfully re-acquired and generating a result log.

[0085] The testing materials include original message frame samples from the electricity meter, field encoding and field value samples, basic records of field-based data collection, records of expired field determination, sets of expired fields, logs of data collection request message frames, logs of expired field re-collection results, and operational statistics records.

[0086] In this invention, the acquisition terminal calculates the current obsolescence duration and the interval between the most recent successful acquisition of each field in each control cycle by collecting basic field records, and writes the calculation results into the expiration field determination record; it completes the expiration determination based on the expiration field determination record and obtains the expiration field set; it merges the expiration field set into field clusters according to the field origin identifier and determines the minimum supporting field set; it combines the operation statistics record to form a bearing constraint, generates and sends a sequence of acquisition request message frames in the control cycle, performs re-acquisition on the expiration fields, and records the successful re-acquisition ratio of the expiration fields.

[0087] In the comparison scheme, the acquisition terminal directly generates a list of fields that need to be re-acquired based solely on the field-based acquisition records, without calculating the current obsolescence duration of the fields and the interval between the most recent successful acquisitions of the fields, nor generating records for the determination of expired fields; it does not perform field merging for fields that need to be re-acquired, and does not determine the minimum supporting field set; the acquisition request message frame is directly assembled and sent according to the field list, lacking load constraint scheduling that combines operational statistics records; and it re-acquires fields and records the success status within the control period.

[0088] The protocol verification failure rate represents the proportion of message frames that are judged as having failed protocol verification during the simulation out of the total number of received message frames. During the simulation, a random number [0,1] is generated for each original message frame from the energy meter. When the random number is less than a set proportion, the message frame is judged as having failed protocol verification and is considered invalid for parsing. The remaining message frames are judged as having succeeded protocol verification and enter the field parsing and record update process. The protocol verification failure rates are set to 0.02, 0.08, and 0.15 respectively to create different levels of protocol verification pressure. Load intensity is used to characterize the load-bearing capacity of the acquisition terminal. Load intensity is increased by increasing the number of energy meters, the total number of fields, or the length of message fields, while keeping other parameters besides load intensity and protocol verification failure rate within their normal range.

[0089] Figure 5 The curves showing the change in the success rate of re-collection of expired fields under different load intensities are presented; Figure 5 The horizontal axis represents the load intensity, which characterizes the degree of increase in the pressure borne by the data acquisition terminal. Figure 5 The vertical axis represents the successful re-acquisition rate of expired fields, indicating the percentage of fields judged to have expired within the control period that actually completed re-acquisition. As load intensity increases, this invention calculates the current obsolescence duration of a field and the interval between the field's most recent successful acquisition, writing this data into the expired field judgment record. This enables calculable filtering of the expired field set, making the re-acquisition triggering of expired fields more quantitatively based. Simultaneously, it reduces the redundancy of acquisition request message frames by merging fields with the same source into the minimum supporting field set, and applies bearer constraints based on operational statistics records, ensuring orderly transmission of acquisition request message frames within the control period. This maintains a high successful re-acquisition rate for expired fields with a smoother decline. In contrast, the comparative scheme, lacking quantitative filtering of expired field judgment records and bearer constraint scheduling, experiences an earlier decline in the successful re-acquisition rate of expired fields when load intensity increases.

[0090] This demonstrates that the present invention can maintain a more stable re-acquisition coverage rate even under high load and high protocol verification failure rate, reflecting the improvement in the timeliness of edge-side acquisition scheduling and resource controllability.

[0091] In summary, this invention achieves calculable filtering of the expired field set and quantitative characterization of the field-level overdue ratio by: associating the current obsolescence duration of a field with the interval between the most recent successful collection of the field and writing it into the expired field determination record; obtaining the expired field set of a field cluster by merging fields with the same source identifier and determining the minimum supporting field set; and generating a field cluster collection request sequence by applying carrying constraints based on the field cluster collection priority and operation statistics record, thereby achieving orderly sending of collection request message frames and re-collection of expired fields within the control period, and improving the timeliness and resource controllability of edge-side collection scheduling.

[0092] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A real-time data acquisition terminal method based on edge computing, characterized in that: include, Collect the original message frames of the electricity meter and complete the protocol verification and parsing to form a field-based collection basic record containing the field source identifier and update the operation statistics record synchronously. Based on the field-based collection of basic records, the current obsolescence duration of a field and the interval between the most recent successful collection of a field are calculated to form a set of expired fields and an expired field determination record; The calculated current obsolescence duration and the most recent successful collection interval of the field include a field index pair merge sequence formed by merging the basic records collected by field index. Based on the verification results, the record of the most recent successful data collection time and the record of the second-to-last successful data collection time are extracted from the field index pair merge sequence. Take the collection time record of the field-based collection base record at the end of the merged sequence from the field index and use it as the judgment time record; The current stale duration field is obtained by comparing the difference between the judgment time record and the most recent successful acquisition time record, and the most recent successful acquisition interval field is obtained by comparing the difference between the most recent successful acquisition time record and the penultimate successful acquisition time record. The process of forming the expiration field set and the expiration field determination record includes comparing the current obsolescence duration of a field with the interval of the most recent successful collection of the field, and writing the index pairs of fields whose current obsolescence duration is not less than the interval of the most recent successful collection of the field into the expiration field set. Generate an expiration field determination record. The expiration field determination record shall include at least the field index pair, the determination time record, the most recent successful collection time record, the penultimate successful collection time record, the current stale duration of the field and the interval between the most recent successful collection of the field, and store the expiration field determination record in association with the expiration field set. The expired field set is merged according to the field origin identifier in the field-based collection basic record, and a field cluster expired field set is constructed. The minimum supporting field set is determined, and a field cluster construction record is generated. The field cluster is constructed based on the field cluster and the expiration field determination record is combined to calculate the field cluster collection priority. The field cluster collection request sequence is generated by applying the bearing constraint through the running statistical record and sending the collection request message frame within the control period to perform re-collection of the expiration field.

2. The real-time data acquisition terminal method based on edge computing as described in claim 1, characterized in that: The original message frame of the electricity meter includes at least the electricity meter identification information, protocol control information, field value content, and message verification information.

3. The real-time data acquisition terminal method based on edge computing as described in claim 2, characterized in that: The protocol verification and parsing process forms a field-based collection basic record containing field origin identifiers. This includes performing message structure identification, field value extraction, and message verification operations on the original message frame of the electricity meter to obtain the field number, field value, verification result information, and message structure identification result, and recording the message reception time as the collection time record. Read the electricity meter identification information to obtain the electricity meter number, and combine the electricity meter number with the field number to generate a field index pair; The field index pairs, field values, collection time records, and verification result information are associated and combined to form a field-based collection basic record; Based on the message structure identification results, a field origin identifier is generated, and the field origin identifier is associated with and stored with the field index pair.

4. The real-time data acquisition terminal method based on edge computing as described in claim 3, characterized in that: The update of the operation statistics record includes updating the operation statistics record when the field-based collection basic record is written to the sequential cache. The operation statistics record includes the effective communication byte count record, the protocol verification and parsing count record, the field-based collection basic record generation count record, and the remaining available cache entries record. At the end of the control cycle, the number of valid communication bytes, the number of protocol verification and parsing attempts, and the number of times the field-based collection basic record was generated are written into the statistics field of the previous control cycle, and the number of remaining available cache entries is written into the current cache status field.

5. The real-time data acquisition terminal method based on edge computing as described in claim 4, characterized in that: The constructed field cluster expiration field set includes matching the expiration field index pairs in the expiration field set with the expiration field determination records and extracting the record of the most recent successful collection time. Using the expiration field index pair and the record of the most recent successful collection time as the matching key, locate the verification result information in the fieldized collection base record to indicate the fieldized collection base record that has passed the verification and extract the field same-origin identifier; Merge the index pairs of expired fields with the same origin identifier, and use the value of the origin identifier as the field cluster number to generate a set of expired fields for each field cluster.

6. The real-time data acquisition terminal method based on edge computing as described in claim 5, characterized in that: The step of determining the minimum supporting field set and generating a field cluster construction record includes filtering the expiration field index pairs that meet the required field identifiers based on a unified field dictionary within the field cluster's expiration field set to form a required field set. When the required field set is empty, the cluster bootstrap field index pair is determined according to the lexicographical order rule of minimum field code length in bytes, minimum field number, and minimum energy meter number. The cluster bootstrap field index pairs are incorporated into the required field set to form the minimum supporting field set; Write the field cluster number, the field cluster expiration field set, and the minimum supporting field set into the field cluster construction record.

7. The real-time data acquisition terminal method based on edge computing as described in claim 6, characterized in that: The calculation of field cluster collection priority includes associating the minimum supporting field set in the field cluster construction record with the expired field determination record by field index pairing, so as to obtain the current stale duration and the most recent successful collection interval of the field corresponding to each field index pair in the minimum supporting field set. The ratio of the current obsolescence duration of a field to the interval between the most recent successful collection of the field is used as the field-level obsolescence ratio, and the maximum value of the field-level obsolescence ratio within the minimum supporting field set is used as the field cluster collection priority value. The field cluster numbers are sorted according to the field cluster collection priority value to form a field cluster priority sequence.

8. The real-time data acquisition terminal method based on edge computing as described in claim 7, characterized in that: The step of applying bearer constraints to generate a field cluster acquisition request sequence and sending acquisition request message frames within the control period includes: reading the running statistics record to obtain the remaining available cache entry count record and determining the entry count limit; reading the running statistics record to obtain the protocol verification parsing count record and determining the entry count limit; and calculating the load budget based on the valid communication byte count record and the protocol verification parsing count record in the running statistics record. Traverse the field cluster numbers according to the field cluster priority sequence, construct records based on the field clusters to generate a set of requested field index pairs, and solidify the set of requested field index pairs when the number of elements in the set of requested field index pairs does not exceed the upper limit of the number of entries and the total number of bytes of the field encoding length corresponding to the list of requested field numbers does not exceed the load budget. The solidified request field index is used to generate field cluster collection request records for the collection and written into the field cluster collection request sequence in the order of generation. The number of records in the field cluster collection request sequence shall not exceed the upper limit of the number of records. The field cluster acquisition request sequence is converted into acquisition request message frames and sent within the control period.