Power consumption behavior analysis method, system and equipment based on semi-parameter additive model and medium
Through the electricity consumption behavior analysis method based on the semi-parametric additive model, the problems of low clustering accuracy and insufficient dynamic correlation modeling in the existing technology are solved, the refined analysis and linkage research of users' electricity consumption behavior are realized, and the data processing efficiency and load forecasting accuracy of the power system are improved.
Patent Information
- Application Number
- CN202510701438.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-28
- Publication Date
- 2025-10-28
AI Technical Summary
Existing electricity consumption data analysis technologies have technical defects in power systems, such as low clustering accuracy, insufficient dynamic correlation modeling capabilities, and inaccurate nonlinear relationship processing. As a result, the power system cannot achieve high-precision electricity consumption data analysis and accurate load forecasting, affecting the power system's operating efficiency and data processing quality.
An electricity consumption behavior analysis method based on a semi-parametric additive model is adopted. By obtaining users' electricity consumption and electricity price data, user electricity consumption characteristics are constructed, and clustering is performed using a clustering algorithm. A semi-parametric additive model is constructed to determine the linkage of electricity consumption behaviors between user groups. The HHO-Kmeans algorithm and the Harris Eagle optimization algorithm are combined to optimize the cluster centers. The orthogonal series method and the ordinary least squares method are used to estimate the model parameters. The generalized cross-validation method is used to determine the truncation parameter, thereby achieving a refined analysis of electricity consumption behavior.
It improves the accuracy and completeness of user portraits, significantly enhances the stability and accuracy of clustering results, ensures the unbiasedness and consistency of model parameter estimation, enables in-depth understanding of the linkage mechanism of electricity consumption behavior, supports the power system to optimize power supply strategies and load forecasting, and improves the intelligence level of the power system.
Smart Images

