User-side load prediction method and electronic device

By decomposing user electricity consumption behavior and terminal equipment load values ​​and applying machine learning models, a load forecasting model was constructed, which solved the problem of low load forecasting accuracy on the user side and achieved higher accuracy and more stable load forecasting.

CN123034337APending Publication Date: 2026-11-03SHANGHAI PYLON TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510493653.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-18
Publication Date
2026-11-03

AI Technical Summary

Technical Problem

Existing user-side load forecasting models suffer from low accuracy and instability due to the strong fluctuations in individual household loads and significant differences in user behavior, making it difficult to meet the implementation requirements of load forecasting.

Method used

By decomposing user electricity consumption behavior characteristics and terminal equipment load values, a load prediction model is constructed. Machine learning models are then used for feature extraction and sample construction to improve prediction accuracy and stability.

Benefits of technology

It improves the accuracy and stability of residential load forecasting, enabling more accurate prediction of changes in users' electricity load and adapting to complex and ever-changing user electricity consumption behaviors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123034337A_ABST
    Figure CN123034337A_ABST
Patent Text Reader

Abstract

The application provides a user-side load prediction method and an electronic device, comprising: determining a target historical electricity load sequence corresponding to a target user; performing load terminal decomposition on each actual electricity load respectively to obtain a terminal equipment usage row matrix corresponding to each actual electricity load; performing feature extraction on the terminal equipment usage row matrix to construct a prediction sample corresponding to each prediction training day; constructing and training a load prediction model corresponding to the target user according to the prediction sample corresponding to each prediction training day in combination with a machine learning model; and inputting a prediction sample of the target user on a to-be-predicted day into the trained load prediction model to obtain load usage prediction data corresponding to the to-be-predicted day. The load data generated by the user is decomposed through the user electricity behavior characteristics and the terminal equipment load value, and a corresponding load prediction model is built based on the decomposition result, so that the resident load prediction precision and stability are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of machine learning technology, and in particular to a user-side load prediction method and electronic device. Background Technology

[0002] With the growth of residential load and the popularization of smart devices, residential users have become important target users of demand response. At the same time, the development of smart grid, communication network technology and sensor technology has led to an exponential increase in the complexity of power user-side data, which has gradually formed user-side big data. Furthermore, under the new power system, energy consumption patterns are becoming more diversified, user diversification is obvious, and user electricity behavior is becoming more complex.

[0003] Therefore, various classic time-series forecasting models have been proposed for user-side load data forecasting. However, due to the strong fluctuations in individual household loads and the large differences in user behavior, the accuracy of existing models based on user-side load data forecasting for residential load forecasting is generally low, and the forecasting effect is unstable, which is not conducive to the implementation of load forecasting. Summary of the Invention

[0004] In view of this, the purpose of this application is to provide at least one user-side load forecasting method and electronic device, which decomposes the load data generated by users through user electricity consumption behavior characteristics and terminal equipment load values, and builds a corresponding load forecasting model based on the decomposition results, thereby improving the accuracy and stability of residential load forecasting.

[0005] This application mainly includes the following aspects:

[0006] In a first aspect, embodiments of this application provide a user-side load forecasting method, the method comprising: determining a target historical electricity load sequence corresponding to a target user, the target historical electricity load sequence including the actual electricity load generated by the target user at each hour node within a historical time period; performing load terminal decomposition on each actual electricity load to obtain a terminal equipment usage row matrix corresponding to each actual electricity load, the terminal equipment usage row matrix describing the usage status of various types of terminal equipment used by the user; using each day within the historical time period as a forecast training day, extracting features from the terminal equipment usage row matrix, and constructing a forecast sample corresponding to each forecast training day based on the extracted features; constructing and training a load forecasting model corresponding to the target user based on the forecast sample corresponding to each forecast training day, combined with a machine learning model; inputting the forecast sample of the target user on the day to be forecasted into the trained load forecasting model, and obtaining the load usage forecast data corresponding to the day to be forecasted output by the trained load forecasting model, the load usage forecast data including the forecast electricity load of the target user at each hour node within the day to be forecasted.

[0007] In one possible implementation, the target historical electricity load sequence corresponding to the target user is determined by: collecting the actual electricity load of the target user within a historical time period according to a collection frequency that can cover whole time nodes, forming the corresponding initial historical electricity load sequence; taking the actual electricity load generated by each hour node from the initial historical electricity load sequence to form the historical electricity load sequence to be processed; cleaning the historical electricity load sequence to be processed, and forming the target historical electricity load sequence from the historical electricity load sequence after data cleaning.

