An internet of things meter box supporting bidirectional electric energy metering and a data security transmission method

By identifying peak transmission periods in the meter box and the power grid, as well as the intensity of user demand, the data transmission strategy of the IoT meter box is optimized, solving the problems of channel congestion and mismatch between user demand, and realizing efficient and real-time bidirectional power metering data transmission.

CN122495703APending Publication Date: 2026-07-31LAIWU KETAI ELECTRIC POWER TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-08
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

The data transmission mode of existing IoT meter boxes does not dynamically optimize the data transmission peak time of the area under the meter box's jurisdiction with the overall power grid transmission peak time, resulting in channel congestion, network latency, and data packet loss. Furthermore, it fails to differentiate the intensity of data query needs of different users, affecting the accuracy and real-time performance of bidirectional power metering data.

Method used

By collecting data and user query behavior from the areas under the jurisdiction of the meter box, we can identify peak, valley, and normal periods for data collection, establish user type tags, optimize data transmission strategies, adjust the frequency of frozen data uploads for different users at different times, and set transmission priorities and frequencies accordingly.

Benefits of technology

It optimizes data transmission efficiency, avoids resource idleness, ensures real-time data query for high-demand users, reduces the risk of power grid congestion and data loss, and adapts to the actual needs of different users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122495703A_ABST
    Figure CN122495703A_ABST
Patent Text Reader

Abstract

This invention discloses an IoT meter box supporting bidirectional energy metering and a method for secure data transmission, relating to the field of IoT meter box data transmission optimization technology. The method includes the following steps: collecting basic data from IoT meter boxes in various subordinate areas; statistically analyzing the forward power transmission and reverse power generation data of different users within the jurisdiction of the IoT meter box; obtaining the peak, valley, and normal data collection periods and the grid freeze data upload time points for different meter box jurisdiction areas; collecting historical data query behavior data of each user's forward power transmission and reverse power generation during different peak periods within the jurisdiction of the IoT meter box; statistically analyzing the query frequency of each user at different times of the day; establishing user data query demand intensity, data type, and time period correlation to output user types; and establishing an IoT meter box user database to record user data. This invention optimizes the data transmission and upload scheme of IoT meters by balancing the communication load on the grid side and the real-time needs of the user side.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data transmission optimization technology for IoT meter boxes, and more specifically, to an IoT meter box that supports bidirectional power metering and a method for secure data transmission. Background Technology

[0002] With the widespread adoption of distributed power sources such as distributed photovoltaics and energy storage, bidirectional electricity metering IoT boxes with forward electricity consumption metering and reverse power generation metering functions have become core equipment for metering and management at the end of the power grid. These boxes need to collect forward electricity consumption peak and valley data and reverse power generation peak and valley data of users in the area under their jurisdiction in real time. Currently, existing IoT boxes generally adopt a working mode of unified collection at fixed time periods and centralized uploading after data freezing. That is, the power grid predefines a unified billing conversion period and uploads the frozen data of the previous period to the power grid master station at the end of each period. However, the existing unified frozen data upload mode does not dynamically optimize the data transmission peak time of the meter box's area and the overall power grid transmission peak time. This results in a large number of terminals reporting data at the same time, which can easily cause channel congestion, network latency, data packet loss, or even transmission failure, affecting the accuracy and real-time performance of bidirectional power metering data. At the same time, with the popularization of photovoltaic power generation and V2G technology, different users have different query needs for forward transmission data and reverse generation data, resulting in different update frequencies for different users at different times. The existing system does not differentiate the intensity of users' data query needs, does not distinguish between high, medium, and low demand levels of users, and cannot set transmission priorities and frequencies accordingly. As a result, high-demand users cannot obtain stable real-time data support, while low-demand users occupy unnecessary communication resources, leading to low practicality. Summary of the Invention

[0003] To address the problems in related technologies, this invention proposes an IoT meter box that supports bidirectional power metering and a secure data transmission method, which can effectively solve the problems of centralized power grid data transmission congestion and mismatch between user needs.

[0004] Therefore, the specific technical solution adopted by the present invention is as follows: A method for secure data transmission in an IoT meter box supporting bidirectional energy metering, the method comprising the following steps: S1. Collect basic data of IoT meter boxes in various regions, and statistically analyze the forward power transmission and reverse power generation data of different users within the jurisdiction of the IoT meter boxes. Obtain the peak, valley, and normal periods of data collection and the time point of power grid freezing data upload for different meter box jurisdictions. S2. Collect historical data query behavior data of each user in the IoT meter box area during different peak periods for forward power transmission and reverse power generation, count the query frequency of each user in different time periods of the day, establish the intensity of user data query demand, data type and time period association to output user type, and establish IoT meter box user database to record user data. S3. Based on the time-based demand type labels of users under each IoT meter box, optimize the data transmission strategy for different users during peak, valley, and normal periods of data collection in the area under the meter box, as well as the time point for uploading frozen data of the power grid, and adjust the frequency of frozen data upload for different types of users at different times in the meter box.

