Photovoltaic prediction method and system fusing historical and real-time photovoltaic curves

A photovoltaic forecasting method trained with a weather encoder and a contrastive loss function, combined with trust weights and dynamic bias, achieves deep correlation learning for photovoltaic forecasting. This solves the problems of insufficient accuracy and robustness in photovoltaic power output forecasting in existing technologies, and improves forecasting accuracy and adaptability.

CN121688859APending Publication Date: 2026-03-17MAINTENANCE BRANCH OF STATE GRID FUJIAN ELECTRIC POWER +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511891455.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-15
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Existing photovoltaic power output prediction technologies have shortcomings in accuracy and robustness, especially in complex weather conditions where efficient and accurate predictions are difficult to achieve. Furthermore, existing hybrid models fail to effectively integrate physical mechanisms and data characteristics, resulting in limited improvement in prediction accuracy.

Method used

By employing a weather encoder combined with a contrastive loss function, the optimal weather parameter matrix is ​​trained using a training set. The photovoltaic curves are then corrected and stitched together using trust weights and dynamic biases, achieving deep correlation learning for photovoltaic forecasting and dynamically optimizing the forecasting process.

Benefits of technology

It improves the accuracy and robustness of photovoltaic power output prediction, enhances the model's adaptability to complex meteorological conditions, reduces prediction errors, and improves the reliability and representativeness of prediction curves.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121688859A_ABST
    Figure CN121688859A_ABST
Patent Text Reader

Abstract

The invention relates to a photovoltaic prediction method and system fusing historical and real-time photovoltaic curves, and the method comprises the steps: collecting related photovoltaic data, including historical photovoltaic data, historical weather data and real-time photovoltaic data; fitting the historical photovoltaic data and the real-time photovoltaic data into a corresponding curve; taking the related photovoltaic data as a training set to train a weather encoder to obtain an optimal weather parameter matrix; extracting a plurality of characteristic curves from the historical photovoltaic curve obtained by fitting; performing weighted calculation on the plurality of characteristic curves based on the trust weight to obtain an initial curve; correcting the initial curve by taking the optimal weather parameter matrix as a scaling factor; and splicing the corrected initial curve and the real-time photovoltaic curve obtained by fitting to obtain a final photovoltaic prediction curve.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of photovoltaic prediction technology, and mainly to a photovoltaic prediction method and system that integrates historical and real-time photovoltaic curves. Background Technology

[0002] As a core component of renewable energy, photovoltaic (PV) power generation is significantly affected by meteorological factors such as irradiance, temperature, and wind speed, exhibiting strong intermittency, volatility, and randomness. This poses a significant challenge to the safe and stable operation of the power system, dispatch optimization, and the integration of new energy sources. Therefore, accurate and efficient PV output forecasting technology has become a key support for ensuring the large-scale development of the PV industry. Its forecasting accuracy directly affects the rationality of grid dispatch, power supply reliability, and the economic benefits of PV power plants.

[0003] Current photovoltaic (PV) output prediction technologies can be broadly categorized into three types: 1. Physical Model Method: Based on the photoelectric conversion principle, thermodynamic characteristics, and meteorological element transmission laws of PV modules, this method establishes physical equations to describe the quantitative relationship between PV output and environmental and module parameters. However, this method requires extremely high measurement accuracy for PV module and environmental parameters. In practical applications, factors such as module aging, dust accumulation, and installation deviations are difficult to quantify accurately, resulting in poor model adaptability. Furthermore, this method cannot effectively cope with sudden meteorological fluctuations (such as strong gusts or sudden changes in cloud cover), and its robustness in predicting complex meteorological conditions is insufficient. 2. Data-Driven Model Method: Relying on machine learning and deep learning algorithms, this method constructs a prediction model by mining the nonlinear mapping relationship between historical PV data and historical meteorological data. However, most of these methods rely on a single Euclidean distance to select similar curves, failing to fully consider the nonlinear matching of curve shapes (such as peak shift, etc.). The slope difference and the fact that the weight allocation is mostly static and fixed, without dynamic adjustment based on time correlation and meteorological consistency, lead to invalid historical data interfering with the prediction results. In addition, the meteorological data is only simply quantified, without in-depth exploration of the local features and global correlations of meteorological elements, and no strong correlation mapping between weather features and photovoltaic curve features is established. At the same time, the single neural network model is easily affected by differences in data distribution and lacks targeted processing for special scenarios such as component state changes and extreme weather. Third, the hybrid model method combines the mechanistic interpretability of the physical model with the fitting ability of the data-driven model, and constructs the model through phased fusion or parameter complementarity. However, existing hybrid models are mostly simple splicing modes, which do not achieve deep integration of physical mechanisms and data features. At the same time, the correction link mostly uses fixed coefficients or single bias adjustment, which cannot be dynamically optimized according to real-time meteorological data and historical prediction errors, resulting in limited improvement in prediction accuracy.