[0008] In one possible implementation, data cleaning of the historical electricity load sequence to be processed is performed as follows: For each day within the user's historical time period, the following processing is performed: Based on the historical electricity load sequence to be processed, determine whether the number of data collection records corresponding to that day is equal to 24; if the number of data collection records corresponding to that day is equal to 24, then no processing is performed on the data for that day; if the number of data collection records corresponding to that day is less than 24 but greater than or equal to a preset collection quantity threshold, then traverse the data for that day, determine the missing hour nodes, and fill in the actual electricity load corresponding to the missing hour nodes using the Lagrange interpolation method; if the number of data collection records corresponding to that day is less than the preset collection quantity threshold, then delete all load data collected on that day.

[0009] In one possible implementation, the actual electricity load is decomposed into terminal devices as follows: Terminal devices are decomposed based on the target historical electricity load sequence to determine the types of terminal devices used by users and the terminal loads corresponding to different types of terminal devices; load restoration is performed on each actual electricity load based on the types of terminal devices used by users, the terminal loads corresponding to each type of terminal device, and the user's electricity consumption behavior to determine the target terminal device combination for each actual electricity load. The target terminal device combination includes the terminal devices used to form the actual electricity load and their quantity; based on the target terminal device combination, the terminal device usage row matrix corresponding to the actual electricity load is determined.

[0010] In one possible implementation, terminal devices are decomposed as follows: the actual electricity loads in the target historical electricity load sequence are sorted in ascending order to obtain a processed electricity load sequence; adjacent actual electricity loads in the processed electricity load sequence are subtracted sequentially to obtain a sequence of electricity load difference values, where each difference value represents the superposition of terminal loads corresponding to at least one terminal device; for each difference value in the electricity load difference sequence, it is determined whether the difference value is less than an invalid load threshold; if the difference value is less than the invalid load threshold, the difference value is deleted to obtain a processed electricity load difference sequence; based on the processed electricity load difference sequence, the type of terminal device used by the user and the terminal loads corresponding to different types of terminal devices are determined using an exhaustive method.

[0011] In one possible implementation, load restoration is performed for each actual power load in the following manner: based on different user power consumption behaviors, multiple feasible terminal device combinations corresponding to the actual power load are determined, wherein user power consumption behaviors include turning on different types of terminal devices, turning on the same type of terminal devices, and turning on a mixture of the same type and different types of terminal devices, and the absolute value of the difference between the total equipment load corresponding to the feasible terminal device combination and the actual power load is less than a given error threshold; the feasible terminal device combination with the smallest total number of terminal devices used is determined as the target terminal device combination for the actual power load.

[0012] In one possible implementation, the prediction samples corresponding to each prediction training day are determined as follows: a two-dimensional feature matrix is ​​formed using a row matrix of terminal devices corresponding to each actual electricity load. The rows in the two-dimensional feature matrix represent the actual electricity load corresponding to the collection time, and the columns represent the terminal device type. Using a given sliding window, with the prediction training day as the starting point and the unit day as the sliding step size, a time-series feature matrix corresponding to each type of terminal device is extracted from the two-dimensional feature matrix. The rows of the time-series feature matrix represent the hour nodes corresponding to each day, and the columns represent the sliding period. Based on the date attribute information corresponding to the prediction training day, a date attribute feature corresponding to the prediction training day is constructed.

[0013] The prediction sample corresponding to the prediction training day is constructed from the time-series feature matrix and date attribute features corresponding to each type of terminal device.

[0014] In one possible implementation, a load usage prediction model for the target user is constructed as follows: multiple training samples are divided into a training set and a test set according to a preset ratio; a load prediction model is constructed using a machine learning model and the training set; the load usage prediction model is evaluated using the test set, and the evaluation result is determined; if the evaluation result indicates that the test has passed, the training of the load prediction model is completed, and a trained load prediction model is obtained; if the evaluation result indicates that the test has failed, the training is re-trained using the training set.

[0015] In one possible implementation, the evaluation result is determined as follows: For each prediction training day in the test set, the following steps are performed: input the test sample corresponding to the prediction training day into the load prediction model to obtain the load usage prediction data corresponding to the prediction training day; calculate the mean absolute percentage error corresponding to the prediction training day based on the actual electricity load corresponding to each hour node in the prediction training day and the load usage prediction data corresponding to the prediction training day; calculate the mean among the mean absolute percentage errors corresponding to all prediction training days in the test set, and determine the mean as the evaluation index value of the load prediction model; if the evaluation index value is less than a given error threshold, the evaluation result is determined to be a pass; if the evaluation index value is greater than or equal to the given error threshold, the evaluation result is determined to be a fail.

[0016] Secondly, embodiments of this application also provide an electronic device, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the memory communicate via the bus. The machine-readable instructions are executed by the processor to perform the steps of the user-side load prediction method provided in any of the above embodiments.

