Electricity consumption prediction method and system based on user portrait

By clustering historical data and constructing user profiles, combined with machine learning algorithms, the problem of existing technologies failing to consider user differences has been solved, enabling more accurate electricity consumption forecasting and supporting refined management and personalized services for the power system.

CN120804520APending Publication Date: 2025-10-17HUADIAN SHANDONG ENERGY SALES CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510985053.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-17
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

Existing electricity consumption forecasting methods fail to fully consider individual user characteristics and differences. As a result, when user groups are diversified and electricity consumption behaviors are complex, the forecast results cannot accurately reflect the actual electricity consumption of different users, making it difficult to meet the needs of refined management and personalized services of the power system.

Method used

By collecting historical electricity consumption and meteorological data, clustering is performed to build user profiles. A power consumption prediction model is constructed by combining machine learning algorithms to make personalized predictions for different types of users. The DTW algorithm is used to adjust the prediction results, taking into account the unique electricity consumption characteristics and behavioral changes of users.

Benefits of technology

It improves the accuracy and reliability of electricity consumption forecasting, enabling it to more accurately reflect the electricity consumption patterns and trends of different users, and supporting the refined management and personalized services of the power system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120804520A_ABST
    Figure CN120804520A_ABST
Patent Text Reader

Abstract

The invention provides an electricity consumption prediction method and system based on user portraits, and relates to the technical field of electricity consumption prediction, and the method comprises the steps: obtaining historical data, carrying out the clustering processing of the historical data, obtaining a cluster corresponding to each type of users, extracting the features of each cluster, and constructing the user portraits of the ith type of users based on the features of the ith cluster; the historical data comprises historical electricity consumption and historical meteorological data; the user portrait comprises user static attribute data and dynamic behavior data; constructing an electricity consumption prediction model, and training the electricity consumption prediction model by using historical data and the user portrait to obtain a trained electricity consumption prediction model; and inputting the real-time meteorological data, the user portrait of the current user and the real-time power consumption into the trained power consumption prediction model, and obtaining and outputting the predicted power consumption, so that the accuracy of a prediction result can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of predicting electricity consumption, and in particular to an electricity consumption prediction method and system based on user portraits. BACKGROUND

[0002] In the operation and management of power systems, accurate prediction of electricity consumption is of great significance. It not only helps power companies to reasonably arrange power generation plans and ensure the stability and reliability of power supply, but also effectively reduces the cost of power generation and improves the utilization efficiency of power resources. At present, the technology of electricity consumption prediction has made significant progress. Common prediction methods mainly include time series analysis method, regression analysis method and grey prediction method, etc.

[0003] The time series analysis method is based on the time series characteristics of historical electricity consumption data, and predicts future electricity consumption by establishing a mathematical model. This method is simple and easy to implement, and has certain prediction effect for electricity consumption data with obvious trend and seasonal changes. However, it often ignores other factors that may affect electricity consumption, such as weather conditions and user behavior, which limits the prediction accuracy in complex situations.

[0004] The regression analysis method establishes a regression model for prediction by analyzing the linear or nonlinear relationship between electricity consumption and various influencing factors. This method can consider multiple influencing factors, but requires accurate determination of the relationship between each factor and electricity consumption, and has high requirements for data integrity and accuracy. In practical applications, due to the large number of influencing factors and complex relationships between them, the construction and parameter estimation of the regression model often face great difficulties.

[0005] The grey prediction method is suitable for small sample uncertain systems, and generates cumulative data through processing to mine the internal law of the system for prediction. Although this method can handle uncertainty to some extent, for electricity consumption prediction affected by multiple factors with large fluctuations, the accuracy and stability of the prediction results still need to be improved.

[0006] The above-mentioned existing electricity consumption prediction methods can achieve prediction of electricity consumption to some extent, but most of them do not fully consider the individual characteristics and differences of users. In actual power consumption scenarios, different users have significant differences in electricity consumption patterns and electricity consumption due to their own static attributes (such as user type, electricity equipment type, electricity area, etc.) and dynamic behavior (such as electricity habit, electricity time distribution, sensitivity to weather changes, etc.).