[0004] Therefore, there is an urgent need for a photovoltaic power output forecasting method that can deeply integrate historical and real-time data features, accurately quantify the impact of weather, and dynamically optimize the forecasting process. Summary of the Invention

[0005] To address the problems existing in the prior art, this invention proposes a photovoltaic prediction method and system that integrates historical and real-time photovoltaic curves.

[0006] The technical solution of the present invention is as follows: On the one hand, this invention proposes a photovoltaic prediction method that integrates historical and real-time photovoltaic curves, the method comprising: Collect relevant photovoltaic data, including historical photovoltaic data, historical weather data, and real-time photovoltaic data; fit the historical photovoltaic data and real-time photovoltaic data into corresponding curves; The weather encoder was trained using relevant photovoltaic data as a training set to obtain the optimal weather parameter matrix; Multiple feature curves are extracted from the fitted historical photovoltaic curves; the multiple feature curves are weighted based on trust weights to obtain the initial curve; The initial curve is corrected by using the optimal weather parameter matrix as a scaling factor; the corrected initial curve and the fitted real-time photovoltaic curve are then spliced ​​together to obtain the final photovoltaic prediction curve.

[0007] Preferably, the relevant photovoltaic data is used as a training set to train the weather encoder, and the specific steps are as follows; One day is randomly selected from historical weather data as the anchor sample; the historical photovoltaic curve of the same day as the anchor sample is used as the positive sample; and the historical photovoltaic curve of another day other than the same day as the anchor sample is used as the negative sample. Input the anchor point samples into the weather encoder to obtain weather features; The positive and negative samples are encoded separately using a pre-set encoder to obtain positive sample features and negative sample features; The distance between weather features and positive and negative sample features is calculated based on the contrastive loss function. Iterate through the above process until the maximum number of iterations is reached or the comparison loss function converges, then stop iterating and obtain the optimal weather parameter matrix; The weather encoder includes at least an input layer, a feature extraction layer, and an output layer. The input layer receives historical weather data and transmits it to the feature extraction layer. The feature extraction layer uses a hybrid neural network model to simultaneously capture local and global features of historical weather data and output weather features. The output layer outputs the weather characteristics.

[0008] Preferably, the contrast loss function is calculated as follows; ; In the formula, Represents the contrastive loss function; Represents an exponential function; Represents the similarity function; Describe weather characteristics; Indicates positive sample features; Indicates negative sample features; This indicates the preset adjustment coefficient.

[0009] Preferably, multiple characteristic curves are extracted from the fitted historical photovoltaic curves, and the specific steps are as follows; Calculate the Euclidean distance between the historical photovoltaic curves for each day and sort them in ascending order; select the historical photovoltaic curves corresponding to the previous k days; By combining k historical photovoltaic curves, the historical photovoltaic curve of the day before the prediction date, and the historical photovoltaic curve of the week before, multiple characteristic curves are obtained.

[0010] Preferably, multiple feature curves are weighted based on trust weights, and the specific steps are as follows: For each feature curve, calculate the time decay weight and the shape similarity weight. The time decay weight is calculated based on the time difference between the date corresponding to the current feature curve and the predicted date, and the shape similarity weight is calculated based on the dynamic time warping distance between the current feature curve and the fitted real-time photovoltaic curve. The morphological consistency threshold of all feature curves is calculated based on the dynamic time warping distance. Traverse each feature curve, determine the relationship between the dynamic time regularization distance and the morphological consistency threshold corresponding to the current feature curve, and calculate the trust weight corresponding to the current feature curve based on the determination result.