[0017] This application provides a user-side load forecasting method and electronic device. The method includes: determining a target historical electricity load sequence corresponding to a target user, the target historical electricity load sequence including the actual electricity load generated by the target user at each hour node within a historical time period; performing load terminal decomposition on each actual electricity load to obtain a terminal equipment usage row matrix corresponding to each actual electricity load, the terminal equipment usage row matrix describing the usage status of various types of terminal equipment used by the user; using each day within the historical time period as a prediction training day, extracting features from the terminal equipment usage row matrix, and constructing prediction samples corresponding to each prediction training day based on the extracted features; constructing and training a load forecasting model corresponding to the target user based on the prediction samples corresponding to each prediction training day and combining them with a machine learning model; inputting the prediction samples of the target user on the day to be predicted into the trained load forecasting model, and obtaining the load usage forecasting data corresponding to the day to be predicted output by the trained load forecasting model, the load usage forecasting data including the predicted electricity load of the target user at each hour node within the day to be predicted. By decomposing the load data generated by the user through user electricity consumption behavior characteristics and terminal equipment load values, and building a corresponding load forecasting model based on the decomposition results, the accuracy and stability of residential load forecasting are improved.

[0018] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0019] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 A flowchart of a user-side load prediction method provided in an embodiment of this application is shown;

[0021] Figure 2 A flowchart of a load terminal decomposition step provided in an embodiment of this application is shown;

[0022] Figure 3 A flowchart illustrating a terminal device disassembly process provided in an embodiment of this application is shown;

[0023] Figure 4 A flowchart of a load restoration step provided in an embodiment of this application is shown;

[0024] Figure 5 A flowchart of a prediction sample construction step provided in an embodiment of this application is shown;

[0025] Figure 6 This paper illustrates a functional block diagram of a user-side load forecasting device provided in an embodiment of this application.

[0026] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of this application is shown. Detailed Implementation

[0027] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the drawings in this application are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or implemented simultaneously. In addition, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.

[0028] Furthermore, the described embodiments are merely some, not all, of the embodiments of this application. The components of the embodiments of this application described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0029] With the growth of residential load and the popularization of smart devices, residential users have become important target users of demand response. At the same time, the development of smart grid, communication network technology and sensor technology has led to an exponential increase in the complexity of power user-side data, gradually forming user-side big data. Furthermore, under the new power system, energy consumption patterns are becoming increasingly diversified, user diversification is obvious, and user electricity behavior is more complex. Therefore, various classic time series forecasting models have been proposed. However, due to the strong fluctuation of individual household load and the large differences in user behavior, the accuracy of residential load forecasting is generally low, and the existing user electricity load forecasting effect is unstable, which is not conducive to the implementation of load forecasting.

[0030] Based on this, embodiments of this application provide a user-side load forecasting method and electronic device. The method decomposes the load data generated by users based on user electricity consumption behavior characteristics and terminal device load values, and builds a corresponding load forecasting model based on the decomposition results, thereby improving the accuracy and stability of residential load forecasting. The details are as follows:

[0031] Please see Figure 1 , Figure 1 A flowchart of a user-side load prediction method provided in an embodiment of this application is shown. Figure 1 As shown, the method provided in this application embodiment includes the following steps:

[0032] S100. Determine the target historical electricity load sequence corresponding to the target user.

[0033] The target historical electricity load sequence includes the actual electricity load generated by the target user at each hourly node within the historical time period.

[0034] S200. Decompose the load terminals for each actual power load to obtain the row matrix of terminal equipment usage for each actual power load.

[0035] The terminal device usage row matrix describes the deployment and usage of various types of terminal devices used by users.

[0036] S300. Using each day within the historical time period as the prediction training day, feature extraction is performed on the terminal device using a row matrix, and prediction samples corresponding to each prediction training day are constructed based on the extracted features.

[0037] S400. Based on the prediction samples corresponding to each prediction training day, and combined with the machine learning model, construct and train the load prediction model corresponding to the target user.

[0038] S500: Input the predicted sample of the target user on the day to be predicted into the trained load prediction model, and obtain the load usage prediction data corresponding to the day to be predicted output by the trained load prediction model.

[0039] The load usage forecast data includes the predicted electricity load of the target user at each hourly node on the day to be forecasted.

[0040] The method provided in steps S100 to S500 mainly considers the situation where the user-side load has poor regularity and random fluctuations. Combining the user's actual electricity consumption scenario, the actual electricity load corresponding to each hour node is decomposed into load terminals to determine the decomposition results, namely, all types of terminal equipment used by the user and the actual usage status of each type of terminal equipment under the actual electricity load corresponding to different time sequences. Based on the decomposition results, feature extraction and prediction sample construction are performed. The constructed samples are then used to build a corresponding load prediction model. The constructed load prediction model is then used to further predict the user-side load. In this process, the aim is to analyze the user's electricity consumption behavior to further explore the types of terminal equipment used by the user and the patterns of turning different terminal equipment on or off. Based on the mining and analysis results, a corresponding prediction model is further built. Compared with the prediction model built by the existing technology that only relies on the initial electricity consumption data, the prediction accuracy and model prediction stability are improved.