[0007] Existing prediction methods often treat all users as a whole, using a unified model for prediction, ignoring these differences between users, resulting in prediction results that cannot accurately reflect the actual power consumption of different users, and the prediction accuracy is greatly affected. Especially in the face of the trend of user group diversification and power consumption behavior complexification, this prediction method without considering user characteristics has been difficult to meet the needs of fine management and personalized service of the power system. SUMMARY

[0008] In order to improve the accuracy of the power consumption prediction result, the application provides a power consumption prediction method and system based on user portrait.

[0009] In a first aspect, the application provides a power consumption prediction method based on user portrait, which adopts the following technical solution: A power consumption prediction method based on user portrait, comprising the following steps: Data acquisition and processing: obtaining historical data, clustering the historical data to obtain clusters corresponding to each type of user, extracting the features of each cluster respectively, and constructing the user portrait of the i-th type of user based on the features of the i-th cluster; the historical data includes: historical power consumption and historical meteorological data; the user portrait includes: user static attribute data and dynamic behavior data; Modeling and training: constructing a power consumption prediction model, training the power consumption prediction model using historical data and user portrait, and obtaining a trained power consumption prediction model; Predicting power consumption: inputting real-time meteorological data, the user portrait of the current user and real-time power consumption into the trained power consumption prediction model, obtaining and outputting the predicted power consumption.

[0010] The application first collects historical power consumption and historical meteorological data, and clusters these two types of data, which can classify users with similar power consumption characteristics into one category and obtain clusters corresponding to each type of user. Then, the application extracts the features of each cluster respectively, and constructs a user portrait based on these features. The user portrait includes user static attribute data (such as user type, power consumption equipment type, etc.) and dynamic behavior data (such as power consumption time distribution, power consumption habits, etc.), making the description of the user more comprehensive and accurate, and enabling in-depth understanding of the power consumption characteristics and needs of different types of users, providing more detailed input information for subsequent power consumption prediction models, and helping to improve the accuracy of prediction.

[0011] Subsequently, the power consumption prediction model is constructed and trained using historical data, and the application can learn the patterns and rules in the historical data. Since the users have been classified and the user portrait has been constructed in the data acquisition and processing link, the power consumption prediction model can be trained according to the characteristics of different types of users, thereby realizing personalized power consumption prediction.

[0012] Optionally, the method further comprises: drawing the power consumption fitting curve: obtaining the power consumption of the current user in a preset time length before the current time, denoted as first data, and drawing the power consumption fitting curve of the current user based on the first data; drawing the initial fitting curve: dividing the historical power consumption into power consumptions in different time periods according to a preset time window, sequentially calculating the average value of the power consumption in each time period in each preset time window, and drawing the initial fitting curve of each preset time window based on the average value; difference judgment: calculating the similarity of the power consumption fitting curve and each initial fitting curve respectively by using the DTW algorithm, recording the initial fitting curve corresponding to the maximum similarity as the similar curve, and judging whether the difference between the historical power consumption corresponding to the next preset time window of the similar curve and the predicted power consumption corresponding to the next preset time window of the similar curve is greater than a preset difference threshold, if yes, an alarm signal is sent, and if no, no processing is performed.

[0013] The fitting curve is drawn by obtaining the power consumption of the current user in a preset time window (first data) before the current time, which can focus on the recent power consumption of the user, and is helpful to capture the short-term changes and trends of the user's power consumption behavior. Subsequently, the fitting curve is drawn for the current user alone, fully considering the unique power consumption characteristics of each user. The power consumption habits and equipment composition of different users are different, and this personalized curve drawing method can more accurately describe the power consumption rules of the user, thereby improving the accuracy of subsequent analysis.

[0014] Subsequently, the historical power consumption is divided into power consumptions in different time periods according to a preset time window, and the average value of the power consumption in each time period is calculated to draw the initial fitting curve, which can mine the periodicity of the user's power consumption from the historical data. By drawing the initial fitting curve of each preset time window respectively, the power consumption rules in different time periods can be compared and analyzed, which is helpful to find out the changes of the user's power consumption mode in different time periods. Through comparison of multiple time periods, the power consumption characteristics of the user can be more comprehensively understood, and the accuracy of the similarity judgment can be improved.

