Distributed photovoltaic power generation power missing data interpolation method and device

Through self-supervised characterization learning method and mask modeling technology, the problem of missing values ​​in distributed photovoltaic power generation data is solved, and high-quality interpolation results are generated, which are suitable for scenarios with high data volatility and insufficient meteorological information, improving The data quality of energy management in the park.

CN119149925AInactive Publication Date: 2024-12-17SHANGHAI INVESTIGATION DESIGN & RES INST CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411175864.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2024-12-17
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

There are many missing values ​​in the existing distributed photovoltaic power generation data, resulting in low quality of the collected data, affecting the informatization and intelligence level of comprehensive energy management in the park, especially in the case of insufficient data volume and insufficient meteorological information. Under the following, traditional interpolation methods cannot effectively capture the high volatility and complex time-varying characteristics of photovoltaic power generation data.

Method used

The self-supervised representation learning method is used to segment historical data through sliding windows, generate mask samples and train PatchTST model, and use mask modeling technology to interpolate data to generate more reliable interpolation results.

Benefits of technology

This method can generate high-quality interpolation results when the distributed photovoltaic power generation data in a single park is highly volatile, limited data volume, and insufficient meteorological related information, and supports downstream computing tasks such as photovoltaic power prediction, improving data Basic reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119149925A_ABST
    Figure CN119149925A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of electric power energy, and discloses a distributed photovoltaic power generation power missing data interpolation method and device, and the method comprises the steps: generating mask samples through a time sequence sample set based on a mask modeling technology, and enabling each mask sample and a corresponding original time sequence sample to form an input-output sample pair; on the self-supervised learning sample set, training the self-supervised model to obtain a self-supervised representation learning model; and intercepting a sequence fragment with data missing as a to-be-interpolated time sequence sample, performing mask processing on the missing fragment, inputting the missing fragment into the self-supervised representation learning model for calculation, and obtaining a value corresponding to a missing value time point position in an output result, namely generating power interpolation data of the time point. According to the method, the problems of high fluctuation of distributed photovoltaic power generation power data of a single park, limited data volume in the early stage of construction, insufficient weather related information and the like are solved, and a relatively reliable interpolation result can be generated for missing fragments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of electric energy technology, and in particular to a method and device for interpolating missing data of distributed photovoltaic power generation. Background Art

[0002] In recent years, more and more industrial and commercial parks have begun to be equipped with distributed photovoltaic facilities. The role of industrial and commercial parks in the power energy system has gradually shifted from a one-way power consumer to an integrated energy manager. Among them, as the main power supply side resource in the park, the quality and scale of the power data of distributed photovoltaic sites directly affect the level of informatization and intelligence of the park's comprehensive energy management. However, in real scenarios, many uncertain interference factors such as acquisition equipment failure, sensor failure, and data transmission obstruction will cause the collected distributed photovoltaic power generation data in the park to contain a large number of missing values. This problem will have a significant negative impact on a series of downstream tasks such as output analysis, power prediction, and energy optimization scheduling based on power data. Therefore, taking into full consideration the characteristics and current status of the distributed photovoltaic power generation data in the park, and proposing a reliable power missing value interpolation method in a targeted manner, it has important practical significance and application value for improving the level of comprehensive energy management in the park.

[0003] At present, the commonly used distributed photovoltaic power data interpolation methods can be mainly divided into traditional statistical interpolation methods and multivariate time series correlation modeling methods based on meteorological information. The former includes linear interpolation, spline interpolation, moving average, exponential smoothing and other methods. Although they are relatively simple and easy to use and have low data requirements, they are usually unable to effectively capture the high volatility and complex nonlinear time-varying characteristics of photovoltaic power data. The latter usually relies on the correlation between photovoltaic power and meteorological information such as irradiation intensity and cloud distribution changes for modeling. This method is more effective in scenarios where both meteorological information and photovoltaic power data are relatively complete and sufficient. However, for a large number of distributed photovoltaic sites in the park that are in the early stages of construction, on the one hand, the amount of photovoltaic power data itself is difficult to guarantee; on the other hand, when deploying distributed photovoltaic sites in the park, special meteorological monitoring devices may not be deployed in conjunction, so it is impossible to guarantee that real-time, accurate and sufficient meteorological information can be obtained. Summary of the invention