[0011] Preferably, the optimal weather parameter matrix is ​​used as a scaling factor to correct the initial curve. The specific steps are as follows: The initial curve is nonlinearly multiplied by the scaling factor to obtain the preliminarily corrected initial curve; Obtain the weather data for the forecast day and extract the bias parameter corresponding to each weather data point from the optimal weather parameter matrix; The dynamic bias is calculated based on the weather data for the forecast date and the corresponding bias parameters. The initial curve after preliminary correction is added to the dynamic bias to obtain the corrected initial curve.

[0012] Preferably, the method further includes monitoring the final photovoltaic prediction curve. If the peak-to-valley difference of the final photovoltaic prediction curve is greater than the peak-to-valley difference of the historical photovoltaic curve under the same weather type, it is judged as an abnormal situation and an early warning is triggered.

[0013] On the other hand, the present invention also provides a photovoltaic prediction system that integrates historical and real-time photovoltaic curves, the system comprising: The data acquisition module collects relevant photovoltaic data, including historical photovoltaic data, historical weather data, and real-time photovoltaic data; and fits the historical photovoltaic data and real-time photovoltaic data into corresponding curves. The training module uses relevant photovoltaic data as a training set to train the weather encoder and obtain the optimal weather parameter matrix. Multiple feature curves are extracted from the fitted historical photovoltaic curves; the multiple feature curves are weighted based on trust weights to obtain the initial curve; The correction module uses the optimal weather parameter matrix as a scaling factor to correct the initial curve; then it stitches the corrected initial curve with the fitted real-time photovoltaic curve to obtain the final photovoltaic prediction curve.

[0014] In another aspect, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described in the present invention.

[0015] In another aspect, the present invention also provides a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the method described in the present invention.

[0016] The present invention has the following beneficial effects: 1. This invention provides a photovoltaic prediction method and system that integrates historical and real-time photovoltaic curves. It uses a weather encoder combined with a contrastive loss function to narrow the distance between weather features and positive sample photovoltaic curve features, and to widen the distance between them and negative samples. This enables deep correlation learning between weather and photovoltaic output, accurately capturing the local fluctuation features (such as short-term irradiance changes) and global trend features (such as the temperature trend throughout the day) of weather elements. This improves the accuracy of the impact of weather on photovoltaic output, enhances the model's adaptability to complex meteorological conditions, and avoids prediction bias caused by insufficient extraction of weather features. 2. This invention provides a photovoltaic prediction method and system that integrates historical and real-time photovoltaic curves. It utilizes a dynamic allocation mechanism of time decay weight and shape similarity weight, and filters low-value curves through a shape consistency threshold. This avoids invalid data interference caused by a single distance indicator, and makes the weight allocation fit the actual reference value of the curve, thereby improving the reliability and representativeness of the initial curve and increasing the utilization rate of historical data. 3. This invention provides a photovoltaic forecasting method and system that integrates historical and real-time photovoltaic curves. It uses the optimal weather parameter matrix as a nonlinear scaling factor and combines it with the dynamic bias corresponding to the real-time weather data of the forecast day to achieve precise fine-tuning of the initial curve. It dynamically corrects the deviation of the initial curve for different meteorological conditions, avoiding the limitations of fixed coefficient correction, making the forecast curve fit the real-time weather changes, improving the forecast accuracy, enhancing the robustness of the model to weather fluctuations, and reducing the forecast error. Attached Figure Description

[0017] Figure 1 This is a detailed flowchart of an embodiment of the present invention. Detailed Implementation