[0015] The DTW (Dynamic Time Warping) algorithm is used to calculate the similarity of the power consumption fitting curve and each initial fitting curve, and the similar curve with the maximum similarity is found out, and then it is judged whether the difference between the historical power consumption corresponding to the next preset time window of the similar curve and the predicted power consumption is greater than a preset difference threshold. If the difference is greater than the threshold, the step of predicting the power consumption is re-executed, and the above scheme can correct the prediction result in time according to the actual situation of the user's power consumption, thereby improving the accuracy and reliability of the prediction.

[0016] Optionally, before the alarm signal is sent, the method further comprises: redrawing the curve: sorting the historical power consumption of each type of user belonging to the preset time window according to the sequence of collection time, obtaining the historical power consumption sequence of each type of user under the preset time window, drawing the historical power consumption curve of the i-th type of user under the preset time window based on the historical power consumption sequence of the i-th type of user, and re-executing the difference judgment step; In the difference judgment step, the historical power consumption curve of each type of user under the preset time window is updated to the initial fitting curve in turn.

[0017] The present application sorts the historical power consumption of each type of user belonging to the preset time window according to the sequence of collection time, obtains the historical power consumption sequence of each type of user under the preset time window, and draws the historical power consumption curve based thereon, which can analyze different types of users (such as industrial users, commercial users, residential users, etc.) respectively and fully consider the uniqueness of the power consumption behavior of each type of user. The power consumption patterns of different types of users are quite different. For example, the power consumption of industrial users is usually large and is affected by production plans, and the power consumption of residential users is more closely related to living habits and meteorological conditions. By separately drawing the curve of each type of user, the power consumption characteristics and trends of each type of user can be more accurately described, providing more targeted basis for subsequent prediction and adjustment.

[0018] Optionally, after performing the step of redrawing the curve, before re-executing the difference judgment step, the method further comprises: obtaining the historical power consumption of each type of user, drawing the historical power consumption curve of each type of user according to the historical power consumption of each type of user, denoted as a target curve, calculating the similarity between any two target curves using the DTW algorithm, obtaining the category corresponding to the target curve when the similarity is less than a preset similarity threshold, denoted as a target category, deleting the historical power consumption not belonging to the target category, and performing the step of redrawing the curve.

[0019] By calculating the similarity between the historical power consumption curves (target curves) of each type of user and selecting the category (target category) corresponding to the target curve with a similarity less than a preset threshold, the present application can identify user groups with large differences in power consumption patterns. After deleting the historical power consumption not belonging to the target category, the curve is redrawn to focus on users with more similar power consumption patterns, making the subsequent difference judgment and prediction adjustment based on these data more targeted. For example, in industrial users, the power consumption patterns of industrial users in different industries may differ significantly. By this method, industry user groups with similar power consumption patterns can be distinguished, and more accurate power consumption prediction can be performed for this group.

[0020] Optionally, the method further comprises: Collect historical operation data and power generation of the new energy power generation equipment, the historical operation data including power generation power, power generation time length, power generation efficiency data under different weather conditions; collect historical meteorological data with the same time stamp as the historical operation data, denoted as second data; adopting a machine learning algorithm to construct a new energy output prediction model, and training the new energy output prediction model using the historical operation data, the second data and the power generation; obtaining input data including real-time operation data and real-time environmental data of the new energy power generation equipment, inputting the input data into the trained new energy output prediction model, and obtaining a predicted power generation.

[0021] Collecting historical operation data of the new energy power generation equipment and historical meteorological data (second data) with the same time stamp as the historical operation data, and closely associating environmental factors with operation data of the power generation equipment. By synchronously collecting the above data, the new energy output prediction model can more accurately capture the relationship between environmental changes and power generation, and improve the prediction accuracy. Subsequently, the new energy output prediction model is constructed, and the model is trained using the historical operation data, the second data (historical meteorological data) and the power generation. The above method can comprehensively consider various factors affecting the new energy power generation, thereby improving the generalization ability and prediction accuracy of the model.