[0041] In a preferred embodiment, step S100 includes:

[0042] The actual electricity load of the target user within a historical time period is collected at a collection frequency that can cover whole time nodes, forming a corresponding initial historical electricity load sequence. The actual electricity load generated by each hour node is taken from the initial historical electricity load sequence to form a historical electricity load sequence to be processed. The historical electricity load sequence to be processed is cleaned, and the target historical electricity load sequence is formed from the historical electricity load sequence after data cleaning.

[0043] In practice, the electricity load data generated by the target user within a historical time period (e.g., the past 5 years, without specific limitations) can be collected at a frequency of 15 minutes to form an initial historical electricity load sequence. This collection frequency can ensure that the actual electricity load corresponding to the whole hour node can be collected, ensuring the normal operation of subsequent processes.

[0044] In this application, the initial historical electricity load sequence can ensure that the hourly electricity load obtained is the actual usage load of the target user, and also facilitates interpolation processing during the subsequent data cleaning process, making the interpolation results more accurate.

[0045] In a preferred embodiment, the historical electricity load sequence to be processed is cleaned in the following manner:

[0046] For each day within a user's historical time period, the following processing is performed: Based on the historical electricity load sequence to be processed, determine whether the number of data collection records corresponding to that day is equal to 24. If the number of data collection records corresponding to that day is equal to 24, then no processing is performed on the data for that day. If the number of data collection records corresponding to that day is less than 24 but greater than or equal to a preset collection quantity threshold, then traverse the data for that day, determine the missing hour nodes, and use Lagrange interpolation to fill in the actual electricity load corresponding to the missing hour nodes. If the number of data collection records corresponding to that day is less than the preset collection quantity threshold, then delete all load data collected for that day.

[0047] In one example, this application needs to process missing data in the historical electricity load sequence to be processed. The historical electricity load sequence to be processed is an hourly time series. Therefore, the specific processing method provided by this application is as follows:

[0048] Data from the historical electricity load sequence to be processed is processed on a daily basis. Assuming a preset threshold of 16 data collections, specifically, for the hourly historical electricity load sequence to be processed, the number of data collections per day should be 24. Therefore, for the daily data collection, it is determined whether the number of data collections for that day is exactly 24. If the number of data collections for that day is exactly 24, it means that there is no missing data for that day, and no processing is performed. If the number of data collections for that day is less than 24 but greater than or equal to 16, the load data collected for that day is traversed to identify hourly nodes with missing data. Combining the load data for that day in the historical electricity load sequence to be processed or the load data for that day in the initial historical electricity load sequence, the Lagrange interpolation method is used to fill in the actual electricity load corresponding to the missing hourly nodes. Since the household load data exhibits obvious non-linear fluctuations, the Lagrange interpolation method can effectively reduce the errors caused by missing values.

[0049] If the number of data entries collected on a given day is less than 16, it means that the data for that day is no longer meaningful, and the data for that day will be deleted.

[0050] In one specific embodiment, for the day to be filled using Lagrange interpolation, there are no missing hour nodes and their corresponding actual electricity loads, forming a sequence to be filled for the day. Assuming the sequence includes m load data points arranged in order and known, each load data point includes an hour node and its corresponding actual electricity load, the actual electricity load corresponding to the missing hour node in the day to be filled is determined using the following formula:

[0051]

[0052] In formula (1), x represents the missing hour node, L(x) represents the actual electricity load corresponding to the missing hour node, and y i This represents the actual electricity load corresponding to the i-th load data point in the sequence to be filled for the day to be filled. i (x) represents y i The corresponding Lagrange basis functions, specifically:

[0053]

[0054] In formula (2), x j This represents the j-th hour node in the sequence to be filled. Assume the sequence includes (x0, y0), (x1, y1), ..., (x... i ,y i ...(x) m ,y m ),but:

[0055] If i = 0, then

[0056] If i = 1, then ......

[0058] By analogy, the fill function corresponding to the day to be filled is finally obtained:

[0059] L(x)=y0×l0(x)+y1×l0(x)+...+y i ×l i (x)+…+y m ×l m (x)

[0060] By substituting the missing hour node x into the above fill function, the corresponding actual electricity load can be obtained.

[0061] In a preferred embodiment, please refer to Figure 2 , Figure 2 A flowchart illustrating a load terminal decomposition step provided in an embodiment of this application is shown. Figure 2As shown, step S200 includes:

[0062] S201. Based on the target historical electricity load sequence, decompose the terminal equipment to determine the type of terminal equipment used by the user and the terminal load corresponding to different types of terminal equipment.

[0063] S202. Based on the type of terminal equipment used by the user, the terminal load corresponding to each type of terminal equipment, and the user's electricity consumption behavior, perform load restoration for each actual power load and determine the target terminal equipment combination for each actual power load.

[0064] The target terminal equipment combination includes the terminal equipment used to form the actual power load and its quantity.

