A distributed photovoltaic short-term power prediction method based on image recognition

By installing high-definition cameras around the distributed photovoltaic power station to acquire image data, and combining historical meteorological and power data, a short-term power prediction model based on image recognition is solved, and the problem that traditional methods are difficult to capture the impact of real-time factors is achieved, achieving higher prediction accuracy and reliability.

CN119762933APending Publication Date: 2025-04-04INTELLIGENT DISTRIBUTION NETWORK CENT OF STATE GRID JIBEI ELECTRIC POWER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411562061.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-04
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

Traditional photovoltaic power prediction methods are difficult to accurately capture the real-time impact of photovoltaic panels and their surrounding environmental factors, resulting in limited prediction accuracy.

Method used

A distributed photovoltaic short-term power prediction method based on picture recognition is adopted, and images and characteristic data of photovoltaic panels and surrounding environments are collected through high-definition cameras, combined with historical meteorological data and historical photovoltaic power data, a power prediction model is constructed, and a long-term and short-term memory network is used for prediction analysis.

Benefits of technology

By taking into account the various factors of the photovoltaic panel and surrounding environment, the accuracy and reliability of photovoltaic power prediction are significantly improved, and more intuitive and practical power prediction results are provided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119762933A_ABST
    Figure CN119762933A_ABST
Patent Text Reader

Abstract

The present invention relates to the field of photovoltaic technology, and discloses a distributed photovoltaic short-term power prediction method based on image recognition, including the steps of data acquisition, image preprocessing, feature extraction, power prediction, and result output; in data acquisition, the present invention uses a high-definition camera to collect images and data features, and combines historical meteorological and photovoltaic power data to cover different conditions, providing a rich and accurate data basis for subsequent analysis; grayscale processing simplifies data, and a specific denoising method improves image quality; the Canny edge detection algorithm and the grayscale co-occurrence matrix method accurately extract edge and texture features respectively, which helps to fully understand the status of photovoltaic panels. The power prediction model adopts a long short-term memory network to normalize the data and reasonably divide the data set, thereby improving the prediction accuracy and reliability; the result output is denormalized to provide relevant personnel with an intuitive and practical power value range, which is convenient for energy management decision-making.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of photovoltaic technology, and in particular to a distributed photovoltaic short-term power prediction method based on image recognition. Background Art

[0002] In today's energy field, the development of distributed photovoltaic power stations has received increasing attention. With the growing demand for renewable energy, improving the power generation efficiency and reliability of distributed photovoltaic power stations has become a key issue. Accurately predicting photovoltaic power is of great significance to the stable operation of the power system, energy scheduling, and economic benefits.

[0003] Traditional photovoltaic power prediction methods mainly rely on meteorological data and historical power data, but these methods often ignore the impact of the photovoltaic panel's own state and the real-time visual information of the surrounding environment on power output. The performance of photovoltaic panels is affected by a combination of factors, such as dust accumulation, shadow occlusion, aging, etc. on the surface of photovoltaic panels, as well as changes in the light intensity of the surrounding environment, temperature, humidity, wind speed and other meteorological conditions. Relying solely on historical data for prediction is difficult to accurately capture the real-time impact of these complex factors, resulting in limited prediction accuracy.

[0004] For example, in actual operation, the photovoltaic panel surface may reduce its photoelectric conversion efficiency due to the gradual accumulation of dust, but traditional methods may not be able to promptly reflect the impact of this change on power output. Similarly, when buildings or trees around the photovoltaic power station cast shadows on the photovoltaic panels at different time periods, it will also significantly affect the generation of photovoltaic power, and it is difficult to accurately predict the power changes in this case by relying solely on conventional meteorological and historical power data.

[0005] Therefore, in order to more accurately predict the power output of distributed photovoltaic power plants, a prediction method is needed that comprehensively considers multiple factors, especially combining the image information of photovoltaic panels and surrounding environment. Summary of the invention

[0006] The purpose of the present invention is to provide a distributed photovoltaic short-term power prediction method based on image recognition, which solves the technical problems raised in the background technology.

