Ammeter data storage method of single-phase charge-control electric energy meter
Optimizing the storage of electricity meter data through intelligent sensors and adaptive compression algorithms, solving the problems of real-time and low data efficiency in traditional electricity meter data storage methods, and achieving efficient, intelligent storage and management of electricity meter data.
Patent Information
- Application Number
- CN202511039756.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-28
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2045-07-28
AI Technical Summary
Traditional power meter data storage methods lack effective analysis and utilization of the characteristics of electricity consumption data, and cannot dynamically adjust the acquisition frequency and compression strategy according to the data fluctuation amplitude, resulting in low data real-time, accuracy and storage efficiency, making it difficult to meet the needs of smart grids.
Through integrated intelligent sensors, real-time acquisition and preprocessing of voltage, current and power data is realized, dynamic time windows and data weight adjustment mechanism are introduced, combined with data classification and adaptive compression algorithms, Q-learning algorithm is used to optimize storage strategies, and dynamically adjust the selection and parameters of compression algorithms.
It improves the flexibility and accuracy of data acquisition, significantly improves storage efficiency and system performance, and supports efficient operation and refined management of smart grids.
Smart Images

Figure CN120546706A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of smart meter data processing, and in particular to a method for storing meter data of a single-phase fee-controlled electric energy meter. Background Art
[0002] With the continuous advancement of smart grid construction, single-phase cost-controlled electricity meters, as important metering equipment in the power system, have a direct impact on the operating efficiency and service quality of the power system. Traditional electricity meter data storage methods often focus on simple data recording and storage, lack effective analysis and utilization of electricity consumption data characteristics, and are difficult to meet the modern power system's requirements for data real-time, accuracy and efficiency. At the same time, with the generation of massive electricity consumption data in smart grids, how to efficiently store, process and analyze these data has become a technical problem that needs to be solved urgently. Therefore, the development of a single-phase cost-controlled electricity meter data storage method that can intelligently analyze electricity consumption data characteristics and optimize data storage efficiency has important practical significance and application value.
[0003] Traditional electricity meter data storage methods often focus on simple data recording and storage, and lack effective analysis and utilization of electricity consumption data characteristics. These traditional methods usually use fixed time intervals for data collection and cannot dynamically adjust the collection frequency according to the amplitude of data fluctuations, resulting in the inability to capture key information in a timely manner when the data fluctuates violently, and may generate a large amount of redundant data when the data is stable. In addition, traditional methods often use a single compression algorithm for data storage and cannot select the optimal compression strategy based on the dynamic characteristics of the data and classification results, thereby limiting data compression efficiency and storage space utilization. More importantly, traditional methods lack real-time monitoring and dynamic optimization mechanisms for storage effects, and cannot automatically adjust the selection strategy and parameters of the compression algorithm according to the system operation status, resulting in difficulty in continuously improving storage performance when faced with complex and changeable electricity consumption data.
[0004] Therefore, developing a meter data storage method for single-phase fee-controlled electricity meters will not only help improve the data processing capabilities of smart grids, but also provide strong support for the refined management and optimized scheduling of power systems. Summary of the Invention
[0005] The purpose of the present invention is to make up for the shortcomings of the existing technology and provide a meter data storage method for a single-phase fee-controlled electricity meter. By integrating intelligent sensor technology, real-time collection and preprocessing of key data such as voltage, current, and power are realized. The method improves the flexibility and accuracy of data collection by introducing a dynamic time window and a data weight adjustment mechanism. By utilizing data classification and adaptive compression algorithms, the optimal compression strategy is selected for different data characteristics, significantly improving storage efficiency. At the same time, the storage strategy is dynamically optimized through the Q-learning algorithm to ensure continuous improvement of system performance, providing strong support for the efficient operation of the smart grid.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions: a method for storing meter data of a single-phase fee-controlled electric energy meter, wherein the specific steps of the storage method are as follows:
[0007] S100, Data Collection and Preliminary Feature Analysis: The voltage, current, and power data of single-phase cost-controlled energy meters are collected using voltage and current sensors. The data is then preprocessed, including filtering and normalization. The frequency and amplitude of fluctuations within a specific time window are calculated. The duration of the time window is dynamically set: when the data fluctuation amplitude exceeds 1.5 times the historical average, the duration is shortened to 5 minutes; when it is less than 0.5 times the historical average, the duration is extended to 15 minutes.
[0008] The calculation of the data change frequency is as follows: , the calculation formula is: ,in, Indicates the Meter data at each sampling moment, is the index variable to be summed, is the number of sampling points in the time window, The square brackets indicate the custom change threshold. Iverson brackets, the value is 1 if the condition is met, otherwise it is 0;
[0009] The calculation of the fluctuation range is as follows: , the calculation formula is: ,in, is the mean of the data in the time window, is the fluctuation amplitude adjustment coefficient, and its value range is , is a symbolic function, through Differentiately amplify or reduce the fluctuations of data of different magnitudes. Indicates the Meter data at each sampling moment, is the index variable to be summed, is the number of sampling points in the time window;
[0010] S200, dynamic adjustment of data weights: Determine the user type based on the initial configuration of the meter and analysis of historical electricity consumption data. Combined with the current time period, user type, and change frequency and fluctuation range, a dynamic weighting algorithm is used to calculate the dynamic weight of each data point.
[0011] S300, Data Classification and Algorithm Adaptation: Meter data is classified based on dynamic weight, change frequency, and fluctuation amplitude. An adaptive compression algorithm is selected for data compression based on different data categories. Meter data classification: The data is classified using a data classification decision function, taking into account the data's dynamic weight, change frequency, and fluctuation amplitude. A specific classification result indicates that the meter data belongs to a class with obvious patterns; otherwise, it belongs to a class with random fluctuations. The classification threshold is determined by training historical data using a machine learning algorithm.
[0012] S400, hybrid compression storage implementation: Based on the dynamic weight and fluctuation range, for data classified as having obvious regularity, a predictive coding algorithm is used for compression, and computing resources are increased. For data classified as having random fluctuations, an LZ77 algorithm is used for compression, and resources are allocated based on the data's dynamic weight and fluctuation range.
[0013] S500, algorithm optimization and iterative improvement: set storage effect evaluation indicators, use storage effect evaluation functions to monitor actual effects during system operation, and when the evaluation results do not meet the target, use the Q-learning algorithm to dynamically adjust the selection strategy and parameters of the compression algorithm to improve storage performance through iterative optimization. The steps of dynamically adjusting the selection strategy and parameters of the compression algorithm based on the Q-learning algorithm and improving storage performance through iterative optimization are as follows: define a system state space including data characteristics, algorithm type, parameters, and evaluation values, and an action space including algorithm switching, parameter adjustment, and resource allocation, build a Q-learning decision basis, design a reward function based on the storage effect evaluation value, enhance the response to abnormal states through segmented optimization, execute the Q-learning iterative process, initialize the Q value, select actions based on the ε-greedy strategy, obtain rewards and new states after execution, update the Q value through the iterative formula until convergence, and form a dynamic and adaptive storage strategy decision mechanism based on the Q value optimization algorithm selection strategy, parameter adjustment logic, and resource allocation plan.
[0014] Furthermore, in the said S100, the sensors used in data collection and feature analysis are: the voltage sensor is a resistor divider, the current sensor is a manganin shunt, and the sensor collection time interval is dynamically adjusted within the range of 5 seconds to 10 minutes according to actual needs.
[0015] Furthermore, the user type classification in the dynamic adjustment of data weight in S200: classifying users based on the daily average power consumption of historical power consumption data, load curve shape and initial configuration of the meter;
[0016] Residential users: average daily electricity consumption <50kWh, peak electricity consumption / off-peak electricity consumption <2;
[0017] Commercial users: average daily electricity consumption is 50-200kWh, with daytime electricity consumption accounting for >70%;
[0018] Industrial users: average daily electricity consumption > 200kWh, with obvious production shift load characteristics;
[0019] Special users: Their electricity usage patterns are special.
[0020] Furthermore, in the step S200, the dynamic weight algorithm is used to calculate the dynamic weight of each data in the dynamic adjustment of the data weight, and the dynamic weight is constructed as , the calculation formula is: ,in, 、 is the weight coefficient of change frequency and fluctuation amplitude, For the The change frequency weight coefficient of each data item, For the The change frequency weight coefficient of each data item, is the total number of data items, is the user type factor, which takes values according to the user type. It is a time period factor, which takes values according to different time periods. In special time periods, the value is dynamically adjusted according to historical data of the same period. is the frequency of data change, is the fluctuation amplitude, and is the frequency and amplitude of changes in other data items, is the index variable to be summed.
[0021] Furthermore, in the above S300, the selection of compression algorithm in data classification and algorithm adaptation: for data with obvious regularity, the predictive coding algorithm is selected to compress the data; for data with random fluctuation, the LZ77 algorithm is selected to compress the data;
[0022] For the data with obvious regularity, the predictive coding algorithm is selected to compress the data. Assuming the prediction coefficient calculated by the predictive coding algorithm is θ, the formula is: ,in, is the initial prediction coefficient, Adjust the step size for the prediction coefficient, the value range , is the weight sensitivity adjustment parameter, the value range is , is the weight threshold, and the prediction coefficient changes smoothly with the weight through the Sigmoid function. is the dynamic weight;
[0023] For random fluctuation data, the LZ77 algorithm is selected for data compression. Assuming the search window size of the LZ77 algorithm is S, the calculation formula is: ,in, and are the minimum and maximum search window sizes, To adjust the parameters, is the fluctuation amplitude threshold, and the Sigmoid function is used to realize the adaptive change of the search window size with the fluctuation amplitude. The fluctuation range.
[0024] In the step S300, the prediction coefficient θ of the prediction coding algorithm in the data classification and algorithm adaptation changes with the dynamic weight Increase and increase, when When the weight threshold is higher than the threshold, the prediction coefficient is smoothly improved by the Sigmoid function; the search window size S of the LZ77 algorithm changes with the fluctuation amplitude. Increase and increase, when When the fluctuation amplitude threshold is exceeded, the search window is adaptively expanded to the maximum value through the Sigmoid function.
[0025] Furthermore, in the S300, the proportion of computing resources invested in the data with obvious patterns in the data classification and algorithm adaptation is not less than 60%, and the proportion of computing resources invested in the data with random fluctuations is not higher than 40%; the compression results of the predictive coding algorithm and the compression results of the LZ77 algorithm are stored in different storage areas respectively; the division of the storage areas is determined according to the classification results and dynamic weights of the data, the data with obvious patterns is stored in the high-speed storage area, and the data with random fluctuations is stored in the ordinary storage area.
[0026] Furthermore, in the S300, the classification of the meter data in the data classification and algorithm adaptation is as follows: the dynamic weight, change frequency and fluctuation amplitude of the data are comprehensively considered and classified using the data classification decision function. The classification result of the data classification decision function is set to be , the calculation formula is: ,in, Indicates meter data Belongs to the obvious regularity category, Indicates meter data Belongs to the random fluctuation category, 、 、 is the classification threshold, which is obtained by training historical data through machine learning algorithm. For data The frequency of change, For data The fluctuation range, For data If the classification result is a specific value, it means that the meter data belongs to the class with obvious regularity; otherwise, it belongs to the class with random fluctuation. The classification threshold is obtained by training historical data with the help of machine learning algorithms.
[0027] Furthermore, in the S400, when data is classified and adapted for the algorithm, two or more compression algorithms are used simultaneously for mixed compression when the data is at the boundary between the regular and random fluctuation classes, and the participation ratio of each algorithm is dynamically adjusted according to the data characteristics. When implementing mixed compression storage, a compression task priority queue is established, and compression tasks are dynamically scheduled according to the real-time storage resource occupancy.
[0028] Furthermore, in the algorithm optimization and iterative improvement step S500, the actual effect is monitored by using the storage effect evaluation function during system operation, and the storage effect evaluation value calculated by the storage effect evaluation function is set to , the calculation formula is: ,in, 、 are weight coefficients for compression ratio and read / write speed respectively, and the evaluation threshold is set to 0.7. , indicating that the system is running well. , indicating that the system is running poorly and the compression algorithm selection strategy and parameters need to be adjusted.
[0029] Furthermore, in the S500, the algorithm optimization iterative improvement updates the Q value by an iterative formula until convergence or the termination condition is met. The calculation formula of the iterative formula is: ,in, is the system state at time t, is the action taken at time t, is the learning rate, is the reward value at time t, which is determined by the storage effect evaluation function The conversion formula is: , is the discount factor, which is updated through continuous iteration , to achieve the optimization of algorithm selection strategy and parameter setting, and yes System status and actions at any moment.
[0030] Compared with the existing technology, the meter data storage method of the single-phase fee-controlled electric energy meter has the following beneficial effects:
[0031] 1. The present invention realizes real-time and accurate collection of key electricity consumption data such as voltage, current and power of single-phase fee-controlled electricity meters by integrating voltage sensors and current sensors. By introducing a dynamic time window setting mechanism, the time window length is automatically adjusted according to the amplitude of data fluctuations, ensuring that the window is shortened to capture instantaneous changes when the data fluctuates violently, and the window is extended to reduce redundant collection when the data is stable. This intelligent adjustment not only improves the flexibility and accuracy of data collection, but also enables subsequent data processing to be based on richer and more detailed feature information, significantly improving the intelligence level of the entire data storage system. In addition, through the dynamic adjustment mechanism of data weights, the present invention can intelligently allocate data weights according to user type, current time period and data characteristics, so that data processing is more in line with actual electricity consumption, providing strong support for the refined management and optimized scheduling of the power system.
[0032] 2. By comprehensively considering the dynamic weight, change frequency and fluctuation amplitude of the data, the present invention can use the data classification decision function to accurately divide the meter data into the class with obvious rules and the class with random fluctuations, and select adaptive compression algorithms for different categories of data. For the data with obvious rules, the predictive coding algorithm is used for efficient compression, and the computing resources are increased to optimize the compression effect; for the data with random fluctuations, the LZ77 algorithm is used for compression, and resources are reasonably allocated according to the dynamic weight and fluctuation amplitude of the data. This adaptive compression strategy based on data characteristics not only significantly improves the data compression efficiency, but also effectively reduces the storage cost. Furthermore, the present invention also introduces a hybrid compression storage mechanism. When the data is at the boundary of the class with obvious rules and the class with random fluctuations, two or more compression algorithms are used for hybrid compression at the same time, and the participation ratio of each algorithm is dynamically adjusted according to the data characteristics to ensure that all types of data can be stored in the optimal way. In addition, the selection strategy and parameters of the compression algorithm are dynamically adjusted through the Q-learning algorithm to achieve continuous optimization of storage performance.
[0033] Other advantages, objects and features of the present invention will be described in part in the following description and, in part, will be apparent to those skilled in the art based on an examination of the following or may be learned from the practice of the invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. Those skilled in the art can also derive other drawings based on these drawings without inventive effort.
[0035] Figure 1 This is a flow chart of a method for storing meter data of a single-phase fee-controlled electric energy meter;
[0036] Figure 2 The present invention is a framework diagram of a meter data storage method for a single-phase fee-controlled electric energy meter. DETAILED DESCRIPTION
[0037] In order to further illustrate the technical means and effects adopted by the present invention to achieve the predetermined purpose of the invention, the specific implementation methods, structures, features and effects of the present invention are described in detail below in conjunction with the accompanying drawings and preferred embodiments.
[0038] Example 1:
[0039] Residential users' daily electricity data storage scenario.
[0040] This embodiment is targeted at typical residential households, whose average daily electricity consumption is typically less than 50 kWh, and the ratio of peak-period (e.g., 7 p.m. to 10 p.m.) to valley-period (e.g., 12 a.m. to 6 a.m.) electricity consumption is less than 2. The electricity consumption characteristics of these households are characterized by intermittent use of daily lighting and household appliances (refrigerators, air conditioners, and washing machines). Data fluctuations have a certain periodicity but are generally small. By intelligently storing electricity consumption data, this embodiment can help power companies accurately analyze residents' electricity usage habits, optimize peak-valley electricity pricing strategies, and provide users with energy-saving recommendations.
[0041] Data Collection and Initial Characterization: A resistor divider is used as a voltage sensor, and a manganin shunt is used as a current sensor to monitor voltage, current, and power data in household circuits in real time. For example, when a user turns on the air conditioner, the current sensor will immediately capture the signal of a sudden increase in current, while the voltage sensor will simultaneously record voltage fluctuations.
[0042] Dynamically adjust the collection interval: During periods of stable electricity usage (such as when the family is out during the day and only a few devices are running), the collection interval is automatically extended to reduce redundant data. When data fluctuations are detected (such as when a user returns home in the evening and turns on multiple appliances), the interval is shortened to minutes to ensure that instantaneous changes in electricity usage are captured.
[0043] The collected data is filtered to remove grid noise interference (such as voltage spikes caused by lightning weather), and then the data level is unified through normalization for subsequent analysis. Finally, the data change frequency (such as the number of power fluctuations per unit time) and fluctuation amplitude (such as the degree to which the voltage deviates from the rated value) are calculated based on the dynamic time window mechanism. The calculation of data change frequency, assuming that the data change frequency is , the calculation formula is: ,in, Indicates the Meter data at each sampling moment, is the index variable to be summed, is the number of sampling points in the time window, The square brackets indicate the custom change threshold. is the Iverson bracket, which takes the value 1 when the condition is met, otherwise it takes the value 0; for the calculation of the fluctuation range, let the fluctuation range be , the calculation formula is: ,in, is the mean of the data in the time window, is the fluctuation amplitude adjustment coefficient, and its value range is , is a symbolic function, through Differentiately amplify or reduce the fluctuations of data of different magnitudes. Indicates the Meter data at each sampling moment, is the index variable to be summed, is the number of sampling points in the time window, such as Figure 1 shown.
[0044] Dynamic adjustment of data weight: Based on the user's electricity consumption data in the past six months (such as an average daily electricity consumption of 30kWh and a peak-to-valley ratio of 1.5) and the initial configuration of the meter (single-phase 220V / 10(40)A), it is determined that the user is a residential user. Combined with the current time period (such as the peak electricity consumption at 8 pm), the dynamic weight algorithm is used to calculate the data weight. The formula is: ,in, 、 is the weight coefficient of change frequency and fluctuation amplitude, For the The change frequency weight coefficient of each data item, For the The change frequency weight coefficient of each data item, is the total number of data items, is the user type factor, which takes values according to the user type. It is a time period factor, which takes values according to different time periods. In special time periods, the value is dynamically adjusted according to historical data of the same period. is the frequency of data change, is the fluctuation amplitude, and is the frequency and amplitude of changes in other data items, It is the index variable for summation. For example, the power data during peak hours directly reflects the power load, so its weight will be higher than that during off-peak hours. If the voltage fluctuation at a certain moment is large (such as temporary overload of the community transformer), the weight of the voltage data during this period will also be increased accordingly to highlight the importance of abnormal data.
[0045] Data classification and algorithm adaptation: Based on the dynamic weight, change frequency and fluctuation amplitude, the data is divided into two categories through the data classification decision function. The classification result of the data classification decision function is , the calculation formula is: ,in, Indicates meter data Belongs to the obvious regularity category, Indicates meter data Belongs to the random fluctuation category, 、 、 is the classification threshold, which is obtained by training historical data through machine learning algorithm. For data The frequency of change, For data The fluctuation range, For data Dynamic weights. If the classification result is a specific value, it indicates that the meter data belongs to the class with obvious regularity; otherwise, it belongs to the class with random fluctuations. The classification threshold is obtained by training historical data with the help of machine learning algorithms.
[0046] Obvious regularity: For example, the power fluctuation curve formed by the start and stop of the air conditioner at a fixed time every day has a repeating pattern;
[0047] Random fluctuations: such as instantaneous changes in electricity consumption caused by occasional use of microwave ovens and hair dryers.
[0048] For data with obvious regularity, a predictive coding algorithm is used for compression. The periodic regularity of historical data is used to predict future values. Assuming the prediction coefficient calculated by the predictive coding algorithm is θ, the formula is: ,in, is the initial prediction coefficient, Adjust the step size for the prediction coefficient, the value range , is the weight sensitivity adjustment parameter, the value range is , is the weight threshold, and the prediction coefficient changes smoothly with the weight through the Sigmoid function. For dynamic weights, duplicate storage is reduced; the LZ77 algorithm is used to compress random fluctuation data. Assuming the search window size of the LZ77 algorithm is S, the calculation formula is: ,in, and are the minimum and maximum search window sizes, To adjust the parameters, is the fluctuation amplitude threshold, and the Sigmoid function is used to realize the adaptive change of the search window size with the fluctuation amplitude. It is the fluctuation amplitude, which is applicable to sudden data without obvious patterns.
[0049] Hybrid compression storage implementation: Allocate computing resources based on data characteristics: Allocate no less than 60% of computing resources to data with obvious patterns (such as daily air conditioning power consumption curves) to ensure the efficient operation of the predictive coding algorithm; allocate no more than 40% of resources to data with random fluctuations (such as occasional use of an electric kettle).
[0050] Divide storage areas: Regular data compressed by predictive coding is stored in a high-speed storage area, allowing power companies to quickly retrieve and analyze user electricity usage patterns; random data compressed by LZ77 is stored in a general storage area to balance storage costs and reading needs.
[0051] When the data is on the boundary between two categories (such as weekend family gatherings resulting in electricity consumption patterns that are both regular and random), the two algorithms are enabled for mixed compression at the same time, and the algorithm participation ratio is dynamically adjusted based on real-time data characteristics (such as whether the fluctuation amplitude exceeds the historical average) to ensure compression efficiency.
[0052] Algorithm optimization and iterative improvement: Set compression ratio (target compression ratio needs to reach 3:1) and read and write speed (read latency ≤ 50ms during peak hours) as core evaluation indicators, monitor the system operation effect in real time, and use the storage effect evaluation function to evaluate the actual storage effect. Set the storage effect evaluation value calculated by the storage effect evaluation function to be , the calculation formula is: ,in, 、 are weight coefficients for compression ratio and read / write speed respectively, and the evaluation threshold is set to 0.7. , indicating that the system is running well. , indicating that the system is running poorly and that the compression algorithm selection strategy and parameters need to be adjusted. When the evaluation results do not meet the target, the Q-learning algorithm is used to dynamically adjust the compression algorithm selection strategy and parameters, and storage performance is improved through iterative optimization. For example, if the compression ratio is only 2:1 in a certain period of time, it means that the storage efficiency has not met expectations.
[0053] If the evaluation results do not meet the requirements, an optimization strategy based on the Q-learning algorithm is implemented. For example, the prediction logic of the predictive coding algorithm is adjusted (to enhance its adaptability to seasonal changes in electricity consumption) or the search window parameters of the LZ77 algorithm. This allows for gradual improvement of storage performance through iterative learning. The iterative formula is: ,in, is the system state at time t, is the action taken at time t, is the learning rate, is the reward value at time t, which is determined by the storage effect evaluation function The conversion formula is: , is the discount factor, which is updated through continuous iteration , to achieve the optimization of algorithm selection strategy and parameter setting, and yes Monitor system status and actions at all times to ensure long-term stable operation.
[0054] To sum up, in the scenario of daily electricity consumption data storage of residential users, the present invention collects voltage and current data in real time through a resistor divider and a manganese copper shunt, dynamically adjusts the collection interval and time window according to data fluctuations, and calculates dynamic weights based on user type, time period and data characteristics after filtering and normalization preprocessing. The data is then divided into categories using a classification decision function, and predictive coding and LZ77 algorithm compression are used for data with obvious regularities and random fluctuations, respectively. Computing resources are allocated according to weights and stored in different regions. Finally, the storage strategy is iteratively optimized through the Q-learning algorithm to achieve efficient and intelligent storage of residential electricity consumption data, providing support for electricity consumption analysis and management.
[0055] Example 2:
[0056] Scenario for storing electricity consumption data of commercial users during office hours.
[0057] This embodiment targets medium-sized commercial office buildings (e.g., with an office area of 1,000 m2 and an average daily electricity consumption of 150 kWh). Daytime electricity consumption (9:00 AM - 6:00 PM) accounts for over 70% of the total, with the main loads being lighting, elevators, central air conditioning, and office equipment. Commercial electricity consumption has distinct time-of-day characteristics (e.g., load decreases during lunch breaks and increases around 3:00 PM due to air conditioning operation), and data fluctuations are significantly affected by weekdays, weekends, and seasonal variations. By efficiently storing electricity consumption data, this embodiment can help commercial users analyze the electricity efficiency of high-energy-consuming equipment (e.g., air conditioning systems) and optimize electricity bills. It also provides data support for power companies to conduct regional load scheduling.
[0058] Data collection and feature analysis: Using resistor dividers and manganese copper shunts, we collect real-time three-phase voltage (converted to single-phase data), current, and power data from the office building. For example, at 9 a.m. every day when employees arrive at their posts, elevators run frequently and computers are turned on. The current sensor will capture significant current spikes, such as Figure 2 shown.
[0059] Dynamically adjust the time window: During office hours (such as 10:00-12:00), due to the sharp fluctuations in data due to full equipment operation, the time window can be shortened to 5 minutes to monitor load changes in real time. During non-office hours (such as after 19:00 in the evening), only basic lighting is retained, and the window is extended to 15 minutes to reduce storage pressure.
[0060] The collected data is filtered (to eliminate electromagnetic interference caused by elevator start-up and stop) and normalized, and then the frequency of change of the data in each period (such as the number of power fluctuations per hour) and the fluctuation amplitude (such as the voltage drop amplitude when the air conditioner is started) are calculated. The formula for calculating the frequency of data change is: , the calculation formula of the fluctuation range is: .
[0061] Dynamic adjustment of data weights: Based on the electricity consumption data of this commercial user in the past year (average daily electricity consumption of 180kWh, 75% of which is consumed during the day) and the meter configuration (three-phase four-wire / 100(400)A), it is determined that this user is a commercial user.
[0062] Combined with the current time period (such as the high-load air conditioning period at 3 p.m. on Wednesday), the dynamic weight algorithm is used to calculate the data weight. The formula is: For example, the power data of central air conditioning accounts for more than 40% of the total load, so its weight will be significantly higher than that of lighting data; if the current fluctuates abnormally due to equipment failure at a certain moment, the weight of the current data during that period will be greatly increased to mark the abnormal state.
[0063] Data classification and algorithm adaptation: Data is classified by combining dynamic weight, change frequency, and fluctuation amplitude through the data classification decision function. The calculation formula of the data classification decision function is: :
[0064] Obvious regularity: For example, the current fluctuation pattern caused by concentrated elevator operation between 8:30 and 9:00 on weekdays;
[0065] Random fluctuations: such as sudden power consumption caused by temporarily turning on large conference equipment (projectors, audio equipment).
[0066] For data with obvious regularity, a predictive coding algorithm is used for compression, and the load repeatability of the working day is used to predict the next day's electricity consumption curve. The formula is: ; LZ77 algorithm is used to compress random fluctuation data to adapt to the efficient storage of burst data. The calculation formula is: .
[0067] Implementation of hybrid compression storage: Resource allocation is tilted towards data with obvious patterns: no less than 60% of computing resources are allocated to air conditioning and elevator power consumption data during office hours to ensure that the predictive coding algorithm accurately captures load patterns; no more than 40% of resources are allocated to randomly fluctuating conference equipment power consumption.
[0068] Storage area division: Regular data compressed by predictive coding (such as the load curve of weekly working days) is stored in the high-speed storage area, which allows commercial users to view electricity consumption trends in real time; random data compressed by LZ77 (such as electricity consumption during temporary overtime hours) is stored in the general storage area.
[0069] When data is in a boundary state (for example, on Friday afternoon, some employees leave work early and the electricity usage pattern is between regular and random), mixed compression of predictive coding and LZ77 algorithms is enabled simultaneously. The algorithm ratio is dynamically adjusted according to the real-time fluctuation amplitude (for example, when the fluctuation amplitude is small, predictive coding is emphasized, otherwise LZ77 is emphasized). Compression tasks are scheduled through priority queues to avoid storage resource congestion.
[0070] Algorithm optimization and iterative improvement: Using compression ratio and read / write speed as evaluation indicators, the storage effect evaluation function is used to monitor system performance in real time. The calculation formula is: For example, if the compression ratio drops during the peak period of air conditioning power consumption in summer, it indicates that the algorithm needs to be optimized.
[0071] Dynamic adjustment strategy based on Q-learning algorithm: define the system state space including data features, algorithm type, parameters, and evaluation values, and the action space including algorithm switching, parameter adjustment, and resource allocation, build the Q-learning decision foundation, design the reward function based on the storage effect evaluation value, enhance the response to abnormal states through segmented optimization, and then execute the Q-learning iterative process, initialize the Q value table, select actions based on the ε-greedy strategy, obtain rewards and new states after execution, and update the Q value through the iterative formula until convergence or the termination condition is met. The formula is: Based on the Q-value optimization algorithm selection strategy, parameter adjustment logic and resource allocation plan, a dynamic and adaptive storage strategy decision-making mechanism is formed. The learning efficiency is improved through experience replay, and the system continuously adapts to the changes in electricity consumption data. For example, if it is found that the predictive coding algorithm is insufficient in identifying sudden air-conditioning failures, the prediction ability of abnormal data is enhanced through iterative learning; or the search strategy of the LZ77 algorithm is adjusted to improve the compression efficiency of sudden data. Ultimately, through continuous optimization, it is ensured that the electricity data storage and analysis needs of commercial users during peak hours are met.
[0072] In summary, for the storage of electricity consumption data of commercial users during office hours, the present invention uses sensors to collect data, dynamically adjusts the collection parameters according to the difference in data fluctuations between office and non-office hours, calculates dynamic weights based on user electricity consumption characteristics and time periods after preprocessing, and after classifying the data, compresses the data of obvious regularity and random fluctuation using predictive coding and LZ77 algorithm respectively, allocates resources according to weights and stores them in different regions, performs mixed compression on boundary data, and optimizes the strategy through the Q-learning algorithm to effectively meet the electricity data storage needs of commercial users and facilitate electricity efficiency analysis and load management.
[0073] The above description is merely a preferred embodiment of the present invention and does not constitute any form of limitation to the present invention. Although the present invention has been disclosed as above in terms of a preferred embodiment, it is not intended to limit the present invention. Any person skilled in the art can, without departing from the scope of the technical solution of the present invention, make some changes or modifications to equivalent embodiments using the technical contents disclosed above. However, any brief modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention are still within the scope of the technical solution of the present invention.
Claims
1. A method for storing meter data of a single-phase fee-controlled electric energy meter, characterized in that: The specific steps of this storage method are: S100, Data Collection and Preliminary Feature Analysis: The voltage, current, and power data of single-phase cost-controlled energy meters are collected using voltage and current sensors. The data is then preprocessed, including filtering and normalization. The frequency and amplitude of fluctuations within a specific time window are calculated. The duration of the time window is dynamically set: when the data fluctuation amplitude exceeds 1.5 times the historical average, the duration is shortened to 5 minutes; when it is less than 0.5 times the historical average, the duration is extended to 15 minutes. S200, dynamic adjustment of data weights: Determine the user type based on the initial configuration of the meter and analysis of historical electricity consumption data. Combined with the current time period, user type, and change frequency and fluctuation range, a dynamic weighting algorithm is used to calculate the dynamic weight of each data point. S300, Data Classification and Algorithm Adaptation: Meter data is classified based on dynamic weight, change frequency, and fluctuation amplitude. An adaptive compression algorithm is selected for data compression based on different data categories. Meter data classification: The data is classified using a data classification decision function, taking into account the data's dynamic weight, change frequency, and fluctuation amplitude. A specific classification result indicates that the meter data belongs to a class with obvious patterns; otherwise, it belongs to a class with random fluctuations. The classification threshold is determined by training historical data using a machine learning algorithm. S400, hybrid compression storage implementation: Based on the dynamic weight and fluctuation range, for data classified as having obvious regularity, a predictive coding algorithm is used for compression, and computing resources are increased. For data classified as having random fluctuations, an LZ77 algorithm is used for compression, and resources are allocated based on the data's dynamic weight and fluctuation range. S500, algorithm optimization and iterative improvement: set storage effect evaluation indicators, use storage effect evaluation functions to monitor actual effects during system operation, and when the evaluation results do not meet the target, use the Q-learning algorithm to dynamically adjust the selection strategy and parameters of the compression algorithm to improve storage performance through iterative optimization. The steps of dynamically adjusting the selection strategy and parameters of the compression algorithm based on the Q-learning algorithm and improving storage performance through iterative optimization are as follows: define a system state space including data characteristics, algorithm type, parameters, and evaluation values, and an action space including algorithm switching, parameter adjustment, and resource allocation, build a Q-learning decision basis, design a reward function based on the storage effect evaluation value, enhance the response to abnormal states through segmented optimization, execute the Q-learning iterative process, initialize the Q value, select actions based on the ε-greedy strategy, obtain rewards and new states after execution, update the Q value through the iterative formula until convergence, and form a dynamic and adaptive storage strategy decision mechanism based on the Q value optimization algorithm selection strategy, parameter adjustment logic, and resource allocation plan.
2. The method for storing meter data of a single-phase fee-controlled electric energy meter according to claim 1, characterized in that: In the aforementioned S100, the sensors used in data collection and preliminary feature analysis are: the voltage sensor is a resistor divider, the current sensor is a manganin shunt, and the sensor collection time interval is dynamically adjusted within the range of 5 seconds to 10 minutes according to actual needs.
3. The method for storing meter data of a single-phase fee-controlled electric energy meter according to claim 1, characterized in that: S200, user type classification in dynamic adjustment of data weights: classifying users based on daily average power consumption, load curve shape, and initial configuration of electricity meters based on historical power consumption data; Residential users: average daily electricity consumption <50kWh, peak electricity consumption / off-peak electricity consumption <2; Commercial users: average daily electricity consumption is 50-200kWh, with daytime electricity consumption accounting for >70%; Industrial users: average daily electricity consumption > 200kWh, with obvious production shift load characteristics; Special users: Their electricity usage patterns are special.
4. The method for storing meter data of a single-phase fee-controlled electric energy meter according to claim 1, characterized in that: In the step S200, the dynamic weight algorithm is used to calculate the dynamic weight of each data in the dynamic adjustment of the data weight. The dynamic weight is constructed as follows: , the calculation formula is: ,in, 、 is the weight coefficient of change frequency and fluctuation amplitude, For the The change frequency weight coefficient of each data item, For the The change frequency weight coefficient of each data item, is the total number of data items, is the user type factor, which takes values according to the user type. It is a time period factor, which takes values according to different time periods. In special time periods, the value is dynamically adjusted according to historical data of the same period. is the frequency of data change, is the fluctuation amplitude, and is the frequency and amplitude of changes in other data items, is the index variable to be summed.
5. The method for storing meter data of a single-phase fee-controlled electric energy meter according to claim 1, characterized in that: S300, selection of compression algorithm in data classification and algorithm adaptation: for data with obvious regularity, select predictive coding algorithm to compress data; for data with random fluctuation, select LZ77 algorithm to compress data; For the data with obvious regularity, the predictive coding algorithm is selected to compress the data. Assuming the prediction coefficient calculated by the predictive coding algorithm is θ, the formula is: ,in, is the initial prediction coefficient, Adjust the step size for the prediction coefficient, the value range , is the weight sensitivity adjustment parameter, the value range is , is the weight threshold, and the prediction coefficient changes smoothly with the weight through the Sigmoid function. is the dynamic weight; For random fluctuation data, the LZ77 algorithm is selected for data compression. Assuming the search window size of the LZ77 algorithm is S, the calculation formula is: ,in, and are the minimum and maximum search window sizes, To adjust the parameters, is the fluctuation amplitude threshold, and the Sigmoid function is used to realize the adaptive change of the search window size with the fluctuation amplitude. The fluctuation range.
6. The method for storing meter data of a single-phase fee-controlled electric energy meter according to claim 5, characterized in that: In the said S300, in the data classification and algorithm adaptation, the proportion of computing resources invested in the data with obvious patterns is not less than 60%, and the proportion of computing resources invested in the data with random fluctuations is not higher than 40%; the compression results of the predictive coding algorithm and the compression results of the LZ77 algorithm are respectively stored in different storage areas; the division of the storage areas is determined according to the classification results and dynamic weights of the data, the data with obvious patterns is stored in the high-speed storage area, and the data with random fluctuations is stored in the ordinary storage area.
7. The method for storing meter data of a single-phase fee-controlled electric energy meter according to claim 5, characterized in that: In the above S300, the classification of the electric meter data in the data classification and algorithm adaptation is as follows: the dynamic weight, change frequency and fluctuation amplitude of the data are comprehensively considered and classified using the data classification decision function. The classification result of the data classification decision function is set to be , the calculation formula is: ,in, Indicates meter data Belongs to the obvious regularity category, Indicates meter data Belongs to the random fluctuation category, 、 、 is the classification threshold, which is obtained by training historical data through machine learning algorithm. For data The frequency of change, For data The fluctuation range, For data If the classification result is a specific value, it means that the meter data belongs to the class with obvious regularity; otherwise, it belongs to the class with random fluctuation. The classification threshold is obtained by training historical data with the help of machine learning algorithms.
8. The method for storing meter data of a single-phase fee-controlled electric energy meter according to claim 1, characterized in that: In the said S400, when data is classified and adapted for the algorithm, two or more compression algorithms are used for mixed compression at the same time when the data is at the boundary between the regular and random fluctuation classes, and the participation ratio of each algorithm is dynamically adjusted according to the data characteristics. When implementing mixed compression storage, a compression task priority queue is established, and compression tasks are dynamically scheduled according to the real-time storage resource occupancy.
9. The method for storing meter data of a single-phase fee-controlled electric energy meter according to claim 1, characterized in that: In the S500, in the algorithm optimization and iterative improvement, the actual effect is monitored by using the storage effect evaluation function during system operation, and the storage effect evaluation value calculated by the storage effect evaluation function is set to , the calculation formula is: ,in, 、 are weight coefficients for compression ratio and read / write speed respectively, and the evaluation threshold is set to 0.
7. , indicating that the system is running well. , indicating that the system is running poorly and the compression algorithm selection strategy and parameters need to be adjusted.
10. The method for storing meter data of a single-phase fee-controlled electric energy meter according to claim 1, characterized in that: In the above S500, the Q value is updated by an iterative formula in the algorithm optimization and iterative improvement until convergence or the termination condition is met. The calculation formula of the iterative formula is: ,in, is the system state at time t, is the action taken at time t, is the learning rate, is the reward value at time t, which is determined by the storage effect evaluation function The conversion formula is: , is the discount factor, which is updated through continuous iteration , to achieve the optimization of algorithm selection strategy and parameter setting, and yes System status and actions at any moment.
Citation Information
Patent Citations
Distributed energy storage network resource regulation and control decision-making method
CN119582206A
Intelligent load management and allocation method for electric meter box
CN120016490A
Self-adaptive data security management and risk early warning system based on intelligent analysis under cloud platform
CN120358082A
Methods and systems for reinforcement learning
US20190102676A1
Data processing method, data training method, data identifying method and device, and storage medium
WO2021057810A1
Cited By
Segmented transmission system for data acquired by force sensor
CN121462671A
Electric energy meter record query method and system based on electric energy meter platform
CN121614477A
Electric energy meter record query method and system based on electric energy meter platform
CN121614477B