[0065] S203. Based on the target terminal equipment combination, determine the row matrix of terminal equipment usage corresponding to the actual power load.

[0066] Existing load forecasting methods based on time-series feature extraction can extract periodic user information, but they are difficult to predict irregular and sporadic electricity consumption behaviors. Therefore, the prediction accuracy of existing prediction models is low. In this application, we consider that the total load of a user is actually the sum of the terminal loads corresponding to individual terminal devices. Irregular and rapidly changing electricity loads are often caused by certain terminal devices being turned on. Therefore, this application provides a method based on user electricity consumption behavior, which decomposes the actual electricity load generated by the user according to the different types of terminal devices used by the user, extracts features based on the decomposition results, and creates corresponding load forecasting models. This can improve the accuracy of predicting irregular loads to a certain extent.

[0067] In a preferred embodiment, please refer to Figure 3 , Figure 3 A flowchart illustrating a terminal device disassembly process provided in an embodiment of this application is shown. Figure 3 As shown, step S201 includes:

[0068] S2010. Sort the actual electricity load in the target historical electricity load sequence in ascending order to obtain the electricity load processing sequence.

[0069] Specifically, for the target historical electricity load sequence [y1, y2, y3]... k …y n ], y k This represents the k-th actual electricity load in the target historical electricity load sequence, where n represents the length of the target historical electricity load sequence. The target historical electricity load sequence [y1, y2, y3] is then used to define the k-th actual electricity load in the sequence. k …y nSort the loads in ascending order according to their actual power load size to obtain the power load processing sequence [O1, O2, O...]. k …O n ].

[0070] S2011. Take the difference between adjacent actual power loads in the power load processing sequence in sequence to obtain a power load difference sequence formed by multiple difference values.

[0071] In this sequence, each difference in the electricity load difference represents the superposition of the terminal load corresponding to at least one terminal device. Specifically, the electricity load difference sequence can be represented as [O2-O1, O3-O2, ... O n -O n-1 ].

[0072] S2012. For each difference in the electricity load difference sequence, determine whether the difference is less than the ineffective load threshold.

[0073] S2013. For each difference in the electricity load difference sequence, if the difference is less than the invalid load threshold, then delete the difference.

[0074] S2014. For each difference in the electricity load difference sequence, if the difference is greater than or equal to the ineffective load threshold, determine whether the next difference is less than the ineffective load threshold, until the last difference.

[0075] S2015. Determine the processed power load difference sequence.

[0076] Preferably, the invalid load threshold is given in advance. Taking O2-O1 as an example, when O2-O1 is less than the invalid load threshold, it means that the actual power load corresponding to the two adjacent hour nodes is basically the same. It can be understood that the user did not turn on or off the terminal device in these two adjacent hour nodes. Therefore, this difference is useless for the subsequent decomposition of the terminal device, so O2-O1 is deleted. If O2-O1 is greater than or equal to the invalid load threshold, then determine whether the next difference O3-O2 is less than the invalid load threshold, until the last difference, to obtain the processed power load difference sequence.

[0077] S2016. Based on the processed power load difference sequence, use an exhaustive method to determine the type of terminal equipment used by the user and the terminal load corresponding to different types of terminal equipment.

[0078] In step S2016, for the processed electricity load difference sequence, the differences formed by combinations of terminal loads corresponding to different types of terminal equipment are eliminated by exhaustive search and duplicates are removed, finally obtaining the terminal load matrix [T1, T2...T ... s ], T s This represents the terminal load corresponding to a Class S terminal device of the target user.

[0079] In a preferred embodiment, please refer to Figure 4 , Figure 4 A flowchart illustrating a load restoration step provided in an embodiment of this application is shown. Figure 4 As shown, step S202 includes:

[0080] S2020. For each actual power load, based on different user power consumption behaviors, determine multiple feasible terminal equipment combinations corresponding to the actual power load.

[0081] In this process, based on the terminal loads corresponding to the various types of terminal devices used by the user obtained in step S201, for each actual power load, it is necessary to decompose the actual power load into a combination of similar and / or different types of terminal devices. In order to simulate the user's real power consumption behavior to the greatest extent, and in combination with the load changes brought about by the user's power consumption behavior, it is necessary to consider multiple user power consumption behaviors to determine the feasible combination of terminal devices corresponding to each actual power load. Specifically, user power consumption behaviors include turning on different types of terminal devices, turning on the same type of terminal devices, and turning on different and the same types of terminal devices in combination.

[0082] Based on actual electricity load y k For example, to account for tolerance, for a certain combination of terminal equipment, if the total equipment load corresponding to the combination of terminal equipment is less than or equal to the actual power load y... k If the absolute value of the difference between the two is less than a given error threshold, then the combination of terminal devices is determined as the actual power load y. k The corresponding feasible combinations of terminal devices.

