An energy-saving optimization method and system for an electric energy metering box based on energy efficiency analysis

By generating a set of electricity consumption characteristics, using a time-series decomposition algorithm, and employing an energy mutual adjustment coefficient, the problem of uncaptured energy interaction effects between metering boxes was solved. This enabled accurate prediction of changes in community electricity consumption and energy-saving optimization, thereby improving energy efficiency management.

CN122456480APending Publication Date: 2026-07-24ZHEJIANG HONGREN ELECTRIC CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHEJIANG HONGREN ELECTRIC CO LTD
Filing Date
2026-06-23
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Existing load forecasting methods for electricity metering boxes are ill-suited to adapting to dynamic environments when faced with complex energy usage scenarios. In particular, they neglect the mutual influence and resource flow between devices when there is energy interaction between multiple metering boxes, resulting in inaccurate forecasts and an inability to effectively guide the refined energy allocation of small-scale metering box clusters in remote communities.

Method used

By collecting historical and real-time electricity consumption data from multiple metering boxes in the community, an initial set of electricity consumption characteristics is generated. A time-series decomposition algorithm is used to process the interaction frequency and dynamic flow intensity between metering boxes, calculate the electricity mutual assistance adjustment coefficient, and determine the distribution vector of mutual assistance behavior by combining user electricity consumption habits, sudden demand fluctuations and environmental constraints. Through time series analysis, a dynamic flow trend sequence is generated to accurately identify the long-term pattern of electricity consumption changes.

Benefits of technology

It improves the accuracy of load forecasting, enables precise identification of changes in community electricity consumption and scientific description of long-term patterns, effectively reduces energy waste, and enhances the level of community energy efficiency management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122456480A_ABST
    Figure CN122456480A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of smart grids, and discloses an energy-saving optimization method and system for an electric energy metering box based on energy efficiency analysis, which comprises the following steps: processing the interaction frequency and dynamic flow intensity indexes between metering boxes by adopting a time sequence decomposition algorithm, determining a preliminary flow mode of electric energy mutual aid in a community, calculating the mutual aid adjustment parameters after optimization, determining a mutual aid behavior distribution vector based on the interaction frequency between metering boxes, the historical data matching degree and the load distribution space characteristics, processing the mutual aid behavior distribution vector by adopting a time sequence analysis algorithm, generating a dynamic flow trend sequence, determining the long-term rules of power consumption changes in the community based on the dynamic flow trend sequence, the historical data cycle coverage and the trend sequence time granularity, and then performing energy-saving optimization on the electric energy metering box. The application realizes a complete energy efficiency optimization link from feature extraction to mutual aid flow identification to long-term trend prediction, and improves the load prediction accuracy and the energy distribution refinement level.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of smart grid technology, specifically a method and system for energy-saving optimization of electricity metering boxes based on energy efficiency analysis. Background Technology

[0002] In the field of energy management, load forecasting research for electricity metering boxes is particularly crucial, directly impacting the efficiency of energy distribution and the stable operation of the system. With the development of smart grids and community energy management, accurate electricity demand forecasting has become an important means of improving energy efficiency and reducing waste. Research in this area not only affects the electricity experience of individual users but also plays an indispensable role in the energy optimization of the entire region. In practice, data acquisition and control technology provides fundamental support for load forecasting. Through the collaboration of high-precision sensors and intelligent terminals, key parameters such as voltage, current, and power of the metering box are acquired in real time. Data cleaning, verification, and standardized storage are then implemented to ensure the integrity and reliability of the input data.

[0003] However, many current methods often struggle to adapt to dynamically changing environments when faced with complex energy usage scenarios, especially when there is power exchange between multiple metering boxes. Existing forecasting methods focus more on the power consumption of individual devices or independent areas, neglecting the potential mutual influence and resource flow between devices. For example, in community microgrids, under distributed control, the integration of energy sources (such as photovoltaics and energy storage) and the power exchange between metering boxes cause load characteristics to exhibit spatiotemporal coupling features, which traditional centralized forecasting models struggle to capture. Summary of the Invention

[0004] To address the above issues, this application provides an energy-saving optimization method for electricity metering boxes based on energy efficiency analysis, which solves the technical problem that existing prediction methods ignore the mutual influence and resource flow between equipment.

[0005] To achieve the above objectives, the technical solution adopted in this application is as follows: Based on historical and real-time electricity consumption data from multiple metering boxes in the community environment, an initial electricity consumption feature set is generated, which includes the weight of user electricity consumption habits and the amplitude of sudden demand fluctuations. Based on the initial set of electricity consumption characteristics, a time-series decomposition algorithm is used to process the interaction frequency and dynamic flow intensity indicators between metering boxes to determine the initial flow pattern of electricity mutual assistance within the community. Based on the weight of user electricity consumption habits, the amplitude of sudden demand fluctuations, the initial flow pattern, and community environmental constraints, the power mutual assistance adjustment coefficient is calculated as the optimized mutual assistance adjustment parameter. Based on the inter-metering box interaction frequency and historical data matching degree obtained from the optimized mutual assistance adjustment parameters, as well as the load distribution spatial characteristics, the mutual assistance behavior distribution vector is determined. The mutual aid behavior distribution vector is processed by a time series analysis algorithm to generate a dynamic flow trend sequence. Based on the dynamic flow trend sequence, historical data period coverage, and the time granularity of the trend sequence, the long-term pattern of electricity consumption changes within the community is determined.

[0006] Furthermore, to achieve the above objectives, this application also proposes an energy-saving optimization system for electricity metering boxes based on energy efficiency analysis, comprising: The electricity consumption characteristic data generation module is used to generate an initial electricity consumption characteristic set based on historical and real-time electricity consumption data from multiple meter boxes in the community environment. The initial electricity consumption characteristic set includes user electricity consumption habit weights and the amplitude of sudden demand fluctuations. The mutual assistance mode time-series decomposition module is used to process the interaction frequency and dynamic flow intensity index between metering boxes according to the initial electricity consumption characteristic set, and determine the initial flow mode of electricity mutual assistance within the community. The mutual assistance parameter comprehensive optimization module is used to calculate the power mutual assistance adjustment coefficient based on the user's electricity consumption habit weight, the sudden demand fluctuation amplitude, the preliminary flow pattern and community environmental constraints, as the optimized mutual assistance adjustment parameter. The mutual assistance behavior distribution determination module is used to determine the mutual assistance behavior distribution vector based on the inter-metering box interaction frequency and historical data matching degree obtained from the optimized mutual assistance adjustment parameters, as well as the load distribution spatial characteristics. The electricity consumption trend analysis module is used to process the mutual aid behavior distribution vector through time series analysis algorithm to generate a dynamic flow trend sequence. Based on the dynamic flow trend sequence, historical data period coverage, and trend sequence time granularity, the long-term pattern of electricity consumption changes in the community is determined. The prediction and optimization module is used to predict the future electricity load of the community based on the long-term pattern, obtain the prediction results, and optimize the energy metering box for energy saving based on the prediction results.

[0007] The technical solution proposed in this application collects historical and real-time electricity consumption data from multiple metering boxes in the community, extracts user electricity consumption habit weights and the amplitude of sudden demand fluctuations, enabling load forecasting to not only reflect regular electricity consumption patterns but also capture short-term abnormal shocks, thus improving the robustness of the forecast. A time-series decomposition algorithm is used to process the interaction frequency and dynamic flow intensity indicators between metering boxes, quantifying the energy transfer behavior into a preliminary flow pattern for the first time, overcoming the shortcomings of traditional methods that ignore energy flow between equipment. The solution integrates user electricity consumption habits, sudden fluctuations, transfer patterns, and community environmental constraints; calculates the energy transfer adjustment coefficient, achieving multi-factor collaborative optimization, enabling load forecasting to dynamically adapt to the actual operating state of the community; further, it extracts the interaction frequency and historical data matching degree, and determines the distribution vector of transfer behavior based on the spatial characteristics of load distribution, characterizing the contribution role of each metering box in energy transfer; and generates a dynamic flow trend sequence through time series analysis, combined with historical cycle coverage and time granularity adjustment, accurately identifying the long-term patterns of changes in community electricity consumption. This application improves the accuracy of load forecasting, provides a scientific basis for refined energy allocation in small-scale metering clusters in remote communities, effectively reduces energy waste, and enhances the level of community energy efficiency management. Attached Figure Description

[0008] Figure 1 This is a flowchart illustrating Embodiment 1 of the energy-saving optimization method for electricity metering boxes based on energy efficiency analysis in this application; Figure 2 This is a flowchart illustrating Embodiment 2 of the energy-saving optimization method for electricity metering boxes based on energy efficiency analysis provided in this application; Figure 3 This is a flowchart illustrating Embodiment 3 of the energy-saving optimization method for electricity metering boxes based on energy efficiency analysis in this application. Detailed Implementation

[0009] To enable those skilled in the art to better understand the technical solution, the present application will be described in detail below with reference to the embodiments. The description in this section is only exemplary and explanatory, and should not be used to limit the scope of protection of the present application in any way.

