Energy consumption data acquisition unit and acquisition method based on Internet of Things
By generating standard energy consumption data packets with unified timestamps and device identifiers, and combining network status and data value assessment, the reporting strategy is dynamically adjusted, solving the problems of inconsistent data formats, inconsistent time bases, and one-sided network quality assessment in existing energy consumption data collectors, and realizing orderly data storage and efficient transmission.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JINAN LITUO SECURITY PROTECTION ENG CO LTD
- Filing Date
- 2026-03-19
- Publication Date
- 2026-05-01
AI Technical Summary
Existing energy consumption data collectors suffer from problems such as inconsistent data formats, inconsistent time bases, one-sided network quality assessments, waste of data processing resources, and delayed response to critical information.
The data processing module generates standard energy consumption data packets with unified timestamps and device identifiers. The network status assessment module evaluates communication quality in real time, the data value assessment module dynamically assesses data importance, and the communication and control module adjusts the reporting strategy to achieve orderly storage and dynamic adjustment of data packets.
It eliminates time base deviation, accurately assesses network status, optimizes resource utilization, ensures timely reporting of key information, and improves the accuracy and reliability of data analysis.
Smart Images

Figure CN121967484A_ABST
Abstract
Description
An IoT-based energy consumption data collector and collection method Technical Field
[0001] This invention belongs to the field of Internet of Things (IoT) technology and energy management technology, specifically an IoT-based energy consumption data collector and collection method. Background Technology
[0002] With the widespread application of IoT technology in energy management, IoT-based energy consumption data acquisition devices have become key infrastructure in scenarios such as building energy conservation, industrial monitoring, and smart grids. These devices typically need to connect to various types of energy consumption metering instruments (such as electricity meters, water meters, and gas meters) and achieve centralized monitoring and analysis of energy consumption data through a remote IoT platform.
[0003] The existing technology has the following limitations: 1. Energy consumption metering instruments usually use heterogeneous physical interfaces and diverse communication protocols, resulting in inconsistent raw data formats. At the same time, each metering instrument has its own clock differences or transmission delays, which can easily lead to inconsistent time bases and affect the accuracy of subsequent data analysis.
[0004] 2. Existing data acquisition devices typically use a fixed-period network detection method. A single measurement at a single moment cannot accurately characterize the overall trend of communication quality. In addition, round-trip time and signal strength reflect network conditions from different dimensions. If only a single indicator is relied upon for evaluation, it is easy to lead to a one-sided judgment of network quality, affecting the reliability and timeliness of data reporting.
[0005] 3. In IoT energy consumption data collection scenarios, the data volume is huge and the value density is uneven. If the same processing and reporting strategy is used for all collected data, it will lead to a waste of communication resources. At the same time, key abnormal information may be missed due to delayed response. Summary of the Invention
[0006] To overcome the shortcomings in the background art, embodiments of the present invention provide an energy consumption data collector and collection method based on the Internet of Things, which can effectively solve the problems involved in the background art.
[0007] The objective of this invention can be achieved through the following technical solutions: In a first aspect, this invention provides an energy consumption data collector based on the Internet of Things, comprising: a data processing module, a network status assessment module, a data value assessment module, and a communication and control module.
[0008] The data processing module is connected to the network status assessment module, the network status assessment module is connected to the data value assessment module, and the data value assessment module is connected to the communication and control module.
[0009] The data processing module performs real-time protocol parsing and data conversion on the raw data, generates standard energy consumption data packets with unified timestamps and device identifiers, and stores them in the order of receipt.
[0010] The network status assessment module collects communication signal strength and round-trip time with the remote IoT platform in real time, and generates network status factors based on the comparison between the current communication quality and the baseline status.
[0011] The data value assessment module analyzes current and historical standard energy consumption data packages, calculates dynamic change benchmarks and adaptive fluctuation ranges based on historical power data sequences, determines the instantaneous deviation rate and duration of continuous deviation of current power data, and generates data value factors through normalization and linear weighting.
[0012] The communication and control module matches network status factors with data value factors in a preset periodic adjustment mode, sends standard energy consumption data packets to the remote IoT platform, and automatically triggers the sequential retransmission of unuploaded historical data after network interruption and recovery.
[0013] Secondly, the present invention provides an energy consumption data collection method based on the Internet of Things, comprising: performing real-time protocol parsing and data conversion on raw data to generate a standard energy consumption data packet with a unified timestamp and device identifier, and storing it in the order of receipt.
[0014] The system collects communication signal strength and round-trip time with a remote IoT platform in real time, and generates network state factors based on a comparison of the current communication quality with the baseline state.
[0015] The current and historical standard energy consumption data packages are analyzed. Based on the historical power data sequence, the dynamic change benchmark and adaptive fluctuation range are calculated. The instantaneous deviation rate and the duration of continuous deviation of the current power data are determined. Data value factors are generated after normalization and linear weighting.
[0016] The network status factor and data value factor are matched with a preset periodic adjustment mode, standard energy consumption data packets are sent to a remote IoT platform, and the sequential retransmission of unuploaded historical data is automatically triggered after the network is restored following an interruption.
[0017] Compared with the prior art, the embodiments of the present invention have at least the following advantages or beneficial effects: (1) The present invention generates a standard energy consumption data packet with a unified timestamp and device identifier by performing real-time protocol parsing and data conversion on the original data, and stores it in the order of receipt, effectively eliminating the time reference deviation caused by the difference of metering instrument clock or transmission delay, and providing a unified and orderly data foundation for subsequent network status assessment and data value assessment.
[0018] (2) This invention collects the communication signal strength and the round-trip time with the remote IoT platform in real time, and obtains sample values through multiple detections and normalization processes. It converts two physical quantities with different dimensions into a unified numerical range and selects the maximum value between the round-trip time deviation value and the signal strength deviation value as the network status factor. This can accurately reflect the most dangerous influencing factors in the network and provide a reliable basis for the dynamic adjustment of the subsequent reporting strategy.
[0019] (3) This invention analyzes current and historical standard energy consumption data packets, calculates dynamic change benchmarks and adaptive fluctuation ranges based on historical power data sequences, determines the instantaneous deviation rate and duration of continuous deviation of current power data, generates data value factors through normalization and linear weighting, and matches network state factors with data value factors in a preset periodic adjustment mode to achieve synergistic optimization of network resources and data importance. Attached Figure Description
[0020] The present invention will be further described with reference to the accompanying drawings, but the embodiments in the drawings do not constitute any limitation on the present invention. For those skilled in the art, other drawings can be obtained based on the following drawings without creative effort.
[0021] Figure 1 is a schematic diagram of the module connection of the present invention.
[0022] Figure 2 is a flowchart of the data value factor generation process of the present invention.
[0023] Figure 3 is a flowchart of the energy consumption data acquisition method based on the Internet of Things of the present invention. Detailed Implementation
[0024] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0025] Referring to FIG1, in a first aspect, the present invention provides an energy consumption data collector based on the Internet of Things, comprising: a data processing module, a network status assessment module, a data value assessment module, and a communication and control module.
[0026] The data processing module is connected to the network status assessment module, the network status assessment module is connected to the data value assessment module, and the data value assessment module is connected to the communication and control module.
[0027] The data processing module performs real-time protocol parsing and data conversion on the raw data, generates standard energy consumption data packets with unified timestamps and device identifiers, and stores them in the order of receipt.
[0028] Considering that energy consumption metering instruments may have their own clock differences or transmission delays that can lead to inconsistent time bases, and that the lack of unified identification and orderly storage of multi-source data can damage the time comparability, equipment traceability and sequence continuity of data, thereby affecting the accuracy of subsequent network status assessment and data value assessment.
[0029] The process of acquiring the raw data is as follows: based on the physical interface type of the connected energy consumption meter (e.g., M-Bus meter bus interface, wireless communication interface), independent communication parameters and data buffers are allocated for each interface type.
[0030] The communication parameters include baud rate, data bits, parity method, and stop bits, and the data buffer is used to temporarily store the raw data received by the interface.
[0031] The energy consumption metering instrument automatically identifies each communication interface by binding a corresponding communication protocol stack. The automatic identification mechanism identifies the communication protocol type used by the instrument based on the response characteristics of the interface access meter or the pre-configured device address range, including but not limited to industry standard protocols such as DL / T645 and CJ / T188.
[0032] After identification is completed, the matching protocol stack is dynamically loaded for each interface, and standardized data acquisition instructions for different instrument types are generated based on the data frame format of each protocol.
[0033] A multi-threaded concurrent control mechanism is adopted, and data collection instructions are sent to multiple energy consumption meters simultaneously based on a preset data collection period and in combination with real-time triggering events. The real-time triggering events include device online notifications or abnormal status alarms. The instruction sending tasks of multiple interfaces are processed in parallel through multi-threading technology, and the interface data arrival events are responded to in a non-blocking manner in real time.
[0034] The integrity of the received raw data is verified as follows: the check code field is extracted from the raw data, and the check value is recalculated for its data field according to the cyclic redundancy check specified in the protocol. The calculation result is compared with the check code field in the message. If the two are consistent, the verification is deemed to have passed; otherwise, the verification is deemed to have failed and the raw data is filtered out.
[0035] A unique identifier for the message is generated based on information such as the instrument address, message sequence number, or metering time carried in the message. The current message identifier is compared with the received message identifier records. If there is a duplicate identifier, it is determined to be a duplicate message and filtered out.
[0036] The raw data that has passed integrity verification and repeatability testing will be appended with interface identifiers, instrument addresses and receiving timestamps, and then stored sequentially in a circular buffer to construct the raw data.
[0037] The preset data collection period is customized according to the type of energy consumption metering instrument accessed and business requirements.
[0038] The specific process of real-time protocol parsing and data conversion is as follows: the original data is read sequentially from the circular buffer in the order of storage using the first-in-first-out method, the corresponding interface type is found through the interface identifier, the specific energy consumption meter is identified according to the meter address, and the matching communication protocol type is found accordingly.
[0039] The protocol parsing engine that matches the protocol type is invoked. The protocol parsing engine is a pre-packaged protocol decoding module, which contains the data frame structure definition, field position mapping table and decoding algorithm of the corresponding protocol.
[0040] According to the data frames defined in the protocol, the original data message is segmented into domains. The original bytes of the energy consumption value, metering time, and operating status fields are located and extracted from the data fields. The energy consumption value includes, but is not limited to, active power, reactive power, voltage, current, or cumulative electricity consumption. The operating status field includes the instrument operating status, fault alarm flag, or event record. After extracting the above original bytes, they are converted into a recognizable data format according to the data encoding method defined in the protocol, such as converting BCD code into decimal numbers.
[0041] The converted data is normalized by converting the energy consumption values into a unified unit of measurement according to the unit dimensions defined in the protocol, such as converting amperes to milliamperes. At the same time, the measurement time is converted into year, month, day, hour, minute, and second format. If the original message does not contain a timestamp, the received timestamp is used as the data time reference.
[0042] Data whose energy consumption values are within a reasonable range defined by the protocol specification and whose operating status field is a valid status code defined by the protocol specification is defined as valid data.
[0043] The data time, device identifier, energy consumption value, and status field of the valid data are encapsulated into a standard energy consumption data packet with a fixed field order and data type definition.
[0044] It should be noted that generating standard energy consumption data packets with unified timestamps and device identifiers and storing them in the order of receipt can effectively eliminate time base deviations and provide an ordered data source for dynamic change benchmark calculations based on the time series characteristics of the original data, thereby providing a unified and orderly data foundation for subsequent network status assessment and data value assessment.
[0045] The network status assessment module collects communication signal strength and round-trip time with the remote IoT platform in real time, and generates network status factors based on the comparison between the current communication quality and the baseline status.
[0046] Considering that real-time fluctuations in network status directly affect the reliability and timeliness of data reporting, a single measurement at a single moment cannot accurately characterize the overall trend of communication quality. Furthermore, round-trip time and signal strength reflect network conditions from different dimensions, and a comprehensive evaluation is needed to avoid bias.
[0047] Based on this, the process of generating network state factors includes: continuously sending multiple probe messages to a remote IoT platform within the current sampling period; recording the sending time each time a probe message is sent; recording the receiving time when a response message is received from the platform; calculating the time difference between the two as the round-trip time for the corresponding probe; obtaining multiple round-trip time sample values accordingly; and reading the current communication signal strength value (e.g., RSSI) during each probe period to obtain multiple signal strength sample values.
[0048] The current sampling period acquisition process is as follows: During operation, the current sampling period is dynamically adjusted according to the changing trend of the network state factor. When the network fluctuates frequently, the sampling period is automatically shortened by 50% of the current period each time until the preset minimum sampling period threshold (e.g., 1 second) is reached. When the network is stable for a long time, the sampling period is automatically extended by 20% of the current period each time until the preset maximum sampling period threshold (e.g., 1 hour) is reached.
[0049] Calculate the arithmetic mean of multiple round-trip time samples and multiple signal strength samples, and use them as the average round-trip time and average signal strength, respectively.
[0050] Obtain the pre-stored reference average round-trip time and reference average signal strength, and calculate the ratio of the average round-trip time to the reference average round-trip time as the round-trip time relative deviation coefficient.
[0051] Calculate the absolute value of the difference between the average signal strength and the reference average signal strength, and use the ratio of the absolute value of the difference to the reference average signal strength as the relative deviation coefficient of signal strength.
[0052] A maximum permissible deviation threshold is preset. When the relative deviation coefficient is less than or equal to 1, the normalized value is 0. When the relative deviation coefficient is greater than or equal to the maximum permissible deviation threshold, the normalized value is 1. When the relative deviation coefficient is between 1 and the maximum permissible deviation threshold, the normalized value is calculated according to a linear formula. Through the above processing, the normalized round-trip time deviation value and signal strength deviation value are obtained respectively. Both are dimensionless values in the interval [0, 1]. The maximum value of the two is selected as the network state factor. The larger the value, the worse the network quality.
[0053] It should be noted that the reference average round-trip time and reference average signal strength are obtained through experimental calibration. Specifically, under normal operating conditions, a preset number of detection messages (e.g., 100 times) are continuously sent to the remote IoT platform. The round-trip time and signal strength sample values of each detection are recorded. The collected sample values are processed for outlier removal using the 3σ criterion. The arithmetic mean of the remaining valid sample values is calculated and used as the reference average round-trip time and reference average signal strength.
[0054] The determination of the maximum permissible deviation threshold is specifically as follows: obtain the maximum permissible response time and minimum received signal strength defined by the application layer protocol from the service level protocol of the remote IoT platform or the technical manual of the communication module; calculate the absolute difference between the reference average signal strength and the minimum received signal strength; calculate the ratio of the maximum permissible response time to the reference average round-trip time and the ratio of the absolute difference to the reference average signal strength, and use these as the corresponding maximum permissible deviation threshold.
[0055] It should also be noted that by normalization, two physical quantities with different dimensions are converted into a unified dimensionless numerical range, eliminating the impact of dimensional differences on the comprehensive evaluation. This allows network latency and signal strength to be compared on the same scale, and the maximum value of the two can be taken as the network state factor, which can reflect the high-risk influencing factors in the network.
[0056] The data value assessment module analyzes current and historical standard energy consumption data packages, calculates dynamic change benchmarks and adaptive fluctuation ranges based on historical power data sequences, determines the instantaneous deviation rate and duration of continuous deviation of current power data, and generates data value factors through normalization and linear weighting.
[0057] Considering the massive amount of data and uneven value density in IoT energy consumption data collection scenarios, using the same processing and reporting strategy for all data will lead to a waste of communication resources and delayed response to key abnormal information. At the same time, data fluctuations at a single moment may originate from normal operating condition disturbances rather than real anomalies, and judging based solely on instantaneous values is prone to false alarms.
[0058] Therefore, by constructing a dynamic change benchmark and an adaptive fluctuation range, the deviation of the current data from the historical normal pattern is quantified. The process of determining the dynamic change benchmark and the adaptive fluctuation range is as follows: extract the power data corresponding to the same device identifier from the historical standard energy consumption data package, and arrange the data in chronological order to form a historical power data sequence.
[0059] The exponentially weighted moving average method is used to process the historical power data series according to a preset smoothing factor, and the exponentially weighted moving average of the current moment is calculated as a dynamic change benchmark.
[0060] The dynamic change benchmark acquisition process is as follows: obtain continuous power data with the same device identifier from the historical power data sequence, which is arranged in chronological order and includes the power values of several sampling points before the current time.
[0061] The first power data point in the historical power data sequence is used directly as the initial value for the dynamic change baseline at that moment.
[0062] Starting from the second power data, the dynamic change benchmark for each moment is calculated sequentially according to time order. The specific calculation method is as follows: multiply the dynamic change benchmark value of the previous moment by an attenuation weight, then multiply the actual power data of the current moment by an update weight, and finally add the two products together. The result is the dynamic change benchmark for the current moment. The sum of the attenuation weight and the update weight is 1, where the update weight is a preset smoothing factor.
[0063] It should be noted that the preset smoothing factor is obtained through experimental calibration. The specific process is as follows: collect power data sequences of the device operating normally for a period of time, calculate its autocorrelation function, and determine the preset smoothing factor accordingly. The larger the autocorrelation function, the smaller the value of the preset smoothing factor. For example, if the autocorrelation function is greater than or equal to 0.8, it is determined that the power data has strong autocorrelation and the sequence changes smoothly, and the preset smoothing factor is 0.1. If the autocorrelation function is less than 0.2, it is determined that the power data is close to random fluctuation, and the smoothing factor is 0.5.
[0064] The values mentioned above are merely examples, and implementers can adjust them adaptively according to accuracy requirements.
[0065] Calculate the absolute deviation between each power data point in the historical power data series and the dynamic change benchmark to obtain the absolute deviation series. Sort the absolute deviation series from smallest to largest value and take the median of the sorted series as the fluctuation amplitude.
[0066] The sum of the dynamically changing benchmark and the fluctuation amplitude is used as the upper limit of the adaptive fluctuation range, and the difference is used as the lower limit of the adaptive fluctuation range.
[0067] Referring to Figure 2, the specific process of generating the data value factor is as follows: calculate the deviation value of the current power data relative to the dynamic change benchmark, and divide the deviation value by the fluctuation amplitude to obtain the instantaneous deviation rate.
[0068] Record the number of times the current power data continuously exceeds the adaptive fluctuation range, and use the product of the number of samplings and the preset time window as the duration of continuous deviation.
[0069] The preset time window is the time interval between obtaining power data from the energy consumption meter.
[0070] The instantaneous deviation rate and the duration of continuous deviation are normalized and mapped to a unified numerical range to obtain the instantaneous deviation factor and the duration of continuous deviation factor. The specific process is as follows: extract all instantaneous deviation rate records and duration records of each continuous deviation event for the same device identifier in the past time period (e.g., the past 24 hours) from the historical standard energy consumption data packet, and take the corresponding maximum values as the historical maximum instantaneous deviation rate and the historical longest duration of continuous deviation.
[0071] If the current instantaneous deviation rate is greater than or equal to the historical maximum instantaneous deviation rate, the instantaneous deviation factor is set to 1; otherwise, the ratio of the current instantaneous deviation rate to the historical maximum instantaneous deviation rate is used as the instantaneous deviation factor.
[0072] Following the same mapping logic as the instantaneous deviation factor, the duration of continuous deviation is normalized to obtain the continuous deviation factor.
[0073] Through the above normalization, the instantaneous deviation factor and the continuous deviation factor are mapped to the interval [0, 1].
[0074] The data value factor is generated by linearly weighting and summing the instantaneous deviation factor and the continuous deviation factor by assigning different weight coefficients. The specific process is as follows: the weight coefficients are configured differently according to the operating characteristics of the equipment monitored by different energy consumption meters. For example, for equipment with impact loads, the power data itself has the characteristic of frequent fluctuations. Occasional instantaneous deviations do not necessarily represent real anomalies. For such equipment, the weight of the instantaneous deviation factor should be appropriately reduced and the weight of the continuous deviation factor should be increased. For example, the instantaneous deviation weight coefficient is 0.3 and the continuous deviation weight coefficient is 0.7.
[0075] The data value factor is generated by adding the products of the instantaneous deviation factor and the continuous deviation factor to their corresponding weight coefficients.
[0076] It should also be noted that by constructing a dynamic benchmark and an adaptive fluctuation range, the degree of deviation of the current data from the historical normal pattern is quantified, and the importance of the data is comprehensively evaluated in combination with the duration of the deviation, generating a data value factor, which provides a basis for the dynamic adjustment of the subsequent reporting strategy.
[0077] The communication and control module matches network status factors with data value factors in a preset periodic adjustment mode, sends standard energy consumption data packets to the remote IoT platform, and automatically triggers the sequential retransmission of unuploaded historical data after network interruption and recovery.
[0078] Considering the dynamic fluctuations in network communication quality, a fixed reporting cycle cannot adapt to changes in network status and is prone to data loss during network congestion. At the same time, the value of energy consumption data collected at different times varies significantly. If the same reporting strategy is used for all data, the real-time nature of high-value data cannot be guaranteed.
[0079] Based on this, by matching network status factors and data value factors with a preset periodic adjustment mode, the synergistic optimization of network resources and data importance can be achieved. The specific process is as follows: according to preset rules, the network status factors and data value factors are used as inputs to calculate the current reporting period value.
[0080] The preset rules are as follows: the network state factor is compared with the first preset threshold range, and the data value factor is compared with the second preset threshold range to determine the corresponding level category. If the network state factor or data value factor is less than or equal to 0.3, it is determined to be the first level of network state or data value. If the network state factor is greater than 0.7, it is determined to be the third level of network state or data value. Otherwise, it is determined to be the second level of network state or data value.
[0081] Based on the combination of network status level category and data value level category, the corresponding adjustment strategy is matched from a variety of predefined reporting cycle adjustment modes.
[0082] When both network status and data value are at the highest level, the data priority mode is adopted to ensure that high-value data is uploaded in real time as the primary goal. A shorter reporting cycle is used to increase the reporting frequency, specifically 0.5 times the base reporting cycle as the current reporting cycle.
[0083] When both network status and data value are at level two, a balanced mode is adopted to take into account both network load and data real-time performance, and a basic reporting cycle is used.
[0084] When both network status and data value are at level three, a network priority mode is adopted to ensure smooth network operation as the primary goal. A longer reporting cycle is used to reduce communication load, specifically twice the base reporting cycle as the current reporting cycle.
[0085] When the network status level is greater than the data value level or the data value level is greater than the network status level, the hold mode is adopted to avoid drastic fluctuations in the reporting frequency due to boundary combination situations, and to maintain the current reporting cycle.
[0086] Set the interval for the next report based on the current reporting cycle value, start the timer, and when the reporting time is reached, retrieve the standard energy consumption data packets from the queue in the order of storage, assemble multiple data packets into an uplink message, and send it to the remote IoT platform. After the message is sent, update the status of the queue and remove the sent data from the queue.
[0087] The system monitors network connectivity in real time. When a network interruption is detected, it immediately suspends periodic data reporting and marks all unsent standard energy consumption data packets as data to be retransmitted, storing them in the data storage area for data to be retransmitted.
[0088] Once the network is restored, the data to be retransmitted is read sequentially from the local persistent storage area in chronological order, reassembled, and sent to the remote IoT platform. During the transmission process, the network status is continuously monitored. If an interruption occurs again, the retransmission is paused and the breakpoint is recorded. Once the network is restored, the retransmission continues from the breakpoint. After all historical data has been retransmitted, the data storage area to be retransmitted is cleared, and normal periodic reporting is resumed according to the current reporting cycle value.
[0089] It should be noted that in the grade categories, the first grade is higher than the second grade, and the second grade is higher than the third grade. The higher the grade, the better the network status or data value.
[0090] The basic reporting cycle is the default reporting interval configured when the device is initialized, such as 5 minutes, which can be uniformly set through a remote platform according to business needs.
[0091] It should also be noted that by using network status factors and data value factors as joint decision-making criteria, dynamic adaptive adjustment of the reporting cycle is achieved. Based on the real-time changes in current network quality and data importance, it can intelligently select one of four adjustment modes: network priority, data priority, balanced, or maintain. While ensuring the real-time uploading of high-value data, it effectively avoids the risk of data loss during periods of network congestion, thus achieving synergistic optimization of communication resources and data value.
[0092] Referring to Figure 3, in a second aspect, the present invention provides an energy consumption data acquisition method based on the Internet of Things, comprising: performing real-time protocol parsing and data conversion on raw data to generate a standard energy consumption data packet with a unified timestamp and device identifier, and storing it in the order of receipt.
[0093] The system collects communication signal strength and round-trip time with a remote IoT platform in real time, and generates network state factors based on a comparison of the current communication quality with the baseline state.
[0094] The current and historical standard energy consumption data packages are analyzed. Based on the historical power data sequence, the dynamic change benchmark and adaptive fluctuation range are calculated. The instantaneous deviation rate and the duration of continuous deviation of the current power data are determined. Data value factors are generated after normalization and linear weighting.
[0095] The network status factor and data value factor are matched with a preset periodic adjustment mode, standard energy consumption data packets are sent to a remote IoT platform, and the sequential retransmission of unuploaded historical data is automatically triggered after the network is restored following an interruption.
[0096] The above description is merely an example and illustration of the structure of the present invention. Those skilled in the art can make various modifications or additions to the specific embodiments described, or use similar methods to replace them, as long as they do not deviate from the structure of the invention or exceed the scope defined by the present invention, they should all fall within the protection scope of the present invention.
Claims
1. An energy consumption data collector based on the Internet of Things, characterized in that, include: The data processing module performs real-time protocol parsing and data conversion on the raw data, generates standard energy consumption data packets with unified timestamps and device identifiers, and stores them in the order of receipt. The network status assessment module collects communication signal strength and round-trip time with the remote IoT platform in real time, and generates network status factors based on the comparison between the current communication quality and the baseline status. The data value assessment module analyzes current and historical standard energy consumption data packages, calculates dynamic change benchmarks and adaptive fluctuation ranges based on historical power data sequences, determines the instantaneous deviation rate and duration of continuous deviation of current power data, and generates data value factors through normalization and linear weighting. The communication and control module matches network status factors with data value factors in a preset periodic adjustment mode, sends standard energy consumption data packets to the remote IoT platform, and automatically triggers the sequential retransmission of unuploaded historical data after network interruption recovery.
2. The energy consumption data collector based on the Internet of Things according to claim 1, characterized in that, include: The process of acquiring the raw data is as follows: according to the physical interface type of the connected energy consumption meter, a variety of heterogeneous physical communication interfaces that match each energy consumption meter are initialized, and independent communication parameters and data buffers are allocated to each interface; the corresponding communication protocol stack is bound to each communication interface through the energy consumption meter automatic identification mechanism, and standardized data acquisition instructions for different meter types are generated based on the data frame format of each protocol. A multi-threaded concurrent control mechanism is adopted. Based on the preset acquisition cycle and combined with real-time triggering events, acquisition commands are sent to multiple energy consumption meters at the same time. The raw data returned by each interface is monitored concurrently through an asynchronous I / O event-driven mechanism. The integrity of the received raw data is verified, and messages that fail verification and duplicate messages are filtered out. The raw data that passes verification is appended with the interface identifier, meter address and receiving timestamp, and then stored in the circular buffer in sequence to construct the raw data.
3. The energy consumption data collector based on the Internet of Things according to claim 1, characterized in that, include: The specific process of real-time protocol parsing and data conversion is as follows: read the original data sequentially from the circular buffer according to the storage order, and determine the corresponding communication protocol type according to the additional interface identifier and instrument address; The protocol parsing engine that matches the protocol type is invoked to perform field segmentation on the original data packet according to the data frame defined by the protocol. The original bytes of the energy consumption value, metering time and operation status fields are located and extracted from the data field and converted into a recognizable data format. The converted data is normalized by converting energy consumption values into a unified unit of measurement according to the unit dimensions defined in the protocol, and converting the measurement time into a standard time format. Data whose energy consumption values are within the reasonable range defined in the protocol specification and whose operating status field is a valid status code is defined as valid data. The data time, device identifier, energy consumption value and status field of the valid data are encapsulated into a standard energy consumption data packet with a unified data structure.
4. The energy consumption data collector based on the Internet of Things according to claim 1, characterized in that, The process of generating network state factors includes: continuously sending multiple probe messages to a remote IoT platform within the current sampling period, recording the sending time of each probe message and the receiving time of the corresponding response, calculating multiple round-trip time sample values, recording the communication signal strength value during each probe, and obtaining multiple signal strength sample values; calculating the arithmetic mean of the multiple round-trip time sample values and the multiple signal strength sample values respectively, and using them as the average round-trip time and average signal strength.
5. The energy consumption data collector based on the Internet of Things according to claim 4, characterized in that, The process of generating the network state factor further includes: obtaining the pre-stored reference average round-trip time and reference average signal strength; calculating the ratio of the average round-trip time to the reference average round-trip time as the round-trip time relative deviation coefficient; calculating the absolute value of the difference between the average signal strength and the reference average signal strength, and using the ratio of the absolute value of the difference to the reference average signal strength as the signal strength relative deviation coefficient; normalizing the round-trip time relative deviation coefficient and the signal strength relative deviation coefficient respectively, mapping them to a unified numerical range, obtaining the normalized round-trip time deviation value and signal strength deviation value, and selecting the maximum value of the two as the network state factor.
6. The energy consumption data collector based on the Internet of Things according to claim 1, characterized in that, The process for determining the dynamic change benchmark and adaptive fluctuation range is as follows: extract power data with the same device identifier from historical standard energy consumption data packets to construct a historical power data sequence; use the exponentially weighted moving average method to process the historical power data sequence according to a preset smoothing factor, calculate the exponentially weighted moving average at the current moment as the dynamic change benchmark; calculate the absolute deviation between each power data in the historical power data sequence and the dynamic change benchmark to obtain an absolute deviation sequence, and calculate the median of the absolute deviation sequence as the fluctuation amplitude; The sum of the dynamic change benchmark and the fluctuation amplitude is used as the upper limit of the adaptive fluctuation range, and the difference is used as the lower limit of the adaptive fluctuation range.
7. An energy consumption data collector based on the Internet of Things according to claim 6, characterized in that, The specific process for generating the data value factor is as follows: calculate the deviation value of the current power data relative to the dynamic change benchmark, divide the deviation value by the fluctuation amplitude to obtain the instantaneous deviation rate; record the number of times the current power data continuously exceeds the adaptive fluctuation range, and use the product of the number of samplings and the preset time window as the duration of continuous deviation; The instantaneous deviation rate and the duration of continuous deviation are normalized and mapped to a unified numerical range to obtain the instantaneous deviation factor and the continuous deviation factor. Different weight coefficients are assigned to the two and linear weighted summation is performed to generate the data value factor.
8. An energy consumption data collector based on the Internet of Things according to claim 1, characterized in that, The specific process of matching the network status factor and the data value factor with the preset period adjustment mode is as follows: according to the preset rules, the network status factor and the data value factor are used as inputs to calculate the current reporting period value; the interval time for the next reporting is set according to the current reporting period value, and when the reporting time is reached, standard energy consumption data packets are taken out from the reporting queue in storage order, assembled into an uplink message and sent to the remote IoT platform; the network connection status is monitored in real time, and when a network interruption is detected, data reporting is paused and the unsent standard energy consumption data packets are marked as data to be retransmitted. Once the network is restored, the data to be retransmitted will be automatically retrieved and resent in chronological order until all historical data has been retransmitted, and then normal reporting will resume according to the current reporting cycle value.
9. An energy consumption data collector based on the Internet of Things according to claim 1, characterized in that, The preset rules are as follows: compare the network status factor with the first preset threshold range to determine the level category to which the network status belongs; compare the data value factor with the second preset threshold range to determine the level category to which the data value belongs; and match the corresponding adjustment strategy from a variety of predefined reporting cycle adjustment modes based on the combination of the network status level category and the data value level category. The reporting cycle adjustment modes include: network priority mode, data priority mode, balanced mode, and maintenance mode.
10. A method for collecting energy consumption data based on the Internet of Things, characterized in that, include: The raw data is parsed and converted in real time to generate standard energy consumption data packets with unified timestamps and device identifiers, and stored in the order of receipt. Real-time acquisition of communication signal strength and round-trip time with remote IoT platform; generation of network state factors based on comparison of current communication quality with baseline state. The current and historical standard energy consumption data packages are analyzed. Based on the historical power data sequence, the dynamic change benchmark and adaptive fluctuation range are calculated. The instantaneous deviation rate and the duration of continuous deviation of the current power data are determined. Data value factors are generated after normalization and linear weighting. The network status factor and data value factor are matched with a preset periodic adjustment mode, standard energy consumption data packets are sent to a remote IoT platform, and the sequential retransmission of unuploaded historical data is automatically triggered after the network interruption is restored.
Citation Information
Cited By
Electricity information collection method and system based on internet-of-things electric energy meter
CN122131009A