[0004] In view of this, the present invention provides a method and device for interpolating missing power data of distributed photovoltaic power generation to solve the problem of how to interpolate missing power data.

[0005] In a first aspect, the present invention provides a method for interpolating missing data of distributed photovoltaic power generation, comprising:

[0006] Select the sequence segments without missing values ​​in the distributed photovoltaic historical data, and divide the sequence segments without missing values ​​into multiple time series samples of equal length in the form of sliding windows to form a time series sample set;

[0007] Based on the mask modeling technology, the time series sample set is used to generate mask samples. Each mask sample and its corresponding original time series sample form an "input-output" sample pair. The collection of all sample pairs forms a sample set for self-supervised learning.

[0008] On the self-supervised learning sample set, the self-supervised model with PatchTST model as the backbone is trained to obtain a self-supervised representation learning model that can restore mask samples to the corresponding original sequence samples;

[0009] Sequence segments with missing data are intercepted as time series samples to be interpolated. After the missing segments are masked, they are input into the self-supervised representation learning model for calculation. The value corresponding to the missing value time point in the output result is the interpolation data of the generated power at that time point.

[0010] The interpolation method proposed in the present invention is based on the mask modeling technology in self-supervised representation learning. It overcomes the problems of high volatility of distributed photovoltaic power generation data in a single park, limited data in the early stage of construction, and insufficient meteorological-related information. It can generate more reliable interpolation results for missing fragments, thus laying a high-quality data foundation for a series of downstream computing tasks (such as photovoltaic power prediction) supported by historical power data.

[0011] In an optional implementation, the process of dividing the sequence segment without missing values ​​into a plurality of time series samples of equal length in the form of a sliding window includes:

[0012] Starting from time 0, distributed photovoltaic power generation data is collected at sampling time intervals to obtain distributed photovoltaic output curves at multiple time points every day. After accumulating the preset number of days, a historical observation sequence of distributed photovoltaic power generation is formed;

[0013] Determine whether there are missing values ​​in the daily output data in the historical observation sequence. If so, mark the output curve of that day as a time series sample to be interpolated and remove it from the historical observation sequence;

[0014] After removing all time series samples with missing values, the non-missing historical observation sequence segments are divided into multiple time series samples of equal length in the form of a sliding time window to construct a time series sample set for model training.

[0015] In an optional implementation, based on the mask modeling technology, the process of generating mask samples using the time series sample set includes:

[0016] According to the distribution of the ratio of the number of missing values ​​in the time series samples to be interpolated to the total number of sample time points, a set of mask ratios is determined. The mask ratios are used to simulate different degrees of missing data in the samples to be interpolated.

[0017] For each time series sample in the time series sample set, according to each mask ratio, a corresponding ratio of original data is randomly selected multiple times in the time series sample for mask processing to obtain multiple mask samples.

[0018] In an optional implementation, the process of obtaining a plurality of mask samples includes:

[0019] Use the program to simulate and generate random numbers that obey the normal distribution, have a mean of 0, and a standard deviation of 1, as white noise for masking;

[0020] For each time series sample in the time series sample set, randomly select multiple time points in each time series sample based on each ratio value in the mask ratio set;

[0021] The photovoltaic power value corresponding to the selected time point is replaced by white noise;

[0022] Repeat the above random selection operation m times, and the total number of mask samples finally obtained is:

[0023] N mask =N*k*m

[0024] Among them, N mask is the total number of mask samples; N is the number of time series samples in the time series sample set; k is the number of ratio values; N mask , N, and k are all positive integers.

[0025] In an optional implementation, the process of training the self-supervised model based on the PatchTST model includes:

[0026] Divide the self-supervised learning sample set into training set, validation set and test set according to the specified ratio;

[0027] Divide the training set data into multiple batches;

[0028] Use Python programming language and PyTorch deep learning framework to build the network structure of PatchTST deep time series model;