[0005] In a preferred embodiment, S1 includes the following steps: S11. Collect basic data of IoT meter boxes in each region, including meter box number, installation location, region range, number of users, and collect forward power transmission and reverse power generation data of different users within the jurisdiction of different IoT meter boxes after dividing each day into time periods at fixed intervals within a historical statistical period T. This includes the forward power transmission and reverse power generation of users in each time period. S12. Calculate the total forward power transmission and total reverse power generation of all users under each meter box within the time period. Use the sum of the absolute values ​​of the total forward power transmission and total reverse power generation as the data acquisition load. Obtain the peak, valley, and normal periods for data acquisition in the area under different meter boxes using the N-Sigma criterion. Simultaneously record the grid freeze data upload time points for different meter boxes. The specific steps include: For each meter box b i Calculate the total forward power transmission and total reverse power generation of all its subordinate users in time period t: The total forward power transmission is: ; The total reverse power generation is: ; Where i is the meter box number, j is the user number, and time period t is the time period divided into fixed time intervals each day. These represent the forward power transmission and reverse power generation of the j-th user in the i-th meter box during the t-th time period, respectively, and the data acquisition load. ; Statistical calculation D i (t) The average value μ over all periods in the historical period i and standard deviation σ i Based on threshold coefficients k1 and k2, the category of time period t is determined to obtain the peak, valley, and normal periods of data collection in different meter boxes' jurisdictions: when If so, the current time period is determined to be a peak period; when If so, the current time period is determined to be a valley period; when If so, the current time period is determined to be a normal time period.

[0006] In a preferred embodiment, S2 includes the following steps: S21. Collect historical data query behavior data of each user in the IoT meter box area during different peak periods for forward power transmission and reverse power generation, including user identifier, query timestamp, and type of query data. Map the query time to the time period index of the day and count the query frequency of each user under different meter boxes in different time periods of the day. S22. Based on the query frequency of different users for different types of data at different time periods, establish the user data query demand intensity, data type and time period association to output user type, obtain the query type labels of different users for different types of data at different time periods, establish an IoT meter box user database, create files for different IoT meter boxes, and record the user data under the meter box in the files.

[0007] In a preferred embodiment, S21 includes the following steps: S211, For IoT meter box b i The set of subordinate users M i For the meter box b i The total number of users is calculated, and query behavior logs for a historical period of T days are obtained from the user data query platform. Each behavior log includes a user identifier u. ij Query timestamp τ ijk Query data types , where data types Including reverse power generation data and forward power transmission data, τ ijk Representing user u ij The timestamp of the kth query log, c ijk Representing user u ij The data type corresponding to the kth query log; S212. Map the query time to a time-segment index within a day. Calculate the time-segment index after standardizing the query time for the time zone. Calculate the average query frequency for different data types at different times within the historical period for different users. This includes the following steps: For time period index , ,in These represent the number of hours and minutes corresponding to the timestamp τ, respectively, for user u. ij Calculate the relationship between data types within a historical period of T days and a time period of t. Average query frequency : ; in, Representing user u ij Query data type within time period t on day d The number of times.

[0008] In a preferred embodiment, S22 includes the following steps: S221. Using time period t as the unit, calculate the query frequency distribution for all users in time period t, based on the forward transmission data and reverse generation data of different users respectively, for the data type of time period t. Collect the query frequency of this data type for all users under the table box during this time period. Using the 33rd and 67th percentiles of this set as thresholds, users are assigned time-based demand type labels, including high demand, medium demand, and low demand. Demands above the 67th percentile are classified as high demand, those above the 33rd percentile as low demand, and those between the 33rd and 67th percentiles as medium demand. ; set The 33rd and 67th percentiles were used as thresholds. For user u ij For data types in time period t query frequency Combined with threshold Determining the demand type label involves the following steps: The label for the forward power transmission data demand type is: : ; in, Representing user u ij The total average query frequency for forward power transmission data within time period t. These represent the 33rd and 67th quantiles of the frequency of forward power transmission data queries within time period t, respectively. The label for the reverse power generation data demand type is... : ; in, Representing user u ij The total average query frequency for reverse generation data within time period t. These represent the 33rd and 67th percentiles of the frequency of reverse power generation data queries within time period t, respectively. S222. Establish an IoT meter box user database using MySQL. Based on the IoT meter box number, create IoT meter box files in the IoT meter box user database. Record user data under different IoT meter boxes in the corresponding IoT meter box files, including user number and user time period demand type label.