[0022] Optionally, the method further comprises: obtaining historical electricity prices, sorting the historical electricity prices in chronological order to obtain a historical electricity price sequence, obtaining electricity prices of n days before the current time and a real-time electricity price, and sorting the electricity prices of n days before the current time and the real-time electricity price in chronological order to obtain a real-time electricity price sequence; adopting a machine learning algorithm to construct an electricity price prediction model, training the electricity price prediction model using the historical electricity price sequence, and obtaining a trained electricity price prediction model; inputting the real-time electricity price sequence into the trained electricity price prediction model to obtain a predicted electricity price.

[0023] The application obtains historical electricity prices and sorts them in chronological order to form a historical electricity price sequence, which can clearly present the change trend of the electricity price in a long time dimension. Then, the application obtains the electricity prices of n days before the current time and the real-time electricity price and sorts them to form a real-time electricity price sequence, which can timely reflect the change of the electricity price in the recent period. Subsequently, the application uses a machine learning algorithm to construct an electricity price prediction model. The machine learning algorithm has strong data processing and pattern recognition capabilities and can automatically learn complex nonlinear relationships from the historical electricity price sequence. Then, the application uses the historical electricity price sequence to train the electricity price prediction model, which can learn various patterns and rules of the historical electricity price. Finally, the application inputs the real-time electricity price sequence into the trained electricity price prediction model to obtain a predicted electricity price. The accurate predicted electricity price can provide an important basis for the power generation plan arrangement of the power enterprise and the electricity consumption strategy selection of the user.

[0024] Optionally, the method further comprises: obtaining a total budget, calculating and outputting a target electricity quantity based on the total budget, the predicted electricity price and the predicted power generation quantity.

[0025] Optionally, the method further comprises: calculating a difference value of the historical electricity consumption of adjacent preset time windows, determining whether the difference value of the historical electricity consumption of adjacent preset time windows is greater than a preset deviation threshold, and if so, issuing an abnormal signal; and if not, not processing.

[0026] Optionally, when the difference value of the historical electricity consumption of adjacent preset time windows is greater than the preset deviation threshold, the method further comprises: obtaining the electricity consumption of n preset time windows before the current time of the current user, denoted as third data, extracting new dynamic behavior data based on the third data, and updating the user portrait of the current user using the new dynamic behavior data.

[0027] In a second aspect, the application provides a user portrait-based electricity consumption prediction system, which adopts the following technical solution: A user portrait-based electricity consumption prediction system comprises a storage and a processor, The storage stores a computer readable storage medium; The processor processes the computer program stored on the computer readable storage medium to implement the method of the first aspect.

[0028] In summary, the application has at least one of the following beneficial technical effects: 1. Firstly, the historical power consumption and historical meteorological data are collected, and the two types of data are clustered to classify users with similar power consumption characteristics into a category, obtaining a cluster corresponding to each type of user. Then, the features of each cluster are extracted, and a user portrait is constructed based on these features. The user portrait includes static attribute data (such as user type, power consumption equipment type, etc.) and dynamic behavior data (such as power consumption time distribution, power consumption habits, etc.), making the description of the user more comprehensive and accurate, and enabling a deep understanding of the power consumption characteristics and needs of different types of users, providing more detailed input information for subsequent power consumption prediction models, and helping to improve the accuracy of prediction.

[0029] 2. By constructing a power consumption prediction model and training it using historical data, the application can learn the patterns and rules in the historical data. Since the users have been classified and user portraits have been constructed during data collection and processing, the power consumption prediction model can be trained for the characteristics of different types of users, thereby realizing personalized power consumption prediction. BRIEF DESCRIPTION OF DRAWINGS

[0030] Fig. 1 is a flowchart of embodiment 1 of the application; Fig. 2 is a flowchart of embodiment 2 of the application; Fig. 3 is a flowchart of embodiment 3 of the application. DETAILED DESCRIPTION

[0031] The application will be further described below. Figs. 1 to 3