Figure CN120851674A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electricity consumption behavior analysis technology, specifically to a method, system, device, and medium for electricity consumption behavior analysis based on a semi-parametric additive model. Background Technology
[0002] With the deepening development of smart grid construction and the rapid growth of electricity consumption data, the power system faces the challenge of efficiently processing and analyzing massive amounts of electricity consumption data. Traditional electricity consumption data analysis methods mainly rely on simple statistical calculations, which are insufficient to meet the complex analysis needs of large-scale, high-dimensional electricity consumption data.
[0003] Existing electricity consumption behavior analysis technologies suffer from the following technical problems in data processing: First, traditional clustering algorithms are prone to getting stuck in local optima when processing large-scale electricity consumption data, leading to unstable user classification results and affecting the accuracy of subsequent data analysis and power system load forecasting. Second, existing analysis methods are mostly static data processing methods, lacking effective mining of the correlations in dynamic electricity consumption data, and failing to accurately identify the impact of major events on power system load distribution, thus affecting the safe and stable operation and dispatch optimization of the power system. Third, traditional linear models struggle to accurately model the complex nonlinear relationships between electricity consumption data, resulting in low accuracy in electricity consumption behavior forecasting, which in turn affects the accuracy of power system load forecasting and equipment capacity configuration optimization. These technical deficiencies directly impact the data processing efficiency and analysis accuracy of the power system, hindering the further development of smart grid data analysis technology. There is an urgent need to develop more accurate and efficient electricity consumption data analysis technologies to improve the intelligence level of the power system. Summary of the Invention
[0004] In view of the above-mentioned problems, the present invention is proposed.
[0005] Therefore, the technical problem solved by this invention is: how to solve the technical defects of existing electricity consumption data analysis technology in power system applications, such as low clustering accuracy, insufficient dynamic correlation modeling capability, and inaccurate nonlinear relationship processing, which prevent the power system from achieving high-precision electricity consumption data analysis and accurate load forecasting, thus affecting the operating efficiency and data processing quality of the power system.
[0006] To address the aforementioned technical problems, this invention provides the following technical solution: a method for analyzing electricity consumption behavior based on a semi-parametric additive model, comprising the following steps: acquiring electricity consumption data and electricity price data of at least one user, and constructing user electricity consumption characteristics based on the electricity consumption data and the electricity price data; employing a clustering algorithm to group users according to their electricity consumption characteristics, and determining the user group to which each user belongs and the corresponding electricity consumption behavior profile; determining a target time period and at least two research objects according to a preset research event or research objective; the research objects include user groups or individual users; constructing a semi-parametric additive model based on the user electricity consumption characteristics of at least two research objects within the target time period, and determining the correlation of electricity consumption behavior between at least two research objects based on the semi-parametric additive model.
[0007] As a preferred embodiment of the electricity consumption behavior analysis method based on a semi-parametric additive model described in this invention, the user electricity consumption characteristics include at least one of the following: electricity consumption characteristics, electricity consumption growth rate characteristics, average electricity price characteristics, and electricity consumption coefficient of variation characteristics.
[0008] The beneficial effects of this preferred technical solution are as follows: by constructing a multi-dimensional electricity consumption characteristic system, it is possible to comprehensively depict the user's electricity consumption behavior pattern, improve the accuracy and completeness of user profiles, and lay a solid data foundation for subsequent cluster analysis and linkage research.
[0009] As a preferred embodiment of the electricity consumption behavior analysis method based on a semi-parametric additive model described in this invention, the step of using a clustering algorithm to group users includes: determining the number of clusters of the clustering algorithm according to a clustering effectiveness evaluation index; and applying a heuristic optimization algorithm to determine the initial cluster centers of the clustering algorithm to obtain the user grouping results.
[0010] The beneficial effects of this preferred technical solution are as follows: by using a scientific method for selecting clustering parameters, it effectively avoids the subjective nature of selecting the number of clusters and the randomness of selecting the initial centers in traditional clustering methods, significantly improving the stability and accuracy of clustering results and ensuring the scientific nature and reliability of user grouping.
[0011] As a preferred embodiment of the electricity consumption behavior analysis method based on a semi-parametric additive model described in this invention, the application of the heuristic optimization algorithm includes: initializing a candidate solution population; iteratively updating the position of individuals in the candidate solution population according to a preset exploration phase update mechanism and a development phase update mechanism; and determining the initial cluster center from the candidate solution population based on a preset fitness function.
[0012] The beneficial effects of this preferred technical solution are as follows: by adopting the exploration and development mechanism of biomimetic intelligent optimization algorithm, a good balance can be achieved between global search and local refinement, effectively avoiding the problem of traditional clustering methods getting stuck in local optima, and improving the global optimality of cluster center selection and the stability of algorithm convergence.
[0013] As a preferred embodiment of the electricity consumption behavior analysis method based on a semi-parametric additive model described in this invention, the semi-parametric additive model represents the electricity consumption of the target research object as a sum of a time trend function, an electricity consumption growth rate function of other research objects, an electricity consumption function of other research objects, and a random error term.
[0014] The beneficial effects of this preferred technical solution are as follows: by decomposing the complex electricity consumption behavior relationship into an interpretable combination of functions, the model maintains its flexibility to capture nonlinear relationships while ensuring the interpretability of each influencing factor, thus providing a scientific modeling framework for a deeper understanding of the linkage mechanism of electricity consumption behavior.
[0015] As a preferred embodiment of the electricity consumption behavior analysis method based on a semi-parametric additive model according to the present invention, the construction of the semi-parametric additive model includes: setting the time trend function, the electricity consumption growth rate function, and the electricity consumption function as smooth functions in Hilbert space, and using the orthogonal series method to expand each smooth function into a linear combination of a set of predetermined basis functions and corresponding coefficient products; and using ordinary least squares method, based on the series expansion results, estimating the coefficients of the semi-parametric additive model to obtain the estimates of each function.
[0016] The beneficial effects of this preferred technical solution are as follows: through rigorous mathematical theoretical foundation and mature statistical estimation methods, the unbiasedness and consistency of model parameter estimation are ensured, the statistical reliability of the linkage analysis results is improved, and theoretical guarantee and numerical stability are provided for practical applications.
[0017] As a preferred embodiment of the electricity consumption behavior analysis method based on a semi-parametric additive model described in this invention, the construction of the semi-parametric additive model further includes: determining the truncation parameters k1, k2, and k3 in the orthogonal series expansion using a generalized cross-validation method, wherein the generalized cross-validation method determines the truncation parameters by minimizing the generalized cross-validation value GCV(k), and the formula for calculating GCV(k) is:
[0018]
[0019] Where n is the sample size, k represents the total cutoff parameter and k = k1 + k2 + k3; the best estimator of the value of k is At this point, k1, k2, and k3 are the optimal cutoff parameters for the model; yt This represents the actual electricity consumption of the target research object at time t. This represents the estimated electricity consumption of the target research object at time t, obtained through the semi-parametric additive model.
[0020] Another objective of this invention is to provide a power consumption behavior analysis system based on a semi-parametric additive model.
[0021] To address the aforementioned technical problems, this invention provides the following technical solution: a power consumption behavior analysis system based on a semi-parametric additive model, comprising: a feature construction module, used to acquire power consumption data and electricity price data of at least one user, and construct user power consumption characteristics based on the power consumption data and the electricity price data; a user grouping module, used to use a clustering algorithm to group the users according to the user power consumption characteristics, and determine the user group to which each user belongs and the corresponding power consumption behavior profile; a target selection module, used to determine a target time period and at least two research objects according to a preset research event or research objective, wherein the research objects include user groups or individual users; and a linkage analysis module, used to construct a semi-parametric additive model based on the user power consumption characteristics of the at least two research objects within the target time period, and determine the linkage of power consumption behaviors between the at least two research objects based on the semi-parametric additive model.
[0022] The present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, characterized in that the processor executes the computer program to implement the steps of the electricity consumption behavior analysis method based on a semi-parametric additive model.
[0023] The present invention provides a computer-readable storage medium having a computer program stored thereon, characterized in that, when the computer program is executed by a processor, it implements the steps of the electricity consumption behavior analysis method based on a semi-parametric additive model.
[0024] The beneficial effects of this invention are as follows: Through an innovative combination of methods, it achieves refined analysis and in-depth mining of user electricity consumption behavior. An improved HHO-Kmeans algorithm is used to cluster users. This algorithm combines the efficiency of K-means with the global search capability of Harris Eagle optimization, effectively avoiding the problem of getting trapped in local optima in traditional clustering methods. This allows for more accurate identification of user electricity consumption characteristics and the generation of precise electricity consumption behavior profiles. Based on the obtained user profiles, a semi-parametric additive model is constructed to explore the correlation of electricity consumption behavior among different user groups and enterprise categories from the perspectives of electricity consumption and electricity consumption growth rate. This provides data support for power companies to optimize power supply strategies and formulate demand-side management solutions, while also helping to discover energy-saving potential and promote sustainable development. Furthermore, this invention supports flexible selection of research events and objectives, adapting it to various practical application scenarios, further improving the efficiency and practical value of the analysis. Attached Figure Description
[0025] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0026] Figure 1 The above is a flowchart of an overall method for analyzing electricity consumption behavior based on a semi-parametric additive model, provided as an embodiment of the present invention.
[0027] Figure 2 This is a technical roadmap for a method for analyzing electricity consumption behavior based on a semi-parametric additive model, provided as an embodiment of the present invention. Detailed Implementation
[0028] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.
[0029] Example 1, referring to Figure 1 This is the first embodiment of the present invention, which provides a method for analyzing electricity consumption behavior based on a semi-parametric additive model, including:
[0030] S100: Obtain electricity consumption data and electricity price data of at least one user, and construct user electricity consumption characteristics based on the electricity consumption data and the electricity price data;
[0031] S200: It adopts a clustering algorithm to group users according to their electricity consumption characteristics and determine the user group to which each user belongs and the corresponding electricity consumption behavior profile;
[0032] S300: Based on a preset research event or research objective, determine the target time period and at least two research subjects; the research subjects may include user groups or individual users;
[0033] S400: Based on the user electricity consumption characteristics of at least two research subjects within the target time period, construct a semi-parametric additive model, and determine the linkage of electricity consumption behavior between at least two research subjects based on the semi-parametric additive model.
[0034] It should be noted that with the development of power systems, the requirements for refined grid operation and accurate load forecasting are constantly increasing. In-depth analysis of electricity consumption behavior, and accurate understanding of users' electricity demands and characteristics, is crucial for improving grid operating efficiency and power supply stability. However, while existing electricity consumption behavior analysis technologies have made some progress in areas such as user classification, they generally lack in-depth research on the correlation between different user groups and between user electricity consumption behavior and major external events. This lack of correlation makes it difficult for power systems to fully understand the dynamic changes in load demand, thus limiting the flexibility of power supply strategies and the effectiveness of load response.
[0035] Therefore, to address the technical problem of the lack of linkage research in the existing technologies, through steps S100-S400, firstly, a clustering algorithm is used to accurately profile user electricity consumption behavior, laying the foundation for subsequent analysis; then, by flexibly selecting research targets and constructing a semi-parametric additive model, it is possible to deeply explore the linkage of electricity consumption behavior among different groups and enterprises from electricity data, providing key data support for power system to optimize power supply strategies and implement demand-side response, thereby promoting the optimization of grid-side resource allocation and the safe and stable operation of the power system.
[0036] Example 2, refer to Figure 1 and Figure 2 As an embodiment of the present invention, based on the above embodiment, a detailed implementation method for electricity consumption behavior analysis based on a semi-parametric additive model is provided.
[0037] Figure 2 This is a research technology roadmap for the present invention.
[0038] In this embodiment of the invention, step S100 involves acquiring electricity consumption data and electricity price data of at least one user, constructing user electricity consumption characteristics based on the electricity consumption data and the electricity price data, and performing cluster analysis by collecting monthly electricity consumption data and monthly average electricity price data of enterprises to calculate corresponding electricity consumption characteristic indicators.
[0039] In one optional implementation, the electricity consumption data and electricity price data obtained in step S100 can also be obtained by collecting the user's hourly electricity consumption data in real time through the smart meter system, and combining it with the real-time electricity price information obtained through the power trading system to construct a more refined electricity consumption profile.
[0040] In another optional implementation, the electricity consumption data and electricity price data obtained in step S100 can also be obtained by batch importing users' monthly electricity consumption and electricity bill data from the historical database of the electricity marketing system, which is suitable for the analysis needs of a large user group.
[0041] In this embodiment of the invention, the user electricity consumption characteristics mentioned in step S100 include at least one of the following: electricity consumption characteristics, electricity consumption growth rate characteristics, average electricity price characteristics, and electricity consumption variation coefficient characteristics.
[0042] Specifically, monthly electricity consumption data and average monthly electricity price data for enterprises are collected. Monthly electricity consumption growth rate and monthly coefficient of variation are calculated using the electricity consumption data. Clustering features are constructed based on the data, including monthly electricity consumption, monthly electricity consumption growth rate, average monthly electricity price, and monthly coefficient of variation for each enterprise.
[0043] In one optional implementation, the electricity consumption characteristics may also include indicators such as peak-valley electricity ratio, load factor, and maximum demand. By analyzing the user's electricity consumption behavior patterns at different times, the user's electricity consumption characteristics can be more comprehensively depicted.
[0044] In another optional implementation, the electricity consumption growth rate feature can also be calculated using different methods such as year-on-year growth rate, month-on-month growth rate, or moving average growth rate to adapt to different analysis periods and business needs.
[0045] In this embodiment of the invention, step S200 employs a clustering algorithm to group users based on their electricity consumption characteristics and determine the user group to which each user belongs and the corresponding electricity consumption behavior profile, including the following steps A1-A3:
[0046] A1: Determine the number of clusters in the clustering algorithm based on the clustering effectiveness evaluation index;
[0047] A2: Apply a heuristic optimization algorithm to determine the initial cluster centers of the clustering algorithm in order to obtain the user grouping results;
[0048] A3: Output and analyze the clustering results to form a profile and grouping of electricity consumption behavior.
[0049] In an optional implementation, the clustering algorithm used in step S200 can also be the DBSCAN density clustering algorithm. By setting the neighborhood radius and minimum number of points, it can automatically identify abnormal users and process noisy data, which is suitable for scenarios where the user scale and feature distribution are uneven.
[0050] In another optional implementation, the clustering algorithm used in step S200 can also be a hierarchical clustering algorithm. By constructing a clustering tree diagram, it can support user grouping needs of different granularities, making it easier for business personnel to select the appropriate clustering level according to actual needs.
[0051] Specifically, this invention uses the K-means algorithm to classify customers based on different electricity consumption characteristics. The algorithm first clusters all data into the nearest cluster, then updates the cluster centers based on the average value of the data in each cluster, and repeats this calculation until the criterion function converges. The standard function of the K-means algorithm is:
[0052]
[0053] Where J represents the objective function of the K-means algorithm, k represents the number of clusters, n represents the number of samples in the i-th cluster, and c i x represents the cluster center of the i-th class. j This represents the j-th sample in the i-th class.
[0054] In one optional implementation, the determination of the number of clusters in the clustering algorithm based on the clustering effectiveness evaluation index can also use the silhouette coefficient to evaluate the clustering effect. By calculating the similarity between each sample and samples of the same and different classes, the number of clusters corresponding to the maximum silhouette coefficient is selected.
[0055] In another optional implementation, the determination of the number of clusters of the clustering algorithm based on the clustering effectiveness evaluation index can also use the Calinski-Harabasz index, which determines the optimal number of clusters by comparing the ratio of inter-cluster dispersion to intra-cluster dispersion.
[0056] Specifically, this invention uses the DBI algorithm to determine the number of clusters, and the specific process is as follows:
[0057] First, the i-th type L i The j-th sample and the cluster center c i The average distance between them is defined as:
[0058]
[0059] Among them, S i Let |L| represent the average intra-class distance of the i-th class. i | represents the number of samples in the i-th class, x j Let L represent the j-th sample. i Let ||x| represent the cluster center of the i-th class. j -Li || represents the Euclidean distance between the j-th sample and the i-th cluster center.
[0060] Secondly, the distance between class i and class j is:
[0061] M ij =||c i -c j || 2 ;
[0062] Among them, M ij c represents the distance between the cluster centers of the i-th and j-th clusters. i and c j Let represent the cluster centers of the i-th and j-th classes, respectively, and ||·|| represent the Euclidean distance norm.
[0063] Then, calculate DBI:
[0064]
[0065] Where DBI(k) represents the Davidson-Borgin index when the number of clusters is k, k represents the number of clusters, and S i and S j Let M represent the intra-class average distances of the i-th and j-th classes, respectively. ij Max represents the distance between the cluster centers of the i-th and j-th clusters. j≠i This indicates that for the i-th class, the maximum ratio with all other classes is taken.
[0066] Finally, calculate the DBI for each cluster number. The optimal number of clusters is when the DBI value is minimized.
[0067] In one alternative implementation, the application of a heuristic optimization algorithm to determine the initial cluster centers of the clustering algorithm can also employ a particle swarm optimization (PSO) algorithm, which uses the position and velocity update mechanism of particles to search for the optimal cluster center location by simulating the foraging behavior of bird flocks.
[0068] In another alternative implementation, the application of a heuristic optimization algorithm to determine the initial cluster centers of the clustering algorithm can also employ a genetic algorithm (GA) to optimize the selection of cluster centers by simulating the biological evolution process through selection, crossover, and mutation operations.
[0069] Specifically, the Harris Eagle algorithm is used to determine the initial cluster centers, and the HHO algorithm uses the Harris Eagle as a candidate solution and the prey as the optimal solution.
[0070] In an embodiment of the present invention, the application of the heuristic optimization algorithm includes: initializing a candidate solution population; iteratively updating the position of individuals in the candidate solution population according to a preset exploration phase update mechanism and a development phase update mechanism; and determining the initial cluster center from the candidate solution population based on a preset fitness function.
[0071] First, during the exploration phase, the eagle's location is:
[0072]
[0073] Where X(t+1) represents the eagle's position in the (t+1)th iteration, and p represents a random number controlling the eagle's behavior pattern. When p ≥ 0.5, it means the eagle is perched on a random tall tree; when p < 0.5, it means the eagle is perched near other individuals or prey. rand X(t) represents the random individual position at the t-th iteration, and X(t) represents the individual position at the t-th iteration. rabbit (t) represents the prey position at the t-th iteration, X ave (t) represents the average position of the current population at the t-th iteration, UB and LB are the upper and lower boundaries of the search domain, respectively, N is the population size, and m1, m2, m3, and m4 are random numbers following a uniform distribution. X i (t) represents the position of the i-th individual in the t-th iteration.
[0074] During the development phase, the eagle begins its hunt, and the prey attempts to escape. The prey's energy during the escape can be expressed as:
[0075] E = 2E0(1-t / T);
[0076] Where E represents the energy of the prey in the t-th iteration, E0 is the initial value of the prey's energy, t is the current iteration number, and T is the maximum iteration number.
[0077] A random number is used to describe whether the prey can escape capture. u < 0.5 indicates that the prey successfully escaped; otherwise, it means the prey did not escape. The specific update formula is:
[0078] ① When u≥0.5 and |E|≥0.5, the eagle's position is updated as follows:
[0079] X(t+1)=ΔX(t)-E|JX rabbit (t)-X(t)|;
[0080] Where, ΔX(t)=X rabbit (t)-X(t) represents the position difference vector between the prey and the eagle, J=rand(0,2) represents a random number between 0 and 2, J is the random jump intensity when the prey escapes, and $|E|$ represents the absolute value of the prey's energy.
[0081] ②When u≥0.5 and |E|<0.5, the eagle's position is updated as follows:
[0082] X(t+1)=X rabbit (t)-E|ΔX(t)|
[0083] ③ When u < 0.5 and |E| ≥ 0.5, the eagle's position is updated as follows:
[0084]
[0085] ④ When u < 0.5 and |E| < 0.5, the eagle's position is updated as follows:
[0086]
[0087] Where Y and Z represent candidate new positions, D is the dimension, i.e. the dimension of the problem, S is a D-dimensional random vector, f is the fitness function used to evaluate the quality of the solution, Levy(D) is the D-dimensional Levy flight function, f(Y) and f(Z) represent the fitness values of positions Y and Z, respectively, and f(X(t)) represents the fitness value of the current position.
[0088] In an alternative implementation, the fitness function may also use the silhouette coefficient as an evaluation criterion, and the optimal cluster center position is determined by maximizing the silhouette coefficient value, thereby improving the separation and compactness of the clusters.
[0089] Based on the above clustering algorithm, users can be divided into N categories according to their electricity consumption characteristics, where N represents the number of clusters, mainly including:
[0090] 1. High-value customers: The electricity consumption characteristics of this group of users are mainly characterized by high electricity consumption, low average electricity price, high electricity consumption growth rate, and small fluctuation range of electricity consumption (coefficient of variation).
[0091] 2. High-potential customers: The electricity consumption characteristics of this group of users are mainly characterized by low electricity consumption, high electricity consumption growth rate, and large fluctuation range of electricity consumption (coefficient of variation).
[0092] 3. Low-value customers: The electricity consumption characteristics of this group of users are mainly characterized by low electricity consumption, low electricity consumption growth rate, and large fluctuation range of electricity consumption (coefficient of variation).
[0093] 4. Ordinary users: Ordinary electricity consumption is characterized by moderate electricity consumption, moderate average electricity price, low electricity consumption growth rate, and small fluctuation range (coefficient of variation).
[0094] 5. Other: Other N-4 categories of electricity consumption behavior. This category will need to be mapped to specific data representation formats.
[0095] In one alternative implementation, the electricity consumption behavior profile can also be constructed by combining external characteristics such as industry attributes, geographical location, and user scale to form a multi-dimensional user profile tag system, thereby improving the accuracy and practicality of the profile.
[0096] In this embodiment of the invention, step S300 determines a target time period and at least two research subjects based on a preset research event or research objective; the research subjects include user groups or individual users.
[0097] This invention can be used to explore the linkage between major events and corporate electricity consumption behavior. Specifically, it can explore the linkage between major events and the electricity consumption of upstream, midstream, and downstream enterprises in the same industrial chain, and it can explore the linkage between major events and the electricity consumption of enterprises in different groups.
[0098] Specifically, in terms of time selection, the target time period is selected. For example, if the goal is to explore the impact of the linkage of enterprise electricity consumption behavior under infectious diseases, the time period is the start and end time of the infectious disease outbreak; if the goal is to explore the impact of the linkage of enterprise electricity consumption behavior under structural transformation, the time point is before and after the structural transformation; if the goal is to explore the impact of a certain policy on the linkage of enterprise electricity consumption behavior, the time point is the time of policy release.
[0099] In one alternative implementation, the target time period can be selected based on the life cycle of the event's impact, including different time windows such as the event expectation stage, the event occurrence stage, and the event recovery stage, in order to comprehensively analyze the dynamic impact process of the event on electricity consumption behavior.
[0100] Specifically, in terms of the selection of research subjects, if the goal is to explore the electricity consumption linkage between upstream, midstream and downstream enterprises in the industrial chain, the electricity consumption of three (or more) upstream, midstream and downstream enterprises in the same cluster group should be selected; if the goal is to explore the electricity consumption linkage between different electricity consumption groups, the electricity consumption of different groups should be selected.
[0101] In one alternative implementation, the selection of research subjects can also be based on spatial geographic location, selecting user groups from different industries within the same region to analyze the impact of regional events on the linkage of local electricity consumption behavior.
[0102] In this embodiment of the invention, in step S400, a semi-parametric additive model is constructed based on the user electricity consumption characteristics of at least two research subjects within the target time period, and the linkage of electricity consumption behavior between at least two research subjects is determined based on the semi-parametric additive model.
[0103] Before establishing the linkage model, we first need to explore the correlation between the data:
[0104] In exploring linear correlation, the Pearson correlation coefficient method is used to investigate the linear relationship between data and to explore pairwise relationships between features. The formula for calculating the Pearson correlation coefficient is:
[0105]
[0106] Where, r X,Y The Pearson correlation coefficient between variables X and Y is represented by x. i and y i Let X and Y represent the i-th observations, respectively. and These are the sample means of variables X and Y, respectively. The numerator represents the covariance of X and Y, and the denominator represents the product of the standard deviations of the two variables. The correlation coefficient ranges from -1 to 1. The closer the value is to 1, the stronger the positive correlation; the closer the value is to -1, the stronger the negative correlation; and the closer the value is to 0, the weaker the correlation.
[0107] In investigating nonlinear correlations, the Spearman rank correlation coefficient method is used to explore nonlinear relationships between data. This method is suitable for data that are not normally distributed, have a skewed distribution, or exhibit nonlinear relationships. The formula for calculating the Spearman rank correlation coefficient is:
[0108]
[0109] Where ρ represents the Spearman rank correlation coefficient, d i It is the difference in rank between each pair of observations on the two variables, where n is the sample size. This represents the square of the rank difference between the i-th pair of observations. The correlation coefficient ranges from [-1, 1], with positive values indicating a positive correlation and negative values indicating a negative correlation. The p-value is determined using a z-test or t-test. The p-value is compared to the pre-set significance level; if the p-value is less than the significance level, a non-linear relationship is considered to exist between the variables.
[0110] In an alternative implementation, data correlation exploration can also employ the mutual information method to quantify nonlinear dependencies between variables, which is suitable for more complex data distribution scenarios.
[0111] In an embodiment of the present invention, the semi-parametric additive model represents the electricity consumption of the target research object as a sum of a time trend function, an electricity growth rate function of other research objects, an electricity consumption function of other research objects, and a random error term.
[0112] This invention utilizes a semi-parametric additive model to explore the inter-user electricity consumption linkages. The general form of the model is as follows:
[0113]
[0114] Among them, y t This represents the electricity consumption of the target research object at time t. g(z t ) and m(x t Let be smooth functions in Hilbert space, and let be the time function, the charge growth rate function, and the charge function, respectively. Let ε t Let be the random error term at time t, satisfying the condition that the expected value is 0 and the conditional variance is a constant σ. 2 , that is E(ε t |z t ,x t ) = 0, Where E(·) denotes the expectation operator.
[0115] This represents the influence of the variable over time, where n represents the sample size. This represents a standardized time variable, with a value range of [value range missing]. g(z t The ) represents the impact of the electricity consumption growth rate, z t This refers to the electricity generation rate at time t. m(x) t The symbol ) represents the impact of electricity consumption, x t This refers to the electricity consumption at time t.
[0116] In an alternative implementation, the semi-parametric additive model can also incorporate a seasonal effect function and an outlier detection mechanism, through s(season) t The item captures seasonal fluctuations in electricity consumption behavior, where season t This represents the seasonality index at time t, improving the model's ability to fit periodic changes.
[0117] In an embodiment of the present invention, the construction of a semi-parametric additive model includes: setting the time trend function, the electricity growth rate function, and the electricity consumption function as smooth functions in Hilbert space, and using the orthogonal series method to expand each smooth function into a linear combination of a set of predetermined basis functions and their corresponding coefficients; and using ordinary least squares to estimate the coefficients of the semi-parametric additive model based on the series expansion results, thereby obtaining estimates of each function.
[0118] Using the orthogonal series method to select basis functions, β(·), g(·), and m(·) have the following orthogonal series expansions:
[0119]
[0120] in, p j (z), l j(x) represent the orthogonal basis functions of the corresponding function, j is the index of the basis function, and c 1,j c 2,j c 3,j Here are the corresponding coefficients, and k1, k2, and k3 are the cutoff parameters for the three functions, respectively. To truncate the error term, r represents the standardized time variable, z represents the electricity consumption growth rate variable, and x represents the electricity consumption variable.
[0121] By combining the OLS method, the parameters are estimated, and the function estimator is obtained:
[0122]
[0123] in, These are estimators for the time function, the electricity consumption growth rate function, and the electricity consumption function, respectively. These are the corresponding basis function vectors. Let $'$ be the coefficient vector estimated by the OLS method, where $'$ denotes the vector transpose.
[0124] In an alternative implementation, parameter estimation can also employ ridge regression or LASSO regression methods, which control the complexity of the model by introducing regularization terms to avoid overfitting, and are particularly suitable for cases with small sample sizes or high feature dimensions.
[0125] In an embodiment of the present invention, the construction of a semi-parametric additive model further includes: determining the truncation parameters k1, k2, and k3 in the orthogonal series expansion using a generalized cross-validation method, wherein the generalized cross-validation method determines the truncation parameters by minimizing the generalized cross-validation value GCV(k).
[0126] The estimation of the semi-parametric additive model described above requires first selecting an appropriate cutoff parameter k value, which is closely related to the model's performance. A k value that is too low will result in insufficient fitting accuracy and poor model performance; while a k value that is too high will lead to overfitting, making the model less smooth and also reducing the model's degrees of freedom and increasing its computational complexity.
[0127] This invention uses generalized cross-validation (GCV) to determine the value of k. The formula for calculating GCV(k) is as follows:
[0128]
[0129] Where GCV(k) represents the generalized cross-validation value with a cutoff parameter of k, n is the sample size, k = k1 + k2 + k3 represents the total cutoff parameter, and y t This represents the actual electricity consumption of the target research object at time t. This represents the estimated electricity consumption of the target research object at time t obtained through the semi-parametric additive model. The optimal estimate of the value of k is... That is, choose the value of k that minimizes GCV(k). At this point, k1, k2, and k3 are the optimal cutoff parameters for the model.
[0130] In an alternative implementation, the k-value selection can also employ the Akaike Information Criterion (AIC) or the Bayesian Information Criterion (BIC) to determine the optimal cutoff parameter by balancing model fit goodness and complexity.
[0131] Taking the study of infectious diseases and the interconnectedness of electricity consumption among upstream, midstream, and downstream enterprises as an example, the study period is from January 2021 to December 2022. The research subjects are selected from all upstream, midstream, and downstream enterprises within the same industrial chain within the same group, calculating their electricity consumption and growth rate. Specifically, the monthly electricity consumption and growth rate are calculated for all upstream enterprises (Category A), all midstream enterprises (Category B), and all downstream enterprises (Category C).
[0132] ① Linearity test of data: The Pearson correlation coefficient method was used to test the linear correlation among six variables: monthly electricity consumption of upstream enterprises in category A, monthly electricity consumption growth rate of upstream enterprises in category A, monthly electricity consumption of midstream enterprises in category B, monthly electricity consumption growth rate of midstream enterprises in category B, monthly electricity consumption of downstream enterprises in category C, and monthly electricity consumption growth rate of downstream enterprises in category C.
[0133] ② Test for nonlinear relationships in the data: Spearman's rank correlation coefficient method was used to test the nonlinear correlation among the six variables: monthly electricity consumption of upstream enterprises in category A, monthly electricity consumption growth rate of upstream enterprises in category A, monthly electricity consumption of midstream enterprises in category B, monthly electricity consumption growth rate of midstream enterprises in category B, monthly electricity consumption of downstream enterprises in category C, and monthly electricity consumption growth rate of downstream enterprises in category C.
[0134] ③ Construction of semi-parametric additive models: Construct semi-parametric additive models for upstream, midstream, and downstream enterprises, as follows:
[0135]
[0136] Where i represents the division of different stages, in this example the period of the infectious disease outbreak, i.e., from January 2021 to December 2022, t represents the time index, and y represents the time index. i,jt z represents the electricity consumption of enterprise j in stage i at time t. i,jt Let x represent the electricity consumption growth rate of enterprise type j in stage i at time t. i,jt Let n represent the electricity consumption of enterprise j in stage i at time t. i This represents the sample size in the i-th stage.
[0137] Specifically, for the first model, y i,1t x i,2t x i,3t z i,2t z i,3t These represent the electricity consumption of upstream enterprises, midstream enterprises, and downstream enterprises during the same period, as well as the growth rate of midstream enterprise electricity consumption and the growth rate of downstream enterprise electricity consumption; for the second model, y i,2t x i,1t x i,3t z i,1t z i,3t These represent the electricity consumption of midstream enterprises, upstream enterprises, and downstream enterprises during the same period, as well as the growth rate of upstream enterprise electricity consumption and the growth rate of downstream enterprise electricity consumption. For the third model, y i,3t x i,1t x i,2t z i,1t z i,2t These represent the electricity consumption of downstream enterprises, upstream enterprises, midstream enterprises, the growth rate of electricity consumption of upstream enterprises, and the growth rate of electricity consumption of midstream enterprises during the same period.
[0138] ④ Model parameter estimation: The orthogonal series method is used to expand and estimate the model.
[0139] ⑤ Model k-value selection: The generalized cross-validation (GCV) method is used to determine the k-value.
[0140] ⑥ Model fitting.
[0141] The model fitting results can intuitively reveal the interconnected changes in electricity consumption behavior among upstream, midstream, and downstream enterprises. The research events and subjects can be flexibly selected based on actual needs.
[0142] For example, in power system dispatch optimization, when abnormal fluctuations in the electricity load of upstream enterprises are detected, the power dispatch system can predict the load change trends of midstream and downstream enterprises based on a linkage model, and adjust the power generation plan and power flow distribution of the grid in advance to ensure the safe and stable operation of the power system. For instance, when the electricity load of steel enterprises drops significantly, the system can predict the corresponding changes in the load of automobile manufacturing enterprises and optimize the power flow dispatch of the regional power grid.
[0143] Regarding improving load forecasting accuracy, a linkage model can be used to construct a multivariate joint forecasting model by using electricity consumption data from enterprises in the industrial chain as mutual forecasting features, significantly improving the accuracy of load forecasting. During emergencies, load changes of related enterprises can be quickly extrapolated based on known changes in enterprise electricity consumption.
[0144] In terms of power system stability analysis, the linkage model can identify key load nodes in the power system. When certain key users experience anomalies, it can quickly assess the degree of impact on the stability of the entire regional power grid, providing data support for system protection strategies.
[0145] In one alternative implementation, linkage analysis can also quantify the dynamic impact path and duration of changes in the electricity consumption behavior of one research subject on other research subjects through impulse response functions, providing a more intuitive explanation of linkage relationships.
[0146] Example 3, the third embodiment of the present invention, differs from the previous two embodiments in that: if the function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0147] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0148] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0149] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0150] Example 4 is the fourth embodiment of the present invention. This embodiment provides an electricity consumption behavior analysis system based on a semi-parametric additive model, including...
[0151] The feature construction module is used to obtain electricity consumption data and electricity price data of at least one user, and to construct user electricity consumption features based on the electricity consumption data and electricity price data;
[0152] The user segmentation module is used to use clustering algorithms to segment users based on their electricity consumption characteristics and determine the user group to which each user belongs and the corresponding electricity consumption behavior profile.
[0153] The target selection module is used to determine the target time period and at least two research subjects based on the preset research event or research objective. The research subjects may include user groups or individual users.
[0154] The linkage analysis module is used to construct a semi-parametric additive model based on the electricity consumption characteristics of at least two research subjects within a target time period, and to determine the linkage of electricity consumption behavior between at least two research subjects based on the semi-parametric additive model.
[0155] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method for analyzing electricity consumption behavior based on a semi-parametric additive model, characterized in that: include, Obtain electricity consumption data and electricity price data for at least one user, and construct user electricity consumption characteristics based on the electricity consumption data and the electricity price data; Clustering algorithms are used to group users based on their electricity consumption characteristics, and to determine the user group to which each user belongs and the corresponding electricity consumption behavior profile. Based on the preset research event or research objective, determine the target time period and at least two research subjects; the research subjects may include user groups or individual users. Based on the user electricity consumption characteristics of at least two research subjects within the target time period, a semi-parametric additive model is constructed, and the linkage of electricity consumption behavior between at least two research subjects is determined based on the semi-parametric additive model.
2. The electricity consumption behavior analysis method based on a semi-parametric additive model as described in claim 1, characterized in that: The user electricity consumption characteristics include at least one of the following: electricity consumption characteristics, electricity consumption growth rate characteristics, average electricity price characteristics, and electricity consumption coefficient of variation characteristics.
3. The electricity consumption behavior analysis method based on a semi-parametric additive model as described in claim 2, characterized in that: The method of using clustering algorithms to group users includes: The number of clusters in the clustering algorithm is determined based on the clustering effectiveness evaluation index. Furthermore, a heuristic optimization algorithm is applied to determine the initial cluster centers of the clustering algorithm in order to obtain the user grouping results.
4. The electricity consumption behavior analysis method based on a semi-parametric additive model as described in claim 3, characterized in that: The application heuristic optimization algorithm includes: Initialize the candidate solution population; The positions of individuals in the candidate solution population are iteratively updated according to the preset exploration phase update mechanism and development phase update mechanism; The initial cluster centers are determined from the candidate solution population based on a preset fitness function.
5. The electricity consumption behavior analysis method based on a semi-parametric additive model as described in claim 4, characterized in that: The semi-parametric additive model represents the electricity consumption of the target research object as a sum of a time trend function, an electricity growth rate function of other research objects, an electricity consumption function of other research objects, and a random error term.
6. The electricity consumption behavior analysis method based on a semi-parametric additive model as described in claim 5, characterized in that: The construction of the semi-parametric additive model includes: The time trend function, the electricity growth rate function, and the electricity consumption function are set as smooth functions in Hilbert space, and the orthogonal series method is used to expand each smooth function into a linear combination of a set of predetermined basis functions and corresponding coefficients. Furthermore, using ordinary least squares, based on the series expansion results, the coefficients of the semiparametric additive model are estimated to obtain the estimators of each function.
7. The electricity consumption behavior analysis method based on a semi-parametric additive model as described in claim 6, characterized in that: The construction of the semi-parametric additive model also includes: The truncation parameters k1, k2, and k3 in the orthogonal series expansion are determined using the generalized cross-validation method. The generalized cross-validation method determines these parameters by minimizing the generalized cross-validation value GCV(k), and the formula for calculating GCV(k) is as follows: Where n is the sample size, k represents the total cutoff parameter and k = k1 + k2 + k3; the best estimator of the value of k is At this point, k1, k2, and k3 are the optimal cutoff parameters for the model; y t This represents the actual electricity consumption of the target research object at time t. This represents the estimated electricity consumption of the target research object at time t, obtained through the semi-parametric additive model.
8. A power consumption behavior analysis system based on a semi-parametric additive model, employing the power consumption behavior analysis method based on a semi-parametric additive model as described in any one of claims 1 to 7, characterized in that, include: The feature construction module is used to acquire electricity consumption data and electricity price data of at least one user, and construct user electricity consumption features based on the electricity consumption data and the electricity price data; The user grouping module is used to use a clustering algorithm to group users according to their electricity consumption characteristics, and to determine the user group to which each user belongs and the corresponding electricity consumption behavior profile. The target selection module is used to determine a target time period and at least two research subjects based on a preset research event or research objective. The research subjects may include a user group or a single user. The linkage analysis module is used to construct a semi-parametric additive model based on the user electricity consumption characteristics of at least two research objects within the target time period, and to determine the linkage of electricity consumption behavior between the at least two research objects based on the semi-parametric additive model.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the electricity consumption behavior analysis method based on a semi-parametric additive model as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the electricity consumption behavior analysis method based on a semi-parametric additive model as described in any one of claims 1 to 7.