[0009] In a preferred embodiment, step S3 includes the following steps: S31. Adjust the preset data transmission frequency based on the peak, valley and normal periods of data collection in the area under the meter box, and at the same time, optimize the adjusted frequency according to the time-specific needs of users under each IoT meter box, and output a personalized data upload frequency. S32. Based on the personalized data upload frequency and the power grid freeze data upload time point, optimize the data transmission strategy for different users and adjust the freeze data upload frequency for different types of users at different times in the meter box.

[0010] In a preferred embodiment, S31 includes the following steps: S311. Extract the peak, valley, and normal periods corresponding to different time periods of the meter box, and adjust the preset transmission frequency by adjusting the adjustment factor, wherein the basic frequency adjustment factor is... : ; Where β0 and β1 represent the meter box b respectively. i Peak adjustment factor and trough adjustment factor at time period t; S312. Based on the time-based demand type tags of users under each IoT meter box, specifically optimize the adjustment frequency and define the demand level adjustment function. These are used for forward power transmission and reverse power generation, respectively, to obtain specific adjustment factors under different types of tags. The product of the preset transmission frequency, the basic frequency adjustment factor, and the specific adjustment factor is used as the personalized data upload frequency. The specific steps include: ; in, These represent the specific adjustment factors for high-demand users and the specific adjustment factors for medium-demand users, respectively. .

[0011] In a preferred embodiment, S32 includes the following steps: S321. Based on the personalized data upload frequency of different data types for different users in different bins at different times, data upload and transmission are carried out according to the personalized data upload frequency for users with high demand and medium demand tags. S322. For users with low-demand tags, if the data upload time of the IoT meter box power grid freeze is in the current IoT meter box data collection valley or normal period, the data will be uploaded uniformly at the current IoT meter box power grid freeze data upload time. If the data upload time of the IoT meter box power grid freeze is in the current IoT meter box data collection peak period, the data upload time will be postponed to the next data collection valley or normal period after the current IoT meter box power grid freeze data upload time.

[0012] In a preferred embodiment, S321 includes the following steps: S3211. For users tagged with high demand and medium demand in different time periods, the data upload frequency is dynamically adjusted based on the maximum number of uploads supported for the corresponding time period. When the sum of the actual upload counts of all users exceeds the maximum number of uploads supported for the current time period, the upload cycle is extended by multiplying the data by the channel adjustment coefficient in order of priority from medium demand to high demand, until the total number of uploads meets the communication constraints. The specific steps are as follows: The sum of the actual upload counts of all users Then, according to the priority order of medium demand and high demand, the channel adjustment coefficient γ is multiplied in turn, and this process is repeated until the requirement is met. Representative box b i The maximum number of uploads that can be supported during time period t.

[0013] An IoT meter box supporting bidirectional power metering uses any of the above-mentioned data security transmission methods for IoT meter boxes supporting bidirectional power metering for data acquisition and transmission.

[0014] The beneficial effects of this invention are as follows: This invention optimizes data transmission by identifying peak transmission periods for both the meter box and the power grid, based on user data and bidirectional power data within the coverage area of ​​an IoT meter box. It combines this with the intensity of user demand to optimize the transmission time and cycle of power data. By identifying the peak data transmission periods for each IoT meter box's own area and the overall power grid, and considering the differentiated data query intensity of each user at different times, the invention specifically optimizes the data transmission time and cycle for each user. It clarifies the transmission priority and frequency for users with high, medium, and low demand intensities, ensuring that the channel bandwidth of different IoT meter boxes serves the most data-intensive services during peak hours and is fully utilized during off-peak and normal periods, avoiding resource idleness and enhancing practicality. This invention classifies user query intensity based on the data characteristics of different meter boxes and formulates differentiated transmission strategies for users with high, medium and low demand intensities. This ensures the real-time data query of high-demand users while taking into account the usage needs of medium and low-demand users and the system communication load, so as to avoid the risk of power grid congestion and data loss caused by centralized uploading. This invention alleviates network congestion and improves the success rate of high-priority data transmission by smoothing out peaks and valleys in low-demand user data. Through differentiated data transmission strategies, it optimizes overall transmission efficiency while ensuring data integrity, adapting to the actual needs of different users. Attached Figure Description

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

