A node electricity price prediction method and system based on user portrait and model library iteration
By using user profiling and model library iteration, a personalized nodal electricity price forecasting system is constructed, which solves the problem that existing technologies cannot accurately reflect the cost curve of specific electricity users, and achieves efficient and accurate electricity price forecasting and rapid response to market changes.
Patent Information
- Application Number
- CN202610379459.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-26
- Publication Date
- 2026-07-24
Smart Images

Figure CN122453428A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electricity markets, and more specifically, to a method and system for forecasting nodal electricity prices. Background Technology
[0002] In the electricity spot market environment, the nodal marginal price is a dynamic signal that varies with time and space, directly affecting the cost of electricity purchases by electricity retailers. Existing nodal price forecasting technologies are mainly divided into two categories: one is macro-statistical / machine learning forecasting models, which are based on macro-time series data such as regional historical electricity prices and system load. Its fundamental drawback is that the forecast result is the average price trend of the region or the entire network, which cannot accurately reflect the individualized cost curve of a specific electricity user; the other method is based on the grid topology, generator prices, and load distribution to calculate optimal power flow, but its computational complexity is high, it relies on a large amount of accurate grid parameters that are difficult to obtain in real time and commercially confidential data, and it cannot quickly respond to changes in market rules.
[0003] The correlation between load curves and nodal electricity prices varies drastically for different user types. Although electricity sales companies possess massive amounts of detailed load data on the user side, they lack a tool to effectively "translate" this data into individualized nodal electricity price forecasts.
[0004] To address the above problems, this invention proposes a solution. Summary of the Invention
[0005] To overcome the aforementioned deficiencies in the prior art, embodiments of the present invention provide a nodal electricity price prediction method and system based on user profiles and model library iteration. By introducing a data acquisition and model training mechanism constrained by user profiles, prediction bias caused by uniform samples and uniform models is avoided, enabling differentiated modeling of users with different load behaviors. Furthermore, by tracing the source of prediction errors to drive the collaborative iteration of the model and profile rules, the accuracy and adaptability of nodal electricity price prediction in complex market environments are improved, thereby solving the problems mentioned in the background art.
[0006] To achieve the above objectives, the present invention provides the following technical solution: A nodal electricity price prediction method based on user profiles and model library iteration includes the following steps: S100, constructing a user dynamic feature library: extracting multi-dimensional features from user historical load data, user attribute data, and load-electricity price correlation data; determining user profile categories through an expert rule-guided clustering mechanism; and forming a user dynamic feature library containing user profile categories, feature vectors, and feature stability indicators; S200, data collection and sample set construction: under the constraints of the user dynamic feature library, differentially collecting, filtering, and fusing user historical load data and nodal electricity price data; and adaptively determining the number of samples based on user profile features. Based on the sampling density, time coverage depth, and feature dimensions, a training sample set matching the user load characteristics is constructed; S300, Personalized prediction model library initialization: Based on user profile categories, node electricity price prediction models corresponding to each profile category are constructed and trained respectively, forming a prediction model library that is bound one-to-one with user profile categories; S400, Node electricity price prediction and feedback optimization: When a prediction request is received, the corresponding prediction model is called according to the user profile category to generate node electricity price prediction results, and after obtaining the actual settlement electricity price, the prediction error is traced and analyzed, and the prediction model or user profile rules are updated and iterated according to the traced results.
[0007] In a preferred embodiment, the step S100 of constructing the user dynamic feature library includes extracting statistical features representing load scale, load pattern and load volatility from the user's historical load time series, and combining them with the correlation features between load and nodal electricity price to form a user profile feature vector.
[0008] In a preferred embodiment, the user profile category is determined by comparing the unsupervised clustering results with the classification results based on the expert rule base, and verifying conflicting samples to determine the final user profile category.
[0009] In a preferred embodiment, in step S200, the number of sampling points and the historical time span of the load data in the sample set are adaptively adjusted based on the load scale characteristics, load pattern characteristics and load fluctuation characteristics corresponding to the user profile category.
[0010] In a preferred embodiment, when the user load fluctuation is higher than a preset threshold, the sample set contains complete daily load data for 96 points; when the user load fluctuation is lower than or equal to the threshold, only the load sampling points that contribute more to the load change are collected.
[0011] In a preferred embodiment, when the user profile indicates that its load has significant peak and valley characteristics, the sample set preferentially retains the time slice data corresponding to the load peak and valley segments; when the user load pattern is relatively stable, load data is obtained by equal interval or periodic sampling.
[0012] In a preferred embodiment, the time coverage of historical load data in the sample set is adjusted according to the user's average daily load. The higher the user's average daily load, the more days the historical load data covers.
[0013] In a preferred embodiment, in step S300, prediction models with different structures or parameter configurations are constructed for different user profile categories, and the trained models are bound and stored with the corresponding user profile categories.
[0014] In a preferred embodiment, when the prediction error of the same user profile category shows a systematic deviation, it is determined that the model is inaccurate, and the parameters of the corresponding prediction model are updated; when the prediction error is concentrated only in some users, it is determined that the user profile is inaccurate, and user profile rule revision and model reconstruction are triggered.
[0015] A nodal electricity price forecasting system based on user profiles and model library iteration includes: a forecast request receiving module, used to receive the forecast request when a user initiates a nodal electricity price forecast request for 96 points the following day, and obtain the corresponding user identification information; a feature library query module, used to, after receiving the forecast request, query the corresponding user profile category label, as well as the load scale characteristics, load pattern characteristics, and load volatility characteristics associated with the user profile category, in the user dynamic feature library according to the user identification information; and a nodal electricity price forecasting module, used to construct a differentiated sample set matching the user profile category based on the queried user profile category and its associated characteristics, and call the corresponding sample set from the forecast model library. The system includes a no-binding node electricity price prediction model, which generates the next day's 96-point node electricity price prediction results for the user; an error tracing module, which, after the market settlement is completed the next day, obtains the actual 96-point node electricity price data for the corresponding node and compares it with the prediction results to identify the source of prediction errors; and a model iteration and profile revision module, which optimizes the parameters or fine-tunes the prediction model under the corresponding user profile category when the prediction error analysis results indicate model inaccuracies; and revises the user profile rules or adds profile categories when the prediction error analysis results indicate user profile inaccuracies, triggering the creation or update of the corresponding prediction model to achieve iterative evolution of the prediction model library and user profile system.
[0016] The technical effects and advantages of the nodal electricity price prediction method and system based on user profiles and model library iterations of this invention are as follows: This invention overcomes the problems of insufficient generalization ability and prediction bias caused by the use of a unified model and unified sample construction strategy for electricity price prediction of heterogeneous users in the prior art by introducing a user profile-driven differentiated modeling mechanism, and realizes the refinement and personalization of nodal electricity price prediction.
[0017] Under the constraint of user profile, this invention performs differentiated collection, screening and fusion of raw load and electricity price data. By adaptively controlling the sampling density, key time periods and historical time coverage of 96 daily load data points, it effectively reduces redundant samples and noise interference while ensuring the sufficiency of key feature expression, significantly improves the effective information density and sample utilization efficiency of training samples, and reduces model training costs.
[0018] This invention introduces a prediction error feedback and tracing mechanism. By continuously comparing and analyzing the prediction results with the actual settlement electricity price, it can automatically distinguish between two types of problems: model inaccuracy and user profile inaccuracy. It can then trigger model parameter updates or profile rule revisions, thereby achieving collaborative iteration and self-evolution of the model library and user profiles. This enhances the system's adaptability to non-stationary factors such as changes in market structure and the access of new electricity consumers. Attached Figure Description
[0019] Figure 1 This is a schematic diagram of the structure of a nodal electricity price prediction method and system based on user profiles and model library iteration according to the present invention; Figure 2 This is a flowchart illustrating the nodal electricity price prediction method and system based on user profiles and model library iterations according to the present invention. Figure 3 This invention provides a schematic diagram of the user profile creation process. Figure 4 This is a schematic diagram of the training sample set construction process provided by the present invention; Figure 5 This is a schematic diagram illustrating the construction process of the personalized prediction model library provided by the present invention. Figure 6 This is a schematic diagram of the error analysis process provided by the present invention. Detailed Implementation
[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0021] Example 1 This invention discloses a nodal electricity price prediction method based on user profiling and model library iteration. It uses a dynamic feature library to create detailed user profiles and matches a customized prediction model to each profile category, forming an initial model library. In prediction applications, the system automatically schedules the corresponding model based on the user profile. The feedback between the prediction results and actual settlement data drives the system to perform cross-level self-optimization, thereby achieving continuous evolution of the entire system. The overall architecture of this system is referenced... Figure 1 As shown, the overall system architecture is divided into five layers: data source layer, feature and profile layer, model library layer, application service layer, and optimization feedback layer.
[0022] Step S100 extracts user historical load data, user attribute data, and load-electricity price correlation features in multiple dimensions, and introduces an expert rule-guided clustering mechanism to create a structured user profile, forming a dynamic user feature library containing user categories, key feature vectors, and feature stability indicators. This feature library is used to characterize the typical load behavior and market response characteristics of different electricity users, and also provides a basis for sample selection, time span control, and feature dimension selection in subsequent model training, thereby improving the targeting, stability, and sample utilization efficiency of the electricity price prediction model. Step S200 is used to collect, filter and fuse the original load and electricity price data in a differentiated manner under the constraints of the user dynamic feature library, and construct a training sample set that matches the load characteristics of different users, thereby improving the sample utilization efficiency and reducing the interference of redundant data on model training while ensuring the sufficiency of feature expression. Step S300 is used to construct, train and initialize the corresponding node electricity price prediction model according to the user profile classification based on the profile category, so as to form a personalized prediction model library that corresponds to different electricity consumption behavior types. Step S400 is used to obtain the actual settlement electricity price calculation prediction error, determine the model inaccuracy or user profile inaccuracy based on the error characteristics, and trigger model parameter updates or profile rule revisions respectively to achieve continuous optimization of the prediction model library.
[0023] S100, Construction of User Dynamic Feature Library.
[0024] A set of deep feature vectors for electricity price prediction is extracted from user load data; the extracted deep feature vectors and user attribute data are input into a clustering analysis module guided by a preset expert rule base, and the initial user profile category is output; the expert rule base contains qualitative-quantitative hybrid rules defined by electricity market and industry experts that associate electricity consumption patterns with typical market behaviors; the user profile category, deep feature vectors and associated metadata together constitute the user dynamic feature base.
[0025] In one possible implementation, S100 determines the user's final profile category label based on the user's historical workload data and the user's deep characteristics, including: Step S110 extracts a set of basic features from the user's historical load and attribute information that can characterize the user's electricity consumption behavior and market characteristics, providing original feature support for the construction of user profile vectors.
[0026] S110, User Profile Building: User profiling primarily generates feature vectors by extracting users' historical workload data and other user attributes. Assume a user profile includes the following key features: Load characteristics: such as load shape characteristics, load fluctuations, etc. User attribute characteristics: such as industry type, voltage level, etc. Market sensitivity characteristics: such as the relationship between load fluctuations and electricity price fluctuations Suppose we represent these features as vectors and combine them with expert rules to generate user profiles.
[0027] Feature vector construction: S111, Load Feature Extraction: Extract key statistical features that characterize the scale, form and stability of the load from time series load data. By calculating indicators such as average daily load, peak-to-valley difference and load volatility, a quantitative description of the user load level, intraday variation range and time stability is achieved, providing objective and calculable basic features for distinguishing users with different load types.
[0028] Assume the time series of user load is L={ , ,..., },in This represents the load value at time t.
[0029] Morphological characteristics include: ; in: This represents the average daily load; T represents the total number of load data points within the considered time period.
[0030] The formula calculates the average load of a user by summing all load values within a given time period and dividing by the total duration T.
[0031] Morphological characteristics also include: ; in: Indicates the difference between peak and valley levels; This represents the maximum load value in the load sequence L; This represents the minimum load value in the load sequence L.
[0032] This formula calculates the difference between the maximum and minimum values in a load sequence, a feature that helps quantify the volatility of user load. A larger peak-to-valley difference indicates greater fluctuations in user load, potentially suggesting larger peak periods.
[0033] Load fluctuations include:
[0034] in: This indicates load fluctuation.
[0035] This formula measures load volatility by calculating the average of the sum of squared deviations of the load value from its daily average load, and then taking the square root to obtain the standard deviation of the load.
[0036] S112, Market Sensitivity Characteristics: Characterizes the correlation between user load changes and nodal electricity price fluctuations. By introducing correlation indicators between load and electricity price, it reflects users' price sensitivity and potential adjustment capabilities, so that user profiles not only remain at the level of physical load characteristics, but also reflect their behavioral characteristics in the electricity market environment, providing important behavioral constraint information for subsequent electricity price prediction models.
[0037] Assume that the electricity price in a certain time period t is The correlation between load volatility and electricity price changes is as follows:
[0038] in: This indicates the correlation between load and electricity price; This represents the Pearson correlation coefficient between the load series L and the electricity price series P; This represents the nodal price at time t; This represents the average electricity price. Here It measures the relationship between load and electricity price fluctuations.
[0039] S113, User Profile Vector: This vector unifies the expression of multidimensional load features and market sensitivity features to form a structured user profile feature vector. This comprehensive feature vector serves as the core representation of the user profile, providing a standardized data interface for cluster analysis, rule determination, and model input, thereby reducing the complexity of subsequent processing.
[0040] Ultimately, a user profile can be represented as a comprehensive feature vector:
[0041] This vector contains information such as the user's load characteristics and electricity price sensitivity, serving as the basis for user profiling.
[0042] S114, Expert Rule-Guided Clustering: By combining expert knowledge with data-driven methods, user profiles are classified in an interpretable and controllable manner.
[0043] By introducing three thresholds—average daily load, peak-to-valley difference, and load volatility—electricity users are characterized in a regular way from three dimensions: load scale, load form, and time stability. An expert rule base is constructed in conjunction with industry attributes to achieve guided classification of different types of loads, providing prior constraints for subsequent load clustering and strategy formulation.
[0044] A pre-defined expert rule base is used, for example: using the average daily load threshold to distinguish between basic large loads and medium and small loads, using the peak-valley difference threshold to distinguish between stable loads and loads with significant peaks and valleys, and using the load fluctuation threshold to distinguish between rigid and stable loads and fluctuating loads. A rule judgment space is constructed from these three dimensions to guide users in multi-dimensional classification.
[0045] Table 1 Rule Decision Space
[0046] When user load characteristics meet and as well as When the load is greater than the preset high load threshold, it indicates that the user's average daily load is greater than the preset high load threshold, and the daily peak-to-valley difference and load fluctuation are both lower than the corresponding threshold. This is classified as a rigid basic type, with typical industries such as electrolytic aluminum, continuous steel production lines, and data centers.
[0047] When user load characteristics meet and as well as When the peak-to-valley difference exceeds the preset peak-to-valley difference threshold, and the daily average load and load volatility are both lower than the corresponding threshold, it is classified as a commercial peak-to-valley type, with typical industries such as shopping malls, office buildings, and hotel complexes.
[0048] When user load characteristics meet This indicates that the user's load changes drastically over time and has adjustment potential, classifying it as a highly volatile adjustable type. Typical industries include interruptible industries and mass production processing industries.
[0049] When user load characteristics meet and as well as When the load size, peak-to-valley difference, and volatility are all below the corresponding thresholds, the user is identified as a small to medium stable load user.
[0050] The system first performs unsupervised clustering using the comprehensive feature vector, obtaining clustering result A. Simultaneously, the comprehensive feature vector is input into the rule engine to obtain rule-based classification suggestions B. The system compares A and B, and manually reviews and annotates samples in the clustering result that severely conflict with the rule suggestions. Finally, combining the clustering result, rule suggestions, and manual annotations, the final profile category label for each user is determined and stored in the user dynamic feature database. This database records: user ID, profile category, comprehensive feature vector, rule trigger records, etc.
[0051] S120, Load-Price Correlation Model: This model is used to construct a load-price correlation model under user profile constraints, enabling accurate prediction of nodal electricity prices. By using historical user load data and user profile features as inputs, the prediction model can perceive the differences in electricity consumption behavior among different types of users. Simultaneously, by optimizing model parameters through a loss function, the prediction results can better fit real electricity price changes, improving the model's generalization ability.
[0052] The goal of load-price correlation models is to predict nodal electricity prices for specific time periods based on user profiles. Different models can be used to achieve this goal; deep learning will be used as an example to demonstrate how to predict electricity prices based on user profiles.
[0053] S121, Input Features: Assume the input features include user historical load L and user profile features U.
[0054] User historical load: ; User profile characteristics: .
[0055] For the LSTM model, we use these features as input after appropriate preprocessing.
[0056] S122, Model Structure: Suppose we use an LSTM network for electricity price forecasting. The output layer of the LSTM network is a regression layer that predicts the electricity price at a given time t. .
[0057] The LSTM model can be represented as: ; in: This indicates the impact of current load information and user profiles; This indicates the impact of the load information and user profile from the previous moment.
[0058] The final electricity price forecast is as follows: Where W and b are model parameters, obtained through training. This represents the predicted nodal electricity price.
[0059] S123, Optimized Electricity Price Forecast: To optimize the model, we need to define a loss function. A commonly used loss function is the mean squared error (MSE). ,in This is the actual electricity price. Here, N is the electricity price predicted by the model, and N is the number of samples. By minimizing the loss function, an optimized electricity price prediction model can be trained.
[0060] S130, the correlation between user profiles and electricity price fluctuations: If the characteristics in the user profile change, or if the user's load pattern and electricity price fluctuation pattern deviate, the accuracy of the forecast results may be affected. In this case, manual review is required.
[0061] S131, Feature Changes: Continuously monitor the established user profiles and quantify the degree of change in user load behavior and market response characteristics over time.
[0062] For numerical characteristics (e.g., average load, load fluctuation, etc.), the calculation of characteristic changes can be expressed as: ; in: This represents the rate of change of the i-th numerical feature; Let i represent the present value of the i-th feature; This represents the old value of the i-th feature.
[0063] The rate of change for all numerical features can be obtained by directly summing them up to get the rate of change for the entire user profile.
[0064] ; in: This indicates the rate of change in the user profile.
[0065] S140, Determine if manual review is required: Based on the user profile change monitoring results, determine whether the user profile is still applicable to the current operating state, and trigger the manual review or profile update process if necessary.
[0066] When the user profile change rate When a certain threshold is exceeded, it indicates that the user profile has changed significantly and needs to be reassessed and may require manual review.
[0067] Review trigger conditions:
[0068] A preset threshold is used to determine the significance of changes in user profiles. Typically, It is set according to actual needs; it can be a fixed value or dynamically adjusted based on historical data.
[0069] The user profile categories and their feature stability indices output in this step are used to dynamically constrain the time span, sampling density, and feature dimension depth of the training samples in the next step, thereby constructing a differentiated training sample set that matches the user load characteristics.
[0070] S200, data acquisition and fusion.
[0071] In this invention, the construction of the training sample set is based on the user dynamic feature library formed in the previous step and is adaptively adjusted, rather than using a uniform and fixed data collection strategy.
[0072] Specifically, the system first obtains historical load data and user profile information of the industrial and commercial users it represents from the internal business system, and then synchronizes historical node electricity price data, day-ahead market clearing price, system marginal price, and publicly available transmission congestion information for the corresponding time period and node from the power trading center interface. All raw data are aligned, cleaned, and imputed for missing values using user identifier, timestamp, and electricity price node as key fields to form a candidate raw data set.
[0073] Based on this, the system performs differentiated screening and reorganization of the candidate raw data set according to user profile categories and their corresponding load scale characteristics, load pattern characteristics, and market sensitivity characteristics, in order to construct a training sample set that matches user characteristics, specifically including: S210, raw data collection, constructs a unified and complete foundation of candidate raw data, providing a data source for subsequent sample screening and recombination.
[0074] The system retrieves electricity load data and user profile information of the industrial and commercial users it represents within a preset historical period from its internal business system. The electricity load data is based on a daily 96-point load data set, reflecting load changes collected at fixed time intervals within a calendar day. Simultaneously, it retrieves historical 96-point node electricity price data, day-ahead market clearing prices, system marginal prices, and publicly available transmission congestion information for the corresponding time period and node from the power trading center or market information interface.
[0075] S220, based on user profile, is a user profile-based depth control method for load data acquisition. It uses user profiles as constraints to adaptively control the expression depth and structure of load data in the sample set, and is the core step in realizing sample differentiation construction.
[0076] After completing the construction of the user dynamic feature database and determining the user profile categories, the system adaptively adjusts the number of acquisition points and time coverage depth of the 96-point daily load data in the sample set based on the load scale characteristics, load pattern characteristics, and load fluctuation characteristics reflected in the user profiles. Specifically, this includes: S221, based on load fluctuation, controls the number of sampling points and dynamically determines the sampling density of 96 daily load data points in the sample set according to the intensity of user load fluctuation.
[0077] After completing the construction of the user dynamic feature library and determining the user profile categories, the system adaptively controls the number of sampling points for the daily 96 load data in the sample set based on the load volatility index that represents the load time fluctuation characteristics in the user profile.
[0078] Suppose the user's original daily load sequence on day d is: ={ , ,..., },in This represents the load value corresponding to the i-th time slot on day d.
[0079] Load fluctuation index Defined as ,in This indicates the user's average daily load within the corresponding time window.
[0080] The system is based on load fluctuation indicators Compared with the preset volatility threshold The relative relationship is used to determine the sampling ratio of daily load data: This allows us to determine the number of load sampling points included in the sample set on a single day. .when At that time, the system acquires complete daily load data for 96 points; when The system only obtains no more than We identify key sampling points that contribute significantly to load changes to reduce redundant load information and improve sample efficiency.
[0081] S222, a critical period sampling control based on peak-valley characteristics, is used to highlight the critical period characteristics of user load that have a more significant impact on electricity price formation. Determining the number of sampling points per day Subsequently, the system further combines load pattern characteristics from user profiles to control the sampling priority of load data from 96 points at different time periods. The load change rate between adjacent time slices is defined as: The system sorts the 96 time slots of a single day according to the magnitude of the load change rate, and selects the top slots based on the load change rate. The time slices constitute the set of key sampling times for the day: When the user profile indicates that their load has significant peak and trough characteristics, the key sampling time set Prioritize covering the time slices corresponding to peak and valley periods of load; when the user load pattern is relatively stable, the system can use equal-interval sampling or periodic sampling to select representative sampling points from 96 load data points to ensure the overall representativeness of load characteristics.
[0082] By employing the above methods, when the number of sampling points is limited, the system can prioritize retaining time slices that contribute significantly to the characterization of load patterns, thereby improving the effective information density of load samples.
[0083] S223, Historical Sample Coverage Extension Based on Load Scale, is used to adjust the time coverage of historical load data in the sample set according to user load scale characteristics. After completing the daily load sampling control, the system further adaptively adjusts the time coverage depth of historical load data in the sample set based on the load scale characteristics in the user profile.
[0084] Let the basic historical sample coverage days be . Load scale characteristics based on average daily load of users The system defines the load scale adjustment factor as follows: ,in This is a preset load threshold. When the average daily load in the user profile... Higher than the preset load threshold At the same time, the system expands the time coverage of historical load data when constructing the sample set, so that the sample set contains more complete daily load sequences of 96 points; when the user's average daily load Not higher than the preset load threshold At the same time, the number of 96-point load sequences corresponding to the historical days will be reduced accordingly.
[0085] This determines the number of historical load coverage days ultimately included in the sample set: When the average daily load of users exceeds the preset load scale threshold, the system expands the time coverage of historical load data to include more complete or key sampled load sequences of consecutive natural days in the sample set; when the average daily load of users does not exceed the threshold, the load data scale corresponding to the number of historical days is reduced accordingly to avoid introducing redundant samples.
[0086] Finally, the system will select the key sampling load points within the D days: This serves as the load input data for subsequent electricity price forecasting model training.
[0087] S230, electricity price data alignment and fusion, enables precise matching of load data and electricity price data in terms of users, time and nodes.
[0088] The 96 daily load data points, after being filtered and adjusted through the above steps, are aligned with the node electricity price data of the corresponding nodes and timestamps. The alignment uses user identifier, timestamp, and node identifier as key fields.
[0089] S240, Data Cleaning and Sample Set Generation, is used to perform quality control on the fused sample data and form a standardized sample set that can be directly used for model training and validation. It performs outlier handling, missing value imputation, and consistency verification on the aligned load data and electricity price data to form a sample set for subsequent nodal electricity price prediction model training and validation.
[0090] S300, the personalized prediction model library initialization, binds user profile categories with model architecture selection, training sample composition and parameter space, so that different types of users can directly call models that are highly matched with their electricity consumption behavior characteristics during the prediction stage, avoiding the fitting bias caused by using a uniform model, and improving the accuracy, stability and generalization ability of nodal electricity price prediction.
[0091] To enable user profile-based model training, training sets were constructed for different types of profiles. Taking commercial peak-valley users as an example, the training samples included information such as historical load, corresponding nodal electricity prices, average daily load, peak-valley difference, load volatility, and the correlation between load and electricity price. The chosen model architecture was a multi-channel input deep learning network. Channel 1 used LSTM to process historical load sequences; Channel 2 used a fully connected layer to process static features such as date and weather; Channel 3 introduced an attention mechanism to specifically weight features before and after historical electricity price peak periods. After training, the model was saved to a model library and strongly bound to the commercial peak-valley profile label.
[0092] S310, Training Set Construction, unifies multi-source, multi-scale features into a training sample format that can be directly used by the model; ensuring consistency between the training objective and the input features in the time dimension.
[0093] For commercial peak-valley users, the training samples contain multiple features, involving historical load data, electricity prices, and static characteristics. Assume the training set is... ,in Indicates input features, It is the target electricity price.
[0094] S320, Feature Library and Training Set Construction: For specific user profile categories, construct a feature set that matches their load behavior characteristics, and use historical load sequences, historical electricity price sequences, and statistical features as model inputs.
[0095] We need to collect and construct training samples containing the following types of features: Historical load data L={ , ,..., } represents the load value at time t in the past.
[0096] The corresponding nodal electricity price data P={ , ,..., } represents the nodal price at each time point.
[0097] Statistical characteristics: Daily average load Peak-valley difference Load fluctuation Load-electricity price correlation Statistical characteristics, etc.
[0098]
[0099] in: This represents the load sequence at time k in the past; This represents the electricity price sequence at time k in the past. This represents the statistical characteristics extracted from load and electricity price.
[0100] S330, Model Architecture Design: Select and build a structure-matching deep learning model architecture for a specific portrait category, and model different types of features through multi-channel design.
[0101] A multi-channel deep learning network architecture is provided for commercial users experiencing peak and off-peak periods. This architecture typically includes the following components: Channel 1: LSTM networks are used to process the time-series characteristics of historical load data.
[0102] Channel 2: Fully connected layers are used to process static features.
[0103] Channel 3: Attention mechanism is used to specially weight the characteristics before and after historical electricity price peak periods.
[0104] S331, Channel 1: LSTM network processes historical load data LSTM is a recurrent neural network suitable for processing time series data. LSTM networks process historical load data... Input the network and capture the time-series dependencies of the load.
[0105] The formula for calculating LSTM is: ; ; ; ; ; ; in: This represents the input load data at the current moment. ; This indicates the output at the current moment; , , , These represent the activation values of the forget gate, input gate, candidate memory, and output gate, respectively. , , , This represents the weight matrix and the calculation of the control gates; , , , This indicates the bias term.
[0106] The goal of LSTM is to learn the temporal patterns of load using historical load data.
[0107] S332, Channel 2: Fully Connected Layer Processing Static Features Static features are processed through a fully connected layer. Assume the static features are... ={ , , , The output of a fully connected layer can be expressed as: The output of a fully connected layer can be expressed as: ; in: This represents the weight matrix of the fully connected layer; Indicates the bias term; This indicates that the activation function is used to introduce nonlinearity.
[0108] S333, Channel 3: Attention mechanism weighted processing of peak electricity price periods, highlighting the impact of peak electricity prices and the periods before and after them on forecast results. Attention mechanisms are used to weight the impact of peak electricity price periods on load. Periods with larger price fluctuations typically have a stronger impact on load, and therefore can be assigned higher weights.
[0109] Assuming the rate of change in electricity prices is... Attention weights for calculating electricity prices: ; in: The attention weight at time t represents the importance of the change in electricity price at that time. This represents the rate of change in electricity prices at time t.
[0110] Then, the characteristics of peak electricity price periods are combined with the corresponding attention weights to obtain a weighted feature representation: ; S334, Model Combination and Output By combining the outputs of each channel, the final predicted electricity price is obtained. Assume the output of each channel is... , , We input these into a fully connected layer for processing to obtain the final predicted electricity price:
[0111] S340, the loss function and optimization, is used to drive the iterative update of model parameters, so that the predicted electricity price gradually approaches the actual electricity price. To train this model, the mean squared error (MSE) is used as the loss function: ; in: Indicates the actual electricity price; This represents the predicted electricity price; N represents the number of training samples.
[0112] The model parameters are updated using the backpropagation algorithm.
[0113] S350, Model Saving and Binding: After training, the trained model is saved to a model library and strongly bound to business peak-valley profile tags. Each industry category corresponds to a specific model, which is closely related to its user profile.
[0114] S400, Prediction Error Feedback and Model Iterative Optimization: After obtaining the predicted node electricity price and the actual settlement electricity price, the prediction error is calculated. Based on the error characteristics, it is determined whether the model is inaccurate or the user profile is inaccurate, and the model parameters are updated or the profile rules are revised respectively, so as to achieve continuous optimization of the prediction model library.
[0115] Example 2 This implementation provides a nodal electricity price prediction method and system based on user profiles and model library iterations, such as Figure 3 As shown, it consists of a module for receiving prediction requests, a module for querying the feature library, a module for predicting nodal electricity prices, and a module for tracing errors.
[0116] The prediction request receiving module is used to receive the prediction request and obtain the corresponding user identification information when a user submits a prediction request for the electricity price at 96 o'clock the next day.
[0117] Upon receiving a prediction request, the feature library query module first calls the feature library query and sample control module to query the user's profile category tags and their associated load scale characteristics, load pattern characteristics, and load volatility characteristics in the user dynamic feature library based on the user identifier.
[0118] The node electricity price prediction module is used to generate prediction results by calling prediction models in the model library that are strongly bound to user profile categories based on the constructed differentiated sample set.
[0119] After the market settlement is completed the next day, the error tracing module and model iteration module automatically obtain the actual 96-point node electricity price data of the corresponding node, and compare and analyze it with the predicted 96-point node electricity price curve to identify the source of prediction error.
[0120] Model Iteration and Profile Revision Module: Model Inaccuracy: Analysis revealed that the prediction error for all commercial peak-valley users was systematically high during the evening peak hours. Source tracing analysis indicated that recent additions of photovoltaic power to this node altered the evening peak supply and demand pattern, which the old model failed to learn. The model optimization center automatically activated, using recent data to fine-tune the model for this category online, quickly adapting to the new environment. Profile Inaccuracy: Analysis found that while most users in the commercial peak-valley profile were predicted accurately, a few users exhibited persistently large errors. For example, investigation revealed that these users were actually newly connected 5G communication base station customers, whose electricity consumption patterns differed from traditional commercial users, leading to misclassification by the rules. The system generated an alert and revision suggestion, suspecting the discovery of a new profile category—communication infrastructure type—and recommended expert review. After expert confirmation, corresponding rules were added to the rule base, reclassifying these users and triggering the creation of a completely new prediction model for the new category, which was then added to the model library.
[0121] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.
[0122] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, in the form of a computer program product.
[0123] Those skilled in the art will recognize that the modules and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and inventive constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0124] In addition, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.
[0125] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0126] In conclusion, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A nodal electricity price prediction method based on user profiles and model library iteration, characterized in that, Includes the following steps: S100, Construct a dynamic user feature library: Extract multi-dimensional features from historical load data, user attribute data, and load-electricity price correlation data. Through expert rule-guided clustering mechanism, determine user profile categories and form a dynamic user feature library containing user profile categories, feature vectors, and feature stability indicators. S200, Data Acquisition and Sample Set Construction: Under the constraints of the user dynamic feature library, user historical load data and nodal electricity price data are collected, filtered and fused in a differentiated manner. The sampling density, time coverage depth and feature dimension of the sample data are adaptively determined according to the user profile characteristics, and a training sample set matching the user load characteristics is constructed. S300, Personalized Prediction Model Library Initialization: Based on user profile categories, construct and train node electricity price prediction models corresponding to each profile category to form a prediction model library that is bound to each user profile category. S400, Node Price Prediction and Feedback Optimization: Upon receiving a prediction request, the corresponding prediction model is called based on the user profile category to generate the node price prediction result. After obtaining the actual settlement price, the prediction error is traced and analyzed, and the prediction model or user profile rules are updated and iterated based on the traceability results.
2. The nodal electricity price prediction method based on user profiles and model library iteration as described in claim 1, characterized in that: The step S100 of constructing a user dynamic feature library includes extracting statistical features representing load scale, load pattern and load volatility from the user's historical load time series, and combining them with the correlation features between load and nodal electricity price to form a user profile feature vector.
3. The nodal electricity price prediction method based on user profiles and model library iteration as described in claim 2, characterized in that: The user profile category is determined by comparing the unsupervised clustering results with the classification results based on the expert rule base, and verifying conflicting samples to determine the final user profile category.
4. The nodal electricity price prediction method based on user profiles and model library iteration as described in claim 3, characterized in that: In step S200, the number of sampling points and the historical time span of the load data in the sample set are adaptively adjusted based on the load scale characteristics, load pattern characteristics and load fluctuation characteristics corresponding to the user profile category.
5. The nodal electricity price prediction method based on user profile and model library iteration according to claim 4, characterized in that: When user load fluctuation is higher than a preset threshold, the sample set contains complete daily load data for 96 points; when user load fluctuation is lower than or equal to the threshold, only the load sampling points that contribute more to load changes are collected.
6. A nodal electricity price prediction method based on user profiles and model library iteration as described in claim 4 or 5, characterized in that: When user profiles indicate that their load has significant peak and valley characteristics, the sample set prioritizes retaining the time slice data corresponding to the load peak and valley segments; when the user load pattern is relatively stable, load data is obtained by using equal-interval or periodic sampling methods.
7. The nodal electricity price prediction method based on user profiles and model library iteration as described in claim 4, characterized in that: The time coverage of historical load data in the sample set is adjusted according to the average daily load of users. The higher the average daily load of users, the more days the historical load data covers.
8. The nodal electricity price prediction method based on user profiles and model library iteration as described in claim 4, characterized in that: In step S300, prediction models with different structures or parameter configurations are constructed for different user profile categories, and the trained models are bound and stored with the corresponding user profile categories.
9. The nodal electricity price prediction method based on user profiles and model library iteration as described in claim 1, characterized in that: When the prediction error of the same user profile category shows a systematic deviation, it is determined that the model is inaccurate, and the parameters of the corresponding prediction model are updated; when the prediction error is concentrated only in some users, it is determined that the user profile is inaccurate, and user profile rule revision and model reconstruction are triggered.
10. A nodal electricity price prediction system based on user profiles and model library iteration, characterized in that, include: The prediction request receiving module is used to receive the prediction request and obtain the corresponding user identification information when a user initiates a prediction request for the electricity price at 96 o'clock the next day. The feature library query module is used to query the corresponding user profile category label, as well as the load scale feature, load pattern feature and load volatility feature associated with the user profile category, in the user dynamic feature library after receiving the prediction request, based on the user identification information. The node electricity price prediction module is used to construct a differentiated sample set that matches the user profile category based on the queried user profile category and its associated features, and call the node electricity price prediction model that is strongly bound to the user profile category from the prediction model library to generate the next day's 96-point node electricity price prediction result for the user. The error tracing module is used to obtain the actual 96-point node electricity price data of the corresponding node after the market settlement is completed the next day, and compare and analyze it with the prediction results to identify the source of the prediction error. The model iteration and profile revision module is used to optimize the parameters or fine-tune the prediction model for the corresponding user profile category when the prediction error analysis results show that the model is inaccurate. Furthermore, when the prediction error analysis results indicate that the user profile is inaccurate, the user profile rules are revised or new profile categories are added, and the creation or update of the corresponding prediction model is triggered, so as to realize the iterative evolution of the prediction model library and the user profile system.