[0029] Using the gradient descent method, the model is trained on multiple batches of training sample sets in sequence, and the training is repeated for multiple rounds;

[0030] The model obtained from each round of training is used for the validation set, and the changes in the evaluation values ​​between the model output results on the validation set and their corresponding original power values ​​are recorded; when the number of times the evaluation value on the validation set no longer decreases exceeds the specified number of rounds, or the number of training rounds of the model reaches the maximum specified number of rounds, the training is stopped and the model parameters obtained from the training are saved;

[0031] Evaluate the accuracy of the self-supervised model in restoring time series samples on the test set. If the accuracy does not meet the requirements, adjust the model structure and model hyperparameters, and return to the step of "dividing the self-supervised learning sample set into training set, validation set and test set according to the specified ratio" until the model accuracy meets the requirements.

[0032] In an optional implementation, the process of training the self-supervised model based on the PatchTST model includes:

[0033] The training objective of the model is to minimize the MSE loss function, that is:

[0034]

[0035] Where P t is the original power value of the time series sample sequence at time point t; is the corresponding value of the model output sequence at time point t; L is the length of the time window.

[0036] In an optional implementation, the process of inputting into the self-supervised representation learning model for calculation includes:

[0037] Use white noise to assign values ​​to the missing time points in the interpolation time series samples;

[0038] The samples to be interpolated after assignment are normalized using the MinMax method and normalization parameters;

[0039] The normalized samples to be interpolated are input into the self-supervised model for calculation to obtain the output sequence;

[0040] The output sequence is denormalized to restore it to the original numerical scale that matches the photovoltaic power generation data. The value of each missing value point in the interpolation sample at the corresponding position in the output sequence is the data interpolation result at that point in time.

[0041] In a second aspect, the present invention provides a distributed photovoltaic power generation power missing data interpolation device, comprising:

[0042] The time series sample set module is used to select sequence segments without missing values ​​in the distributed photovoltaic historical data, and divide the sequence segments without missing values ​​into multiple time series samples of equal length in the form of sliding windows to form a time series sample set;

[0043] The sample set module for self-supervised learning is used to generate mask samples using the time series sample set based on the mask modeling technology. Each mask sample and its corresponding original time series sample form an "input-output" sample pair. The collection of all sample pairs forms a sample set for self-supervised learning.

[0044] A training module is used to train a self-supervised model based on the PatchTST model on a self-supervised learning sample set to obtain a self-supervised representation learning model that can restore mask samples to corresponding original sequence samples;

[0045] The interpolation module is used to intercept sequence fragments with missing data as time series samples to be interpolated, mask the missing fragments, and input them into the self-supervised representation learning model for calculation. The value corresponding to the missing value time point in the output result is the interpolation data of the generated power at that time point.

[0046] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the distributed photovoltaic power generation power missing data interpolation method of the above-mentioned first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0047] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the distributed photovoltaic power generation power missing data interpolation method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0049] Figure 1 is a flow chart of an interpolation method according to an embodiment of the present invention;

[0050] Figure 2 is a flow chart of another interpolation method according to an embodiment of the present invention;

[0051] Figure 3 is a flow chart of another interpolation method according to an embodiment of the present invention;

[0052] Figure 4is a flow chart of another interpolation method according to an embodiment of the present invention;

[0053] Figure 5 is a flow chart of another interpolation method according to an embodiment of the present invention;

[0054] Figure 6 A composition diagram of another interpolation device according to an embodiment of the present invention;

[0055] Figure 7 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0056] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0057] According to an embodiment of the present invention, an embodiment of a method for interpolating missing data of distributed photovoltaic power generation is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0058] In this embodiment, a method for interpolating missing data of distributed photovoltaic power generation is provided. Figure 1 As shown, including:

[0059] Step S1: Select sequence segments without missing values ​​in the distributed photovoltaic historical data, and divide the sequence segments without missing values ​​into multiple time series samples of equal length in the form of a sliding window to form a time series sample set.

[0060] Step S2: Based on the mask modeling technology, a mask sample is generated using a time series sample set. Each mask sample and its corresponding original time series sample form an "input-output" sample pair, and the set of all sample pairs forms a sample set for self-supervised learning.