[0016] Figure 1 This is an overall flowchart of a data security transmission method for an IoT meter box supporting bidirectional power metering according to an embodiment of the present invention; Figure 2 This is a flowchart of step S2 of a data security transmission method for an IoT meter box supporting bidirectional power metering according to an embodiment of the present invention; Figure 3 This is a flowchart of step S3 of a data security transmission method for an IoT meter box that supports bidirectional power metering according to an embodiment of the present invention. Detailed Implementation

[0017] To further illustrate the various embodiments, the present invention provides accompanying drawings, which are part of the disclosure of the present invention. These drawings are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these drawings, those skilled in the art should be able to understand other possible implementation methods and the advantages of the present invention. The components in the drawings are not drawn to scale, and similar component symbols are generally used to represent similar components.

[0018] According to an embodiment of the present invention, an Internet of Things (IoT) meter box supporting bidirectional power metering and a method for secure data transmission are provided.

[0019] The present invention will now be further described in conjunction with the accompanying drawings and specific embodiments: Example 1: like Figure 1 As shown, according to an embodiment of the present invention, a data security transmission method for an IoT meter box supporting bidirectional power metering includes the following steps: S1. Collect basic data of IoT meter boxes in various regions, and statistically analyze the forward power transmission and reverse power generation data of different users within the jurisdiction of the IoT meter boxes. Obtain the peak, valley, and normal periods of data collection and the time point of power grid freezing data upload for different meter box jurisdictions. S11. Collect basic data of IoT meter boxes in each region, including meter box number, installation location, region range, number of users, and collect forward power transmission and reverse power generation data of different users within the jurisdiction of different IoT meter boxes after dividing each day into time periods at fixed intervals within a historical statistical period T. This includes the forward power transmission and reverse power generation of users in each time period. S12. Calculate the total forward power transmission and total reverse power generation of all users under each meter box within the time period. Use the sum of the absolute values ​​of the total forward power transmission and total reverse power generation as the data acquisition load. Obtain the peak, valley, and normal periods for data acquisition in the area under different meter boxes using the N-Sigma criterion. Simultaneously record the grid freeze data upload time points for different meter boxes. The specific steps include: For each meter box b i Calculate the total forward power transmission and total reverse power generation of all its subordinate users in time period t: The total forward power transmission is: ; The total reverse power generation is: ; Where i is the meter box number, j is the user number, and time period t is the time period divided into fixed time intervals each day. These represent the forward power transmission and reverse power generation of the j-th user in the i-th meter box during the t-th time period, respectively, and the data acquisition load. ; Statistical calculation D i (t) The average value μ over all periods in the historical period i and standard deviation σ i Based on threshold coefficients k1 and k2, the category of time period t is determined to obtain the peak, valley, and normal periods of data collection in different meter boxes' jurisdictions: when If so, the current time period is determined to be a peak period; when If so, the current time period is determined to be a valley period; when If so, the current time period is determined to be a normal time period.

[0020] It should be noted that the threshold coefficient is... k1 and k2 are usually set to 1 and 0.5, respectively, but can also be adjusted based on experience according to actual application. The time point for uploading frozen data of the power grid is preset by the main station system. It is the time point when all meter boxes need to upload frozen data. It is usually the switching time of each tariff period. The fixed time interval is usually set to 15 minutes, but can also be adjusted according to actual conditions. The sum of the absolute values ​​of total power can reflect the busyness of data collection. That is, the more power generation and power consumption in a period, the more data needs to be collected and transmitted.