[0007] The purpose of the present invention can be achieved through the following technical solutions:

[0008] A distributed photovoltaic short-term power prediction method based on image recognition includes the following steps:

[0009] Step 1: Data Collection

[0010] Through the high-definition cameras installed around the distributed photovoltaic power station, the images corresponding to the photovoltaic panels and the surrounding environment and their corresponding image data features are collected at specified time intervals; at the same time, the historical meteorological data and historical photovoltaic power data of the distributed photovoltaic power station are collected; the historical meteorological data include but are not limited to temperature, humidity, light intensity, wind speed;

[0011] Step 2: Image preprocessing

[0012] Perform grayscale processing and image denoising on the collected images;

[0013] Step 3: Feature extraction

[0014] Extract edge features and texture features of photovoltaic panels based on the images after grayscale processing and image denoising;

[0015] Step 4: Power prediction

[0016] The extracted image features, historical meteorological data and historical photovoltaic power data are used to construct a power prediction model, and prediction analysis is performed through the power prediction model to obtain the predicted photovoltaic power in the specified time period in the future based on the analysis results;

[0017] Step 5: Result output

[0018] The prediction results obtained by the power prediction module are denormalized to obtain the actual power value range, which is then displayed to relevant personnel.

[0019] As a further solution of the present invention: wherein, the image data features include image resolution, color information, and light intensity, and the image data features cover different weather conditions and different time periods.

[0020] As a further solution of the present invention: grayscale processing is to convert the RGB three-channel image into a grayscale image.

[0021] As a further solution of the present invention: the image denoising method is as follows:

[0022] For each pixel in the image, a 3×3 neighborhood window is selected with it as the center, the pixel values ​​in the window are sorted from small to large, and the middle value is taken as the new value of the pixel.

[0023] As a further solution of the present invention: wherein, the Canny edge detection algorithm is used to extract edge features, and the edge feature extraction method is as follows:

[0024] Step D1.1, perform Gaussian filtering on the preprocessed image and calculate the convolution value of each pixel. Then, for each pixel in the image, use the convolution value of the pixels in its neighborhood and the Gaussian function to update the value of the pixel.

[0025] The Gaussian function is as follows:

[0026]

[0027] Among them, G(x, y) is the convolution value of the corresponding pixel, (x, y) is the pixel coordinate of the corresponding pixel, σ is the Gaussian standard deviation, and its value is 1.4;

[0028] Step D1.2, use the Sobel operator to calculate the horizontal and vertical gradients Tx and Ty of the image respectively;

[0029] Then through Calculate the gradient amplitude T of the image;

[0030] At the same time through Calculate the direction θ of the image;

[0031] Step D1.3, perform non-maximum suppression on the gradient amplitude and set the gradient values ​​outside the local maximum value to 0.

[0032] Step D1.4, extract the preset high threshold Tg and low threshold Td, where Tg = 2 × td;

[0033] The pixel points whose gradient amplitude T is greater than the high threshold Tg are defined as strong edges;

[0034] The pixel points whose gradient amplitude is between the low threshold and the high threshold are defined as weak edges;

[0035] Step D1.5, by connecting the strong edge and the weak edge connected to it, the final edge image is obtained;

[0036] Step D1.6: Based on the final edge image, edge features are extracted, including but not limited to the outline of the photovoltaic panel and the length of the edge.

[0037] As a further solution of the present invention: the way to update the value of the pixel point is as follows:

[0038] When Gaussian filtering is performed on an image, a pixel point (i, j) in the image is selected, and (i, j) represents the coordinates of the pixel point;

[0039] Then (i, j) is taken as the center and a 3×3 neighborhood is selected;

[0040] Then, the pixel value of each pixel point (m, n) in the neighborhood is multiplied by the value of the Gaussian function at the corresponding position (mi, nj), and all the products are added together. The result is to update the value of the original pixel point with the value after the convolution of the pixel in the neighborhood and the Gaussian function;

[0041] In a 3×3 neighborhood, the value of m is any one of i-1, i, i+1, and the value of n is any one of j-1, j, j+1;