[0032] Embodiment 1: This embodiment discloses a power consumption prediction method based on user portrait, referring to Fig. 1 , the method comprises: S11 data collection and processing, S12 modeling and training, and S13 predicting power consumption. Firstly, historical data containing historical power consumption and meteorological data are obtained, and a cluster corresponding to each type of user is obtained by clustering, and the features of each cluster are extracted to construct the i-th user portrait. Then, a power consumption prediction model is constructed and trained using historical data. Then, real-time meteorological data, current user portrait and real-time power consumption are input into the trained model, and the predicted power consumption is output. This embodiment includes the following steps: S11 data collection and processing, obtaining historical data, the historical data including: historical power consumption and historical meteorological data.

[0033] The historical power consumption records the power consumption of each user at each time point, in kilowatt-hours (kWh). Historical power consumption can be counted by hour, day, week, month, etc. By analyzing historical power consumption, the user's power consumption habits can be understood, such as power consumption peak and valley periods, seasonal fluctuations in power consumption, etc.​

[0034] Historical meteorological data can affect historical power consumption because meteorological conditions can directly affect the power demand of users, including temperature, humidity, wind speed, precipitation, light intensity, etc.

[0035] The historical data is clustered using a clustering algorithm such as K-Means clustering algorithm or hierarchical clustering algorithm or DBSCAN algorithm, to obtain a cluster corresponding to each type of user.

[0036] In this embodiment, the K-Means clustering algorithm is used to cluster the historical data. The process is as follows: determining the number of clusters K is a key issue. The elbow rule, silhouette coefficient and other methods can be used to determine the optimal K value. After determining the K value, the historical data is clustered to obtain a cluster corresponding to each type of user.

[0037] Statistical analysis is performed on the data in each cluster to extract various statistical features. For example, the average power consumption of users in each cluster, the standard deviation of power consumption, the maximum power consumption, the minimum power consumption, etc. The above statistical features can reflect the power consumption level and power consumption fluctuation of the cluster users. For meteorological data, the average temperature, temperature standard deviation, and number of precipitation days in each cluster can be calculated to understand the meteorological characteristics of the environment in which the cluster users are located.

[0038] In addition to statistical features, this embodiment also extracts user behavior pattern features. For example, analyzing the peak and valley periods of power consumption of users in each cluster, calculating the proportion of peak period power consumption to total power consumption, etc. Behavior pattern features can help better understand the power consumption habits of users, for example, some clusters of users may consume more power at night, while some clusters of users may consume more power during the day.

[0039] Based on the features of the i-th cluster, a user portrait of the i-th type of user is constructed, which includes user static attribute data and dynamic behavior data.

[0040] User static attribute data is relatively stable information, including user type, user geographic location, population, equipment ownership, etc. These data can be obtained through user registration information, questionnaires, etc. Combining static attribute data with clustering features can more comprehensively describe the characteristics of users.

[0041] User dynamic behavior data is time-varying information, mainly based on the analysis results of historical power consumption and meteorological data, including user power consumption habits, power consumption sensitivity to meteorological factors, etc.

[0042] This embodiment constructs a complete user portrait of the i-th type of user by fusing dynamic behavior data and static attribute data.

[0043] S12 modeling and training, the power consumption prediction model can be selected from linear regression model, neural network model, support vector machine model, decision tree model, etc. In this embodiment, a neural network model is selected as the power consumption prediction model.

[0044] The association between historical data and user portraits is established, and the historical data and user portraits after association are divided into a training set, a validation set and a test set. The training set is used for training the power consumption prediction model, the validation set is used for adjusting the hyperparameters of the power consumption prediction model and preventing overfitting, and the test set is used for evaluating the final performance of the power consumption prediction model. The training set accounts for a large part of the data, such as 70%-80%, and the validation set and the test set each account for 10%-15%.

[0045] The training set is used to train the power consumption prediction model, and the prediction error of the power consumption prediction model on the training set is minimized by continuously adjusting the parameters of the model. During the training process, optimization algorithms such as gradient descent can be used to update the parameters of the model. At the same time, the model is evaluated using the validation set, and the hyperparameters of the model such as learning rate and regularization coefficient are adjusted according to the performance indicators (such as mean square error and mean absolute error) on the validation set. Repeat the training and validation process until the performance of the power consumption prediction model on the validation set reaches a satisfactory level.