[0010] In existing technologies, energy-saving optimization methods for electricity metering boxes based on energy efficiency analysis have the following drawbacks: Under a distributed control architecture, there is a lack of effective modeling of the energy exchange behavior among multiple metering boxes in a community, making it impossible to fully consider the interaction frequency and dynamic flow intensity between metering boxes during the prediction stage, resulting in the initial flow pattern deviating from reality; the weight of user electricity consumption habits and the amplitude of sudden demand fluctuations are not integrated with the community environmental constraints, making the calculation of the energy exchange adjustment coefficient inaccurate and affecting the extraction of load distribution spatial characteristics; the lack of a time-series decomposition and iterative optimization mechanism between the exchange behavior distribution vector and the dynamic flow trend sequence leads to a large error in identifying the long-term pattern of electricity consumption changes in the community, ultimately making it difficult to guide the refined energy allocation of small-scale metering box groups in remote communities.

[0011] Therefore, this application provides a solution: An initial set of electricity consumption characteristics, including user electricity consumption habit weights and sudden demand fluctuations, is generated based on historical and real-time electricity consumption data. A time-series decomposition algorithm is used to process the interaction frequency and dynamic flow intensity indicators between metering boxes to determine the initial flow pattern of electricity mutual assistance. The user electricity consumption habit weights, sudden demand fluctuations, the initial flow pattern, and community environmental constraints are integrated to calculate an electricity mutual assistance adjustment coefficient as the optimized mutual assistance adjustment parameter. The interaction frequency between metering boxes and the historical data matching degree are extracted from this coefficient, and the distribution vector of mutual assistance behavior is determined by combining the spatial characteristics of load distribution. This vector is processed using a time-series analysis algorithm to generate a dynamic flow trend sequence. Based on the historical data periodic coverage and the time granularity of the trend sequence, the long-term pattern of electricity consumption changes within the community is determined. This achieves a complete energy efficiency optimization chain from feature extraction and flow pattern identification to long-term pattern prediction, significantly improving the accuracy of load forecasting and the refinement of energy allocation.

[0012] It should be noted that the executing entity of each embodiment of this application can be a computing service system with data processing, network communication, and program execution functions, such as an electronic system capable of realizing the above functions, an energy-saving optimization system for an energy metering box based on energy efficiency analysis, etc. The following description uses an energy-saving optimization system for an energy metering box based on energy efficiency analysis (hereinafter referred to as "the system") as an example to illustrate the following embodiments.

[0013] Based on this, embodiments of this application provide an energy-saving optimization method for electricity metering boxes based on energy efficiency analysis, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the energy-saving optimization method for electricity metering boxes based on energy efficiency analysis according to this application.

[0014] In this embodiment, the energy-saving optimization method for electricity metering boxes based on energy efficiency analysis includes steps S10~S60: Step S10: Based on the historical and real-time electricity consumption data of multiple metering boxes in the community environment, an initial electricity consumption feature set is generated. The initial electricity consumption feature set includes the weight of user electricity consumption habits and the amplitude of sudden demand fluctuations.

[0015] In a community energy management system, each household or each electricity unit is usually equipped with an electricity metering box. The metering box integrates a smart meter that can collect electricity consumption data at a frequency of minutes or hours.

[0016] It should be noted that historical electricity consumption data refers to the electricity consumption sequence recorded over a period of time (such as the past 30 days or the past year), and the data unit is usually kilowatt-hours; real-time electricity consumption data refers to the instantaneous electricity consumption collected at the current moment or within the last few minutes.

[0017] To generate an initial set of electricity consumption characteristics, this data was exported in batches from multiple metering bins and aligned by time. User electricity consumption habit weights are quantitative indicators reflecting a user's electricity consumption preferences at different times of the day. The specific calculation method is as follows: the day is divided into several time periods, for example, 24 time periods based on hours. For each time period, the average historical electricity consumption within that period and the proportion of this average to the total average daily electricity consumption are calculated; this proportion is the electricity consumption habit weight for that time period. Peak hours have higher weights, while off-peak hours have lower weights. For example, 6 PM to 9 PM is a peak electricity consumption period, with a weight that may reach 0.6; 2 AM to 5 AM is an off-peak electricity consumption period, with a weight that may only be 0.1.

[0018] The amplitude of sudden demand fluctuations is used to quantify abnormal changes in electricity consumption within a short period. A baseline threshold is set, such as ±30% of the historical average electricity consumption. When the increase in real-time electricity consumption data exceeds this threshold within a short period (e.g., within 5 minutes), it is determined to be a sudden demand event. Fluctuation amplitude = (Electricity consumption at this moment - Historical average electricity consumption at this moment) / Historical average electricity consumption. This value can be greater than 1, indicating the severity of the sudden demand. The weights of user electricity consumption habits and the amplitude of sudden demand fluctuations are integrated to form an initial electricity consumption feature set. This set is stored in tabular form, with each record associated with a unique identifier for a meter bin and containing weight arrays for multiple time periods as well as the most recent sudden fluctuation record.

[0019] Step S20: Based on the initial electricity consumption characteristic set, a time-series decomposition algorithm is used to process the interaction frequency and dynamic flow intensity index between metering boxes to determine the preliminary flow pattern of electricity mutual assistance within the community.

[0020] It should be understood that in a community environment, there may be bidirectional flows of electrical energy between different metering boxes, i.e., energy sharing. For example, households with solar power generation may feed excess electricity to their neighbors, while electric vehicle charging stations may draw power from nearby metering boxes during peak hours. To capture this sharing behavior, it is necessary to analyze the frequency and dynamic flow intensity between metering boxes.

[0021] Time series decomposition algorithms are methods for decomposing time series data into trend components, periodic components, and random components. These can be STL (Seasonal-Trend decomposition procedure based on Loess) or X13-ARIMA (X-13ARIMA-SEATS Seasonal Adjustment Program) decomposition. Interaction frequency refers to the number of times electrical energy is exchanged between two metering boxes per unit time. It can be estimated by calculating the cross-correlation function of the electricity consumption time series of the two metering boxes: when the correlation coefficient exceeds a preset threshold and there is a time offset, it indicates that interaction exists. The dynamic flow intensity index reflects the scale of electrical energy flow and can be characterized by the rate of change of the trend component. For example, if the trend component of metering box A continues to decrease while the trend component of metering box B increases synchronously, it indicates that electrical energy is flowing from B to A.

[0022] By combining the interaction frequency and flow intensity of all metering pairs, an energy flow network is constructed. In this network, nodes represent metering boxes, and edge weights represent interaction frequency or flow intensity. By performing community detection or maximum flow analysis on this network, hotspots and main flow paths for energy sharing can be identified, thereby determining the preliminary energy sharing flow pattern within the community. This pattern is presented in the form of a directed graph, marking the main energy suppliers and demanders.

[0023] Step S30: Based on the user's electricity consumption habit weight, the fluctuation range of sudden demand, the preliminary flow pattern, and the community environment constraints, calculate the power mutual assistance adjustment coefficient, and use the power mutual assistance adjustment coefficient as the optimized mutual assistance adjustment parameter.

[0024] User electricity consumption habit weights reflect the basic electricity consumption patterns of each meter box, sudden demand fluctuations reflect short-term uncertainties, preliminary flow patterns reflect the existing power supply balance, and community environmental constraints include physical limitations such as the upper limit of grid capacity, transformer capacity, and voltage stability range.

[0025] The power supply adjustment coefficient is a comprehensive parameter used to guide the optimization of power distribution among different metering boxes. The basic idea behind calculating this coefficient is to adjust the direction and magnitude of the power supply flow based on users' electricity consumption habits and sudden fluctuations, while meeting environmental constraints. Specifically, a weighted fusion method can be adopted: multiplying the weight of user electricity consumption habits by a first weighting coefficient yields the electricity consumption habit influence factor; multiplying the magnitude of sudden demand fluctuations by a second weighting coefficient yields the fluctuation influence factor; and multiplying the dynamic flow intensity index in the initial flow pattern by a third weighting coefficient yields the flow influence factor. The sum of these three influence factors is then multiplied by the environmental constraint factor. The environmental constraint factor can be defined as the ratio of the grid's carrying capacity limit to the current load; a smaller ratio indicates a tighter constraint. The product is the power supply adjustment coefficient, which reflects whether the community as a whole should lean towards conservative allocation or active power supply under the current conditions. A larger adjustment coefficient indicates sufficient power supply space and strong demand; a smaller coefficient indicates the need to restrict power supply to avoid overload. The optimized power supply adjustment parameter is the value obtained through the above calculations.

[0026] Step S40: Based on the metering box interaction frequency and historical data matching degree obtained from the optimized mutual assistance adjustment parameters, as well as the load distribution spatial characteristics, determine the mutual assistance behavior distribution vector.