[0061] Specifically, a set of mask ratios is determined to simulate different degrees of missing data in the samples to be interpolated. For each sample in the time series sample set described in step S1, according to each of the above mask ratios, a corresponding proportion of original data is randomly selected in the sample for mask processing multiple times, that is, the original power value of the selected time point is replaced with simulated random white noise to obtain multiple masked samples, referred to as masked samples. Each mask sample and its corresponding original time series sample form an "input-output" sample pair, and the set of all sample pairs is the sample set for self-supervised learning.

[0062] Step S3: On the self-supervised learning sample set, a self-supervised model based on the PatchTST model is trained to obtain a self-supervised representation learning model that can restore mask samples to corresponding original sequence samples.

[0063] Step S4: intercept sequence segments with missing data as time series samples to be interpolated, mask the missing segments, and input them into the self-supervised representation learning model for calculation. The value corresponding to the missing value time point in the output result is the interpolation data of the generated power at that time point.

[0064] Specifically, this embodiment first intercepts the non-missing time series segments of the output data of the distributed photovoltaic site in the park, and divides the above time series segments into multiple time series samples in the form of a sliding window; then the time series samples are masked, a small number of shorter time series segments are randomly selected in each time series sample, and their original values ​​are masked to form a mask sample set; then the masked samples are used as the input of the PatchTST model, and the original time series samples corresponding to each masked sample are used as the output target of the model, and the model is trained so that it can effectively capture and extract the intrinsic time-varying characteristics and patterns of the photovoltaic power generation time series data in the park, and accurately reconstruct and restore the masked segments to the original sequence segments; after completing the model training, the photovoltaic power historical data segments with missing values ​​are intercepted as the samples to be interpolated, and the missing parts in the segments are processed using the same masking method as the above training process, and the samples to be interpolated are input into the model, and the model is used to reconstruct the missing segments in the samples to achieve the interpolation of the photovoltaic power generation historical data. Practice has proved that in downstream prediction tasks, the above interpolation scheme effectively promotes the improvement of the accuracy of photovoltaic power generation prediction.

[0065] In an optional embodiment, if Figure 2 As shown in Figure 1, the process of segmenting a sequence segment without missing values ​​into multiple time series samples of equal length in the form of a sliding window includes:

[0066] Step S11: starting from time 0, distributed photovoltaic power generation data is collected at sampling time intervals to obtain distributed photovoltaic output curves at multiple time points every day, and after accumulating a preset number of days, a historical observation sequence of distributed photovoltaic power generation is formed.

[0067] Step S12: Determine whether there are missing values ​​in the output data of each day in the historical observation sequence. If so, mark the output curve of that day as a time series sample to be interpolated and remove it from the historical observation sequence.

[0068] Step S13: After removing all time series samples containing missing values, the non-missing historical observation sequence segments are divided into multiple time series samples of equal length in the form of a sliding time window to construct a time series sample set for model training.

[0069] Exemplarily, the distributed photovoltaic power generation data of the park is collected through smart meters and other equipment. Starting from 0:00, the sampling time interval is 15 minutes to obtain the distributed photovoltaic output curve of the park at 96 time points every day. After accumulating for many days, a historical observation sequence of distributed photovoltaic power generation is formed; it is judged whether there are missing values ​​in the daily output data in the historical observation sequence. If so, the output curve of that day is marked as a time series sample to be interpolated and removed from the historical observation sequence; after removing all time series samples containing missing values, the non-missing historical observation sequence fragments are divided into multiple time series samples of equal length in the form of a sliding time window to construct a time series sample set for model training, wherein the number of time points contained in each time series sample (i.e., the length of the time window) is 96, denoted as L; the number of time series samples obtained is denoted as N.

[0070] In an optional embodiment, if Figure 4 As shown, based on the mask modeling technology, the process of generating mask samples using the time series sample set includes:

[0071] Step S21: Determine a set of mask ratios according to the distribution of the ratio of the number of missing values ​​in the time series samples to be interpolated to the total number of sample time points. The mask ratios are used to simulate different degrees of missing data in the samples to be interpolated.