[0042] The formula is as follows:

[0043] Where L1 represents the value used to update the original pixel, Lm,n represents the pixel value of the corresponding pixel in the neighborhood, and Gm-i,nj represents the value of the Gaussian function at the corresponding position.

[0044] As a further solution of the present invention: the texture features of the photovoltaic panel are extracted using the gray level co-occurrence matrix method, and the texture feature extraction method is as follows:

[0045] Step D2.1, quantize the gray value of the preprocessed image to a preset gray level k levels;

[0046] Step D2.2, select a displacement vector (Dx, Dy), calculate the number of occurrences of the gray value combination of all pixel pairs that satisfy the displacement vector in the image, and obtain the gray level co-occurrence matrix Z (w,v) , where w = 0, 1, ... k-1, v = 0, 1, ... k-1;

[0047] Step D 2.3, based on the gray-level co-occurrence matrix, calculate the energy feature, contrast feature, correlation feature, and entropy feature respectively.

[0048] As a further solution of the present invention: the calculation formula of the energy characteristic is:

[0049]

[0050] Where ASM represents energy characteristics;

[0051] The calculation formula of contrast feature is:

[0052]

[0053] In the formula, CON represents the contrast feature;

[0054] The calculation formula of correlation characteristics is:

[0055]

[0056] In the formula, COR represents the correlation characteristic;

[0057] The calculation formula of entropy feature is as follows:

[0058] Where ENT represents the entropy feature.

[0059] As a further solution of the present invention: the prediction analysis method is as follows:

[0060] Step Y1. Normalize the historical meteorological data and historical photovoltaic power data. The normalization method is as follows:

[0061] Multiple data parameters of one attribute in the historical data and the historical photovoltaic power data are used as a vector using Q;

[0062] A data parameter with the largest value is selected from the data parameters of the attribute and is marked as Qmax. A data parameter with the smallest value is selected from the data parameters of the attribute and is marked as Qmin.

[0063] Then through Obtaining normalized values ​​Q1 of multiple data parameters;

[0064] StepY2. Combine the extracted image features, historical meteorological data and historical photovoltaic power data to establish a power prediction model.

[0065] As a further solution of the present invention: at the same time, the extracted image features, historical meteorological data and historical photovoltaic power data are divided into a training set, a validation set and a test set according to a certain ratio;

[0066] The validation set is used to adjust the model's hyperparameters during the training process, and the test set is used to finally evaluate the model's performance.

[0067] As a further solution of the present invention: the power prediction model is established by a long short-term memory network, and its structure includes an input layer, multiple hidden layers and an output layer;

[0068] The input layer receives image features, historical meteorological data, and historical photovoltaic power data, the hidden layer performs nonlinear processing and feature extraction on the received data, and the output layer predicts the photovoltaic power within a specified time period in the future.

[0069] Beneficial effects of the present invention:

[0070] Comprehensive and accurate data collection: By installing high-definition cameras around distributed photovoltaic power stations, images and data features of photovoltaic panels and surrounding environment are collected at specified time intervals. At the same time, historical meteorological data and historical photovoltaic power data are collected, covering temperature, humidity, light intensity, wind speed and other factors. The image data features include resolution, color information, light intensity, etc., and cover different weather conditions and time periods, providing a rich and comprehensive data basis for subsequent power forecasts, which helps to more accurately analyze the operation of photovoltaic power stations and power change factors.

[0071] Image preprocessing effectively improves quality: grayscale processing is performed on the collected images, and the RGB three-channel images are converted into grayscale images, which reduces the amount of data and computational complexity, while highlighting important features such as the image contour and texture, which is conducive to subsequent feature extraction. A specific image denoising method is used to select a 3×3 neighborhood window with each pixel as the center. By taking the middle value as the new value, the noise interference in the image can be effectively removed, the image clarity and quality can be improved, and the subsequent extracted features can be more accurate and reliable.