[0027] The optimized mutual assistance adjustment parameters not only include adjustment coefficients but also implicitly contain information on the interaction frequency and historical data matching degree between metering boxes. The interaction frequency reflects the frequency of energy exchange between two metering boxes and is derived from the optimized parameters. The historical data matching degree refers to the similarity between the current electricity consumption pattern and the historical pattern of the same period, calculated using cosine similarity or Euclidean distance. Load distribution spatial characteristics refer to the physical load distribution of the metering boxes, such as which areas have concentrated loads and which have dispersed loads. By fusing this information, a mutual assistance behavior distribution vector can be determined, i.e., a multi-dimensional vector where each dimension corresponds to a metering box or a group of metering boxes. Each element of the vector represents the contribution or benefit of that metering box in the mutual assistance process; a positive contribution indicates that the metering box is an energy supplier, and a negative contribution indicates that it is a demander.

[0028] The specific method for determining the distribution vector of mutual assistance behavior is as follows: construct a weighted adjacency matrix based on the interaction frequency, adjust the weights in the matrix according to the matching degree of historical data, normalize the weights in combination with the spatial characteristics of load distribution, calculate the net outflow power ratio of each node, and form a distribution vector. This vector can quantitatively describe the direction and intensity distribution of power mutual assistance within the community.

[0029] Step S50: Process the mutual aid behavior distribution vector using a time series analysis algorithm to generate a dynamic flow trend sequence. Based on the dynamic flow trend sequence, historical data period coverage, and the time granularity of the trend sequence, determine the long-term pattern of electricity consumption changes within the community.

[0030] It should be understood that the mutual aid behavior distribution vector is a dynamic quantity that changes over time, as users' electricity demand and mutual aid patterns change over time. To capture this changing pattern, time series analysis is needed on this vector sequence. Time series analysis algorithms include autoregressive moving average models, exponential smoothing models, and long short-term memory networks. Arranging the mutual aid behavior distribution vector in chronological order forms a multidimensional time series. Decomposing this series allows for the extraction of trend components, periodic components, and random components.

[0031] Dynamic flow trend sequences are smoothed sequences reflecting the long-term direction of electricity consumption changes, eliminating short-term random fluctuations. Historical data period coverage involves analyzing data from multiple complete periods (e.g., years, months, or weeks) to identify periodic patterns in electricity consumption changes. Trend sequence time granularity refers to the time unit used in the analysis, such as hourly, daily, or weekly. Adjusting the time granularity allows for a balance between accuracy and computational efficiency. Combining the above information, long-term patterns of electricity consumption changes within a community can be determined and presented in the form of mathematical models. For example, electricity consumption might have a one-year cycle, with peaks in summer and winter, troughs in spring and autumn, and an average annual growth rate of approximately a certain percentage. Furthermore, the impact of specific events (such as holidays and extreme weather) on electricity consumption patterns can be identified.

[0032] For example, a community contains 100 meter boxes, and historical and real-time electricity consumption data for the past 30 days were collected. Analysis revealed that the weight of user electricity consumption habits reached 0.6 between 6 PM and 9 PM, but only 0.1 between 2 AM and 5 AM. At 5:30 PM one afternoon, the system detected a sudden increase in the electricity consumption of one meter box from 0.3 kWh to 0.9 kWh within 5 minutes, exceeding the 30% threshold of the average, and recording the sudden demand fluctuation amplitude as 2.0. Using the STL time-series decomposition algorithm to process the electricity consumption data of each meter box, it was found that the interaction frequency between meter boxes A and B was 5 times per hour, with a dynamic flow intensity index of 8.5, exceeding the preset threshold of 7.0. The preliminary flow pattern indicates that electricity is flowing from high-load areas to low-load areas. The community power grid has a capacity limit of 1000 kW, the current load is 850 kW, and the environmental constraint factor is 0.15. By weighting and fusing user electricity consumption habits (0.6), sudden demand fluctuation amplitude (2.0), and dynamic flow intensity index (8.5), a power mutual assistance adjustment coefficient of 4.145 is obtained. After analyzing the interaction frequency and historical data matching degree from this parameter, and combining the spatial clustering results (high load area in the north, low load area in the south), a mutual assistance behavior distribution vector is calculated. The contribution of the northern metering boxes is negative (demand side), while that in the south is positive (supply side). The ARIMA (Autoregressive Integrated Moving Average Model) model is used to process the time series of the mutual assistance behavior distribution vector to generate a dynamic flow trend sequence, predicting an average of 120 kWh per hour of electricity transmitted from the south to the north in the coming week. Combining historical data from the past three years, a cyclical pattern of a 15% increase in electricity consumption each summer is identified, ultimately determining the long-term pattern of community electricity consumption changes as: annual fluctuations with an average annual growth of approximately 8%.

[0033] Step S60: Based on the long-term trend, predict the future electricity load of the community, obtain the prediction results, and optimize the energy metering box for energy saving based on the prediction results.

[0034] It should be understood that after determining the long-term patterns of electricity consumption changes within the community (including trend components, periodic components, and their extrapolation models), the system enters the load forecasting and energy-saving optimization phase. Specifically, the periodic and trend components in the long-term patterns are extrapolated to future time periods (such as the next 24 hours or the next week) along the time axis, generating future electricity load forecasts for each metering box and the community as a whole. These forecasts are output in time series form, including the expected load value and confidence interval for each time point. Further, the forecast results are used as input to perform energy-saving optimization on the electricity metering boxes: for metering boxes with predicted loads higher than the local power supply capacity, electricity from nearby surplus metering boxes is pre-allocated for mutual support; for metering boxes with consistently low predicted loads, their reserve capacity allocation is appropriately reduced to avoid energy idleness. The optimization process employs a rolling optimization strategy based on the forecast results, aiming to minimize the community's total electricity cost or peak-valley difference. Power adjustment instructions are generated for each metering box, and the optimized power allocation scheme is issued to each smart meter or energy controller for execution, achieving electricity mutual support and energy-saving operation at the metering box level.

[0035] The extrapolation model is constructed based on the periodic and trend components obtained from time-series decomposition. Specifically, the trend component is extrapolated linearly or nonlinearly using Holt-Winters exponential smoothing or ARIMA models, while the phase and amplitude of the periodic component are fitted using Fourier series. The two are then superimposed to generate a load forecast sequence for future periods. Furthermore, the forecast results are not directly output but are used as input variables for the energy-saving optimization module. The energy-saving optimization module has a built-in mixed-integer linear programming solver. Using the forecast results as the future load boundary conditions, the power mutual adjustment coefficient as the decision variable, and minimizing the total electricity cost of the community or the peak-valley difference as the optimization objective, it calculates the optimal power allocation scheme for each metering box while satisfying constraints such as transformer capacity and line current carrying capacity. After optimization, the power setpoints for each metering box are sent to smart meters or edge controllers for execution, thereby realizing proactive energy-saving control based on prediction.

[0036] It should be noted that this application is not only applicable to load forecasting of community electricity metering boxes, but can also be extended to scenarios involving multi-node power interaction and distributed energy mutual assistance, such as industrial parks, commercial complexes, and microgrids. Through time-series decomposition and mutual assistance behavior vector modeling, it can adapt to metering box groups of different sizes and different power consumption patterns, demonstrating strong versatility and belonging to the field of power system energy efficiency management engineering solutions.

[0037] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in Embodiment 1 above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 2 Step S20 includes steps S201 to S204: Step S201: Based on the electricity consumption data in the initial electricity consumption feature set, the electricity consumption data of each meter box is decomposed into trend components and periodic components according to the time series using a time series decomposition algorithm.

[0038] It should be noted that the initial electricity consumption feature set contains the time series of electricity consumption data for each meter box, with sampling intervals of hours or days. The goal of the time series decomposition algorithm is to decompose the original sequence into several components with clear physical meaning. The trend component reflects the overall direction of change in electricity consumption over a long time scale, such as a slow rise or fall due to seasonal changes or changes in residents' lifestyles. The trend component can be extracted by low-pass filtering or local weighted regression smoothing, which eliminates short-term fluctuations. The periodic component reflects the fluctuation pattern of electricity consumption that repeats at fixed time intervals, such as the daily morning and evening peak electricity consumption, the weekday and weekend differences, and the annual seasonal changes. It can be extracted by periodic subsequence smoothing or Fourier transform.

[0039] During the decomposition process, the original electricity consumption data is subtracted by the trend component, and then the periodic component is subtracted from the remaining portion. The resulting residual component is treated as random noise and can be ignored in subsequent analysis. Through decomposition, the electricity consumption data of each meter box is decomposed into trend component curves and periodic component curves, both of which can be used for subsequent mutual assistance behavior analysis.

[0040] Step S202: Calculate the dynamic flow intensity index between metering boxes based on the rate of change of the trend component over time.