[0046] After multiple training and validation, the model parameters with the best performance on the validation set are obtained, and the power consumption prediction model at this time is the trained power consumption prediction model.

[0047] S13 predicts the power consumption, and inputs the real-time weather data, the current user's user portrait and the real-time power consumption into the trained power consumption prediction model. The trained power consumption prediction model processes and analyzes these input data according to the patterns and rules learned from the historical data, and calculates the predicted power consumption.

[0048] By adopting the above scheme, the current user's power consumption can be predicted according to the historical data and user portraits, personalized prediction can be realized, and the accuracy of the prediction result can be improved.

[0049] Embodiment 2: Refer to Fig. 2 The difference between this embodiment and embodiment 1 is that the method further comprises: S21 draws a power consumption fitting curve, obtains the power consumption of the current user for a preset time length before the current time, denoted as first data, and draws a power consumption fitting curve of the current user based on the first data.

[0050] S22 draws an initial fitting curve, and divides the historical power consumption into power consumptions in different time periods according to a preset time window. The selection of the preset time window needs to be determined according to the characteristics of the power consumption behavior and the analysis requirements. For example, if the daily power consumption mode is concerned, the time window can be set to one day, and one day can be divided into 24-hour time periods; if the weekly power consumption mode is concerned, the time window can be set to one week, and one week can be divided into 7-day time periods.

[0051] The average value of the power consumption in each time period in each preset time window is calculated in turn, and the initial fitting curve of each preset time window is drawn based on the average value.

[0052] S23 difference judgment, the similarity between the power consumption fitting curve and each initial fitting curve is calculated by using the DTW algorithm. By comparing the size of the similarity, the initial fitting curve most similar to the power consumption fitting curve is found, which is recorded as a similar curve.

[0053] Based on the historical power consumption, the historical power consumption of the next preset time window under the similar curve is obtained, and it is judged whether the difference between the historical power consumption corresponding to the next preset time window under the similar curve and the predicted power consumption corresponding to the preset time window is greater than a preset difference threshold. If yes, it means that the current user does not conform to the trend of the initial fitting curve drawn by using the average value, and the curve needs to be redrawn according to different categories of users, and S24 screening is performed; if not, no processing is performed.

[0054] S24 screening, according to the clustering result in S11 data acquisition and processing, the historical power consumption of each category of users is obtained, and the historical power consumption curve of each category of users is drawn according to the historical power consumption of each category of users, and is recorded as a target curve. The target curve reflects the power consumption characteristics and change law of each category of users in different time periods.

[0055] The similarity between any two target curves is calculated by using the DTW algorithm. The DTW algorithm finds the best alignment path between the two target curves by dynamic programming, and calculates the similarity between them. When the similarity is less than a preset similarity threshold, the category corresponding to the target curve is obtained, which is recorded as a target category, the historical power consumption not belonging to the target category is deleted, and S25 is executed to redraw the curve.

[0056] S25 redraws the curve, respectively sorts the historical power consumption of each category of users belonging to the preset time window according to the acquisition time sequence, and obtains the historical power consumption sequence of each category of users under the preset time window. The historical power consumption curve of the i-th category of users under the preset time window is drawn based on the historical power consumption sequence of the i-th category of users, and S23 difference judgment is re-executed.

[0057] In the re-execution of the difference value judgment S23, the historical power consumption curve of each type of user in the preset time window is updated to the initial fitting curve in turn.

[0058] In the re-execution of the difference value judgment S23, if the difference value between the historical power consumption and the predicted power consumption corresponding to one preset time window of the similar curve is still greater than the preset difference threshold, an alarm signal is sent.

[0059] Embodiment 3: Reference Fig. 3 The difference between this embodiment and embodiment 2 is that the method further comprises: S31 predicts the power generation, collects historical operation data and power generation of new energy power generation equipment, and the historical operation data includes power generation power, power generation time, and power generation efficiency data under different weather conditions; collect historical meteorological data with the same time stamp as the historical operation data, denoted as second data.

[0060] A machine learning algorithm is used to construct a new energy output prediction model, and the historical operation data, the second data and the power generation are used to train the new energy output prediction model to obtain the trained new energy output prediction model.