[0072] Feature extraction is accurate and comprehensive: Using the Canny edge detection algorithm, after Gaussian filtering, calculating gradients, non-maximum suppression, threshold setting and edge connection, the edge features of photovoltaic panels, including contours and edge lengths, can be accurately extracted. These edge features are of great significance for analyzing the physical state of photovoltaic panels and their relationship with the surrounding environment, and help to more deeply understand the impact of the working state of photovoltaic panels on power output. In Gaussian filtering, the pixel values ​​are updated by convolution of pixels in the neighborhood with Gaussian functions through precise pixel value update methods, which ensures the accuracy and stability of the filtering effect and further improves the accuracy of edge detection. The grayscale co-occurrence matrix method is used to quantize the grayscale value of the image to a preset grayscale level, and the grayscale co-occurrence matrix is ​​obtained by calculating the number of occurrences of the grayscale value combination of pixel pairs under the displacement vector, and then the energy, contrast, correlation, entropy and other features are calculated. These texture features can reflect the texture characteristics and local structural information of the photovoltaic panel surface, and there is a potential correlation with the power output, which provides richer feature information for power prediction and helps to improve the accuracy of prediction.

[0073] The power prediction model is scientific and efficient: the historical meteorological data and historical photovoltaic power data are normalized so that the data parameters of different attributes are on the same scale, which is conducive to the training and convergence of the model and improves the computational efficiency and accuracy of the model. The power prediction model is established by combining the extracted image features, historical meteorological data and historical photovoltaic power data, and the data is divided into training set, validation set and test set according to a certain ratio. The validation set is used to adjust the model hyperparameters, and the test set is used to evaluate the model performance. This scientific data division and use method can ensure the reliability and generalization ability of the model, so that it can better adapt to different operating scenarios and data conditions. The power prediction model is established through a long short-term memory network, and its structure includes an input layer, multiple hidden layers and an output layer. The input layer can receive various types of data, the hidden layer performs nonlinear processing and feature extraction on the data, and the output layer predicts the photovoltaic power in the specified time period in the future. Long short-term memory networks can effectively process time series data and capture the time dependencies and long-term trends in the data. They have good adaptability to prediction tasks such as photovoltaic power, which is greatly affected by time factors. They can improve the accuracy and reliability of power prediction, provide accurate future power prediction information for relevant personnel, and help to reasonably arrange power production and scheduling, and improve the operating efficiency and economic benefits of photovoltaic power stations.

[0074] The output results are intuitive and practical: the prediction results obtained by the power prediction module are denormalized to obtain the actual power value range and displayed to relevant personnel, making the results more intuitive and easy to understand, so that relevant personnel can make decisions and management based on the predicted power values, such as adjusting power distribution, arranging equipment maintenance, etc., thereby improving the overall operation and management level of the photovoltaic power station. BRIEF DESCRIPTION OF THE DRAWINGS

[0075] The present invention will be further described below in conjunction with the accompanying drawings.

[0076] Figure 1 It is a system block diagram of a distributed photovoltaic short-term power prediction method based on image recognition in the present invention.

[0077] Figure 2 It is a flow chart of a distributed photovoltaic short-term power prediction method based on image recognition in the present invention. DETAILED DESCRIPTION

[0078] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0079] Embodiment 1

[0080] See also Figure 1 and Figure 2 As shown, the present invention is a distributed photovoltaic short-term power prediction method based on image recognition, comprising the following steps:

[0081] Step 1: Data Collection

[0082] Through the high-definition cameras installed around the distributed photovoltaic power station, the images corresponding to the photovoltaic panels and the surrounding environment and their corresponding image data features are collected at specified time intervals;

[0083] Among them, the image data features include image resolution, color information, and light intensity;

[0084] In this embodiment, the resolution is 1920×1080 pixels, the color information is represented by RGB three channels, and the light intensity is estimated by the grayscale value of the image;

[0085] Among them, the image data features cover different weather conditions and different time periods;

[0086] In this embodiment, the time interval is once every 15 minutes; different weather conditions such as sunny, cloudy, overcast, rainy, etc.; different time periods such as morning, noon, afternoon, etc.;