[0021] Example 2: like Figure 2 As shown, S2 collects historical data query behavior data of each user in the IoT meter box area during different peak periods for forward power transmission and reverse power generation, counts the query frequency of each user in different time periods of the day, establishes the intensity of user data query demand, data type and time period association to output user type, and establishes IoT meter box user database to record user data. S21. Collect historical data query behavior data of each user in the IoT meter box area during different peak periods for forward power transmission and reverse power generation, including user identifier, query timestamp, and type of query data. Map the query time to the time period index of the day and count the query frequency of each user under different meter boxes in different time periods of the day. S211, For IoT meter box b i The set of subordinate users M i For the meter box b i The total number of users is calculated, and query behavior logs for a historical period of T days are obtained from the user data query platform. Each behavior log includes a user identifier u. ij Query timestamp τ ijk Query data types , where data types Including reverse power generation data and forward power transmission data, τ ijk Representing user u ij The timestamp of the kth query log, c ijk Representing user u ij The data type corresponding to the kth query log; It should be noted that an event tracking SDK can be integrated into the front-end code of applications such as the power grid APP, WeChat mini-program, electricity service platform, and user-side query terminal. When a user performs a query operation, the SDK will automatically capture events such as clicks and views, and generate logs containing fields such as user ID, timestamp, and query type. This data is then transmitted in real time or in batches to a designated log server or data platform by calling the back-end data reporting API interface. This allows the acquisition of historical query behavior data of users for forward power transmission data and reverse power generation data within the area covered by the IoT meter box. The user's power generation data includes various distributed power generation data such as distributed photovoltaic power generation data, V2G electric vehicle grid discharge data, and household energy storage reverse discharge data. Anonymized user data is achieved by using an encrypted hash function, combining a confidential Salt value with the original user identifier at the meter box side, and then performing hash calculation. At the same time, all transmission communication from the IoT meter box to the data aggregation platform / cloud center is encrypted using the TLS 1.2 / 1.3 protocol to ensure the security of data transmission. The timestamp of the user query log is accurate to the second.

[0022] S212. Map the query time to a time-segment index within a day. Calculate the time-segment index after standardizing the query time for the time zone. Calculate the average query frequency for different data types at different times within the historical period for different users. This includes the following steps: For time period index , ,in These represent the number of hours and minutes corresponding to the timestamp τ, respectively, for user u. ij Calculate the relationship between data types within a historical period of T days and a time period of t. Average query frequency : ; in, Representing user u ij Query data type within time period t on day d The number of times.

[0023] It should be noted that the average query frequency of different types of data by users at different times can reflect the level of user attention to different types of data. For example, users who frequently query power generation data during the midday period may be participants in V2G projects who need to monitor the power transmission status of vehicles in real time. The higher the frequency, the higher the level of attention and the more urgent the need. The more concentrated the time period, the more obvious the behavioral characteristics. For example, 11:00-14:00 is a typical period for V2G vehicles to discharge and feed into the grid. Users who frequently query reverse power generation data during this period are likely V2G vehicle owners who need to monitor the vehicle's discharge status in real time and adjust charging and discharging strategies. By identifying high-demand users, subsequent steps can be taken to increase their data upload frequency to meet user needs and optimize the data transmission methods of different meter boxes.

[0024] S22. Based on the query frequency of different users for different types of data at different time periods, establish the user data query demand intensity, data type and time period association to output user type, obtain the query type label of different users for different types of data at different time periods, establish IoT meter box user database, create files for different IoT meter boxes, and record user data under the meter box in the files. S221. Using time period t as the unit, calculate the query frequency distribution for all users in time period t, based on the forward transmission data and reverse generation data of different users respectively, for the data type of time period t. Collect the query frequency of this data type for all users under the table box during this time period. Using the 33rd and 67th percentiles of this set as thresholds, users are assigned time-based demand type labels, including high demand, medium demand, and low demand. Demands above the 67th percentile are classified as high demand, those above the 33rd percentile as low demand, and those between the 33rd and 67th percentiles as medium demand. ; set The 33rd and 67th percentiles were used as thresholds. For user u ij For data types in time period t query frequency Combined with threshold Determining the demand type label involves the following steps: The label for the forward power transmission data demand type is: : ; in, Representing user u ij The total average query frequency for forward power transmission data within time period t. These represent the 33rd and 67th quantiles of the frequency of forward power transmission data queries within time period t, respectively. The label for the reverse power generation data demand type is... : ; in, Representing user u ij The total average query frequency for reverse generation data within time period t. These represent the 33rd and 67th percentiles of the frequency of reverse power generation data queries within time period t, respectively. It should be noted that the thresholds are generated and determined by the distribution of user behavior in this region, time period, and data type. This can conform to the actual application situation within the scope of each IoT meter box. High demand corresponds to users with high query frequency, medium demand corresponds to users with moderate query frequency, and low demand corresponds to users with few or no queries. By using the 33rd and 67th percentiles of this set as thresholds, the dataset is divided into three approximately equal parts. The subsequent data upload frequency is classified according to the demand label. Data uploads are divided during peak, valley, and normal data collection periods, as well as during power grid freeze data upload times. This optimizes data transmission and upload logic, matches the user behavior characteristics of different regions, time periods, and data types, and provides a data foundation for differentiated data transmission strategies.

[0025] S222. Establish an IoT meter box user database using MySQL. Based on the IoT meter box number, create IoT meter box files in the IoT meter box user database. Record user data under different IoT meter boxes in the corresponding IoT meter box files, including user number and user time period demand type label.