[0072] Step S22: for each time series sample in the time series sample set, according to each mask ratio, a corresponding ratio of original data is randomly selected multiple times in the time series sample for mask processing to obtain multiple mask samples.

[0073] Specifically, a program is used to simulate and generate random numbers that obey normal distribution, have a mean of 0, and a standard deviation of 1 as white noise for masking. i =(i=1,2,…,k) is the proportion, randomly select L in the sample mask =ri *L time points, the photovoltaic power values ​​corresponding to the selected time points are replaced with the above white noise. Repeat the above random selection operation m times, and the total number of mask samples finally obtained is:

[0074] N mask =N*k*m (1)

[0075] Among them, N mask is the total number of mask samples; N is the number of time series samples in the time series sample set; k is the number of ratio values; N mask , N, and k are all positive integers.

[0076] Pair each mask sample with its corresponding original time series sample to form N sample pairs. mask The sample set of self-supervised learning is normalized using the MinMax normalization method.

[0077] In an optional embodiment, if Figure 3 As shown in FIG. 1 , the process of training the self-supervised model based on the PatchTST model includes:

[0078] Step S31: Divide the self-supervised learning sample set into a training set, a validation set and a test set according to a specified ratio.

[0079] Step S321: Divide the training set data into multiple batches.

[0080] Step S33: Use Python programming language and PyTorch deep learning framework to build the network structure of the PatchTST deep time series model.

[0081] Step S34: Using the gradient descent method, the model is trained on multiple batches of training sample sets in sequence, and the training is repeated for multiple rounds.

[0082] The training objective of the model is to minimize the MSE loss function, that is:

[0083]

[0084] Where P t is the original power value of the time series sample sequence at time point t; P t is the corresponding value of the model output sequence at time point t; L is the length of the time window.

[0085] Step S35: Use the model obtained in each round of training for the validation set, and record the change in the evaluation value between the model output result on the validation set and its corresponding original power value; when the number of times the evaluation value on the validation set no longer decreases exceeds the specified rounds, or the training rounds of the model reach the maximum specified rounds, stop training and save the model parameters obtained through training.

[0086] Optionally, the evaluation value may be an MSE value.

[0087] Step S36: Evaluate the accuracy of the self-supervised model in restoring the time series samples on the test set. If the accuracy does not meet the requirements, adjust the model structure and model hyperparameters, and return to the step of "dividing the self-supervised learning sample set into training set, validation set and test set according to the specified ratio" until the model accuracy meets the requirements.

[0088] In an optional embodiment, if Figure 5 As shown in Figure 1, the process of inputting into the self-supervised representation learning model for calculation includes:

[0089] Step S41: using white noise to assign values ​​to the missing time points in the time series samples to be interpolated; wherein the white noise is the same as the white noise in step S2.

[0090] Step S42: normalizing the assigned samples to be interpolated using the MinMax method and normalization parameters;

[0091] Step S43: input the normalized samples to be interpolated into the self-supervised model for calculation to obtain an output sequence;

[0092] Step S44: Denormalize the output sequence to restore it to the original numerical scale that matches the photovoltaic power data. The numerical value of each missing value point in the interpolation sample at the corresponding position in the output sequence is the data interpolation result at that point in time.

[0093] In this embodiment, a distributed photovoltaic power generation power missing data interpolation device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0094] This embodiment provides a distributed photovoltaic power generation power missing data interpolation device, comprising:

[0095] The time series sample set module is used to select sequence segments without missing values ​​in the distributed photovoltaic historical data, and divide the sequence segments without missing values ​​into multiple time series samples of equal length in the form of sliding windows to form a time series sample set;

[0096] The sample set module for self-supervised learning is used to generate mask samples using the time series sample set based on the mask modeling technology. Each mask sample and its corresponding original time series sample form an "input-output" sample pair. The collection of all sample pairs forms a sample set for self-supervised learning.

[0097] A training module is used to train a self-supervised model based on the PatchTST model on a self-supervised learning sample set to obtain a self-supervised representation learning model that can restore mask samples to corresponding original sequence samples;