[0087] At the same time, historical meteorological data and historical photovoltaic power data of distributed photovoltaic power stations are collected; historical meteorological data include but are not limited to temperature, humidity, light intensity, and wind speed;

[0088] This embodiment uses a high-definition camera to collect images of photovoltaic panels and surrounding environments and their data features at certain time intervals, including resolution, color information, light intensity, etc., and covers different weather conditions and time periods. At the same time, historical meteorological data and historical photovoltaic power data are collected, which provides a rich data basis for subsequent analysis and helps to more comprehensively consider the impact of various factors on photovoltaic power.

[0089] Step 2: Image preprocessing

[0090] The collected images are preprocessed as follows:

[0091] Grayscale the collected image and convert the RGB three-channel image into a grayscale image;

[0092] In this embodiment, the conversion formula of the grayscale image is as follows:

[0093] H=0.299×R+0.587×G+0.114×B

[0094] In the formula, R, G, B are the pixel values ​​of the red, green, and blue channels at the same pixel point in the original image, respectively, and H is the grayscale value of the corresponding pixel point;

[0095] This embodiment performs grayscale processing on the collected image, converting the RGB three-channel image into a grayscale image, which is conducive to simplifying subsequent processing and improving calculation efficiency, and provides a specific grayscale conversion formula to enhance the accuracy and operability of the processing;

[0096] Step 3: Feature extraction

[0097] The specific steps are as follows:

[0098] Step D1: Edge feature extraction

[0099] In this embodiment, the Canny edge detection algorithm is used for feature extraction;

[0100] Step D1.1, perform Gaussian filtering on the preprocessed image and calculate the convolution value of each pixel. Then, for each pixel in the image, use the convolution value of the pixels in its neighborhood and the Gaussian function to update the value of the pixel.

[0101] In this embodiment, the purpose of Gaussian filtering is to smooth the image and reduce the influence of noise on edge detection;

[0102] The Gaussian function is as follows:

[0103]

[0104] Among them, G(x, y) is the convolution value of the corresponding pixel, (x, y) is the pixel coordinate of the corresponding pixel, σ is the Gaussian standard deviation, and its value is 1.4;

[0105] The way to update the pixel value is as follows:

[0106] When Gaussian filtering is performed on an image, a pixel point (i, j) in the image is selected, and (i, j) represents the coordinates of the pixel point;

[0107] Then (i, j) is taken as the center and a 3×3 neighborhood is selected;

[0108] Then, the pixel value of each pixel point (m, n) in the neighborhood is multiplied by the value of the Gaussian function at the corresponding position (mi, nj), and all the products are added together. The result is to update the value of the original pixel point with the value after the convolution of the pixel in the neighborhood and the Gaussian function;

[0109] In a 3×3 neighborhood, the value of m is any one of i-1, i, i+1, and the value of n is any one of j-1, j, j+1;

[0110] The formula is as follows:

[0111] Where L1 represents the value used to update the original pixel, Lm,n represents the pixel value of the corresponding pixel in the neighborhood, and Gm-i,nj represents the value of the Gaussian function at the corresponding position;

[0112] Step D1.2, use the Sobel operator to calculate the horizontal and vertical gradients Tx and Ty of the image respectively;

[0113] Then through Calculate the gradient amplitude T of the image;

[0114] At the same time through Calculate the direction θ of the image;

[0115] Step D1.3, perform non-maximum suppression on the gradient amplitude and set the gradient values ​​outside the local maximum value to 0.

[0116] Step D1.4, extract the preset high threshold Tg and low threshold Td, where Tg = 2 × td;

[0117] The pixel points whose gradient amplitude T is greater than the high threshold Tg are defined as strong edges;

[0118] The pixel points whose gradient amplitude is between the low threshold and the high threshold are defined as weak edges;

[0119] Step D1.5, by connecting the strong edge and the weak edge connected to it, the final edge image is obtained;

[0120] Step D1.6, based on the final edge image, extract edge features, including but not limited to the outline of the photovoltaic panel and the length of the edge;

[0121] Step D2, texture feature extraction;