[0041] The rate of change of the trend component reflects whether electricity consumption is increasing or decreasing, and how fast it changes. For two metering boxes i and j, within the same time window, if the trend component of metering box i shows a downward trend while the trend component of metering box j shows an upward trend, and the magnitudes of their changes are similar and the time is synchronized, then there is likely a mutual flow of electricity from i to j. The dynamic flow intensity index is used to quantify the intensity of this flow. In specific calculations, the first derivative of the trend component of each metering box is calculated, that is, the change per unit time. For each pair of metering boxes, the reciprocal of the difference between their derivatives with opposite signs and absolute values ​​is calculated, and then multiplied by the time synchronization coefficient. Opposite signs of the derivatives indicate that one is increasing and the other is decreasing, and the magnitude of the absolute value reflects the scale of the flow. The flow intensity at all time points is summed or averaged to obtain the average dynamic flow intensity. The larger the value of this index, the more active the mutual flow of electricity between the two metering boxes.

[0042] Step S203: Determine the interaction frequency between metering boxes based on the amplitude and phase of the periodic fluctuations in the periodic component.

[0043] It should be understood that the periodic component contains information about the periodic fluctuations in electricity consumption over time, where amplitude represents the severity of the fluctuation and phase represents the timing of the peak or trough. For two metering units, if their periodic components have similar period lengths but opposite phases—that is, one peak corresponds to the other trough—it indicates that they may be complementary in time, suggesting a possibility of mutual assistance. The interaction frequency refers to the number of times such complementarity and mutual assistance occur per unit time.

[0044] In practice, cross-correlation analysis can be performed on the periodic component sequences of the two metering boxes. The value of the cross-correlation function at zero delay reflects the synchronicity between the two, while the peak value at non-zero delay reflects the similarity under time offset. The delay corresponding to the maximum peak value of the cross-correlation function is selected, and the reciprocal of this delay is the estimated value of the interaction frequency. For example, if the delay is 2 hours, it means that the peak electricity consumption of metering box A is 2 hours later than that of metering box B, then approximately 12 one-way mutual assistances can occur per day (based on a 2-hour cycle). The level of interaction frequency reflects the strength of the energy complementarity potential between the two metering boxes.

[0045] Step S204: Based on the dynamic flow intensity index and interaction frequency, determine the preliminary flow pattern of power exchange within the community.

[0046] After obtaining the dynamic flow intensity index and interaction frequency for each pair of metering boxes, a weighted directed graph or a weighted undirected graph is constructed. Each node in the graph represents a metering box, and the edge weights between nodes can be set as the product or weighted sum of the dynamic flow intensity index and the interaction frequency. To further simplify, the maximum spanning tree algorithm can be used to extract the most important flow paths, or a community detection algorithm can be used to identify closely interconnected groups of metering boxes. The preliminary flow pattern includes the following: which metering boxes are the main energy providers (net outflow) and which are the main receivers (net inflow); the main direction and path of energy flow; and whether the flow pattern changes at different times of the day. The preliminary flow pattern is usually presented graphically, for example, using arrows to indicate flow direction and arrow thickness to indicate flow intensity. This pattern provides the basic topology for subsequent calculation of adjustment factors. If the preliminary flow pattern shows that energy flow is too concentrated or there are loop inefficiencies, subsequent steps can optimize it by adjusting the factors.

[0047] For example, the STL decomposition algorithm was applied to 30 days of electricity consumption data from 1000 meter boxes in the community. Trend component analysis showed that the trend component of meter boxes in the northern area of ​​the community decreased by an average of 5 kWh per day over the past week, while that in the southern area increased by an average of 4 kWh per day, with opposite rates of change during the same period. The calculated dynamic flow intensity index was 8.5, exceeding the preset threshold of 7.0. Periodic component analysis indicated that peak electricity consumption in the southern area occurred between 6 PM and 9 PM, while in the northern area it occurred between 9 PM and midnight, with a phase difference of approximately 3 hours. Cross-correlation calculations yielded an interaction frequency of 0.33 times per hour, or approximately once every 3 hours. Combining these two factors, an electricity flow network was constructed. Maximum flow calculations showed that the main flow path was from 10 high-load meter boxes in the south to 15 low-load meter boxes in the north. The preliminary flow pattern was determined to be "south-to-north power transmission," with a peak-hour flow scale reaching 320 kWh per hour.

[0048] As one implementation, the time series decomposition algorithm includes a local weighted regression smoothing algorithm and a periodic subsequence smoothing algorithm, and step S201 includes steps S2011 to S2013: Step S2011: Based on the electricity consumption data in the initial electricity consumption feature set, the trend component of the electricity consumption data is extracted using a local weighted regression smoothing algorithm; Step S2012: After subtracting the trend component from the electricity consumption data, the periodic component is extracted using a periodic subsequence smoothing algorithm; Step S2013: Determine the residual components of the remaining part of the electricity consumption data, and remove the residual components as noise to obtain the decomposed trend components and periodic components.

[0049] It's important to note that locally weighted regression smoothing is a non-parametric regression method. It doesn't require pre-assuming a functional form for the data. Instead, it estimates the value of each data point by fitting a low-order polynomial (first or second order) to its vicinity. For each target point, the algorithm selects several data points in its neighborhood, assigning weights related to their distance from the target point—the closer the distance, the greater the weight. Weighted least squares regression is then performed on this weighted data to obtain the estimated value of the target point. Repeating this process on all data points yields a smooth curve, i.e., the trend component. For time series data, the inner loop of the STL decomposition algorithm is used. STL decomposition alternates between extracting the trend component and the periodic component, stabilizing the decomposition result through multiple iterations. Parameters of locally weighted regression smoothing include the neighborhood window width. A larger window width results in a smoother trend component but may lose short-term variations; a smaller window width makes the trend component closer to the original data. For electricity consumption data, a window width equal to the number of data points in a day multiplied by a coefficient is chosen, for example, a window width twice that of 24 hours, i.e., 48 data points, to capture daily periodic trend changes.

[0050] After extracting the trend component, it is subtracted from the original electricity consumption data to obtain the detrended sequence, which mainly contains periodic components and random noise. The core idea of ​​the periodic subsequence smoothing algorithm is: for a time series with a period length L, the sequence is rearranged into L columns according to the period position, with each column containing data points at the same relative position in all periods. For example, for electricity consumption data with a 24-hour period, the data for the first hour of each day is placed in the first column, the data for the second hour in the second column, and so on. Then, local weighted regression smoothing is applied to each column to obtain the smoothed value at each period position. These smoothed values ​​are then reassembled in their original order to obtain the periodic component. Periodic subsequence smoothing aggregates information from multiple periods, effectively extracting stable periodic patterns from noise. The period length can be determined by Fourier transform or autocorrelation function estimation. If the period length is unclear, multiple candidate periods can be tried, and the one that minimizes the decomposition residual can be selected.

[0051] After subtracting the trend component and periodic component from the original electricity consumption data, the remaining portion is the residual component. Theoretically, the residual component should consist of random noise and unmodeled anomalies. In load forecasting, the residual component is considered unpredictable noise and is therefore removed, retaining only the trend and periodic components for further analysis. The decomposition result after removing the residual component is the final electricity consumption data decomposition model: the original data equals the trend component plus the periodic component plus the residual component. In practical engineering applications, statistical tests can be performed on the residual component, such as calculating its mean and standard deviation. If the mean is close to zero and the distribution conforms to a normal distribution, the decomposition is considered reasonable. If the residual component still contains significant structural information (e.g., unextracted short-cycle fluctuations), the decomposition parameters need to be adjusted or a more complex decomposition algorithm needs to be selected. The decomposed trend and periodic components represent the long-term evolution and periodic fluctuations of electricity consumption, respectively, providing clean data input for subsequent mutual aid behavior analysis.

[0052] For example, the STL decomposition algorithm was used to process 30 days of hourly electricity consumption data from a metering box, totaling 720 data points. The period length was set to 24 hours, and the number of inner loop iterations was set to 10. The width of the local weighted regression smoothing window was set to 48 hours. First, the trend component was extracted, which was found to slowly rise from 5.2 kWh on day 1 to 5.8 kWh on day 30, showing a slight upward trend. Then, the trend component was subtracted from the original data, and local weighted regression smoothing was performed on the 24 columns of data after detrending (each column corresponding to the same hour of the day) to obtain the period component. The period component showed that the electricity consumption at 7 PM was 1.5 kWh, while at 5 AM it was only 0.3 kWh. After subtracting the trend and period components from the original data, the residual component was obtained, with a mean of 0.05 kWh and a standard deviation of 0.12 kWh, which basically conforms to a zero-mean normal distribution. After removing the residuals, the final decomposition result retained the trend component and the period component, which were used for subsequent flow intensity calculations.

[0053] In one implementation, the community environmental constraints are characterized by environmental constraint factors, and step S30 includes steps S301 to S302: Step S301: Determine the environmental constraint factor based on the community power grid capacity limit and the current load.