[0083] S2021. For each actual power load, the feasible combination of terminal equipment with the smallest total number of terminal equipment used is determined as the target combination of terminal equipment for that actual power load.

[0084] Preferably, the user electricity consumption behavior provided in this application covers user usage scenarios. Considering real-world user scenarios and to reduce computational complexity, the load restoration process provided in this paper aims to construct the actual electricity load using the minimum number of terminal devices. For example, the actual electricity load y k =3KW, so this application prioritizes a combination of 2KW+700W+300W, rather than combining 10 300W terminal devices. This decomposition method is more in line with the actual electricity consumption behavior of users.

[0085] In one specific embodiment, return Figure 3 In step S203, it is assumed that the actual electrical load y k The corresponding target terminal combination is [T2, T3, T]. s ×2], then the actual electricity load yk The corresponding terminal device row matrix is ​​[T1×0, T2×1, T3×1, ...T s [×2] In this terminal device row matrix, it indicates that the first type of terminal device is not turned on, one second type of terminal device is turned on, one third type of terminal device is turned on, ... two s type of terminal devices are turned on. Finally, the sum of the terminal loads corresponding to the terminal devices in the terminal device row matrix is ​​equal to the actual power load y. k The effective range represents the actual electricity load y. k The data has been restored, meaning that each actual electrical load corresponds to a 1×s matrix, where s is the decomposed terminal type.

[0086] In a preferred embodiment, please refer to Figure 5 , Figure 5 A flowchart illustrating a prediction sample construction step provided in an embodiment of this application is shown. Figure 5 As shown, step S300 includes:

[0087] S301. A two-dimensional feature matrix is ​​formed by using row matrices for each terminal device corresponding to each actual power load.

[0088] In the two-dimensional feature matrix, the rows represent the actual electricity load corresponding to the collection time, and the columns represent the terminal device type. Specifically, the target historical electricity load sequence [y1, y2, y3] is... k …y n After all the actual electrical loads in the data have been restored, an n×s two-dimensional feature matrix will be generated.

[0089] S302. Using a given sliding window, with the predicted training day as the starting point of the sliding and the unit day as the sliding step size, extract the time-series feature matrix corresponding to each type of terminal device from the two-dimensional feature matrix.

[0090] The rows of the time-series feature matrix represent the hour nodes corresponding to each day, and the columns of the time-series feature matrix represent the sliding period. In a specific embodiment, the length of the given sliding window is 24 (i.e., 24 hour nodes), and the width of the given sliding window is the number of terminal device types. Assuming the sliding period is 21, the data within the sliding window is the actual electricity load corresponding to all hour nodes within a single day. Taking the S-type terminal device as an example, for each prediction training day, the usage data corresponding to the S-type terminal device for the 21 days prior to the prediction training day is extracted using the given sliding window to form the time-series feature matrix corresponding to this type of terminal device. For each prediction training day, 21 features can be extracted for each type of terminal device, so 21×s features can be extracted for the S-type terminal device.

[0091] S303. Based on the date attribute information corresponding to the predicted training day, construct the date attribute features corresponding to the predicted training day.

[0092] In this application, in addition to the extraction of the time series feature matrix, since the actual electricity load of users is also affected by date attributes such as non-working days and holidays, date attribute features are constructed for each prediction training day. The date attribute features include the quarter, month, week, week number of the month, whether it is a holiday, day of the year, and the time node of the day. That is, each hour node in the prediction training day has a corresponding date attribute feature row.

[0093] S304. Construct the prediction sample corresponding to the prediction training day from the time-series feature matrix and date attribute features corresponding to each type of terminal device.

[0094] Specifically, the final predicted sample includes a total of 21×s+7 features.

[0095] In a preferred embodiment, step S400 includes:

[0096] Multiple training samples are divided into training and test sets according to a preset ratio. A load prediction model is built using a machine learning model and the training set. The load usage prediction model is evaluated using the test set. The evaluation result is determined. If the evaluation result indicates that the test has passed, the training of the load prediction model is completed and a trained load prediction model is obtained. If the evaluation result indicates that the test has failed, the training set is used to retrain the model.

[0097] Specifically, the preset ratio can be 8:2, and there is no specific limitation here. It can be set according to actual needs. In a specific example, the machine learning model can use the tree model algorithm XGboost, adjust the corresponding hyperparameter learn_rate (learning rate) to 0.05, the maximum tree depth max_depth to 9, and the number of trees n_estimators to 100. The load prediction model is obtained by training with the training set, and then the load prediction model is evaluated using the test set.

[0098] In a preferred embodiment, the evaluation result is determined in the following manner:

[0099] For each prediction training day in the test set, the following steps are performed: Input the test sample corresponding to the prediction training day into the load prediction model to obtain the load usage prediction data corresponding to the prediction training day. Based on the actual electricity load corresponding to each hour node in the prediction training day and the load usage prediction data corresponding to the prediction training day, calculate the mean absolute percentage error corresponding to the prediction training day. Calculate the mean of the mean absolute percentage errors corresponding to all prediction training days in the test set. Determine the mean as the evaluation index value of the load prediction model. If the evaluation index value is less than the given error threshold, the evaluation result is determined to be passed. If the evaluation index value is greater than or equal to the given error threshold, the evaluation result is determined to be failed.

[0100] In one specific embodiment, the formula for calculating the mean absolute percentage error corresponding to the prediction training day is:

[0101]

[0102] In this formula, Mape represents the mean absolute percentage error corresponding to the prediction training day, Q represents the number of hourly nodes corresponding to the prediction training day (24 for hourly nodes), and y q_pre y represents the predicted electricity load corresponding to the node in the qth hour of the prediction training day. q_true This represents the actual electricity load corresponding to the node in the qth hour of the predicted training day.

[0103] Based on the same application concept, this application also provides a user-side load forecasting device corresponding to the user-side load forecasting method provided in the above embodiments. Since the principle of the device in this application is similar to the user-side load forecasting method in the above embodiments of this application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.

[0104] Please see Figure 6 , Figure 6 A functional block diagram of a user-side load forecasting device provided in an embodiment of this application is shown. Figure 6 As shown, the device includes:

[0105] The determination module 600 is used to determine the target historical electricity load sequence corresponding to the target user. The target historical electricity load sequence includes the actual electricity load generated by the target user at each hour node within the historical time period.

[0106] The load terminal decomposition module 610 is used to decompose each actual power load into a load terminal, and obtain the terminal equipment usage row matrix corresponding to each actual power load. The terminal equipment usage row matrix describes the usage status of various types of terminal equipment used by the user.

[0107] The feature extraction module 620 is used to use each day in the historical time period as the prediction training day, extract features from the terminal device using a row matrix, and construct the prediction sample corresponding to each prediction training day based on the extracted features.

[0108] Training module 630 is used to construct and train the load prediction model for the target user based on the prediction samples corresponding to each prediction training day and in combination with the machine learning model.

[0109] The prediction module 640 is used to input the prediction samples of the target user on the day to be predicted into the trained load prediction model, and obtain the load usage prediction data corresponding to the day to be predicted output by the trained load prediction model. The load usage prediction data includes the predicted electricity load of the target user at each hour node on the day to be predicted.

[0110] Based on the same application concept, please refer to Figure 7 , Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of this application is shown. Figure 7 As shown, the electronic device 700 includes a processor 710, a memory 720, and a bus 730. The memory 720 stores machine-readable instructions that can be executed by the processor 710. When the electronic device 700 is running, the processor 710 and the memory 720 communicate through the bus 730. The machine-readable instructions are executed by the processor 710 to perform the steps of any of the user-side load prediction methods provided in the above embodiments.

[0111] Based on the same concept, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when run by a processor, executes the steps of the user-side load prediction method provided in the above embodiments.

[0112] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here. In the several embodiments provided in this application, it should be understood that the disclosed device and method can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division; in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection may be through some communication interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.

[0113] In addition, the functional modules in the various embodiments of this application can be integrated into one processing unit, or each module can exist physically separately, or two or more units can be integrated into one unit.

[0114] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0115] The above are merely specific embodiments 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.