[0122] The texture features of photovoltaic panels are extracted using the gray-level co-occurrence matrix method;

[0123] The specific steps are as follows:

[0124] Step D2.1, quantize the gray value of the preprocessed image to a preset gray level k levels;

[0125] Step D2.2, select a displacement vector (Dx, Dy), calculate the number of occurrences of the gray value combination of all pixel pairs that satisfy the displacement vector in the image, and obtain the gray level co-occurrence matrix Z (w,v) , where w = 0, 1, ... k-1, v = 0, 1, ... k-1;

[0126] Step D2.3, based on the gray-level co-occurrence matrix, calculate the energy feature, contrast feature, correlation feature, and entropy feature respectively;

[0127] The energy characteristic is calculated as:

[0128]

[0129] Where ASM represents energy characteristics;

[0130] The calculation formula of contrast feature is:

[0131]

[0132] In the formula, CON represents the contrast feature;

[0133] The calculation formula of correlation characteristics is:

[0134]

[0135] In the formula, COR represents the correlation characteristic;

[0136] The calculation formula of entropy feature is as follows:

[0137] In the formula, ENT represents entropy feature;

[0138] This embodiment adopts the Canny edge detection algorithm, smoothes the image through Gaussian filtering to reduce the influence of noise, and describes in detail the way of updating pixel values ​​in Gaussian filtering, including convolution value calculation, neighborhood selection and calculation method, etc. It also clarifies the steps of calculating gradient, non-maximum suppression, threshold setting and edge connection by Sobel operator, and finally accurately extracts edge features such as the contour and edge length of the photovoltaic panel, providing important image structure information for power prediction; uses the grayscale co-occurrence matrix method, quantizes the grayscale value and calculates the grayscale co-occurrence matrix, and then calculates energy, contrast, correlation, entropy and other features. These texture features can reflect the texture condition of the photovoltaic panel surface, further enrich the feature information, and help improve the accuracy of power prediction;

[0139] Step 4: Power prediction

[0140] The extracted image features, historical meteorological data and historical photovoltaic power data are used for prediction and analysis;

[0141] The predictive analysis method is as follows:

[0142] Step Y1. Normalize the historical meteorological data and historical photovoltaic power data. The normalization method is as follows:

[0143] Multiple data parameters of one attribute in the historical data and the historical photovoltaic power data are used as a vector using Q;

[0144] A data parameter with the largest value is selected from the data parameters of the attribute and is marked as Qmax. A data parameter with the smallest value is selected from the data parameters of the attribute and is marked as Qmin.

[0145] Then through Obtaining normalized values ​​Q1 of multiple data parameters;

[0146] Step Y2, combine the extracted image features, historical meteorological data and historical photovoltaic power data to establish a power prediction model;

[0147] Divide the data into training set, validation set and test set according to a certain ratio;

[0148] In this embodiment, it is divided in a ratio of 6:2:2;

[0149] The validation set is used to adjust the model's hyperparameters during the training process, and the test set is used to finally evaluate the model's performance;

[0150] The power prediction model is established through a long short-term memory network, and its structure includes an input layer, multiple hidden layers and an output layer.

[0151] The input layer receives image features, historical meteorological data, and historical photovoltaic power data. The hidden layer performs nonlinear processing and feature extraction on the received data. The output layer predicts the photovoltaic power within a specified time period in the future.

[0152] Step 5: Result output

[0153] The prediction results obtained by the power prediction module are denormalized to obtain the actual power value range, which is then displayed to relevant personnel.

[0154] This embodiment normalizes historical meteorological data and historical photovoltaic power data to make the data at the same scale for easy model processing; divides the training set, validation set and test set according to a certain ratio, and uses the long short-term memory network to establish a power prediction model. Reasonable model structure and data division method can improve the training effect and prediction performance of the model, and accurately predict the photovoltaic power in the specified time period in the future. The prediction results are denormalized to obtain the actual power value range and displayed to relevant personnel, which is convenient for users to intuitively understand the photovoltaic power prediction situation, and provides strong support for the operation management and decision-making of photovoltaic power stations.