[0054] It should be noted that the community power grid capacity limit refers to the maximum available electrical power that the community can obtain from the upper-level power grid or local distributed power sources, usually measured in kilowatts. This limit is determined by transformer capacity, line current carrying capacity, and power source capacity, and is a hard constraint. Current load refers to the sum of the electrical power consumed by all metering boxes within the community at the current moment. The environmental constraint factor = (capacity limit - current load) / capacity limit. This ratio reflects the proportion of additional load the grid can still withstand. For example, if the capacity limit is 1000 kilowatts and the current load is 850 kilowatts, then the remaining capacity is 150 kilowatts, and the environmental constraint factor is 150 divided by 1000, which equals 0.15. If the current load is very close to the capacity limit, the environmental constraint factor approaches zero. In this case, the power adjustment should be very conservative to avoid triggering overload protection. If the current load is much lower than the limit, the environmental constraint factor is larger, and there is sufficient room for adjustment. Another way to define it is to use the ratio of remaining capacity to the capacity limit, or the reciprocal of the ratio of current load to the capacity limit. Regardless of the form used, the environmental constraint factor ranges from 0 to 1, with a larger value indicating a more lenient constraint.

[0055] Step S302: Multiply the user's electricity consumption habit weight by the first weight coefficient, multiply the sudden demand fluctuation amplitude by the second weight coefficient, and multiply the dynamic flow intensity index in the preliminary flow pattern by the third weight coefficient to obtain three weighted terms.

[0056] The user's electricity consumption habit weight reflects their basic electricity consumption pattern and is a value between 0 and 1, with higher weight during peak hours and lower weight during off-peak hours. Sudden demand fluctuation amplitude is a non-negative number, usually greater than or equal to 0, but may exceed 1 in exceptionally drastic cases. The dynamic flow intensity index is also a non-negative number, reflecting the scale of energy exchange between metering boxes. These three parameters have different physical meanings and cannot be directly added together. Therefore, they need to be assigned weight coefficients to adjust their respective contributions to the adjustment coefficient. The sum of the first, second, and third weight coefficients is usually 1, but it may not be equal to 1, as it will ultimately be multiplied by the environmental constraint factor. The specific values ​​of the weight coefficients can be obtained through training with historical data, for example, using linear regression or gradient descent, to minimize the error between the predicted adjustment coefficient and the optimal adjustment coefficient. In initial implementation, they can be set based on experience, for example, the first weight coefficient is 0.4, the second weight coefficient is 0.3, and the third weight coefficient is 0.3. Multiplying each parameter by its corresponding weight coefficient yields three weighted terms, all of which are dimensionless values ​​and can be safely summed.

[0057] Step S303: Sum the three weighted terms and multiply them by the environmental constraint factor to determine the power mutual adjustment coefficient, which is used as the optimized mutual adjustment parameter.

[0058] It should be understood that the sum of the three weighted terms yields a comprehensive impact factor, which integrates user habits, sudden fluctuations, and the demand for power allocation from existing mutual assistance models. This comprehensive impact factor is then multiplied by an environmental constraint factor. The environmental constraint factor scales the comprehensive impact factor: if the grid has sufficient remaining capacity, the environmental constraint factor is relatively large, and the adjustment coefficient remains essentially unchanged; if the grid is near full load, the environmental constraint factor is very small, and the adjustment coefficient is significantly compressed, thereby suppressing mutual assistance behavior to avoid overload. The product is the power mutual assistance adjustment coefficient, which is a non-negative real number. If the coefficient is greater than 1, it indicates a strong demand for mutual assistance and relaxed environmental constraints, allowing for active promotion of power flow; if it is between 0 and 1, it indicates the need for moderate control; if it is close to 0, it indicates that mutual assistance should be restricted or even stopped. The optimized mutual assistance adjustment parameter includes not only this coefficient but also intermediate quantities generated during the calculation process, such as the values ​​of the three weighted terms, for subsequent debugging and analysis.

[0059] For example, the community power grid has a capacity limit of 1000 kW, a current load of 850 kW, and an environmental constraint factor of 0.15. The user's electricity consumption habits have a weight of 0.6 during the evening period, with a first weight coefficient of 0.4 and a weighting term of 0.24. Sudden demand fluctuations are 2.0, with a second weight coefficient of 0.3 and a weighting term of 0.6. The dynamic flow intensity index is 8.5, with a third weight coefficient of 0.3 and a weighting term of 2.55. The sum of the three weighting terms is 0.24 + 0.6 + 2.55 = 3.39. Multiplying this by the environmental constraint factor of 0.15 yields a power balance adjustment coefficient of 0.5085. This coefficient is less than 1, indicating that although there is significant sudden demand and flow intensity, the balance adjustment should be moderate and not overly aggressive due to the high grid load. The optimized balance adjustment parameter is recorded as 0.51 and stored for subsequent steps.

[0060] In one implementation, before step S303, steps S3031 to S3034 are also included: Step S3031: Obtain the historical prediction deviation sequence, which is the difference between the predicted load and the actual load over multiple past periods; Step S3032: Calculate the prediction contribution of the user electricity consumption habit weight, the sudden demand fluctuation amplitude, and the dynamic flow intensity index respectively based on the historical prediction deviation sequence. Step S3033: Normalize the corresponding predicted contribution and use it as the benchmark weight coefficient; Step S3034: Adjust the reference weight coefficients according to the real-time collected change rate of the direction of electrical energy flow to obtain the first weight coefficient, the second weight coefficient, and the third weight coefficient.

[0061] In practice, load forecasting uses a forecasting model (such as a time series model or a machine learning model) to predict future electricity consumption. The predicted value is compared with the actual collected value, and the difference between the two is the forecast deviation. The deviation can be positive (prediction is too high) or negative (prediction is too low). To analyze the impact of user electricity consumption habits, sudden demand fluctuations, and dynamic flow intensity indicators on forecast accuracy, it is necessary to collect forecast deviation data for multiple complete periods (e.g., the past 30 days or the past 12 months) to form a forecast deviation sequence. The length of this sequence is equal to the number of periods multiplied by the number of sampling points in each period.

[0062] It should be noted that the predictive contribution refers to the degree to which each input parameter (user electricity consumption habit weight, sudden demand fluctuation amplitude, and dynamic flow intensity index) explains the prediction deviation. It is calculated using multiple linear regression or variance decomposition. Specifically, a linear regression model is established with the historical prediction deviation sequence as the dependent variable and the historical records of user electricity consumption habit weight, sudden demand fluctuation amplitude, and dynamic flow intensity index as independent variables. The coefficients of each independent variable in the regression model represent the change in prediction deviation when that variable changes by one unit. The larger the absolute value of the coefficient, the greater the contribution of that variable to the prediction deviation. Alternatively, partial dependency plots or Shapley value decomposition can be used to quantify the contribution of each parameter. The contribution itself is a dimensionless relative value.

[0063] Because the contribution values ​​of the three parameters have different ranges, they need to be normalized so that the sum of the normalized values ​​is 1. The normalization method is to divide the contribution of each parameter by the sum of the contributions of the three parameters. For example, if the contribution of user electricity consumption habits is 0.3, the contribution of sudden demand fluctuation amplitude is 0.5, and the contribution of dynamic flow intensity index is 0.2, the sum is 1.0, so the normalized values ​​are still 0.3, 0.5, and 0.2. If the sum of the contributions is not 1, scaling is required. The normalized contribution is the benchmark weight coefficient, reflecting the average influence of each parameter on the prediction deviation in a historical statistical sense. However, in actual operation, the flow direction of electricity exchange may change in real time, so the benchmark weight coefficient needs to be dynamically adjusted.

[0064] The rate of change of the direction of electricity flow in the mutual assistance network refers to the speed at which the direction of the main flow path changes compared to the previous moment. A large rate of change indicates instability in the electricity flow pattern. The weights of sudden demand and dynamic flow intensity should be appropriately increased, while the weight of user electricity consumption habits can be appropriately decreased, as habits are relatively stable. The adjustment method could be to set an adjustment amplitude function; for example, for every unit increase in the rate of change, the weight of sudden demand fluctuation amplitude increases by 0.05, the weight of dynamic flow intensity also increases by 0.05, and the weight of user electricity consumption habits decreases by 0.1. After adjustment, renormalization is required so that the sum of the three weights is 1.

[0065] For example, a historical forecast deviation sequence of 720 points over the past 30 days was collected. Linear regression analysis revealed that the contribution of user electricity consumption habits was 0.25, the contribution of sudden demand fluctuations was 0.45, and the contribution of dynamic flow intensity was 0.30. The normalized baseline weight coefficients were 0.25, 0.45, and 0.30, respectively. Real-time monitoring showed a sudden increase in the rate of change of the electricity flow direction from 0.1 to 0.3, indicating instability in the mutual assistance mode. The system set adjustment rules: for every 0.1 increase in the rate of change, the second and third weight coefficients were each increased by 0.05, while the first weight coefficient was decreased by 0.1. After adjustment, the unnormalized weights became 0.15, 0.50, and 0.35, summing to 1.0, which is exactly normalized. Therefore, the first, second, and third weight coefficients were 0.15, 0.50, and 0.35, respectively. This set of weight coefficients was used to calculate the electricity mutual assistance adjustment coefficient for the current period, making the impact of sudden demand and dynamic flow more prominent.