[0026] like Figure 3 As shown, S3, based on the time-based demand type labels of users under each IoT meter box, optimize the data transmission strategy for different users during peak, valley, and normal periods of data collection in the area under the meter box, as well as the time point for uploading frozen data of the power grid, and adjust the frequency of frozen data upload for different types of users in different time periods of the meter box. S31. Adjust the preset data transmission frequency based on the peak, valley and normal periods of data collection in the area under the meter box, and at the same time, optimize the adjusted frequency according to the time-specific needs of users under each IoT meter box, and output a personalized data upload frequency. S311. Extract the peak, valley, and normal periods corresponding to different time periods of the meter box, and adjust the preset transmission frequency by adjusting the adjustment factor, wherein the basic frequency adjustment factor is... : ; Where β0 and β1 represent the meter box b respectively. iPeak adjustment factor and trough adjustment factor at time period t; It should be noted that the preset transmission frequency needs to be determined based on the model of the IoT meter box and the performance of the communication module in the actual IoT meter box. This determines the maximum number of sustainable uploads for different meter boxes, and the network channel capacity is determined by the bandwidth, signal quality, and QoS requirements of the IoT meter box. The initial transmission frequency is preset by consulting experts in the field. β0 and β1 represent meter box b, respectively. i The peak-hour adjustment factor and valley-hour adjustment factor are defined for time period t. β0 ranges from 0.5 to 0.8, meaning that during peak data acquisition periods, the power grid network is heavily loaded and the channel capacity is at critical saturation. Reducing the frequency by 20% to 50% avoids high network load and can save power consumption of the meter box-side communication module. β1 ranges from 1.2 to 1.5, meaning that during idle valley periods of data acquisition, within the allowable instantaneous maximum transmit power and bandwidth of the communication module, the transmission frequency is increased by approximately 20% to 50%, moderately seizing network resources and increasing data transmission frequency. Specific values ​​need to be determined based on the historical load characteristics of the power IoT communication network of the IoT meter box in the application environment. The system analyzes the load characteristics to adapt to different network load conditions at different times. This involves analyzing the historical load of different bins during peak and valley periods, adjusting the peak and valley adjustment factors within their upper and lower limits, and then analyzing the load condition. Within the value range, the system iteratively adjusts the value of the factor with a preset step size. After each adjustment, the system collects and analyzes the real-time network load condition for the next same time period. By comparing the load condition under different factor values, the system selects the factor value that optimizes the load condition for the bin as the actual value of the adjustment factor. Load characteristics include packet loss rate, latency, service data volume, and channel occupancy rate. Alternatively, the system can consult experts in the field for settings based on experience.

[0027] S312. Based on the time-based demand type tags of users under each IoT meter box, specifically optimize the adjustment frequency and define the demand level adjustment function. These are used for forward power transmission and reverse power generation, respectively, to obtain specific adjustment factors under different types of tags. The product of the preset transmission frequency, the basic frequency adjustment factor, and the specific adjustment factor is used as the personalized data upload frequency. The specific steps include: ; in, These represent the specific adjustment factors for high-demand users and the specific adjustment factors for medium-demand users, respectively. .

[0028] It should be noted that, for high-demand and medium-demand users, by pre-setting specific adjustment factors based on user needs, it is possible to both meet users' data query requirements and reduce the amount of data accumulated at the frozen data upload time point, thus avoiding the risk of power grid congestion and data loss caused by concentrated uploads. The value is usually set to 1.5 or 1.2. It can also be adjusted based on the actual number of users in the meter box using an empirical method. For low-demand users, the base frequency is maintained for the corresponding peak, valley, and normal periods. By setting specific adjustment factors for high-demand and medium-demand users, the base frequency can be further adjusted in a targeted manner according to the actual needs of these users in different peak, valley, and normal periods to meet the needs of different types of users.

[0029] S32. Based on the personalized data upload frequency and the power grid frozen data upload time point, optimize the data transmission strategy for different users and adjust the frozen data upload frequency of different types of users in different time periods of the meter box. S321. Based on the personalized data upload frequency of different data types for different users in different bins at different times, data upload and transmission are carried out according to the personalized data upload frequency for users with high demand and medium demand tags. S3211. For users tagged with high demand and medium demand in different time periods, the data upload frequency is dynamically adjusted based on the maximum number of uploads supported for the corresponding time period. When the sum of the actual upload counts of all users exceeds the maximum number of uploads supported for the current time period, the upload cycle is extended by multiplying the data by the channel adjustment coefficient in order of priority from medium demand to high demand, until the total number of uploads meets the communication constraints. The specific steps are as follows: The sum of the actual upload counts of all users Then, according to the priority order of medium demand and high demand, the channel adjustment coefficient γ is multiplied in turn, and this process is repeated until the requirement is met. Representative box b i The maximum number of uploads that can be supported during time period t.