[0155] Embodiment 2

[0156] As the second embodiment of the present invention, when the present application is implemented, compared with the first embodiment, the technical solution of the present embodiment is different from that of the first embodiment only in that,

[0157] The preprocessing step also includes: using a median filter algorithm to perform image denoising on the collected image;

[0158] Image denoising is done as follows:

[0159] For each pixel in the image, select a 3×3 neighborhood window with it as the center, sort the pixel values ​​in the window from small to large, and take the middle value as the new value of the pixel;

[0160] In this embodiment, the purpose of image denoising is to remove noise interference in the image;

[0161] In this embodiment, after preprocessing, the data features of the image are more prominent and the noise is suppressed, which is conducive to subsequent feature extraction; at this time, the grayscale value distribution of the image is more reasonable, and features such as the average grayscale value and grayscale standard deviation can more accurately reflect the lighting and texture conditions of the image.

[0162] This embodiment adds a median filter algorithm to the preprocessing step to denoise the image. By selecting a 3×3 neighborhood window and taking the middle value as the new value of the pixel point, the noise interference in the image is effectively removed. The data features of the image are more prominent, the noise is suppressed, and better conditions are created for subsequent feature extraction. After preprocessing, the grayscale value distribution of the image is more reasonable, and features such as the average grayscale value and grayscale standard deviation can more accurately reflect the illumination and texture of the image, which is conducive to improving the accuracy of subsequent edge feature and texture feature extraction, thereby further improving the accuracy of power prediction.

[0163] Embodiment 3

[0164] As the third embodiment of the present invention, when the present application is specifically implemented, compared with the first and second embodiments, the technical solution of this embodiment is to combine the solutions of the first and second embodiments mentioned above for implementation.

[0165] This embodiment takes full advantage of the following advantages: the solutions of embodiment one and embodiment two are implemented in combination, which not only has the advantages of embodiment one, such as comprehensive data acquisition, effective image preprocessing (including grayscale processing), accurate feature extraction (edge ​​features and texture features), scientific power prediction and practical result output, but also integrates the advantages of embodiment two in which the median filtering algorithm is used to enhance the image denoising effect and improve the image feature quality. It can give full play to the strengths of the two solutions, further improve the accuracy, reliability and stability of distributed photovoltaic short-term power prediction, and provide better technical support for the efficient operation and management of photovoltaic power stations.

[0166] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters and thresholds in the formula are set by technicians in this field according to actual conditions.

[0167] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A distributed photovoltaic short-term power prediction method based on image recognition, characterized in that: The following steps are involved: Step 1: Use high-definition cameras installed around distributed photovoltaic power stations to collect images of photovoltaic panels and surrounding environments and their corresponding image data features at specified time intervals; and collect historical meteorological data and historical photovoltaic power data of distributed photovoltaic power stations at the same time; Step 2: grayscale processing and image denoising are performed on the collected images; Step 3: Extract edge features and texture features of the photovoltaic panel based on the image after grayscale processing and image denoising processing; Step 4: construct a power prediction model using the extracted image features, historical meteorological data, and historical photovoltaic power data, and perform prediction analysis using the power prediction model to obtain the predicted photovoltaic power within a specified time period in the future based on the analysis results; Step 5: Denormalize the prediction results obtained by the power prediction module and obtain the actual power value range, which is then displayed to relevant personnel.

2. According to claim 1, a distributed photovoltaic short-term power prediction method based on image recognition is characterized in that: Grayscale processing is to convert the RGB three-channel image into a grayscale image; Image denoising is done as follows: For each pixel in the image, a 3×3 neighborhood window is selected with it as the center, the pixel values ​​in the window are sorted from small to large, and the middle value is taken as the new value of the pixel.