[0066] Based on the first embodiment of this application, in the third embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 3 Step S40 may include steps S401 to S404: Step S401: From the optimized mutual adjustment parameters, the interaction frequency between metering boxes and the historical data matching degree of each metering box are extracted.

[0067] The optimized mutual adjustment parameters not only include adjustment coefficients but also implicitly contain intermediate data used in the optimization process. Interaction frequency refers to the frequency of energy exchange between metering boxes, which can be extracted from the initial flow pattern or recalculated during the adjustment coefficient calculation. Historical data matching degree refers to the similarity between the current electricity consumption pattern of each metering box and its historical patterns for the same period. This is obtained by calculating the cosine similarity or the reciprocal of the Euclidean distance between the current electricity consumption feature vector and the feature vectors of the same time period in the past (e.g., the same hour yesterday, the same hour last week).

[0068] It should be understood that the matching degree ranges from 0 to 1. The closer to 1, the more similar the matching degree, indicating stable electricity consumption behavior; the closer to 0, the more abnormal the matching degree, indicating possible sudden events or equipment failures. The parsed interaction frequencies are stored in matrix form, where the i-th row and j-th column of the matrix represents the interaction frequency between meter boxes i and j; the historical data matching degree is stored in vector form, with each element corresponding to a meter box.

[0069] Step S402: Determine the spatial group to which each metering box belongs based on the spatial characteristics of the load distribution.

[0070] The spatial characteristics of load distribution include spatial grouping information obtained in advance by analyzing data such as the geographical coordinates, electrical distance, and historical load characteristics of meter boxes. Specifically, this includes: the group identifier of each meter box, the load distribution range of each group, and a list of meter boxes within each group. This feature is stored in the system and can be directly queried. The method for determining the spatial group to which each meter box belongs is as follows: based on the group identifier field in the load distribution spatial characteristics, each meter box is matched with its corresponding group number. Meter boxes within the same group are geographically adjacent or have similar load characteristics, facilitating their treatment as a whole in subsequent mutual analysis. After matching, each meter box is assigned a group identifier.

[0071] Step S403: Calculate the power contribution of each metering box based on the interaction frequency and historical data matching degree within each spatial group.

[0072] Within a spatial group, the role of each metering box in mutual aid behavior can be determined by analyzing the interaction frequency between metering boxes within the group and the historical data matching degree of each metering box. Energy contribution is used to quantify whether a metering box is a provider or consumer of electricity, and the extent of its contribution. Specifically, for each metering box, its interaction frequency with other metering boxes in the group is summed to obtain the total interaction frequency; then, its historical data matching degree is compared with the group's average matching degree. If it is higher than the average, its behavior is stable, and it may be a stable power source or load; if it is lower than the average, its behavior is abnormal. Combining the interaction frequency and matching degree, the net contribution can be calculated: the net contribution equals the sum of outflow interaction frequencies minus the sum of inflow interaction frequencies, multiplied by a matching degree correction factor. The matching degree correction factor can be set to (matching degree - 0.5) × 2, so that the contribution increases when the matching degree is higher than 0.5 and decreases when it is lower than 0.5. A positive net contribution indicates that the metering box is an electricity supplier, and a negative value indicates a demander.

[0073] Step S404: Normalize the power contribution of each metering box by spatial grouping to obtain the mutual assistance behavior distribution vector.

[0074] It should be understood that within each spatial group, the sum of the net contributions of each metering box should be close to zero, because the overall mutual assistance within the group is balanced, but there may be net outflows or inflows, which need to be balanced through mutual assistance with other groups. To obtain the mutual assistance behavior distribution vector, the contribution within each group needs to be normalized. The normalization method is to divide the net contribution of each metering box by the sum of the absolute values ​​of the net contributions of all metering boxes within that group, so that the sum of the absolute values ​​of the contributions within each group is 1. Then, the normalized contribution values ​​of all groups are concatenated in metering box order to obtain a multi-dimensional vector. Each element of this vector represents the relative contribution share of the corresponding metering box in the overall mutual assistance behavior. Positive elements indicate that the metering box is a major energy outputter, and negative elements indicate that it is a major energy inputter. The mutual assistance behavior distribution vector is a fixed-dimensional numerical sequence that changes over time and can be directly used for time series analysis.

[0075] For example, the interaction frequency matrix between the 10 metering boxes is obtained by parsing the optimized mutual adjustment parameters. The historical data matching degree vector shows that the matching degree of metering box 1 is 0.95, metering box 2 is 0.60, etc. According to the pre-stored load distribution spatial characteristics, the 10 metering boxes are divided into 3 spatial groups: group A contains metering boxes 1, 2, and 3; group B contains 4, 5, and 6; and group C contains 7, 8, 9, and 10. Within group A, the interaction frequency between metering boxes 1 and 2 is 5 times per hour, and with 3 it is 3 times per hour; the net contribution of metering box 1 is +12 kW, metering box 2 is -7 kW, and metering box 3 is -5 kW. After normalization by absolute value, the contribution vector of group A is 0.5, -0.29, and -0.21. Similar calculations were performed on the other groups, resulting in the overall mutual aid behavior distribution vector [0.5, -0.29, -0.21, 0.3, -0.2, -0.1, 0.4, -0.2, -0.1, -0.1]. This vector indicates that bins 1, 4, and 7 are the main outputs, while bins 2, 3, 5, 6, 8, 9, and 10 are the main inputs.

[0076] In one implementation, before step S40, steps S4001 to S4003 are also included: Step S4001: Extract load feature vectors from the historical load data of each metering box. The historical load feature vectors include peak load, valley load, and load change rate. Step S4002: Based on the similarity between the load feature vectors, a clustering algorithm is used to divide the metering box into multiple spatial groups; Step S4003: The group identifier of each spatial group and the load distribution range of the metering boxes in each group are used as the load distribution spatial characteristics.

[0077] It should be noted that historical load data typically includes the electricity consumption sequence of each meter box over a past period. To effectively cluster the meter boxes, it is necessary to extract numerical features that reflect the electricity consumption characteristics from these sequences. Peak load refers to the maximum power consumption occurring within a given time period (e.g., within a day), measured in kilowatts; valley load refers to the minimum power consumption; and the load change rate reflects the degree of change in power consumption over time, which can be calculated as the average of the absolute values ​​of the power differences between adjacent time points, or the peak-valley difference divided by the time span. In addition to these three basic features, average load, load factor (average load divided by peak load), peak-valley ratio, etc., can be added. The feature vector of each meter box is an array of these values, for example, [peak load 5.2 kW, valley load 0.3 kW, change rate 0.8 kW / h].

[0078] It should be understood that the goal of clustering algorithms is to group bins with similar feature vectors into the same group, resulting in high similarity within groups and low similarity between groups. The similarity is measured using Euclidean distance or cosine distance. A smaller Euclidean distance indicates greater similarity.

[0079] Clustering algorithms include K-means clustering, hierarchical clustering, and DBSCAN (Density-Based Spatial Clustering of Applications with Noise). K-means clustering requires pre-specifying the number of groups K, and the algorithm iteratively optimizes to minimize the sum of squared distances from data points within each cluster to the cluster center. Hierarchical clustering does not require pre-specifying K; it calculates the distances between all samples and gradually merges the nearest clusters to form a tree structure, which users can choose an appropriate number of groups based on the tree diagram. DBSCAN, based on density, can discover clusters of arbitrary shapes and automatically identify noise points.

[0080] After clustering, each bin receives a group label. The number of groups can be set according to actual needs; for example, more groups can be used for fine-grained allocation, while fewer groups can be used for macro-management.

[0081] The spatial characteristics of load distribution include not only the geographical location of the metering boxes but also the load statistics for each group. The group identifier is an integer or string used to uniquely identify the group. The load distribution range refers to the minimum and maximum load values ​​of all metering boxes within the group, as well as the overall load distribution pattern (e.g., normal or skewed distribution). Additionally, the group's center coordinates, total load, and average load can also be recorded.

[0082] For example, load feature vectors for the past 30 days were extracted from 100 meter boxes within the community. Each vector showed peak loads ranging from 2 kW to 15 kW, valley loads ranging from 0.1 kW to 1.2 kW, and load change rates ranging from 0.2 kW / h to 1.5 kW / h. Using K-means clustering with K=5, after 10 iterations, the 100 meter boxes were divided into 5 spatial groups. Group 1 contained 20 meter boxes with higher peak loads, averaging 10.5 kW, mainly concentrated in the northern part of the community; Group 2 contained 30 meter boxes with lower peak loads, averaging 3.2 kW, mainly concentrated in the southern part of the community. Load distribution range: Group 1's load was between 8 and 15 kW, and Group 2's was between 1.5 and 5 kW. This grouping information was stored as spatial load distribution features for subsequent spatial clustering and cross-functional analysis.