[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. 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.

[0019] It should be understood that the step numbers used in the text are for ease of description only and are not intended to limit the order in which the steps are performed.

[0020] 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.

[0021] The terms “comprising” and “including” indicate the presence of the described feature, whole, step, operation, element and / or component, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or collections thereof.

[0022] The term “and / or” refers to any combination of one or more of the associated listed items, as well as all possible combinations, and includes these combinations.

[0023] Example 1: See Figure 1 This invention provides a photovoltaic prediction method that integrates historical and real-time photovoltaic curves, the method comprising: S1. Collect relevant photovoltaic data, including historical photovoltaic data, historical weather data, and real-time photovoltaic data; The historical weather data includes at least solar radiation intensity, temperature, humidity, wind speed, and cloud cover; S2. Fit historical photovoltaic data and real-time photovoltaic data into corresponding curves; S3. Use the relevant photovoltaic data as a training set to train the weather encoder and obtain the optimal weather parameter matrix; S31. Randomly select one day from historical weather data as the anchor sample; take the historical photovoltaic curve of the same day as the anchor sample as the positive sample; select the historical photovoltaic curve of another day other than the same day as the anchor sample as the negative sample; Input the anchor point samples into the weather encoder to obtain weather features; The positive and negative samples are encoded separately using a pre-set encoder to obtain positive sample features and negative sample features; Based on the contrastive loss function, the distance between weather features and positive and negative sample features is calculated. This represents bringing the weather features closer to the positive sample features in the feature space, while pushing the weather features further away from the negative sample features. Iterate through the above process until the maximum number of iterations is reached or the comparison loss function converges, then stop iterating and obtain the optimal weather parameter matrix; The weather encoder includes at least an input layer, a feature extraction layer, and an output layer. The input layer receives historical weather data and transmits it to the feature extraction layer. The feature extraction layer uses a hybrid neural network model (e.g., CNN+Transformer) to simultaneously capture local and global features of historical weather data and output weather features; The output layer outputs the weather characteristics; S32. The comparison loss function is calculated as follows: ; In the formula, Represents the contrastive loss function; Represents an exponential function; Represents the similarity function; Describe weather characteristics; Indicates positive sample features; Indicates negative sample features; This represents a preset adjustment coefficient used to adjust the level of attention given to difficult samples; S4. Extract multiple feature curves from the historical photovoltaic curves obtained from the fitting; Calculate the Euclidean distance between the historical photovoltaic curves for each day and sort them in ascending order; select the historical photovoltaic curves corresponding to the previous k days; By combining k historical photovoltaic curves, the historical photovoltaic curve of the day before the prediction date, and the historical photovoltaic curve of the previous week, multiple characteristic curves are obtained. S5. Weight the multiple feature curves based on the trust weights to obtain the initial curve; S51. Calculate the time decay weight and morphological similarity weight for each feature curve. The time decay weight is calculated based on the time difference between the current feature curve's corresponding date and the prediction date. The calculation method is as follows: ; In the formula, Indicates the first Time decay weights of the characteristic curves; This represents the preset time decay coefficient; Indicates the first The time difference between the characteristic curve and the prediction date; The morphological similarity weight is calculated based on the dynamic time warp distance between the current feature curve and the fitted real-time photovoltaic curve. The calculation method is as follows: ; In the formula, Indicates the first Weights based on the similarity in shape of the characteristic curves; Indicates the first The dynamic time warping distance of the characteristic curves; The dynamic time warping distance is calculated using a dynamic time warping algorithm, and the specific steps include: Build a matrix ,in This indicates the number of eigenvalues ​​in the current characteristic curve. This indicates the number of eigenvalues ​​in the real-time photovoltaic curve; The Euclidean distance from each eigenvalue in the current characteristic curve to each eigenvalue in the real-time photovoltaic curve is calculated as follows: ; In the formula, Indicates the first The eigenvalues ​​in the current characteristic curve up to the ... Euclidean distance of eigenvalues ​​in a real-time photovoltaic curve; Indicates the first The eigenvalues ​​in the current characteristic curve; Indicates the first Characteristic values ​​in a real-time photovoltaic curve; The cumulative distance between two points is calculated recursively, as follows: ; ; In the formula, Indicates the first The eigenvalues ​​in the current characteristic curve up to the ... The cumulative distance of characteristic values ​​in a real-time photovoltaic curve; Describes the minimum value function; Last Dynamic time warping distance of the characteristic curve That is, the result of recursive calculation. ; The morphological consistency threshold of all feature curves is calculated based on the dynamic time warping distance. The calculation method is as follows: ; In the formula, Indicates the morphological consistency threshold; Indicates the number of characteristic curves; Iterate through each feature curve, determine the relationship between the dynamic time regularization distance and the morphological consistency threshold corresponding to the current feature curve, and calculate the trust weight corresponding to the current feature curve based on the determination result. The calculation method is as follows: ; In the formula, Indicates the first Trust weights for each characteristic curve; S52. The initial curve is calculated as follows: ; In the formula, Indicates the initial curve; Indicates the first Characteristic curves; S6. Use the optimal weather parameter matrix as a scaling factor to correct the initial curve; The initial curve is nonlinearly multiplied by the scaling factor to obtain the pre-corrected initial curve. The calculation method is as follows: ; In the formula, This represents the initial curve after preliminary correction; Indicates the scaling factor; Indicates the activation function; Obtain the weather data for the forecast day and extract the bias parameter corresponding to each weather data point from the optimal weather parameter matrix; The dynamic bias is calculated based on the weather data for the forecast date and the corresponding bias parameters. The calculation method is as follows: ; In the formula, Indicates the dynamic bias amount; Indicates the first Weather data; Indicates the first The bias parameter corresponding to each weather data point; Indicates that it follows the mean. variance is The Gaussian distribution function is used to simulate the concentrated effect of weather data on the phase of photovoltaic data; The initial curve after preliminary correction is added to the dynamic bias to obtain the corrected initial curve. The calculation method is as follows: ; In the formula, This represents the corrected initial curve; S7. The corrected initial curve and the fitted real-time photovoltaic curve are spliced ​​together to obtain the final photovoltaic prediction curve. The calculation method is as follows: ; In the formula, This represents the final photovoltaic forecast curve; This represents the real-time photovoltaic curve obtained through fitting; S8. The method further includes monitoring the final photovoltaic prediction curve. If the peak-to-valley difference of the final photovoltaic prediction curve is greater than the peak-to-valley difference of the historical photovoltaic curve under the same weather type, it is judged as an abnormal situation and an early warning is triggered.

[0024] Example 2: This embodiment provides a photovoltaic forecasting system that integrates historical and real-time photovoltaic curves. The system includes: The data acquisition module collects relevant photovoltaic data, including historical photovoltaic data, historical weather data, and real-time photovoltaic data; and fits the historical photovoltaic data and real-time photovoltaic data into corresponding curves. The training module uses relevant photovoltaic data as a training set to train the weather encoder and obtain the optimal weather parameter matrix. Multiple feature curves are extracted from the fitted historical photovoltaic curves; the multiple feature curves are weighted based on trust weights to obtain the initial curve; The correction module uses the optimal weather parameter matrix as a scaling factor to correct the initial curve; then it stitches the corrected initial curve with the fitted real-time photovoltaic curve to obtain the final photovoltaic prediction curve.

[0025] Example 3: This embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements a photovoltaic prediction method that integrates historical and real-time photovoltaic curves as described in any one of Embodiment 1.

[0026] Example 4: This embodiment provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements a photovoltaic prediction method that integrates historical and real-time photovoltaic curves as described in any one of Embodiment 1.

[0027] In this embodiment of the invention, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent the existence of A alone, A and B simultaneously, or B alone. A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects have an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of singular or plural items. For example, at least one of a, b, and c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, and c can be single or multiple.

[0028] Those skilled in the art will recognize that the units and algorithm steps described in the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of electronic hardware and software. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0029] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0030] In several embodiments provided by this invention, any function, if implemented as a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0031] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. A photovoltaic forecasting method that fuses historical and real-time photovoltaic curves, characterized in that, The method comprises: Collecting related photovoltaic data, including historical photovoltaic data, historical weather data and real-time photovoltaic data; fitting the historical photovoltaic data and the real-time photovoltaic data into corresponding curves; Training the weather encoder with the related photovoltaic data as the training set to obtain an optimal weather parameter matrix; Extracting a plurality of feature curves from the fitted historical photovoltaic curve; and performing weighted calculation on the plurality of feature curves based on a trust weight to obtain an initial curve; Correcting the initial curve with the optimal weather parameter matrix as a scaling factor; and splicing the corrected initial curve and the fitted real-time photovoltaic curve to obtain a final photovoltaic prediction curve.

