Power grid load prediction method based on regression analysis
By combining the aggregation of smart meter data and environmental data with wavelet transform feature extraction, a load prediction model is trained, which solves the problem of insufficient accuracy of traditional models in power grid load prediction and realizes flexible and accurate smart grid management for various application scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 刘英
- Filing Date
- 2025-05-19
- Publication Date
- 2026-05-01
AI Technical Summary
Traditional load forecasting models fail to effectively utilize the synergistic advantages of wavelet transform and regression analysis, making it difficult to accurately capture the local fluctuation characteristics of power grid load in different regions and at different times, resulting in insufficient forecast accuracy.
By acquiring electricity consumption data and environmental data collected by smart meters, aggregating and extracting features, and using a combination of wavelet transform and regression analysis to train a load prediction model, the model captures electricity consumption and environmental characteristics, thereby improving prediction accuracy.
It enables accurate prediction of grid load, improves the flexibility and accuracy of the model, is applicable to load changes in different regions and time periods, and supports flexible management of smart grids.
Smart Images

Figure CN121960892A_ABST
Abstract
Description
A Power Grid Load Forecasting Method Based on Regression Analysis
[0001] This invention patent application is a divisional application. The original application number is 202510639234.9, the application date is May 19, 2025, and the invention title is "A Power Grid Management Method Based on Artificial Intelligence". Technical Field
[0002] This application relates to the field of artificial intelligence, and in particular to a power grid load forecasting method based on regression analysis. Background Technology
[0003] The power grid is a crucial component of the power system, responsible for transmitting electricity generated by power plants through transmission lines to various electricity-consuming areas, and then distributing the electricity to end users through the distribution network. However, traditional load forecasting models do not effectively utilize the combined advantages of wavelet transform and regression analysis, resulting in difficulties in accurately capturing the local load fluctuation characteristics of different regions and time periods (such as instantaneous load changes in commercial areas and peak nighttime electricity consumption in residential areas), and difficulties in engineering implementation. Summary of the Invention
[0004] The main objective of this invention is to provide a power grid load forecasting method based on regression analysis, comprising: step S101, acquiring electricity consumption data collected by smart meters and environmental data of the corresponding electricity consumption area; step S102, aggregating the electricity consumption data and the environmental data based on a preset scale to obtain electricity consumption time-series data and environmental time-series data; specifically including, based on a preset time scale, calculating the mathematical expectations corresponding to the electricity consumption data and the environmental data within a preset time period to obtain electricity consumption expectation data and environmental expectation data; and based on a preset spatial scale, calculating the sum of the electricity consumption expectation data within a preset area. And the mean of the environmental expectation data, to obtain the electricity consumption time series data and the environmental time series data; according to the area identifier of the preset area, determine the area label corresponding to the electricity consumption time series data as: any one of the residential area, office area, and commercial area; Step S103: Based on the preset analysis model, perform feature extraction on the electricity consumption time series data and the environmental time series data to obtain the corresponding electricity consumption feature data and environmental feature data; specifically including, performing wavelet transform on the electricity consumption time series data and the environmental time series data to obtain the electricity consumption coefficient and the environmental coefficient: calculate the electricity consumption coefficient and the environmental coefficient according to the following formula: in, This refers to the electricity consumption factor or the environmental factor. This represents the nth time series data in the electricity consumption time series data or the environmental time series data. Let j and k represent preset scale and position parameters, respectively. The scale parameter j is proportional to the center frequency of the wavelet function; a smaller j value corresponds to a higher frequency wavelet, used to capture high-frequency components of the signal; a larger j value corresponds to a lower frequency wavelet, used to capture low-frequency components or trends of the signal. The position parameter k represents the translation of the wavelet function in the time or spatial domain. Changing k at different positions helps to capture local features of the signal. Multiple wavelet coefficient matrices (j, k) can be preset to perform wavelet transforms at different scales and positions. Specifically, this includes filtering the electricity consumption coefficient and the environmental coefficient, and reconstructing the filtered electricity consumption coefficient and environmental coefficient to obtain the electricity consumption feature data and the environmental feature data: filtering electricity consumption coefficients and environmental coefficients greater than preset values; and reconstructing the filtered electricity consumption coefficient and environmental coefficient according to the following formula: in, This represents the nth electricity consumption characteristic data or environmental characteristic data. This indicates the power consumption or environmental factor after filtration. This represents the complex conjugate wavelet function.
[0005] Preferably, step S104 involves training a preset load prediction model based on the electricity consumption characteristic data and environmental characteristic data; specifically, training the load prediction model using the wavelet transform-processed electricity consumption characteristic data and environmental characteristic data includes using a method combining wavelet transform and regression analysis. ,in, It is the load sequence after wavelet transform. It is a regression function. This is the predicted load value. Attached Figure Description
[0006] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0007] Figure 1 is a flowchart illustrating a power grid load forecasting method based on regression analysis provided in an embodiment of the present invention; Figure 2 is a schematic diagram illustrating the module structure of a power grid load forecasting device based on regression analysis provided in an embodiment of the present invention; Figure 3 is a schematic block diagram illustrating the structure of a terminal device provided in an embodiment of the present invention. Detailed Implementation
[0008] 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, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0009] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content and operations / steps, nor does it necessarily have to be performed in the order described. For example, some operations / steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.
[0010] It should be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0011] This invention provides a power grid load forecasting method based on regression analysis. This method can be applied to terminal devices, such as tablets, laptops, desktop computers, personal digital assistants, and wearable devices. The terminal device can be a server or a server cluster.
[0012] The following detailed description of some embodiments of the present invention is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0013] Please refer to Figure 1, which is a flowchart illustrating a power grid load forecasting method based on regression analysis provided in an embodiment of the present invention.
[0014] As shown in Figure 1, the power grid load forecasting method based on regression analysis includes steps S101 to S105.
[0015] Step S101: Obtain the electricity consumption data collected by the smart meter and the environmental data of the corresponding electricity consumption area.
[0016] For example, in the case of setting up smart meters for each household to monitor residents' electricity consumption in order to charge for electricity, this application embodiment collects the electricity consumption data obtained by smart meters to build a load prediction model, thereby avoiding the need to set up additional hardware equipment and reducing implementation costs.
[0017] For example, the electricity consumption data obtained through a smart meter includes the collection time, electricity consumption, and device identifier. The device identifier is used to identify the smart meter that collected the electricity consumption data, and the electricity consumption area to which the smart meter belongs can be determined based on the device identifier. The electricity consumption area is pre-divided according to actual needs. For example, the power supply area corresponding to each substation can be defined as an electricity consumption area, but it is not limited to this and is not restricted here.
[0018] For example, environmental data could be meteorological data such as temperature, humidity, and precipitation obtained from one or more weather stations located within the power consumption area. Specifically, the weather stations are pre-linked to their respective power consumption areas.
[0019] Step S102: Aggregate the electricity consumption data and the environmental data based on a preset scale to obtain electricity consumption time series data and environmental time series data.
[0020] For example, the amount of electricity consumption data obtained in step S102 is large, and it may contain certain user privacy information. In order to facilitate subsequent data processing and protect user electricity consumption privacy, it is necessary to aggregate multiple electricity consumption data with corresponding collection times within an electricity consumption area to obtain the electricity consumption time-series data for that area. Similarly, in order to ensure the synchronization between environmental data and electricity consumption data, environmental data is aggregated based on the same logic to obtain electricity consumption time-series data.
[0021] In some implementations, the aggregation of the electricity consumption data and the environmental data based on a preset scale to obtain electricity consumption time-series data and environmental time-series data includes: calculating the expected values of the electricity consumption data and the environmental data within a preset time period based on a preset time scale to obtain expected electricity consumption data and expected environmental data; and calculating the sum of the expected electricity consumption data and the mean of the expected environmental data within a preset spatial area based on a preset spatial scale to obtain the electricity consumption time-series data and the environmental time-series data.
[0022] For example, the electricity consumption data collected by smart meters usually has a relatively detailed time scale, such as collecting electricity consumption data every 15 minutes. In order to reduce the amount of data, a larger time scale can be set when aggregating the data, such as 2 hours.
[0023] For example, the expected data for each set of electricity consumption data and each set of environmental data within the preset time scale are calculated separately to obtain the expected electricity consumption data and the expected environmental data. Specifically, the average electricity consumption of each smart meter over 2 hours is calculated, as well as the average temperature, average humidity, and average precipitation collected by each weather station over 2 hours are calculated.
[0024] For example, to ensure that a set of electricity consumption time-series data and environmental time-series data can comprehensively reflect the electricity consumption and environmental conditions within a given electricity consumption area, the expected electricity consumption data and expected environmental data are aggregated according to a preset spatial scale. This preset spatial scale can correspond to the division of electricity consumption areas, where the electricity consumption area is the preset area; however, it is not limited to this and is not specified here. For instance, the average electricity consumption of each user in the electricity consumption area over a two-hour period is calculated to obtain a value in the electricity consumption time-series data; the average temperature, average humidity, and average precipitation in the electricity consumption area over a two-hour period are calculated to obtain a value in the environmental time-series data; and so on, resulting in a set of time-related electricity consumption time-series data and a set of time-related environmental time-series data.
[0025] In some implementations, the step of calculating the sum of the expected electricity consumption data and the mean of the expected environmental data within a preset spatial scale to obtain the electricity consumption time series data and the environmental time series data includes: determining the area label corresponding to the electricity consumption time series data as any one of a residential area, an office area, or a commercial area based on the area identifier of the preset area.
[0026] For example, different types of electricity consumption areas have different characteristics. Residential areas typically experience peak electricity consumption after get off work hours, office areas during work hours, and commercial areas on holidays. To improve the flexibility of smart grid management, when aggregating electricity consumption data based on spatial scales, the types of preset areas can be classified according to their area identifiers. Specifically, the area identifier can be predetermined. The bytes representing the area type are pre-set in the area identifier based on the type of the preset area, thus determining whether the preset area is labeled as a residential area, office area, or commercial area based on the area identifier.
[0027] Step S103: Based on the preset analysis model, feature extraction is performed on the electricity consumption time series data and the environmental time series data to obtain the corresponding electricity consumption feature data and environmental feature data.
[0028] For example, by extracting features from electricity consumption time-series data and environmental time-series data, electricity consumption feature data and environmental feature data that can reflect electricity consumption and environmental conditions can be obtained.
[0029] In some implementations, the step of extracting features from the electricity consumption time-series data and environmental time-series data based on a preset analysis model to obtain corresponding electricity consumption feature data and environmental feature data includes: performing wavelet transform on the electricity consumption time-series data and the environmental time-series data to obtain electricity consumption coefficients and environmental coefficients; filtering the electricity consumption coefficients and the environmental coefficients; and reconstructing the filtered electricity consumption coefficients and environmental coefficients to obtain the electricity consumption feature data and the environmental feature data.
[0030] For example, since wavelet transform can analyze time-series data at different time and frequency scales, providing time-frequency localization information of the signal, it is suitable for analyzing non-stationary signals, as it can capture the nonlinear and non-stationary characteristics in load data. Therefore, wavelet transform can be applied to the analysis of electricity consumption characteristic data and environmental characteristic data in the embodiments of this application. Specifically, wavelet transform can filter out high-frequency noise in time-series data, retaining the main information.
[0031] Specifically, the electricity consumption time series data and the environmental time series data are respectively processed by wavelet transform to obtain the decomposed electricity consumption coefficient and environmental coefficient. The electricity consumption coefficient and environmental coefficient can reflect the frequency characteristics in the electricity consumption time series data and the environmental time series data, respectively. High-frequency noise has a higher electricity consumption coefficient or environmental coefficient. The electricity consumption coefficient and environmental coefficient greater than the preset coefficient are filtered out, and the filtered electricity consumption coefficient and environmental coefficient are reconstructed to obtain electricity consumption characteristic data and environmental characteristic data to reflect the electricity consumption situation and the environmental situation, respectively.
[0032] In some implementations, performing wavelet transform on the electricity consumption time-series data and the environmental time-series data to obtain the electricity consumption coefficient and the environmental coefficient includes: calculating the electricity consumption coefficient and the environmental coefficient according to the following formulas:
[0033] in, This refers to the electricity consumption factor or the environmental factor. This represents the nth time series data in the electricity consumption time series data or the environmental time series data. The wavelet function can be represented by commonly used functions such as Haar wavelet and Daubechies wavelet, where j and k represent the preset scale parameter and position parameter, respectively.
[0034] For example, wavelet transform is performed on the electricity consumption time series data and the environmental time series data respectively, and the nth data in the electricity consumption time series data or the environmental time series data is obtained. Substituting into the wavelet transform formula, we obtain the electricity consumption coefficient corresponding to the electricity consumption time series data or the environmental coefficient corresponding to the environmental time series data, where, Let represent the wavelet function. The scale parameter j and position parameter k represent the scale and position in the wavelet transform, respectively. The scale parameter j determines the scaling degree of the wavelet function and is related to the wavelet's frequency. In the Discrete Wavelet Transform (DWT) of this application embodiment, the scale parameter j is usually proportional to the center frequency of the wavelet function. A smaller j value corresponds to a higher frequency wavelet, used to capture the high-frequency components of the signal; a larger j value corresponds to a lower frequency wavelet, used to capture the low-frequency components or trends of the signal. The position parameter k determines the specific position of the wavelet function on the signal. In the Discrete Wavelet Transform, k usually represents the translation amount of the wavelet function in the time or spatial domain. By changing k, we can analyze the signal at different positions to capture local features.
[0035] For example, multiple wavelet coefficient matrices (j, k) can be pre-set, wavelet transforms can be performed at different scales and positions, and the most suitable j and k values can be selected.
[0036] In some implementations, filtering the electricity consumption coefficient and the environmental coefficient, and reconstructing the filtered electricity consumption coefficient and environmental coefficient to obtain the electricity consumption characteristic data and the environmental characteristic data, includes: filtering electricity consumption coefficients and environmental coefficients that are greater than preset values; and reconstructing the filtered electricity consumption coefficient and environmental coefficient according to the following formula:
[0037] in, This represents the nth electricity consumption characteristic data or environmental characteristic data. This indicates the power consumption or environmental factor after filtration. This represents the complex conjugate wavelet function.
[0038] For example, high-frequency components in electricity consumption time series data and environmental time series data can be filtered based on electricity consumption coefficients and environmental coefficients. Specifically, a preset value T can be set in advance to filter out electricity consumption coefficients and environmental coefficients greater than T, retain electricity consumption coefficients and environmental coefficients less than T, and then reconstruct the filtered electricity consumption coefficients and environmental coefficients.
[0039] For example, after extracting useful features and removing noise, a clean load sequence can be reconstructed through the inverse process of wavelet transform, which can then be used as input to a load prediction model. This is achieved through the wavelet function. Complex conjugate wavelet function The power consumption or environmental factor after filtration Reconstruction is performed, where the wavelet function... With complex conjugate wavelet function They have the same scale and location parameters.
[0040] Step S104: Train the preset load prediction model based on the electricity consumption characteristic data and environmental characteristic data.
[0041] For example, the load forecasting model is trained using wavelet transform-processed electricity consumption characteristic data and environmental characteristic data. The load forecasting model can be determined based on algorithms from related technologies, such as regression analysis algorithms, time series analysis algorithms, neural network algorithms, etc., and is not limited here. Taking regression analysis as an example, the method of using wavelet transform combined with regression analysis can be expressed as: ,in, It is the load sequence after wavelet transform. It is a regression function. This is the predicted load value.
[0042] Step S105: If the performance test results of the load prediction model meet the preset performance conditions, predict the current electricity consumption data based on the current environmental data of the electricity consumption area according to the load prediction model.
[0043] For example, to ensure the accuracy of load forecasting, a validation dataset can be pre-set to test the performance of the load forecasting model. If the performance test results of the load forecasting model meet the preset performance conditions, the load forecasting model can then be used to forecast electricity consumption data.
[0044] In some implementations, when the performance test results of the load forecasting model meet preset performance conditions, predicting the current electricity consumption data based on the current environmental data of the electricity consumption area using the load forecasting model includes: obtaining a preset verification dataset, the verification dataset including preset environmental data and preset electricity consumption data; obtaining the target electricity consumption determined by the load forecasting model based on the preset environmental data; and predicting the current electricity consumption data based on the current environmental data of the electricity consumption area using the load forecasting model when at least one of the mean square error, root mean square error, and mean absolute error between the target electricity consumption and the preset electricity consumption data is less than a preset threshold.
[0045] For example, the metrics used to evaluate a load forecasting model can be one or more of the mean square error (MSE), root mean square error (RMSE), and mean absolute error (MAE).
[0046] Taking the mean square error as an example, the mean square error of the load forecasting model is calculated using the following formula:
[0047] Where MSE represents the mean squared error of the load forecasting model, and n is the number of samples in the validation dataset. This indicates the preset electricity consumption data. This represents the target electricity consumption predicted by the load forecasting model. The calculation methods for the root mean square error and mean absolute error can be found in relevant technical documentation and will not be elaborated upon here.
[0048] For example, if the mean square error, root mean square error, and mean absolute error are small, such as less than a preset threshold, it means that the accuracy of the load forecasting model meets the requirements. The load forecasting model can be used to predict the current electricity consumption data based on the current environmental data of the electricity consumption area. The preset threshold can be set separately for the mean square error, root mean square error, and mean absolute error.
[0049] For example, load forecasting models can be trained separately for residential areas, office areas, and commercial areas based on regional labels to improve the targeting and accuracy of smart grid management.
[0050] The power grid load forecasting method based on regression analysis provided in this invention acquires electricity consumption data collected by smart meters and environmental data of the corresponding electricity application area. Simultaneously, it acquires electricity consumption data and environmental data within the corresponding electricity application area to train the load forecasting model, thereby improving the accuracy of the model. The method aggregates the electricity consumption data and environmental data based on preset scales to obtain electricity consumption time-series data and environmental time-series data, reducing the randomness of these data and minimizing the computational load for subsequent feature extraction. Finally, based on a preset analysis model, it extracts features from the electricity consumption time-series data and environmental time-series data to obtain corresponding electricity consumption feature data and environmental feature data. The system represents electricity consumption time-series data and environmental time-series data using electricity consumption characteristic data and environmental characteristic data to train a load forecasting model. Based on these data, a pre-defined load forecasting model is trained, improving its realism and accuracy by incorporating historically collected data. When the performance test results of the load forecasting model meet pre-defined performance conditions, the system predicts current electricity consumption data based on the current environmental data of the electricity consumption area. By using the trained load forecasting model to predict current electricity consumption data based on current environmental data, the system can more flexibly and effectively predict the grid load, thereby enabling management of grid distribution and supply.
[0051] Please refer to Figure 2. Figure 2 shows a power grid load forecasting device 200 based on regression analysis provided in an embodiment of this application. The power grid load forecasting device 200 based on regression analysis includes a data acquisition module 201, used to acquire electricity consumption data collected by smart meters and environmental data of the corresponding electricity consumption area; a data aggregation module 202, used to aggregate the electricity consumption data and the environmental data according to a preset scale to obtain electricity consumption time-series data and environmental time-series data; a data analysis module 203, used to extract features from the electricity consumption time-series data and the environmental time-series data based on a preset analysis model to obtain corresponding electricity consumption feature data and environmental feature data; a model training module 204, used to train a preset load forecasting model based on the electricity consumption feature data and environmental feature data; and a data forecasting module 205, used to predict the current electricity consumption data based on the current environmental data of the electricity consumption area, provided that the performance test results of the load forecasting model meet preset performance conditions.
[0052] In some implementations, during the process of aggregating the electricity consumption data and the environmental data based on a preset scale to obtain electricity consumption time-series data and environmental time-series data, the data aggregation module 202 performs the following steps: based on a preset time scale, it calculates the mathematical expectations corresponding to the electricity consumption data and the environmental data within a preset time period to obtain electricity consumption expectation data and environmental expectation data; based on a preset spatial scale, it calculates the sum of the electricity consumption expectation data and the mean of the environmental expectation data within a preset area to obtain the electricity consumption time-series data and the environmental time-series data.
[0053] In some implementations, during the process of calculating the sum of the expected electricity consumption data and the mean of the expected environmental data within a preset area based on a preset spatial scale to obtain the electricity consumption time series data and the environmental time series data, the data aggregation module 202 processes: based on the area identifier of the preset area, it determines the area label corresponding to the electricity consumption time series data as any one of: residential area, office area, or commercial area.
[0054] In some implementations, during the process of extracting features from the electricity consumption time-series data and environmental time-series data based on a preset analysis model to obtain corresponding electricity consumption feature data and environmental feature data, the data analysis module 203 performs the following steps: performs wavelet transform on the electricity consumption time-series data and the environmental time-series data to obtain electricity consumption coefficients and environmental coefficients; filters the electricity consumption coefficients and the environmental coefficients, and reconstructs the filtered electricity consumption coefficients and environmental coefficients to obtain the electricity consumption feature data and the environmental feature data.
[0055] In some implementations, the data analysis module 203, during the process of performing wavelet transform on the electricity consumption time-series data and the environmental time-series data to obtain the electricity consumption coefficient and the environmental coefficient, performs the following steps: calculating the electricity consumption coefficient and the environmental coefficient according to the following formulas:
[0056] in, This refers to the electricity consumption factor or the environmental factor. This represents the nth time series data in the electricity consumption time series data or the environmental time series data. Let j represent the wavelet function, and k represent the preset scale parameter and position parameter, respectively.
[0057] In some implementations, during the process of filtering the electricity consumption coefficient and the environmental coefficient, and reconstructing the filtered electricity consumption coefficient and environmental coefficient to obtain the electricity consumption characteristic data and the environmental characteristic data, the data analysis module 203 performs the following steps: filtering electricity consumption coefficients and environmental coefficients that are greater than a preset value; and reconstructing the filtered electricity consumption coefficients and environmental coefficients according to the following formula:
[0058] in, This represents the nth electricity consumption characteristic data or environmental characteristic data. This indicates the power consumption or environmental factor after filtration. This represents the complex conjugate wavelet function.
[0059] In some implementations, when the performance test results of the load prediction model meet preset performance conditions, the data prediction module 205, during the process of predicting current electricity consumption data based on the current environmental data of the electricity consumption area using the load prediction model, processes the following: acquiring a preset verification dataset, the verification dataset including preset environmental data and preset electricity consumption data; acquiring the target electricity consumption determined by the load prediction model based on the preset environmental data; and predicting current electricity consumption data based on the current environmental data of the electricity consumption area using the load prediction model when at least one of the mean square error, root mean square error, and mean absolute error between the target electricity consumption and the preset electricity consumption data is less than a preset threshold.
[0060] Please refer to Figure 3, which is a schematic block diagram of the structure of a terminal device provided in an embodiment of the present invention.
[0061] As shown in Figure 3, the terminal device 300 includes a processor 301 and a memory 302. The processor 301 and the memory 302 are connected through a bus 303, such as an I2C (Inter-integrated Circuit) bus.
[0062] Specifically, processor 301 provides computing and control capabilities to support the operation of the entire terminal device. Processor 301 can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0063] Specifically, the memory 302 can be a Flash chip, a read-only memory (ROM) disk, an optical disk, a USB flash drive, or a portable hard drive, etc.
[0064] Those skilled in the art will understand that the structure shown in Figure 3 is merely a block diagram of a portion of the structure related to the embodiments of the present invention, and does not constitute a limitation on the terminal device to which the embodiments of the present invention are applied. The specific server may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0065] The processor is used to run a computer program stored in a memory, and when executing the computer program, implements any of the power grid load forecasting methods based on regression analysis provided in the embodiments of the present invention.
[0066] In one embodiment, the processor is configured to run a computer program stored in a memory, and when executing the computer program, perform the following steps: acquiring electricity consumption data collected by a smart meter and environmental data of the corresponding electricity consumption area; aggregating the electricity consumption data and the environmental data based on a preset scale to obtain electricity consumption time-series data and environmental time-series data; extracting features from the electricity consumption time-series data and the environmental time-series data based on a preset analysis model to obtain corresponding electricity consumption feature data and environmental feature data; training a preset load forecasting model based on the electricity consumption feature data and environmental feature data; and, if the performance test results of the load forecasting model meet preset performance conditions, predicting the current electricity consumption data based on the current environmental data of the electricity consumption area using the load forecasting model.
[0067] In some embodiments, during the process of aggregating the electricity consumption data and the environmental data based on a preset scale to obtain electricity consumption time-series data and environmental time-series data, the processor 301 performs the following: calculating the mathematical expectations corresponding to the electricity consumption data and the environmental data within a preset time period based on a preset time scale to obtain electricity consumption expectation data and environmental expectation data; and calculating the sum of the electricity consumption expectation data and the mean of the environmental expectation data within a preset spatial scale to obtain the electricity consumption time-series data and the environmental time-series data.
[0068] In some implementations, during the process of calculating the sum of the expected electricity consumption data and the mean of the expected environmental data within a preset area based on a preset spatial scale to obtain the electricity consumption time-series data and the environmental time-series data, the processor 301 performs the following: determining, based on the area identifier of the preset area, the area label corresponding to the electricity consumption time-series data as any one of: a residential area, an office area, or a commercial area.
[0069] In some embodiments, during the process of extracting features from the electricity consumption time-series data and environmental time-series data based on a preset analysis model to obtain corresponding electricity consumption feature data and environmental feature data, the processor 301 performs the following: performing wavelet transform on the electricity consumption time-series data and the environmental time-series data to obtain electricity consumption coefficients and environmental coefficients; filtering the electricity consumption coefficients and the environmental coefficients, and reconstructing the filtered electricity consumption coefficients and environmental coefficients to obtain the electricity consumption feature data and the environmental feature data.
[0070] In some embodiments, during the process of performing wavelet transform on the power consumption time-series data and the environmental time-series data to obtain the power consumption coefficient and the environmental coefficient, the processor 301 performs the following calculation: Calculates the power consumption coefficient and the environmental coefficient according to the following formulas:
[0071] in, This refers to the electricity consumption factor or the environmental factor. This represents the nth time series data in the electricity consumption time series data or the environmental time series data. Let j represent the wavelet function, and k represent the preset scale parameter and position parameter, respectively.
[0072] In some embodiments, during the process of filtering the electricity consumption coefficient and the environmental coefficient, and reconstructing the filtered electricity consumption coefficient and environmental coefficient to obtain the electricity consumption feature data and the environmental feature data, the processor 301 performs the following actions: filtering electricity consumption coefficients and environmental coefficients that are greater than a preset value; and reconstructing the filtered electricity consumption coefficients and environmental coefficients according to the following formula:
[0073] in, This represents the nth electricity consumption characteristic data or environmental characteristic data. This indicates the power consumption or environmental factor after filtration. This represents the complex conjugate wavelet function.
[0074] In some embodiments, when the performance test results of the load prediction model meet preset performance conditions, and the processor 301 predicts the current electricity consumption data based on the current environmental data of the electricity consumption area using the load prediction model, the processor 301 performs the following actions: acquiring a preset verification dataset, the verification dataset including preset environmental data and preset electricity consumption data; acquiring a target electricity consumption determined by the load prediction model based on the preset environmental data; and predicting the current electricity consumption data based on the load prediction model using the current environmental data of the electricity consumption area when at least one of the mean square error, root mean square error, and mean absolute error between the target electricity consumption and the preset electricity consumption data is less than a preset threshold.
[0075] It should be noted that those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the terminal equipment described above can be referred to the corresponding process in the aforementioned embodiment of the power grid load forecasting method based on regression analysis, and will not be repeated here.
[0076] This invention also provides a storage medium for computer-readable storage, wherein the storage medium stores one or more programs that can be executed by one or more processors to implement the steps of any of the power grid load forecasting methods based on regression analysis provided in the specification of this invention.
[0077] The storage medium can be an internal storage unit of the terminal device described in the foregoing embodiments, such as the hard drive or memory of the terminal device. Alternatively, the storage medium can be an external storage device of the terminal device, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the terminal device.
[0078] Those skilled in the art will understand that all or some of the steps, systems, or apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware embodiments, the division between functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0079] It should be understood that the term "and / or" as used in this specification and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes such combinations. It should be noted that, herein, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0080] The sequence numbers of the above embodiments of the present invention are merely for descriptive purposes and do not represent the superiority or inferiority of the embodiments. The above descriptions are only specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A power grid load forecasting method based on regression analysis, characterized in that, The method includes: step S101, acquiring electricity consumption data collected by a smart meter and environmental data of the corresponding electricity consumption area; step S102, aggregating the electricity consumption data and the environmental data based on a preset scale to obtain electricity consumption time-series data and environmental time-series data; specifically, based on a preset time scale, calculating the mathematical expectations corresponding to the electricity consumption data and the environmental data within a preset time period to obtain electricity consumption expectation data and environmental expectation data; based on a preset spatial scale, calculating the sum of the electricity consumption expectation data and the mean of the environmental expectation data within a preset area to obtain... The electricity consumption time-series data and the environmental time-series data are obtained; based on the area identifier of the preset area, the area label corresponding to the electricity consumption time-series data is determined to be any one of: residential area, office area, and commercial area; Step S103: Based on the preset analysis model, feature extraction is performed on the electricity consumption time-series data and the environmental time-series data to obtain corresponding electricity consumption feature data and environmental feature data; specifically, wavelet transform is performed on the electricity consumption time-series data and the environmental time-series data to obtain the electricity consumption coefficient and the environmental coefficient: the electricity consumption coefficient and the environmental coefficient are calculated according to the following formula: in, This refers to the electricity consumption factor or the environmental factor. This represents the nth time series data in the electricity consumption time series data or the environmental time series data. Let j and k represent preset scale and position parameters, respectively. The scale parameter j is proportional to the center frequency of the wavelet function; a smaller j value corresponds to a higher frequency wavelet, used to capture high-frequency components of the signal; a larger j value corresponds to a lower frequency wavelet, used to capture low-frequency components or trends of the signal. The position parameter k represents the translation of the wavelet function in the time or spatial domain. Changing k at different positions helps to capture local features of the signal. Multiple wavelet coefficient matrices (j, k) can be preset to perform wavelet transforms at different scales and positions. Specifically, this includes filtering the electricity consumption coefficient and the environmental coefficient, and reconstructing the filtered electricity consumption coefficient and environmental coefficient to obtain the electricity consumption feature data and the environmental feature data: filtering electricity consumption coefficients and environmental coefficients greater than preset values; and reconstructing the filtered electricity consumption coefficient and environmental coefficient according to the following formula: in, This represents the nth electricity consumption characteristic data or environmental characteristic data. This indicates the power consumption or environmental factor after filtration. This represents the complex conjugate wavelet function.
2. The power grid load forecasting method based on regression analysis according to claim 1, characterized in that, It also includes: step S104, training a preset load prediction model based on the electricity consumption characteristic data and environmental characteristic data; training the load prediction model using the wavelet transform-processed electricity consumption characteristic data and environmental characteristic data, specifically including using a wavelet transform combined with regression analysis: ,in, It is the load sequence after wavelet transform. It is a regression function. This is the predicted load value.