[0061] Obtain input data, the input data including real-time operation data and real-time environmental data of new energy power generation equipment, input the input data into the trained new energy output prediction model, and obtain the predicted power generation.

[0062] S32 predicts the electricity price, obtains the historical electricity price, and sorts it in time sequence to obtain the historical electricity price sequence. The historical electricity price sequence reflects the change trend of the electricity price in different time periods; obtain the electricity price of the previous n days and the real-time electricity price, and sort them in time sequence to obtain the real-time electricity price sequence. The real-time electricity price sequence contains the latest electricity price information and can reflect the short-term change trend of the electricity price.

[0063] A machine learning algorithm is used to construct an electricity price prediction model, such as an autoregressive integrated moving average model (ARIMA) and a bidirectional long short-term memory model (BI-LSTM model), and the historical electricity price sequence is used to train the electricity price prediction model to obtain the trained electricity price prediction model. In the training process, the electricity price prediction model learns the change rule and influencing factors of the historical electricity price, such as season, holiday, energy market supply and demand relationship, etc. By continuously adjusting the parameters of the electricity price prediction model, the electricity price prediction model can better fit the historical electricity price.

[0064] The real-time electricity price sequence is input into the trained electricity price prediction model to obtain the predicted electricity price.

[0065] S33 calculates the target electricity quantity, obtains the total budget, and calculates and outputs the target electricity quantity based on the total budget, the predicted electricity price and the predicted power generation.

[0066] ; A is the target power; B is the total budget; C is the predicted electricity price; and D is the predicted power generation.

[0067] Embodiment 4: The difference between this embodiment and embodiment 2 is that the method further comprises: calculating the difference of the historical power consumption of adjacent preset time windows, determining whether the difference of the historical power consumption of adjacent preset time windows is greater than a preset deviation threshold, if yes, it means that the user's power consumption behavior has a large deviation, at this time an abnormal signal needs to be sent; if not, no processing is performed.

[0068] When the difference of the historical power consumption of adjacent preset time windows is greater than the preset deviation threshold, the method further comprises: obtaining the power consumption of n preset time windows before the current time of the current user, denoted as the third data, extracting new dynamic behavior data based on the third data, and updating the user portrait of the current user using the new dynamic behavior data.

[0069] Embodiment 5: The embodiment discloses a power consumption prediction system based on a user portrait, and the system comprises a memory and a processor, The memory stores a computer readable storage medium; The processor processes the computer program stored on the computer readable storage medium to realize the power consumption prediction method based on the user portrait.

[0070] The above are preferred embodiments of the present application, and are not intended to limit the protection scope of the present application, therefore: any equivalent changes made according to the structure, shape, principle of the present application should be covered within the protection scope of the present application.

Claims

1. A method for predicting electricity consumption based on user profile, characterized in that: include: Data collection and processing: Obtain historical data, perform clustering on the historical data to obtain clusters corresponding to each type of user, extract the features of each cluster, and construct a user profile for the i-th type of user based on the features of the i-th cluster; The historical data includes: historical electricity consumption and historical meteorological data; the user portrait includes: user static attribute data and dynamic behavior data; Modeling and training: Build a power consumption prediction model, train it using historical data and user profiles, and obtain a trained power consumption prediction model. Predicting electricity consumption: Input real-time meteorological data, the current user's user profile, and real-time electricity consumption into the trained electricity consumption prediction model to obtain and output predicted electricity consumption.

2. The power consumption prediction method based on user profile according to claim 1 is characterized in that: The method further comprises: Drawing a power consumption fitting curve: obtaining the power consumption of the current user for a preset period of time before the current moment, recording it as first data, and drawing the power consumption fitting curve of the current user based on the first data; Drawing an initial fitting curve: Divide the historical electricity consumption into electricity consumption in different time periods according to the preset time window, calculate the average electricity consumption of each time period in each preset time window in turn, and draw the initial fitting curve for each preset time window based on the average value; Difference judgment: Use the DTW algorithm to calculate the similarity between the power consumption fitting curve and each initial fitting curve, and record the initial fitting curve corresponding to the maximum similarity as the similarity curve; judge whether the difference between the historical power consumption corresponding to the next preset time window of the similarity curve and the predicted power consumption corresponding to the next preset time window of the similarity curve is greater than the preset difference threshold. If so, an alarm signal is issued; if not, no action is taken.

