A method and system for predicting power consumption driven by user graph considering nonlinear behavior
By constructing a dynamic user similarity map and using graph attention network to capture nonlinear relationships, combined with time series models, the problem that traditional methods are difficult to capture nonlinear relationships in user electricity consumption behavior is solved, and more accurate and robust power prediction is achieved.
Patent Information
- Application Number
- CN202510152963.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-12
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2045-02-12
AI Technical Summary
Traditional linear models and simple time series methods are difficult to accurately capture the interaction between nonlinear relationships and multidimensional data in user electricity consumption behavior, resulting in insufficient accuracy and robustness of power load prediction.
A user graph driving power prediction method that considers nonlinear behavior is adopted. By obtaining user historical electricity consumption data, meteorological time data, user portrait data and time feature data, a dynamic user similarity map is constructed, and a graph attention network is used to capture the nonlinear relationship between the user and its neighbor nodes, combining the time series model to obtain the characteristics of meteorological time data, and finally a power prediction model is constructed to obtain the user's power prediction value.
It realizes all-round modeling of user electricity consumption behavior, significantly improves the accuracy and robustness of power prediction, can dynamically update the relationship between users, and flexibly handle changes in user behavior.
Smart Images

Figure CN119623773B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of power forecasting, and in particular to a user graph driven power forecasting method and system considering nonlinear behavior. Background Art
[0002] In modern energy systems, with the rapid growth of electricity demand and the widespread access to renewable energy, power load forecasting has become particularly important. Accurate power forecasting can not only improve the efficiency of power grid operation, but also optimize energy distribution and promote energy conservation and emission reduction. However, the individual electricity consumption behavior of users is complex and diverse, and is affected by dynamic changes in meteorological conditions, time patterns, and socio-economic factors, which increases the difficulty of the forecasting model. Traditional linear models and simple time series methods are difficult to accurately capture the nonlinear relationships and interactions of multidimensional data in user electricity consumption behaviors. Summary of the invention
[0003] In order to solve the above problems, the purpose of the present invention is to provide a user graph-driven electricity consumption prediction method and system considering nonlinear behavior, so as to achieve all-round modeling of user electricity consumption behavior and significantly improve the accuracy and robustness of the prediction.
[0004] To achieve the above object, the present invention adopts the following technical solutions:
[0005] A user graph driven power prediction method considering nonlinear behavior includes the following steps:
[0006] S1: Obtain user historical electricity consumption data, meteorological time data, user portrait data and time feature data, and pre-process them;
[0007] S2: Build a dynamic user similarity graph, where nodes represent users and edge weights represent the behavioral similarity between users;
[0008] S3: Based on the user dynamic similarity graph, a graph attention network is used to capture the nonlinear relationship between users and their neighbor nodes and generate graph embedding features;
[0009] S4: using a time series model based on meteorological time data to obtain time series characteristics of meteorological time data;
[0010] S5: Build a power forecasting model based on the acquired graph embedding features and meteorological time data series features, combined with user portrait data and time feature data, to obtain the final user power forecast value.
[0011] Furthermore, S1 is specifically:
[0012] Obtain user historical electricity consumption data, weather time data, user portrait data and time characteristic data;
[0013] Align the user's historical electricity consumption data, meteorological time data, and time feature data by timestamp to ensure that all features have the same time granularity;
[0014] Interpolation synchronization: If the time granularity of meteorological time data or historical electricity consumption data is different, interpolate the low-frequency data;
[0015] Standardize the user's historical electricity consumption data, meteorological environment data and time characteristic data to eliminate dimensional differences;
[0016] Label encoding of category features in user portrait data.
[0017] Furthermore, S2 is specifically:
[0018] Construct a user similarity graph, which is represented by an undirected graph G=(V,E):
[0019] Where V represents the user set, each user i∈V is a node in the graph; E represents the edge set between users, and the edge weight W ij represents the behavioral similarity between users i and j;
[0020] Each user is represented as a feature vector, and the feature vector of user i is F i : F i =[F i,use ,F i,cyc ,F i,env ];
[0021]
[0022] Among them, F i,use F is the electricity consumption behavior feature, describing the static attributes of the user; i,cyc F is the behavioral pattern characteristic; i,env for environmental and temporal characteristics; are the mean, standard deviation, peak, valley and coefficient of variation of electricity consumption of user i respectively; are the daily fluctuation and weekly fluctuation of user i respectively; They are the daily average temperature difference, humidity level, weekends and holidays One-Hot coding marks;
[0023] The edge weight W is calculated using the cosine similarity between feature vectors. ij :
[0024] ;
[0025] Among them, F j is the feature vector of user j;
[0026] For new users, the nearest neighbor algorithm is used to estimate features, and after adding a node, the similarity between it and existing users is calculated to update the graph and dynamically adjust the weight of the edge;
[0027] Based on the user similarity graph, a time update mechanism is introduced to dynamically adjust the graph and construct a user dynamic similarity graph.
[0028] Furthermore, a time update mechanism is introduced to dynamically adjust the graph and construct a user dynamic similarity graph, as follows:
[0029] Use sliding window method to regularly update the user node feature F at time t i (t), for users who have not been updated, delete their nodes and edges;
[0030] For new users, the nearest neighbor algorithm is used to estimate features. After adding a node, the similarity between the new node and the existing user is calculated and updated. Based on the new user feature F new and existing user features {F1, F2, ..., F i ,...,F n}, calculate the behavior similarity between each pair of users and update the adjacency matrix A t ; Insert the similarity of the newly added users into the adjacency matrix A t , get the updated adjacency matrix A t+1 :
[0031] ;
[0032] Among them, W new,1:n is the similarity weight vector between the new user and all existing users; A t+1 is the adjacency matrix at time t+1;
[0033] Get the dynamic user similarity graph G t =(V t ,E t ), including the dynamic adjacency matrix A t and the user's feature vector F t .
[0034] Furthermore, the graph attention network is used to input the dynamic user similarity graph and node features and obtain the graph embedding features of each node, as follows:
[0035] First, the feature vector F of each node i i Perform a linear transformation and map it to the new feature space:
[0036] ;
[0037] Among them, h iis the transformed feature of node i; W is the weight matrix;
[0038] For each pair of adjacent user nodes i and j in the graph, calculate the similarity score:
[0039] ;
[0040] Among them, e ij is the correlation score between node i and node j; a is a learnable attention vector; LeakyReLU is the activation function; h j is the transformed feature of node j;
[0041] Normalize the neighboring nodes of node i to ensure that the sum of weights is 1:
[0042] ;
[0043] in, is the normalized attention weight; is the set of neighbor nodes of node i; is the index of the neighbor node of node i;
[0044] Using attention weights and the features of neighboring nodes, generating nodes i Graph embedding features of:
[0045] ;
[0046] Among them, z i is the graph embedding feature of node i; σ is the activation function;
[0047] Use multiple attention heads for each node to obtain different embedding features, and concatenate them to obtain the final graph embedding features:
[0048]
[0049] Among them, K is the number of attention heads; is the final embedding feature of node i, is the concatenation of the embedded features of each head; It means concatenating the features of all K attention heads.
[0050] Furthermore, S4 is specifically:
[0051] The meteorological time data W(t) includes L meteorological variables:
[0052] ;
[0053] in, is the value of the lth meteorological variable at time t;
[0054] The Transformer model captures the global dependencies of meteorological time data through a multi-layer attention mechanism and feed-forward neural network:
[0055] The meteorological time data W(t) of each time step is mapped to a feature space of fixed dimension d through linear transformation:
[0056] ;
[0057] Among them, W e, b e are the weight and bias of feature embedding respectively; Embed the meteorological features at time step t; and add position encoding for each time step ;
[0058] Add the meteorological feature embedding and position encoding to get the input of Transformer;
[0059] ;
[0060] Use a sliding window approach to divide the meteorological time data into fixed-length input segments:
[0061] ;
[0062] Where C is the window size; Input of meteorological time data within the time window;
[0063] based on Compute the query Q, key at each time step The sum V matrix:
[0064] ;
[0065] Among them, W Q , ,W V is the weight matrix;
[0066] Calculate the attention weights:
[0067] ;
[0068] Among them, softmax is a normalization operation; d k is the scaling factor;
[0069] Use h independent attention heads, each of which computes an independent attention output; at each time step, apply a two-layer feedforward neural network to process the output of the attention mechanism; add residual connections and layer normalization after the multi-head attention and feedforward networks, respectively;
[0070] After passing through the multi-layer Transformer encoder, the meteorological time data sequence features are obtained .
[0071] Furthermore, S5 is specifically:
[0072] Based on the acquired graph embedding features and meteorological time data sequence features, combined with user portrait data and time feature data, the input vector of the power forecasting model is formed:
[0073] ;
[0074] in, For users The fused feature input at time t; For users Graph embedding features, user portrait data, and time feature data; is the characteristic of meteorological time data series;
[0075] A multi-layer perceptron is used to model the fusion features and finally output the user's power prediction value. The multi-layer perceptron uses an M-layer fully connected network to extract nonlinear features, and an activation function is added to each layer:
[0076]
[0077] in, and are the weight and bias of the mth layer of the fully connected network respectively;
[0078] Finally, the user's power prediction value is output through the output layer :
[0079] ;
[0080] in, , are the output weight and bias respectively;
[0081] During the training process, the mean square error is used as the loss function to minimize the error between the predicted value and the true value:
[0082] ;
[0083] in, is the number of users; For users The actual user power at time t; T is the training time;
[0084] The AdamW optimizer is used to reduce overfitting, and Dropout regularization is added to the hidden layers in the multi-layer perceptron.
[0085] Furthermore, the AdamW optimizer is used to reduce overfitting, as follows:
[0086] Set the hyperparameters of the AdamW optimizer, including the learning rate η, momentum coefficients β1, β2, and smoothing coefficients , weight decay coefficient λ;
[0087] Weight update at each step:
[0088] Calculating Losses and its gradient , θ t is the current parameter weight; represents the partial derivative operation;
[0089] Calculate the first-order momentum estimate m in turn according to the formula t and the second-order momentum estimate v t ;
[0090] ;
[0091] ;
[0092] in, β 1 is the first-order momentum decay coefficient; β 2 is the decay coefficient of the second-order momentum;
[0093] Correct the first-order momentum and second-order momentum according to the bias correction formula:
[0094] ;
[0095] in, and are the corrected first-order momentum and second-order momentum respectively;
[0096] Update parameter weights:
[0097] ;
[0098] Set different weight decay strengths for different features to avoid uneven impact on features.
[0099] A user graph driven power prediction system considering nonlinear behavior includes a processor, a memory, and a computer program stored in the memory. When the processor executes the computer program, it specifically performs the steps in the user graph driven power prediction method considering nonlinear behavior as described above.
[0100] A computer storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the above method steps.
[0101] The present invention has the following beneficial effects:
[0102] 1. The present invention comprehensively captures the complexity and dynamic changes of users' electricity consumption behaviors through multi-source data fusion, graph modeling and deep learning technology, realizes all-round modeling of users' electricity consumption behaviors, and can significantly improve the accuracy and robustness of predictions;
[0103] 2. The construction scheme of the dynamic user similarity graph of the present invention integrates electricity consumption time series data, user portrait information and external characteristics, can dynamically update the relationship between users, flexibly handle changes in user behavior, and estimate the characteristics of new users through the nearest neighbor algorithm, calculate their similarity with existing users, dynamically adjust the structure and weight of the user graph, and realize the dynamic update of user behavior characteristics and adjacency matrix;
[0104] 3. The present invention captures the nonlinear relationship between users through GAT, dynamically adjusts the relationship weights between neighbor nodes and central nodes, generates graph embedding features with stronger expressive power, and combines with dynamic user similarity graphs to quickly adapt to dynamic changes in user behavior and graph structure, providing a comprehensive user graph embedding representation for power prediction tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0105] Figure 1 The figure is a flow chart of the method of the present invention. DETAILED DESCRIPTION
[0106] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments:
[0107] refer to Figure 1 In this embodiment, a method for predicting power consumption driven by a user graph considering nonlinear behavior is provided, comprising the following steps:
[0108] S1: Obtain user historical electricity consumption data, meteorological time data, user portrait data and time feature data, and pre-process them;
[0109] S2: Build a dynamic user similarity graph, where nodes represent users and edge weights represent the behavioral similarity between users;
[0110] S3: Based on the user dynamic similarity graph, a graph attention network is used to capture the nonlinear relationship between users and their neighbor nodes and generate graph embedding features;
[0111] S4: using a time series model based on meteorological time data to obtain meteorological time data sequence characteristics;
[0112] S5: Build a power forecasting model based on the acquired graph embedding features and meteorological time data series features, combined with user portrait data and time feature data, to obtain the final user power forecast value.
[0113] In this embodiment, S1 is specifically:
[0114] Obtain user historical electricity consumption data, weather time data, user portrait data and time characteristic data;
[0115] Align the user's historical electricity consumption data, meteorological time data, and time feature data by timestamp to ensure that all features have the same time granularity (such as hourly or daily level);
[0116] Interpolation synchronization: If the time granularity of meteorological time data or historical electricity consumption data is different (e.g., meteorological time data is at the hour level, and historical electricity consumption data is at the 15-minute level), interpolate the low-frequency data;
[0117] Standardize the user's historical electricity consumption data, meteorological environment data and time characteristic data to eliminate dimensional differences;
[0118] Label encode categorical features (e.g., income level, device type) in user profile data.
[0119] In this embodiment, S2 is specifically:
[0120] Construct a user similarity graph, which is represented by an undirected graph G=(V,E):
[0121] Where V represents the user set, each user i∈V is a node in the graph; E represents the edge set between users, and the edge weight W ij represents the behavioral similarity between users i and j;
[0122] Each user is represented as a feature vector, and the feature vector of user i is F i : F i =[F i,use ,F i,cyc ,F i,env ];
[0123]
[0124] Among them, F i,useF is the electricity consumption behavior feature, describing the static attributes of the user; i,cyc F is the behavioral pattern characteristic; i,env for environmental and temporal characteristics; are the mean, standard deviation, peak, valley and coefficient of variation of electricity consumption of user i respectively; are the daily fluctuation and weekly fluctuation of user i respectively; They are the one-hot coding marks for daily average temperature difference, humidity level, weekends and holidays;
[0125] The edge weight W is calculated using the cosine similarity between feature vectors. ij :
[0126] ;
[0127] Among them, F j is the feature vector of user j;
[0128] For new users, the nearest neighbor algorithm is used to estimate features, and after adding a node, the similarity between it and existing users is calculated to update the graph and dynamically adjust the weight of the edge;
[0129] Based on the user similarity graph, a time update mechanism is introduced to dynamically adjust the graph and construct a user dynamic similarity graph.
[0130] In this embodiment, a time update mechanism is introduced to dynamically adjust the graph and construct a user dynamic similarity graph, as follows:
[0131] Use sliding window method to regularly update the user node feature F at time t i (t), for users who have not updated (the disappearance of electricity consumption records exceeds the set threshold), delete their nodes and edges;
[0132] For new users, the nearest neighbor algorithm is used to estimate features. After adding a node, the similarity between the new node and the existing user is calculated and updated. Based on the new user feature F new and existing user features {F1, F2, ..., F i ,...,F n}, calculate the behavior similarity between each pair of users and update the adjacency matrix A t ; Insert the similarity of the newly added users into the adjacency matrix A t , and get the updated A t+1 :
[0133] ;
[0134] Among them, W new,1:n is the similarity weight vector between the new user and all existing users; A t+1 is the adjacency matrix at time t+1;
[0135] Get the dynamic user similarity graph G t =(V t ,E t ), including the dynamic adjacency matrix A t and the user's feature vector F t .
[0136] In this embodiment, the graph attention network is used to input the dynamic user similarity graph and node features and obtain the graph embedding features of each node, as follows:
[0137] First, the feature vector F of each node i i Perform a linear transformation and map it to the new feature space:
[0138] ;
[0139] Among them, h i is the transformed feature of node i; W is the weight matrix;
[0140] For each pair of adjacent user nodes i and j in the graph, calculate the similarity score:
[0141] ;
[0142] Among them, e ij is the correlation score between node i and node j; a is a learnable attention vector; LeakyReLU is the activation function; h j is the transformed feature of node j;
[0143] Normalize the neighboring nodes of node i to ensure that the sum of weights is 1:
[0144] ;
[0145] in, is the normalized attention weight; is the set of neighbor nodes of node i; is the index of the neighbor node of node i;
[0146] Using attention weights and the features of neighboring nodes, generating nodes i Graph embedding features of:
[0147] ;
[0148] Among them, z i is the graph embedding feature of node i; σ is the activation function;
[0149] Use multiple attention heads for each node to obtain different embedding features, and concatenate them to obtain the final graph embedding features:
[0150]
[0151] Among them, K is the number of attention heads; is the final embedding feature of node i, is the concatenation of the embedded features of each head; It means concatenating the features of all K attention heads.
[0152] In this embodiment, S4 is specifically:
[0153] The meteorological time data W(t) includes L meteorological variables (including temperature, humidity, wind speed, etc.):
[0154] ;
[0155] in, is the value of the lth meteorological variable at time t;
[0156] The Transformer model captures the global dependencies of meteorological time data through a multi-layer attention mechanism and feed-forward neural network:
[0157] The meteorological time data W(t) of each time step is mapped to a feature space of fixed dimension d through linear transformation:
[0158] ;
[0159] Among them, W e, b e are the weight and bias of feature embedding respectively; Embed the meteorological features at time step t; and add position encoding for each time step ;
[0160] Add the meteorological feature embedding and position encoding to get the input of Transformer;
[0161] ;
[0162] Use a sliding window approach to divide the meteorological time data into fixed-length input segments:
[0163] ;
[0164] Where C is the window size; Input of meteorological time data within the time window;
[0165] based on Compute the query Q, key at each time step The sum V matrix:
[0166] ;
[0167] Among them, W Q , ,W V is the weight matrix;
[0168] Calculate the attention weights:
[0169] ;
[0170] Among them, softmax is a normalization operation; d k is the scaling factor;
[0171] Use h independent attention heads, each of which computes an independent attention output; at each time step, apply a two-layer feedforward neural network to process the output of the attention mechanism; add residual connections and layer normalization after the multi-head attention and feedforward networks, respectively;
[0172] After passing through the multi-layer Transformer encoder, the meteorological time data sequence features are obtained .
[0173] In this embodiment, S5 is specifically:
[0174] Based on the acquired graph embedding features and meteorological time data sequence features, combined with user portrait data and time feature data, the input vector of the power forecasting model is formed:
[0175] ;
[0176] in, For users The fused feature input at time t; For users Graph embedding features, user portrait data, and time feature data; is the characteristic of meteorological time data series;
[0177] A multi-layer perceptron is used to model the fusion features and finally output the user's power prediction value. The multi-layer perceptron uses an M-layer fully connected network to extract nonlinear features, and an activation function is added to each layer:
[0178]
[0179] in, and are the weight and bias of the mth layer of the fully connected network respectively;
[0180] Finally, the user's power prediction value is output through the output layer :
[0181] ;
[0182] in, , are the output weight and bias respectively;
[0183] During the training process, the mean square error is used as the loss function to minimize the error between the predicted value and the true value:
[0184] ;
[0185] in, is the number of users; For users The actual user power at time t; T is the training time;
[0186] The AdamW optimizer is used to reduce overfitting, and Dropout regularization is added to the hidden layers in the multi-layer perceptron.
[0187] In this embodiment, the AdamW optimizer is used to reduce overfitting, as follows:
[0188] Set the hyperparameters of the AdamW optimizer, including the learning rate η, momentum coefficients β1, β2, and smoothing coefficients , weight decay coefficient λ;
[0189] Weight update at each step:
[0190] Calculating Losses and its gradient , θ t is the current parameter weight; represents the partial derivative operation;
[0191] Calculate the first-order momentum estimate m in turn according to the formula t and the second-order momentum estimate v t ;
[0192] ;
[0193] ;
[0194] in, β 1 is the first-order momentum decay coefficient; β 2 is the decay coefficient of the second-order momentum;
[0195] Correct the first-order momentum and second-order momentum according to the bias correction formula:
[0196] ;
[0197] in, and are the corrected first-order momentum and second-order momentum respectively;
[0198] Update parameter weights:
[0199] ;
[0200] Set different weight decay strengths for different features (such as embedding features and time series feature processing weights) to avoid uneven impact on features.
[0201] In this embodiment, a stronger regularization is set for the hidden layer parameter weight θh, and a weaker regularization is set for the low-dimensional feature parameters (such as time feature embedding).
[0202] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0203] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0204] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0205] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0206] The above is only a preferred embodiment of the present invention, and does not limit the present invention in other forms. Any technician familiar with the profession may use the above disclosed technical content to change or modify it into an equivalent embodiment with equivalent changes. However, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the technical solution of the present invention still belongs to the protection scope of the technical solution of the present invention.
Claims
1. A user graph driven power prediction method considering nonlinear behavior, characterized in that: The following steps are involved: S1: Obtain user historical electricity consumption data, meteorological time data, user portrait data and time feature data, and pre-process them; S2: Build a dynamic user similarity graph, where nodes represent users and edge weights represent the behavioral similarity between users; S3: Based on the user dynamic similarity graph, a graph attention network is used to capture the nonlinear relationship between users and their neighbor nodes and generate graph embedding features; S4: using a time series model based on meteorological time data to obtain time series characteristics of meteorological time data; S5: Build a power forecasting model based on the acquired graph embedding features and meteorological time data series features, combined with user portrait data and time feature data, to obtain the final user power forecast value; The S2 is specifically: Construct a user similarity graph, which is represented by an undirected graph G=(V,E): Where V represents the user set, each user i∈V is a node in the graph; E represents the edge set between users, and the edge weight W ij represents the behavioral similarity between users i and j; Each user is represented as a feature vector, and the feature vector of user i is F i : F i =[F i,use ,F i,cyc ,F i,env ]; Among them, F i,use F is the electricity consumption behavior feature, describing the static attributes of the user; i,cyc F is the behavioral pattern characteristic; i,env for environmental and temporal characteristics; are the mean, standard deviation, peak, valley and coefficient of variation of electricity consumption of user i respectively; are the daily fluctuation and weekly fluctuation of user i respectively; They are the one-hot coding marks for daily average temperature difference, humidity level, weekends and holidays; The edge weight W is calculated using the cosine similarity between feature vectors. ij : ; Among them, F j is the feature vector of user j; For new users, the nearest neighbor algorithm is used to estimate features, and after adding a node, the similarity between it and existing users is calculated to update the graph and dynamically adjust the weight of the edge; Based on the user similarity graph, a time update mechanism is introduced to dynamically adjust the graph and construct a user dynamic similarity graph.
2. According to claim 1, a user graph driving power prediction method considering nonlinear behavior is characterized in that: The S1 is specifically: Obtain user historical electricity consumption data, weather time data, user portrait data and time characteristic data; Align the user's historical electricity consumption data, meteorological time data, and time feature data by timestamp to ensure that all features have the same time granularity; Interpolation synchronization: If the time granularity of meteorological time data or historical electricity consumption data is different, interpolate the low-frequency data; Standardize the user's historical electricity consumption data, meteorological environment data and time characteristic data to eliminate dimensional differences; Label encoding of category features in user portrait data.
3. According to claim 1, a user graph driving power prediction method considering nonlinear behavior is characterized in that: The time update mechanism is introduced to dynamically adjust the graph and construct a user dynamic similarity graph, as follows: Use sliding window method to regularly update the user node feature F at time t i (t), for users who have not been updated, delete their nodes and edges; For new users, the nearest neighbor algorithm is used to estimate features. After adding a node, the similarity between the new node and the existing user is calculated and updated. Based on the new user feature F new and existing user features {F1, F2, ..., F i ,...,F n }, calculate the behavior similarity between each pair of users and update the adjacency matrix A t ; Insert the similarity of the newly added users into the adjacency matrix A t , get the updated adjacency matrix A t+1 : ; Among them, W new,1:n is the similarity weight vector between the new user and all existing users; A t+1 is the adjacency matrix at time t+1; Get the dynamic user similarity graph G t =(V t ,E t ), including the dynamic adjacency matrix A t and the user's feature vector F t .
4. According to claim 1, a user graph driving power prediction method considering nonlinear behavior is characterized in that: The graph attention network is used to input the dynamic user similarity graph and node features and obtain the graph embedding features of each node, as follows: First, the feature vector F of each node i i Perform a linear transformation and map it to the new feature space: ; Among them, h i is the transformed feature of node i; W is the weight matrix; For each pair of adjacent user nodes i and j in the graph, calculate the similarity score: ; Among them, e ij is the correlation score between node i and node j; a is a learnable attention vector; LeakyReLU is the activation function; h j is the transformed feature of node j; Normalize the neighboring nodes of node i to ensure that the sum of weights is 1: ; in, is the normalized attention weight; is the set of neighbor nodes of node i; is the index of the neighbor node of node i; Using attention weights and the features of neighboring nodes, generating nodes i Graph embedding features of: ; Among them, z i is the graph embedding feature of node i; σ is the activation function; Use multiple attention heads for each node to obtain different embedding features, and concatenate them to obtain the final graph embedding features: ; Among them, K is the number of attention heads; is the final embedding feature of node i, is the concatenation of the embedded features of each head; It means concatenating the features of all K attention heads.
5. The method for predicting the user graph driving power considering nonlinear behavior according to claim 1, characterized in that: The S4 is specifically: The meteorological time data W(t) includes L meteorological variables: ; in, is the value of the lth meteorological variable at time t; The Transformer model captures the global dependencies of meteorological time data through a multi-layer attention mechanism and feed-forward neural network: The meteorological time data W(t) of each time step is mapped to a feature space of fixed dimension d through linear transformation: ; Among them, W e, b e are the weight and bias of feature embedding respectively; Embed the meteorological features at time step t; and add position encoding for each time step ; Add the meteorological feature embedding and position encoding to get the input of Transformer; ; Use a sliding window approach to divide the meteorological time data into fixed-length input segments: ; Where C is the window size; Input of meteorological time data within the time window; based on Compute the query Q, key at each time step The sum V matrix: ; Among them, W Q , ,W V is the weight matrix; Calculate the attention weights: ; Among them, softmax is a normalization operation; d k is the scaling factor; Use h independent attention heads, each of which computes an independent attention output; at each time step, apply a two-layer feedforward neural network to process the output of the attention mechanism; add residual connections and layer normalization after the multi-head attention and feedforward networks, respectively; After passing through the multi-layer Transformer encoder, the meteorological time data sequence features are obtained .
6. The method for predicting the user graph driving power considering nonlinear behavior according to claim 1, characterized in that: The S5 is specifically: Based on the acquired graph embedding features and meteorological time data sequence features, combined with user portrait data and time feature data, the input vector of the power forecasting model is formed: ; in, For users The fused feature input at time t; For users Graph embedding features, user portrait data, and time feature data; is the characteristic of meteorological time data series; A multi-layer perceptron is used to model the fusion features and finally output the user's power prediction value. The multi-layer perceptron uses an M-layer fully connected network to extract nonlinear features, and an activation function is added to each layer: in, and are the weight and bias of the mth layer of the fully connected network respectively; Finally, the user's power prediction value is output through the output layer : ; in, , are the output weight and bias respectively; During the training process, the mean square error is used as the loss function to minimize the error between the predicted value and the true value: ; in, is the number of users; For users The actual user power at time t; T is the training time; The AdamW optimizer is used to reduce overfitting, and Dropout regularization is added to the hidden layers in the multi-layer perceptron.
7. The method for predicting the user graph driving power considering nonlinear behavior according to claim 6, characterized in that: The AdamW optimizer is used to reduce overfitting, as follows: Set the hyperparameters of the AdamW optimizer, including the learning rate η, momentum coefficients β1, β2, and smoothing coefficient , weight decay coefficient λ; Weight update at each step: Calculating Losses and its gradient , θ t is the current parameter weight; represents the partial derivative operation; Calculate the first-order momentum estimate m in turn according to the formula t and the second-order momentum estimate v t ; ; ; in, β 1 is the first-order momentum decay coefficient; β 2 is the decay coefficient of the second-order momentum; Correct the first-order momentum and second-order momentum according to the bias correction formula: ; in, and are the corrected first-order momentum and second-order momentum respectively; Update parameter weights: ; Set different weight decay strengths for different features to avoid uneven impact on features.
8. A user graph driven power prediction system considering nonlinear behavior, characterized in that: It includes a processor, a memory and a computer program stored in the memory. When the processor executes the computer program, it specifically performs the steps in the user spectrum driven power prediction method considering nonlinear behavior as described in any one of claims 1-7.
Citation Information
Patent Citations
Power load curve prediction method and device based on big data, and storage medium
CN115800273A
Learable electricity selling user load prediction method considering aggregation load and correlation thereof
CN117077836A