[0083] In one implementation, step S402 includes steps S4021 to S4022: Step S4021: Based on the metering box grouping mapping table stored in the load distribution spatial characteristics, query the corresponding spatial grouping identifier for each metering box; Step S4022: Group meter boxes with the same grouping identifier into the same spatial group.

[0084] It should be understood that a mapping table with unique meter box identifiers as keys and spatial group numbers as values ​​is pre-stored in the load distribution spatial characteristics. This table can be structured data stored in the form of a hash table or a database index. When the system needs to determine the ownership of a meter box, it directly looks up the corresponding group identifier (such as "Group_A", "Group_B", or an integer group number) in the mapping table based on the meter box's ID. Since this mapping table is generated and stored once through cluster analysis (or manual configuration) in the early stage, subsequent queries at any point in time do not need to be recalculated and can be completed with constant time complexity.

[0085] Furthermore, the system iterates through all metering boxes, grouping those with the same grouping identifier into the same spatial group, forming a list of metering boxes within each group. For example, the set of metering boxes with grouping identifier 1 is the first spatial group, those with identifier 2 are the second spatial group, and so on. Through simple table lookup and classification operations, the mapping from metering boxes to spatial groups can be completed efficiently and accurately, providing clear group boundaries for subsequent calculations of the energy contribution and mutual assistance behavior distribution vector within each spatial group.

[0086] In one implementation, after step S50, steps S5001 to S5005 are also included: Step S5001: Extrapolate the periodic and trend components in the long-term pattern along the time axis to generate a prediction result of the community's future electricity load. Step S5002: Based on the long-term pattern, the dynamic flow trend sequence is compared hourly with the real-time collected electricity consumption data to generate the degree of deviation. Step S5003: Correct the prediction result according to the degree of deviation to obtain the corrected prediction result; Step S5004: When the degree of deviation exceeds the preset deviation tolerance value, shorten the time granularity of the trend sequence to obtain the shortened trend sequence time granularity, and re-execute the step of determining the long-term law with the shortened time granularity to obtain the updated dynamic flow trend sequence. Step S5005: Based on the updated dynamic flow trend sequence and the corrected prediction results, generate an energy-saving optimization scheme for the power metering box.

[0087] In its implementation, after determining the long-term patterns of electricity consumption changes in the community, the system first extrapolates the periodic and trend components of these long-term patterns along the time axis to generate a prediction of the community's future electricity load. Extrapolation involves using the decomposed trend and periodic components, mathematically extending their patterns to future time periods. The trend component is fitted with linear or nonlinear regression, while the periodic component is mapped to the future based on the period length obtained from Fourier analysis. After superimposing both, fine-tuning is performed based on the residual components, ultimately outputting a predicted sequence of the community's future electricity load.

[0088] Furthermore, the system compares the dynamic flow trend sequence (representing the expected changes in electricity consumption based on historical data and mutual assistance behavior analysis) with the real-time collected electricity consumption data (reflecting the actual electricity consumption situation) hourly. That is, it calculates the difference between the predicted value and the actual value at the same point in time to obtain the degree of deviation. The degree of deviation can be expressed as absolute deviation (kilowatt-hours) or relative deviation (percentage). For example, if the long-term prediction is that the total electricity load of the community at 2 pm is 800 kilowatts, and the real-time collected value is 850 kilowatts, then the absolute deviation is 50 kilowatts, and the relative deviation is 6.25%.

[0089] When the predicted value deviates from the actual value, it indicates that the original spatial characteristics of the load distribution may have changed (e.g., changes in the electricity usage habits of some metering boxes, or the emergence of a new mutual assistance mode). In this case, the prediction result is corrected according to the degree of deviation, using a feedback correction strategy, such as Kalman filtering or exponential smoothing. For example, when using exponential smoothing, the corrected prediction value equals the original prediction value multiplied by a smoothing coefficient, plus the actual value multiplied by (1 minus the smoothing coefficient). The smoothing coefficient is typically set between 0.2 and 0.3. This correction can be performed independently for each metering box or each spatial group, and the corrected prediction result is closer to the actual situation.

[0090] If the deviation exceeds the preset deviation tolerance value (e.g., 10%), it indicates that the current prediction model has low accuracy. The system will then shorten the time granularity of the trend sequence (e.g., from hourly to 15-minute intervals) and re-execute the steps for determining long-term patterns (i.e., re-perform time series decomposition, trend analysis, and long-term pattern extraction) at this shortened time granularity to obtain an updated dynamic flow trend sequence. The preset deviation tolerance value needs to be set based on the community power grid's carrying capacity, transformer capacity, and line current carrying capacity to prevent excessive prediction deviations from causing power grid overload and voltage instability. Refining the time granularity improves the accuracy of periodic component extraction, capturing more detailed changes in electricity consumption.

[0091] Finally, based on the updated dynamic flow trend sequence and the corrected prediction results, an energy-saving optimization scheme for the electricity metering boxes is generated. The optimization objective is to minimize peak load, reduce network losses, or maximize renewable energy consumption while meeting grid security constraints (transformer capacity, line current carrying capacity, etc.). Optimization methods can employ linear programming, mixed-integer programming, or heuristic algorithms, using the updated trend sequence and corrected prediction results as input to adjust the mutual power allocation among the metering boxes, making the actual load distribution as close as possible to the corrected ideal predicted distribution. The final energy-saving optimization scheme includes the electrical energy value that each metering box should receive or send in each time period, as well as the start-up instructions for backup power or demand response. This scheme is then sent to smart meters or energy controllers for execution, achieving real-time optimization of community energy efficiency.

[0092] For example, the long-term trend of community electricity consumption predicted a total load of 800 kW at 2 PM, while the real-time measured value was 850 kW, with a relative deviation of 6.25%, lower than the preset deviation tolerance of 10%. The system startup time granularity was optimized, shortening the original hourly granularity to a 15-minute granularity. Re-executing the time-series decomposition and long-term trend analysis yielded a dynamic flow trend sequence at the 15-minute granularity, showing that the load would rapidly rise to 870 kW between 2 PM and 2:15 PM. Based on this, the power sharing scheme was optimized: 50 kW of surplus power from the south was transferred to the northern peak area 15 minutes in advance, reducing the northern peak load from 820 kW to 770 kW. Finally, an energy-saving optimization scheme was generated and executed via smart meter commands, successfully controlling the actual peak load below 800 kW and avoiding the risk of transformer overload.

[0093] This application also provides an energy-saving optimization system for electricity metering boxes based on energy efficiency analysis, including: The electricity consumption characteristic data generation module is used to generate an initial electricity consumption characteristic set based on historical and real-time electricity consumption data from multiple meter boxes in the community environment. The initial electricity consumption characteristic set includes user electricity consumption habit weights and the amplitude of sudden demand fluctuations. The mutual assistance mode time-series decomposition module is used to process the interaction frequency and dynamic flow intensity index between metering boxes according to the initial electricity consumption characteristic set, and determine the initial flow mode of electricity mutual assistance within the community. The mutual assistance parameter comprehensive optimization module is used to calculate the power mutual assistance adjustment coefficient based on the user's electricity consumption habit weight, the sudden demand fluctuation amplitude, the preliminary flow pattern and community environmental constraints, as the optimized mutual assistance adjustment parameter. The mutual assistance behavior distribution determination module is used to determine the mutual assistance behavior distribution vector based on the inter-metering box interaction frequency and historical data matching degree obtained from the optimized mutual assistance adjustment parameters, as well as the load distribution spatial characteristics. The electricity consumption trend analysis module is used to process the mutual aid behavior distribution vector through time series analysis algorithm to generate a dynamic flow trend sequence. Based on the dynamic flow trend sequence, historical data period coverage, and trend sequence time granularity, the long-term pattern of electricity consumption changes in the community is determined. The prediction and optimization module is used to predict the future electricity load of the community based on the long-term pattern, obtain the prediction results, and optimize the energy metering box for energy saving based on the prediction results.

[0094] The energy-saving optimization system for electricity metering boxes based on energy efficiency analysis provided in this application employs the energy-saving optimization method for electricity metering boxes based on energy efficiency analysis in the above embodiments. This solves the technical problem that existing prediction methods neglect the mutual influence and resource flow between devices. Compared with the prior art, the beneficial effects of the energy-saving optimization system for electricity metering boxes based on energy efficiency analysis provided in this application are the same as those of the energy-saving optimization method for electricity metering boxes based on energy efficiency analysis provided in the above embodiments. Furthermore, other technical features of the energy-saving optimization system for electricity metering boxes based on energy efficiency analysis are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0095] It should be noted that, in this document, the terms "comprising," "including," and any other variations are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Specific examples have been used in this document to illustrate the principles and implementation methods of the technical solutions of this application. These examples are only intended to help understand the methods and core ideas of this application. The above descriptions are merely preferred embodiments of this application. It should be pointed out that, due to the limitations of written expression and the objective existence of infinite specific structures, those skilled in the art can make several improvements, modifications, or changes without departing from the principles of this application, and can also combine the above technical features in an appropriate manner. These improvements, modifications, changes, or combinations, or the direct application of the concept and technical solutions of this application to other situations without modification, should all be considered within the scope of protection of this application.