3. The power consumption prediction method based on user profile according to claim 2 is characterized in that: Before issuing the alarm signal, the method further includes: Redrawing the curve: sort the historical electricity consumption of each type of user in the preset time window according to the order of collection time, obtain the historical electricity consumption sequence of each type of user in the preset time window, draw the historical electricity consumption curve of the i-th type of user in the preset time window based on the historical electricity consumption sequence of the i-th type of user, and re-execute the difference judgment step; In the step of difference judgment, the historical electricity consumption curve of each type of user in the preset time window is updated to the initial fitting curve in turn.

4. The power consumption prediction method based on user profile according to claim 3 is characterized in that: Before executing the step of redrawing the curve, the method further includes: Obtain the historical electricity consumption of each type of user, draw the historical electricity consumption curve of each type of user based on the historical electricity consumption of each type of user, record it as the target curve, use the DTW algorithm to calculate the similarity between any two target curves, obtain the category corresponding to the target curve when the similarity is less than the preset similarity threshold, record it as the target category, delete the historical electricity consumption that does not belong to the target category, and execute the step of redrawing the curve.

5. The method for predicting electricity consumption based on user profile according to any one of claims 1 to 4, characterized in that: The method further comprises: Collect historical operating data and power generation of new energy power generation equipment. The historical operating data includes power generation, power generation duration, and power generation efficiency data under different weather conditions. Collect historical meteorological data with the same timestamp as the historical operating data and record it as the second data. A machine learning algorithm is used to build a new energy output prediction model, which is trained using historical operating data, secondary data, and power generation. Input data is obtained, wherein the input data includes real-time operation data and real-time environmental data of the new energy power generation equipment, and the input data is input into the trained new energy output prediction model to obtain predicted power generation.

6. The power consumption prediction method based on user profile according to claim 5 is characterized in that: The method further comprises: Obtain historical electricity prices, sort the historical electricity prices in chronological order, and obtain a historical electricity price sequence; obtain electricity prices n days before the current moment and real-time electricity prices, sort the electricity prices n days before the current moment and real-time electricity prices in chronological order, and obtain a real-time electricity price sequence; A machine learning algorithm is used to build an electricity price prediction model, and the electricity price prediction model is trained using a historical electricity price series to obtain a trained electricity price prediction model; The real-time electricity price sequence is input into the trained electricity price prediction model to obtain the predicted electricity price.

7. The power consumption prediction method based on user profile according to claim 6 is characterized in that: The method further comprises: Obtain the total budget, calculate and output the target power based on the total budget, predicted electricity price and predicted power generation.

8. The method for predicting electricity consumption based on user profile according to any one of claims 2 to 4, characterized in that: The method further comprises: Calculate the difference in historical power consumption between adjacent preset time windows, and determine whether the difference in historical power consumption between adjacent preset time windows is greater than a preset deviation threshold. If so, issue an abnormal signal; if not, do nothing.

9. The power consumption prediction method based on user profile according to claim 8 is characterized in that: When the difference in historical power consumption between adjacent preset time windows is greater than a preset deviation threshold, the method further includes: The power consumption of the current user in n preset time windows before the current moment is obtained and recorded as the third data. New dynamic behavior data is extracted based on the third data, and the new dynamic behavior data is used to update the user profile of the current user.

10. A power consumption prediction system based on user portrait, characterized in that: include: memory and processor, The memory stores a computer-readable storage medium; When the processor processes the computer program stored on the computer-readable storage medium, the method according to any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Power consumption load prediction method based on multivariate user behavior portrait

    CN111582548A

  • Medium and long term generating capacity prediction method of photovoltaic power station group

    CN117335411A

  • Short-term load prediction method and system based on artificial intelligence

    CN117521889A

  • Electric quantity prediction method and system based on user clustering analysis

    CN118690213A

  • Method for predicting generating capacity of distributed photovoltaic power station by combining grid point meteorological data

    CN119253623A