[0098] The interpolation module is used to intercept sequence fragments with missing data as time series samples to be interpolated, mask the missing fragments, and input them into the self-supervised representation learning model for calculation. The value corresponding to the missing value time point in the output result is the interpolation data of the generated power at that time point.

[0099] Specifically, Figure 6 As shown, the interpolation device actually includes a photovoltaic power time series data preprocessing module, a time series self-supervised model training module and a photovoltaic power data interpolation module. Among them, the photovoltaic power time series data preprocessing module realizes a series of functions related to time series sample preprocessing, such as time series sample data set construction, mask sample generation, sample data set normalization, etc. described in step S1 and step S2, that is, the photovoltaic power time series data preprocessing module is actually equivalent to the time series sample set module and the sample set module of self-supervised learning; the time series self-supervised model training module realizes the function of constructing the PatchTST self-supervised representation learning model and iteratively training it described in step S3, that is, the time series self-supervised model training module is actually equivalent to the training module; the photovoltaic power data interpolation module realizes the function of using the self-supervised model to perform data interpolation described in step S4, that is, the photovoltaic power data interpolation module is actually equivalent to the interpolation module.

[0100] The distributed photovoltaic power generation power missing data interpolation device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0101] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0102] An embodiment of the present invention further provides a computer device having the above-mentioned distributed photovoltaic power generation power missing data interpolation device.

[0103] See also Figure 7 , Figure 7 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 7As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 7 A processor 10 is taken as an example.

[0104] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0105] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.

[0106] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the use of a computer device based on the presentation of a small program landing page, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0107] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0108] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0109] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0110] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for interpolating missing data of distributed photovoltaic power generation, characterized in that: include: Select the sequence segments without missing values ​​in the distributed photovoltaic historical data, and divide the sequence segments without missing values ​​into multiple time series samples of equal length in the form of sliding windows to form a time series sample set; Based on the mask modeling technology, the time series sample set is used to generate mask samples. Each mask sample and its corresponding original time series sample form an "input-output" sample pair. The collection of all sample pairs forms a sample set for self-supervised learning. On the self-supervised learning sample set, the self-supervised model with PatchTST model as the backbone is trained to obtain a self-supervised representation learning model that can restore mask samples to the corresponding original sequence samples; Sequence segments with missing data are intercepted as time series samples to be interpolated. After the missing segments are masked, they are input into the self-supervised representation learning model for calculation. The value corresponding to the missing value time point in the output result is the interpolation data of the generated power at that time point.

2. The method for interpolating missing data of distributed photovoltaic power generation according to claim 1, characterized in that: The process of dividing the sequence segment without missing values ​​into multiple time series samples of equal length in the form of a sliding window includes: Starting from time 0, distributed photovoltaic power generation data is collected at sampling time intervals to obtain distributed photovoltaic output curves at multiple time points every day. After accumulating the preset number of days, a historical observation sequence of distributed photovoltaic power generation is formed; Determine whether there are missing values ​​in the daily output data in the historical observation sequence. If so, mark the output curve of that day as a time series sample to be interpolated and remove it from the historical observation sequence; After removing all time series samples with missing values, the non-missing historical observation sequence segments are divided into multiple time series samples of equal length in the form of a sliding time window to construct a time series sample set for model training.

3. The method for interpolating missing data of distributed photovoltaic power generation according to claim 1, characterized in that: Based on the mask modeling technology, the process of generating mask samples using the time series sample set includes: According to the distribution of the ratio of the number of missing values ​​in the time series samples to be interpolated to the total number of sample time points, a set of mask ratios is determined, where the mask ratios are used to simulate different degrees of missing data in the samples to be interpolated; For each time series sample in the time series sample set, according to each mask ratio, a corresponding ratio of original data is randomly selected multiple times in the time series sample for mask processing to obtain multiple mask samples.