[0030] It should be noted that, among them , Representing user u ij The actual upload cycle for time period t, in minutes. Representative box b i The maximum number of uploads that can be supported in time period t is measured in times per hour. The total upload traffic of the meter box in that time period is obtained by adding the frequencies of all users. If the total upload traffic exceeds the maximum number of uploads supported by the meter box, the upload frequency of users is reduced according to priority until the overload is eliminated. γ is usually set to 0.75, but it can also be adjusted based on the actual meter box model using empirical methods.

[0031] S322. For users with low-demand tags, if the data upload time of the IoT meter box power grid freeze is in the current IoT meter box data collection valley or normal period, the data will be uploaded uniformly at the current IoT meter box power grid freeze data upload time. If the data upload time of the IoT meter box power grid freeze is in the current IoT meter box data collection peak period, the data upload time will be postponed to the next data collection valley or normal period after the current IoT meter box power grid freeze data upload time.

[0032] It should be noted that users tagged with "low demand" are not particularly sensitive to data queries. By classifying the data upload time of users tagged with "low demand," the amount of data can be further optimized when the power grid freezes the data upload time.

[0033] In summary, this invention optimizes data transmission by identifying peak transmission periods for both the meter boxes and the power grid, based on user data and bidirectional power data within the coverage area of ​​each IoT meter box. It combines this with the intensity of user demand to optimize the transmission time and cycle of power data. Specifically, it identifies the peak data transmission periods for each IoT meter box's area and the overall power grid, and considers the differentiated data query intensity of users at different times. This allows for targeted optimization of the data transmission time and cycle for each user, clearly defining the transmission priority and frequency for users with high, medium, and low demand intensities. This ensures that the channel bandwidth of different IoT meter boxes serves the most data-intensive services during peak hours and is fully utilized during off-peak and normal periods, avoiding resource idleness. By classifying user query demand intensity based on the data characteristics of different meter boxes, and developing differentiated transmission strategies for high, medium, and low demand intensities, this invention ensures the real-time data query performance of high-demand users while also considering the usage needs and system communication load of medium and low-demand users, thus avoiding the risk of power grid congestion and data loss due to concentrated uploads.

[0034] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for secure data transmission in an IoT meter box supporting bidirectional energy metering, characterized in that, The method includes the following steps: S1. Collect basic data of IoT meter boxes in various regions, and statistically analyze the forward power transmission and reverse power generation data of different users within the jurisdiction of the IoT meter boxes. Obtain the peak, valley, normal, and grid freeze data upload time points for data collection in different regions under the jurisdiction of the meter boxes. S2. Collect historical data query behavior data of each user in the IoT meter box area during different peak periods for forward power transmission and reverse power generation, count the query frequency of each user in different time periods of the day, establish the intensity of user data query demand, data type and time period association to output user type, and establish IoT meter box user database to record user data. S3. Based on the time-based demand type labels of users under each IoT meter box, optimize the data transmission strategy for different users during peak, valley, and normal periods of data collection in the area under the meter box, as well as the time point for uploading frozen data to the power grid, and adjust the frequency of frozen data upload for different types of users in different time periods of the meter box.

2. The data security transmission method for an IoT meter box supporting bidirectional power metering according to claim 1, characterized in that, S1 includes the following steps: S11. Collect basic data of IoT meter boxes in each region, including meter box number, installation location, region range, number of users, and collect forward power transmission and reverse power generation data of different users within the jurisdiction of different IoT meter boxes after dividing each day into time periods at fixed intervals within a historical statistical period T. This includes the forward power transmission and reverse power generation of users in each time period. S12. Calculate the total forward power transmission and total reverse power generation of all users under each meter box within the time period. Take the sum of the absolute values ​​of the total forward power transmission and total reverse power generation as the data acquisition load. Obtain the data acquisition time period, valley period and normal period of the area under the jurisdiction of different meter boxes through the N-Sigma criterion. At the same time, record the grid freeze data upload time point of different meter boxes.