Claims

1. A user-side load forecasting method, characterized in that, The method includes: Determine the target historical electricity load sequence corresponding to the target user. The target historical electricity load sequence includes the actual electricity load generated by the target user at each hour node within the historical time period. Each actual power load is decomposed into load terminals to obtain a row matrix of terminal equipment usage corresponding to each actual power load. The row matrix of terminal equipment usage describes the usage status of various types of terminal equipment used by the user. Each day within a historical time period is used as a prediction training day. Features are extracted from the terminal devices using a row matrix, and prediction samples are constructed based on the extracted features for each prediction training day. Based on the prediction samples corresponding to each prediction training day, and combined with the machine learning model, a load prediction model for the target user is constructed and trained. Input the predicted sample of the target user on the day to be predicted into the trained load prediction model, and obtain the load usage prediction data corresponding to the day to be predicted output by the trained load prediction model. The load usage prediction data includes the predicted electricity load of the target user at each hour node on the day to be predicted.

2. The method according to claim 1, characterized in that, The target historical electricity load sequence corresponding to the target user is determined by the following method: Collect the actual electricity load of the target user within a historical time period according to the collection frequency that can cover the whole time node, and form the corresponding initial historical electricity load sequence; The actual electricity load generated by each hour node is taken from the initial historical electricity load sequence to form a historical electricity load sequence to be processed; The historical electricity load sequence to be processed is cleaned, and the target historical electricity load sequence is formed from the cleaned historical electricity load sequence.