2. The method of claim 1, wherein, The specific steps for training the weather encoder with the related photovoltaic data as the training set are as follows: Randomly selecting a day from the historical weather data as an anchor sample; taking the historical photovoltaic curve of the same day as the anchor sample as a positive sample; and selecting a historical photovoltaic curve of another day except the same day as the anchor sample as a negative sample; Inputting the anchor sample into the weather encoder to obtain weather features; Encoding the positive sample and the negative sample respectively by using a preset encoder to obtain positive sample features and negative sample features; Calculating the distance between the weather features and the positive sample features and the negative sample features based on a contrast loss function; Iterating the above process until a maximum iteration number is reached or the contrast loss function converges, stopping iteration, and obtaining an optimal weather parameter matrix; The weather encoder at least comprises an input layer, a feature extraction layer and an output layer; The input layer receives input historical weather data and transmits it to the feature extraction layer; The feature extraction layer adopts a hybrid neural network model to capture local features and global features of the historical weather data simultaneously, and outputs weather features; The output layer outputs the weather features.

3. The method of claim 1, wherein, The contrast loss function is calculated in the following manner: ; In the formula, represents a contrast loss function; represents an exponential function; represents a similarity function; represents a weather feature; represents a positive sample feature; represents a negative sample feature; represents a preset adjustment coefficient.