Claims

1. A method for energy-saving optimization of electricity metering boxes based on energy efficiency analysis, characterized in that, include: Based on historical and real-time electricity consumption data from multiple metering boxes in the community environment, an initial electricity consumption feature set is generated, which includes user electricity consumption habit weights and the magnitude of sudden demand fluctuations. Based on the initial set of electricity consumption characteristics, a time-series decomposition algorithm is used to process the interaction frequency and dynamic flow intensity indicators between metering boxes to determine the initial flow pattern of electricity mutual assistance within the community. Based on the user electricity consumption habit weight, the sudden demand fluctuation range, the initial flow pattern, and the community environment constraints, the power mutual assistance adjustment coefficient is calculated, and the power mutual assistance adjustment coefficient is used as the optimized mutual assistance adjustment parameter. Based on the inter-metering box interaction frequency and historical data matching degree obtained from the optimized mutual assistance adjustment parameters, as well as the load distribution spatial characteristics, the mutual assistance behavior distribution vector is determined. The mutual aid behavior distribution vector is processed by time series analysis algorithm to generate a dynamic flow trend sequence. Based on the dynamic flow trend sequence, historical data period coverage and trend sequence time granularity, the long-term pattern of electricity consumption changes in the community is determined. Based on the long-term patterns, the future electricity load of the community is predicted, and the prediction results are obtained. Based on the prediction results, the energy metering box is optimized for energy saving.

2. The energy-saving optimization method for electricity metering boxes based on energy efficiency analysis according to claim 1, characterized in that, The step involves using a time-series decomposition algorithm to process the interaction frequency and dynamic flow intensity indicators between metering boxes based on the initial electricity consumption characteristic set, to determine the preliminary flow pattern of electricity mutual assistance within the community, including: Based on the electricity consumption data in the initial electricity consumption feature set, the electricity consumption data of each meter box is decomposed into trend components and periodic components according to the time series using a time series decomposition algorithm; The dynamic flow intensity index between the metering boxes is calculated based on the rate of change of the trend component over time. The interaction frequency between metering boxes is determined based on the amplitude and phase of the periodic fluctuations in the periodic components. Based on the dynamic flow intensity index and the interaction frequency, a preliminary flow pattern for power exchange within the community is determined.

3. The energy-saving optimization method for electricity metering boxes based on energy efficiency analysis according to claim 2, characterized in that, The time-series decomposition algorithm includes a local weighted regression smoothing algorithm and a periodic subsequence smoothing algorithm. Based on the electricity consumption data in the initial electricity consumption feature set, the time-series decomposition algorithm decomposes the electricity consumption data of each meter box into trend components and periodic components according to the time series, including: Based on the electricity consumption data in the initial electricity consumption feature set, a local weighted regression smoothing algorithm is used to extract the trend components of the electricity consumption data; After subtracting the trend component from the electricity consumption data, the periodic component is extracted using a periodic subsequence smoothing algorithm; The residual components of the remaining part of the electricity consumption data are determined, and the residual components are removed as noise to obtain the decomposed trend components and periodic components.

4. The energy-saving optimization method for electricity metering boxes based on energy efficiency analysis according to claim 1, characterized in that, The community environmental constraints are characterized by environmental constraint factors. The calculation of the power mutual assistance adjustment coefficient, based on the user's electricity consumption habit weight, the magnitude of sudden demand fluctuations, the initial flow pattern, and the community environmental constraints, serves as the optimized mutual assistance adjustment parameter. This includes: Environmental constraint factors are determined based on the community power grid's carrying capacity and current load. The user's electricity consumption habit weight is multiplied by the first weight coefficient, the sudden demand fluctuation amplitude is multiplied by the second weight coefficient, and the dynamic flow intensity index in the preliminary flow pattern is multiplied by the third weight coefficient to obtain three weighted terms. The sum of the three weighted terms is multiplied by the environmental constraint factor to determine the power mutual adjustment coefficient, which is used as the optimized mutual adjustment parameter.

5. The energy-saving optimization method for electricity metering boxes based on energy efficiency analysis according to claim 4, characterized in that, Determining the first weighting coefficient, the second weighting coefficient, and the third weighting coefficient includes: Obtain the historical forecast deviation sequence, which is the difference between the forecast load and the actual load over multiple past periods; Based on the historical prediction deviation sequence, the prediction contribution of the user electricity consumption habit weight, the sudden demand fluctuation amplitude, and the dynamic flow intensity index is calculated respectively. The corresponding predicted contribution is normalized and used as the benchmark weight coefficient; Based on the real-time collected rate of change of the direction of electrical energy flow, the benchmark weight coefficient is adjusted to obtain the first weight coefficient, the second weight coefficient, and the third weight coefficient.

6. The energy-saving optimization method for electricity metering boxes based on energy efficiency analysis according to claim 1, characterized in that, Determining the spatial characteristics of the load distribution includes: Extract load feature vectors from the historical load data of each metering box. The load feature vectors include peak load, valley load, and load change rate. Based on the similarity between the load feature vectors, a clustering algorithm is used to divide the metering boxes into multiple spatial groups; The group identifier of each spatial group and the load distribution range of the metering boxes within each group are used as the spatial characteristics of the load distribution.

7. The energy-saving optimization method for electricity metering boxes based on energy efficiency analysis according to claim 1, characterized in that, The step of determining the mutual assistance behavior distribution vector based on the inter-metering box interaction frequency and historical data matching degree obtained from the optimized mutual assistance adjustment parameters, as well as the spatial characteristics of the load distribution, includes: The interaction frequency between metering boxes and the historical data matching degree of each metering box are extracted from the optimized mutual adjustment parameters. Based on the spatial characteristics of the load distribution, determine the spatial group to which each metering box belongs; The energy contribution of each metering box is calculated based on the interaction frequency and historical data matching degree within each spatial group. The energy contribution of each metering box is normalized by spatial grouping to obtain the distribution vector of mutual assistance behavior.

8. The energy-saving optimization method for electricity metering boxes based on energy efficiency analysis according to claim 7, characterized in that, The step of determining the spatial grouping of each metering box based on the spatial characteristics of the load distribution includes: Based on the meter box grouping mapping table stored in the load distribution spatial characteristics, query the corresponding spatial grouping identifier for each meter box; Meter boxes with the same grouping identifier are grouped into the same spatial group.

9. The energy-saving optimization method for electricity metering boxes based on energy efficiency analysis according to claim 1, characterized in that, The process of predicting the future electricity load of the community based on the long-term trend, obtaining prediction results, and optimizing the energy metering box for energy saving based on the prediction results includes: Extrapolate the periodic and trend components in the long-term pattern along the time axis to generate a prediction of the community's future electricity load. Based on the long-term pattern, the dynamic flow trend sequence is compared hourly with the real-time collected electricity consumption data to generate the degree of deviation. The prediction result is corrected based on the degree of deviation to obtain the corrected prediction result; When the deviation exceeds the preset deviation tolerance value, the time granularity of the trend sequence is shortened to obtain the shortened time granularity of the trend sequence, and the step of determining the long-term pattern is re-executed with the shortened time granularity of the trend sequence to obtain the updated dynamic flow trend sequence. Based on the updated dynamic flow trend sequence and the corrected prediction results, an energy-saving optimization scheme for the power metering box is generated.

10. An energy-saving optimization system for an electricity metering box based on energy efficiency analysis, characterized in that, include: The electricity consumption characteristic data generation module is used to generate an initial electricity consumption characteristic set based on historical and real-time electricity consumption data from multiple meter boxes in the community environment. The initial electricity consumption characteristic set includes user electricity consumption habit weights and the amplitude of sudden demand fluctuations. The mutual assistance mode time-series decomposition module is used to process the interaction frequency and dynamic flow intensity index between metering boxes according to the initial electricity consumption characteristic set, and determine the initial flow mode of electricity mutual assistance within the community. The mutual assistance parameter comprehensive optimization module is used to calculate the power mutual assistance adjustment coefficient based on the user's electricity consumption habit weight, the sudden demand fluctuation amplitude, the preliminary flow pattern and community environmental constraints, and use the power mutual assistance adjustment coefficient as the optimized mutual assistance adjustment parameter. The mutual assistance behavior distribution determination module is used to determine the mutual assistance behavior distribution vector based on the inter-metering box interaction frequency and historical data matching degree obtained from the optimized mutual assistance adjustment parameters, as well as the load distribution spatial characteristics. The electricity consumption trend analysis module is used to process the mutual aid behavior distribution vector through time series analysis algorithm to generate a dynamic flow trend sequence. Based on the dynamic flow trend sequence, historical data period coverage, and trend sequence time granularity, the long-term pattern of electricity consumption changes in the community is determined. The prediction and optimization module is used to predict the future electricity load of the community based on the long-term pattern, obtain the prediction results, and optimize the energy metering box for energy saving based on the prediction results.