3. The method according to claim 2, characterized in that, The historical electricity load sequence to be processed is cleaned using the following methods: For each day within a user's historical time period, perform the following processing: Based on the historical electricity load sequence to be processed, determine whether the number of data collection entries for that day is equal to 24; If the number of data entries collected on a given day is 24, then no processing will be performed on the data for that day. If the number of data collections for that day is less than 24 and greater than or equal to the preset collection quantity threshold, then the data for that day is traversed to determine the missing hour nodes, and the actual electricity load corresponding to the missing hour nodes is filled using the Lagrange interpolation method. If the number of data entries collected on a given day is less than the preset data collection threshold, then all load data collected on that day will be deleted.

4. The method according to claim 1, characterized in that, The actual electrical load is decomposed into load terminals using the following method: Based on the target historical electricity load sequence, the terminal equipment is decomposed to determine the type of terminal equipment used by the user and the terminal load corresponding to different types of terminal equipment. Based on the type of terminal equipment used by the user, the terminal load corresponding to each type of terminal equipment, and the user's electricity consumption behavior, load restoration is performed on each actual electricity load to determine the target terminal equipment combination for each actual electricity load. The target terminal equipment combination includes the terminal equipment used to form the actual electricity load and its quantity. Based on the target terminal equipment combination, determine the terminal equipment usage row matrix corresponding to the actual power load.

5. The method according to claim 4, characterized in that, Terminal devices are disassembled in the following ways: The actual electricity loads in the target historical electricity load sequence are sorted in ascending order to obtain the electricity load processing sequence. The adjacent actual power loads in the power load processing sequence are subtracted sequentially to obtain a power load difference sequence formed by multiple differences. Each difference in the power load difference sequence represents the superposition of terminal loads corresponding to at least one terminal device. For each difference in the power load difference sequence, determine whether the difference is less than the invalid load threshold. If the difference is less than the invalid load threshold, delete the difference to obtain the processed power load difference sequence. Based on the processed electricity load difference sequence, the exhaustive method is used to determine the type of terminal equipment used by the user and the terminal load corresponding to different types of terminal equipment.

6. The method according to claim 4, characterized in that, Load restoration is performed for each actual electrical load using the following method: Based on different user electricity consumption behaviors, multiple feasible terminal device combinations corresponding to the actual electricity load are determined. The user electricity consumption behaviors include turning on different types of terminal devices, turning on the same type of terminal devices, and turning on both the same type and different types of terminal devices. The absolute value of the difference between the total equipment load corresponding to the feasible terminal device combination and the actual electricity load is less than a given error threshold. The feasible combination of terminal devices with the smallest total number of terminal devices is determined as the target combination of terminal devices for the actual power load.

7. The method according to claim 1, characterized in that, The prediction samples for each prediction training day are determined using the following method: A two-dimensional feature matrix is ​​formed by using a row matrix for each terminal device corresponding to the actual power load. The rows in the two-dimensional feature matrix represent the actual power load corresponding to the collection time, and the columns in the two-dimensional feature matrix represent the terminal device type. Using a given sliding window, with the predicted training day as the starting point of the sliding and the unit day as the sliding step size, the time-series feature matrix corresponding to each type of terminal device is extracted from the two-dimensional feature matrix. The rows of the time-series feature matrix represent the hour nodes corresponding to each day, and the columns of the time-series feature matrix represent the sliding period. Based on the date attribute information corresponding to the predicted training day, construct the date attribute features corresponding to the predicted training day; The prediction sample corresponding to the prediction training day is constructed from the time-series feature matrix corresponding to each type of terminal device and the date attribute features.

8. The method according to claim 1, characterized in that, The load usage prediction model for the target users is constructed using the following methods: Multiple training samples are divided into training and test sets according to a preset ratio; Utilize machine learning models and training sets to construct load prediction models; The load usage prediction model was evaluated using a test set to determine the evaluation results; If the evaluation results indicate that the test has passed, then the training of the load forecasting model is complete, and a trained load forecasting model is obtained. If the evaluation result indicates that the test failed, then retraining is performed using the training set.

9. The method according to claim 8, characterized in that, The evaluation results are determined in the following ways: For each prediction training day in the test set, perform the following: input the test sample corresponding to the prediction training day into the load prediction model to obtain the load usage prediction data corresponding to the prediction training day; Based on the actual electricity load corresponding to each hour node in the prediction training day and the load usage prediction data corresponding to the prediction training day, calculate the average absolute percentage error corresponding to the prediction training day. Calculate the mean of the average absolute percentage errors among all predicted training days in the test set, and determine the mean as the evaluation index value of the load forecasting model. If the value of the evaluation index is less than the given error threshold, the evaluation result is determined to be a pass. If the value of the evaluation index is greater than or equal to the given error threshold, the evaluation result is determined to be an evaluation failure.

10. An electronic device, characterized in that, include: The device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. The machine-readable instructions are executed by the processor to perform the steps of the user-side load forecasting method as described in any one of claims 1 to 9.