4. The method for interpolating missing data of distributed photovoltaic power generation according to claim 3, characterized in that: The process of obtaining a plurality of mask samples includes: Use the program to simulate and generate random numbers that obey the normal distribution, have a mean of 0, and a standard deviation of 1, as white noise for masking; For each time series sample in the time series sample set, randomly select multiple time points in each time series sample according to each ratio value in the mask ratio set; Replacing the photovoltaic power value corresponding to the selected time point with the white noise; Repeat the above random selection operation m times, and the total number of mask samples finally obtained is: N mask =N*k*m Among them, N mask is the total number of mask samples; N is the number of time series samples in the time series sample set; k is the number of ratio values; N mask , N, and k are all positive integers.

5. The method for interpolating missing data of distributed photovoltaic power generation according to claim 1, characterized in that: The process of training a self-supervised model based on the PatchTST model includes: Dividing the self-supervised learning sample set into a training set, a validation set and a test set according to a specified ratio; Divide the training set data into multiple batches; Use Python programming language and PyTorch deep learning framework to build the network structure of PatchTST deep time series model; Using the gradient descent method, the model is trained on multiple batches of training sample sets in sequence, and the training is repeated for multiple rounds; The model obtained from each round of training is used for the validation set, and the changes in the evaluation values ​​between the model output results on the validation set and their corresponding original power values ​​are recorded; when the number of times the evaluation value on the validation set no longer decreases exceeds the specified number of rounds, or the number of training rounds of the model reaches the maximum specified number of rounds, the training is stopped and the model parameters obtained from the training are saved; The accuracy of the self-supervised model in restoring the time series samples is evaluated on the test set. If the accuracy does not meet the requirements, the model structure and model hyperparameters are adjusted, and the step of "dividing the self-supervised learning sample set into a training set, a validation set, and a test set according to a specified ratio" is returned until the model accuracy meets the requirements.

6. The method for interpolating missing data of distributed photovoltaic power generation according to claim 1, characterized in that: The process of training a self-supervised model based on the PatchTST model includes: The training objective of the model is to minimize the MSE loss function, that is: Where P t is the original power value of the time series sample sequence at time point t; is the corresponding value of the model output sequence at time point t; L is the length of the time window.

7. The method for interpolating missing data of distributed photovoltaic power generation according to claim 4, characterized in that: The process of inputting into the self-supervised representation learning model for calculation includes: Using the white noise, assigning values ​​to the missing time points in the time series samples to be interpolated; The samples to be interpolated after the assignment are normalized using the MinMax method and normalization parameters; Inputting the normalized samples to be interpolated into the self-supervised model for calculation to obtain an output sequence; The output sequence is denormalized to restore it to the original numerical scale that matches the photovoltaic power generation data. The value of each missing value point in the interpolation sample at the corresponding position in the output sequence is the data interpolation result at that point in time.

8. A distributed photovoltaic power generation power missing data interpolation device, characterized in that: include: The time series sample set module is used to select sequence segments without missing values ​​in the distributed photovoltaic historical data, and divide the sequence segments without missing values ​​into multiple time series samples of equal length in the form of sliding windows to form a time series sample set; The sample set module for self-supervised learning is used to generate mask samples using the time series sample set based on the mask modeling technology. Each mask sample and its corresponding original time series sample form an "input-output" sample pair. The collection of all sample pairs forms a sample set for self-supervised learning. A training module is used to train a self-supervised model based on the PatchTST model on a self-supervised learning sample set to obtain a self-supervised representation learning model that can restore mask samples to corresponding original sequence samples; The interpolation module is used to intercept sequence fragments with missing data as time series samples to be interpolated, mask the missing fragments, and input them into the self-supervised representation learning model for calculation. The value corresponding to the missing value time point in the output result is the interpolation data of the generated power at that time point.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the distributed photovoltaic power generation power missing data interpolation method according to any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the distributed photovoltaic power generation power missing data interpolation method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Time series data missing value automatic filling method, system and device

    CN110597799A

  • Generative adversarial network-based electric energy measurement data completion method and system

    CN114091615A

  • Traffic data interpolation method based on self-supervised learning algorithm

    CN115618180A

  • Self-supervised representation learning method and system for industry user electricity consumption prediction

    CN117039868A

  • Mask time sequence model training method and device, mask time sequence model prediction method and device, equipment and medium

    CN117556882A