3. The data security transmission method for an IoT meter box supporting bidirectional power metering according to claim 2, characterized in that, S2 includes the following steps: S21. Collect historical data query behavior data of each user in the IoT meter box area during different peak periods for forward power transmission and reverse power generation, including user identifier, query timestamp, and type of query data. Map the query time to the time period index of the day and count the query frequency of each user under different meter boxes in different time periods of the day. S22. Based on the query frequency of different users for different types of data at different time periods, establish the user data query demand intensity, data type and time period association to output user type, obtain the query type labels of different users for different types of data at different time periods, establish an IoT meter box user database, create files for different IoT meter boxes, and record the user data under the meter box in the files.

4. The data security transmission method for an IoT meter box supporting bidirectional power metering according to claim 3, characterized in that, S21 includes the following steps: S211. For the set of users under the IoT meter box, obtain the query behavior logs within the historical period from the user data query platform. Each behavior log includes a user identifier, query timestamp, and query data type, where the data type includes reverse power generation data and forward power transmission data. S212. Map the query time to the time period index of the day. Calculate the time period index after standardizing the query time for the time zone. Calculate the average query frequency for different data types at different times in the historical period for different users.

5. A data security transmission method for an IoT meter box supporting bidirectional power metering according to claim 4, characterized in that, S22 includes the following steps: S221. Using time period t as the unit, calculate the query frequency distribution for all users in time period t, based on the forward transmission data and reverse generation data of different users respectively, for the data type of time period t. Collect the query frequency of this data type for all users under the table box during this time period. Using the 33rd and 67th percentiles of the set as thresholds, users are assigned time-based demand type labels, including high demand, medium demand, and low demand. Those not lower than the 67th percentile are set as high demand, those not higher than the 33rd percentile are set as low demand, and those between the 33rd and 67th percentiles are set as medium demand. S222. Establish an IoT meter box user database using MySQL. Based on the IoT meter box number, create IoT meter box files in the IoT meter box user database. Record user data under different IoT meter boxes in the corresponding IoT meter box files, including user number and user time period demand type label.

6. A data security transmission method for an IoT meter box supporting bidirectional power metering according to claim 5, characterized in that, S3 includes the following steps: S31. Adjust the preset data transmission frequency based on the data collection time period, valley period and normal period of the area under the meter box. At the same time, optimize the adjustment frequency according to the time period needs of users under each IoT meter box and output a personalized data upload frequency. S32. Based on the personalized data upload frequency and the power grid freeze data upload time point, optimize the data transmission strategy for different users and adjust the freeze data upload frequency for different types of users at different times in the meter box.

7. A data security transmission method for an IoT meter box supporting bidirectional power metering according to claim 6, characterized in that, S31 includes the following steps: S311. Extract the collection time period, valley period, and normal period corresponding to different time periods of the meter box, and adjust the preset transmission frequency by adjusting the adjustment factor; S312. Combine the time-based demand type tags of users under each IoT meter box to perform specific optimization of the adjustment frequency, define demand level adjustment functions for forward power transmission and reverse power generation respectively, obtain specific adjustment factors under different types of tags, and use the product of the preset transmission frequency, the basic frequency adjustment factor, and the specific adjustment factor as the personalized data upload frequency.

8. A data security transmission method for an IoT meter box supporting bidirectional power metering according to claim 7, characterized in that, S32 includes the following steps: S321. Based on the personalized data upload frequency of different data types for different users in different bins at different times, data upload and transmission are carried out according to the personalized data upload frequency for users with high demand and medium demand tags. S322. For users with low-demand tags, if the data upload time of the IoT meter box power grid freeze is in the current IoT meter box data collection valley or normal period, the data will be uploaded uniformly at the current IoT meter box power grid freeze data upload time. If the data upload time of the IoT meter box power grid freeze is in the current IoT meter box data collection peak period, the data upload time will be postponed to the next data collection valley or normal period after the current IoT meter box power grid freeze data upload time.

9. A data security transmission method for an IoT meter box supporting bidirectional power metering according to claim 8, characterized in that, S321 includes the following steps: S3211. For users with high and medium demand tags in different time periods, the data upload frequency is dynamically adjusted according to the maximum number of uploads supported in the corresponding time period. When the sum of the actual uploads of all users is greater than the maximum number of uploads supported in the current time period, the upload cycle of users is extended by multiplying by the channel adjustment coefficient in the order of priority of medium demand and high demand, until the total number of uploads meets the communication constraints.

10. An IoT meter box supporting bidirectional power metering, characterized in that, Data acquisition and transmission are performed using the data security transmission method for IoT meter boxes supporting bidirectional power metering as described in any one of claims 1 to 9.