3. According to claim 1, a distributed photovoltaic short-term power prediction method based on image recognition is characterized in that: in, Use the Canny edge detection algorithm to extract edge features. The edge feature extraction method is as follows: Step D1.1, perform Gaussian filtering on the preprocessed image through the Gaussian function, and calculate the convolution value of each pixel point, and then for each pixel point in the image, use the convolution value of the pixels in its neighborhood and the Gaussian function to update the value of the pixel point; Step D1.2, use the Sobel operator to calculate the horizontal and vertical gradients Tx and Ty of the image respectively; Then through Calculate the gradient amplitude T of the image; At the same time through Calculate the direction θ of the image; Step D1.3, perform non-maximum suppression on the gradient amplitude and set the gradient values ​​other than the local maximum value to 0; Step D1.4, extract the preset high threshold Tg and low threshold Td, where Tg = 2 × td; The pixel points whose gradient amplitude T is greater than the high threshold Tg are defined as strong edges; The pixel points whose gradient amplitude is between the low threshold and the high threshold are defined as weak edges; Step D1.5, by connecting the strong edge and the weak edge connected to it, the final edge image is obtained; Step D1.6: Based on the final edge image, edge features are extracted, including but not limited to the outline of the photovoltaic panel and the length of the edge.

4. A distributed photovoltaic short-term power prediction method based on image recognition according to claim 3, characterized in that: The way to update the pixel value is as follows: When Gaussian filtering is performed on an image, a pixel point (i, j) in the image is selected, and (i, j) represents the coordinates of the pixel point; Then (i, j) is taken as the center and a 3×3 neighborhood is selected; Then, the pixel value of each pixel point (m, n) in the neighborhood is multiplied by the value of the Gaussian function at the corresponding position (mi, nj), and all the products are added together. The result is to update the value of the original pixel point with the value after convolution of the pixel in the neighborhood with the Gaussian function.

5. According to claim 1, a distributed photovoltaic short-term power prediction method based on image recognition is characterized in that: The gray level co-occurrence matrix method is used to extract the texture features of the photovoltaic panel. The texture feature extraction method is as follows: Step D2.1, quantize the gray value of the preprocessed image to a preset gray level k levels; Step D2.2, select a displacement vector (Dx, Dy), calculate the number of occurrences of the gray value combination of all pixel pairs that satisfy the displacement vector in the image, and obtain the gray level co-occurrence matrix Z (w,v) , where w = 0, 1, ... k-1, v = 0, 1, ... k-1; Step D 2.3, based on the gray-level co-occurrence matrix, calculate the energy feature, contrast feature, correlation feature, and entropy feature respectively.

6. A distributed photovoltaic short-term power prediction method based on image recognition according to claim 5, characterized in that: The energy characteristic is calculated as: Where ASM represents the energy characteristic.

7. A distributed photovoltaic short-term power prediction method based on image recognition according to claim 5, characterized in that: The calculation formula of contrast feature is: Where CON represents the contrast feature.

8. The distributed photovoltaic short-term power prediction method based on image recognition according to claim 5 is characterized in that: The calculation formula of correlation characteristics is: In the formula, COR represents the correlation characteristic.

9. The distributed photovoltaic short-term power prediction method based on image recognition according to claim 5 is characterized in that: The calculation formula of entropy feature is as follows: Where ENT represents the entropy feature.

10. A distributed photovoltaic short-term power prediction method based on image recognition according to claim 1, characterized in that: The predictive analysis method is as follows: Step Y1. Normalize the historical meteorological data and historical photovoltaic power data. The normalization method is as follows: Multiple data parameters of one attribute in the historical data and the historical photovoltaic power data are used as a vector using Q; A data parameter with the largest value is selected from the data parameters of the attribute and is marked as Qmax. A data parameter with the smallest value is selected from the data parameters of the attribute and is marked as Qmin. Then through Obtaining normalized values ​​Q1 of multiple data parameters; Step Y2, combine the extracted image features, historical meteorological data and historical photovoltaic power data to establish a power prediction model; The power prediction model is established through a long short-term memory network, whose structure includes an input layer, multiple hidden layers, and an output layer; The input layer receives image features, historical meteorological data, and historical photovoltaic power data, the hidden layer performs nonlinear processing and feature extraction on the received data, and the output layer predicts the photovoltaic power within a specified time period in the future.