4. The method of claim 3, wherein the historical and real-time PV curve fusion is performed by: The specific steps for extracting a plurality of feature curves from the fitted historical photovoltaic curve are as follows: Calculating the Euclidean distance between the historical photovoltaic curves of each day and arranging them in ascending order; and selecting the historical photovoltaic curves corresponding to the first k days; Combining the k historical photovoltaic curves, the historical photovoltaic curve of the day before the prediction day and the historical photovoltaic curves of the previous week to obtain a plurality of feature curves.

5. The method of claim 1, wherein, The specific steps for performing weighted calculation on the plurality of feature curves based on a trust weight are as follows: Calculating a time decay weight and a shape similarity weight for each feature curve, wherein the time decay weight is calculated based on the time difference between the corresponding date of the current feature curve and the prediction day, and the shape similarity weight is calculated based on the dynamic time warping distance between the current feature curve and the fitted real-time photovoltaic curve; Calculating the shape consistency threshold of all feature curves based on the dynamic time warping distance; Traversing each feature curve, judging the relationship between the dynamic time warping distance corresponding to the current feature curve and the shape consistency threshold, and calculating the trust weight corresponding to the current feature curve according to the judgment result.

6. The method of claim 1, wherein, The specific steps for correcting the initial curve with the optimal weather parameter matrix as a scaling factor are as follows: Nonlinearly multiplying the initial curve by the scaling factor to obtain a preliminarily corrected initial curve; Obtain weather data of the prediction day, and extract a bias parameter corresponding to each weather data from the optimal weather parameter matrix; Calculate a dynamic bias based on the weather data of the prediction day and the corresponding bias parameter; Add the initial curve after preliminary correction and the dynamic bias to obtain the corrected initial curve.

7. The method of claim 1, wherein, The method further comprises monitoring the final photovoltaic prediction curve, and if a peak-valley difference of the final photovoltaic prediction curve is greater than a peak-valley difference of a historical photovoltaic curve under the same weather type, determining that an abnormal situation occurs, and triggering a warning.

8. A photovoltaic forecasting system that fuses historical and real-time photovoltaic curves, characterized in that, The system comprises: A data acquisition module that collects relevant photovoltaic data, including historical photovoltaic data, historical weather data, and real-time photovoltaic data; and fits the historical photovoltaic data and the real-time photovoltaic data into corresponding curves; A training module that trains a weather encoder using the relevant photovoltaic data as a training set to obtain an optimal weather parameter matrix; Extracts a plurality of feature curves from the fitted historical photovoltaic curve; and calculates the plurality of feature curves based on a trust weight to obtain an initial curve; A correction module that corrects the initial curve using the optimal weather parameter matrix as a scaling factor; and splices the corrected initial curve and the fitted real-time photovoltaic curve to obtain a final photovoltaic prediction curve.

9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the method of any one of claims 1 to 7 when executing the program.

10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program, when executed by the processor, implements the method of any one of claims 1 to 7.