Cloud cluster movement track prediction method and device, electronic equipment and storage medium
By carefully analyzing the sky image and identifying the cloud layer category, the cloud cluster position and velocity information are extracted, and the accuracy of cloud cluster movement trajectory prediction in the existing technology is solved, and more accurate cloud cluster movement trajectory prediction is achieved, providing a foundation for photovoltaic power prediction.
Patent Information
- Application Number
- CN202411824685.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-03-18
AI Technical Summary
When there is an error in the input parameters of the existing cloud group movement trajectory prediction method, it will cause the prediction results to deviate from reality and be affected by various weather factors, reducing the accuracy of the prediction.
By obtaining sky images, performing detailed analysis to filter out effective images containing cloud and clear sky information, identify cloud categories, and extracting the location and speed information of cloud clusters in the preset time period to determine the prediction trajectory of cloud cluster movement.
It improves the accuracy of the prediction of cloud cluster movement trajectory, can more accurately understand the characteristics and behavior patterns of cloud clusters, comprehensively capture changes in the motion state of cloud clusters, provide accurate motion trajectory prediction, and provide a basis for ultra-short-term prediction of photovoltaic power.
Smart Images

Figure CN119648740A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of cloud image motion trajectory prediction, and in particular to cloud group motion trajectory prediction methods, devices, electronic devices, and storage media. Background Art
[0002] With the rapid development of social economy around the world, human demand for energy is increasing. The traditional fossil energy structure dominated by oil and coal will bring about environmental damage such as global warming. The development and utilization of clean energy such as solar energy has attracted widespread attention. Photovoltaic power generation is the main means of converting solar energy into electrical energy, but the output power of photovoltaic power generation is affected by factors such as surface irradiance attenuation.
[0003] A related method for predicting cloud movement trajectories is to input all the collected data into a pre-trained physical model. When there are errors in the input parameters, the prediction results may deviate from reality. Clouds will be affected by various weather factors during their movement. Therefore, this physical model will reduce the accuracy of cloud trajectory prediction. Summary of the invention
[0004] In order to improve the accuracy of cloud movement trajectory prediction, the present application provides a cloud movement trajectory prediction method, device, electronic device and storage medium.
[0005] In the first aspect, the present application provides a cloud movement trajectory prediction method, which adopts the following technical solutions: The cloud movement trajectory prediction method includes: Get sky images; Analyze the sky image to obtain a valid image, where the valid image is an image containing cloud layer and clear sky information in the sky image; Analyzing the effective image to obtain cloud categories, wherein the cloud categories include cumulus, stratus, and cirrus; Based on the cloud layer category, extract cloud cluster information within a preset time period, wherein the cloud cluster information is the position and speed of each frame of the cloud cluster within the preset time period; A predicted cloud movement trajectory is determined based on the cloud information.
[0006] By adopting the above technical solution, after acquiring the sky image, the sky image is carefully analyzed to screen out the effective image containing cloud and clear sky information, and then identify the specific cloud category. This classification process helps to more accurately understand the characteristics and behavior patterns of clouds, thereby improving the accuracy of motion trajectory prediction. By extracting the position and speed information of each frame of clouds in a preset time period, the motion state changes of clouds can be fully captured. According to different types of clouds, and according to different types of clouds, the movement trajectory of clouds can be tracked, so that the motion trajectory of clouds can be accurately predicted, providing a basis for ultra-short-term prediction of photovoltaic power.
[0007] In another possible implementation manner, analyzing the sky image to obtain a valid image includes: Performing mask processing on the sky image to obtain a target area, where the target area is an area including the sky; Performing grayscale processing on the target area to determine a grayscale value of at least one pixel; Compare the grayscale value of each pixel with a preset grayscale threshold to obtain a highlight area, where the highlight area is an area where the grayscale value is greater than the preset grayscale threshold; Extracting features from the highlighted area to obtain a feature contour of the highlighted area; Based on the characteristic contour of the highlighted area, the target area is repaired to obtain a valid image.
[0008] By adopting the above technical solution, through mask processing, the target area containing the sky can be accurately identified and extracted, and unnecessary background or interference parts in the image can be removed, thereby improving the image quality of subsequent processing. After converting the color image into a grayscale image, the amount of data processed is greatly reduced, while retaining sufficient information for the identification of cloud pixels. The processing process is simplified and the processing efficiency is improved. By setting a preset grayscale threshold and comparing it with the grayscale value of each pixel, the highlight area, that is, the overexposed area or the cloud area, can be accurately identified. Feature extraction of the highlight area can obtain the characteristic contour of the cloud. These characteristic contours not only help to identify the cloud, but also provide important data support for the subsequent cloud classification and cloud movement trajectory prediction. Repairing the target area based on the characteristic contour of the highlight area can effectively remove image defects caused by overexposure or occlusion, make the repaired image closer to the real situation, and improve the accuracy of the analysis.
[0009] In another possible implementation, the repairing of the target area based on the characteristic contour of the highlight area to obtain a valid image includes: Compare the highlighted area feature contour with a preset cloud layer contour to determine whether there is a cloud layer in the highlighted area feature contour; If there is a cloud layer in the characteristic contour of the highlight area, the highlight area is interpolated to obtain a valid image.
[0010] By adopting the above technical solution, by comparing the characteristic outline of the highlight area with the preset cloud outline, it is possible to accurately determine whether the highlight area actually contains clouds. For highlight areas where clouds do exist, interpolation processing can be used to repair them, which can effectively improve the overexposure problem of these areas. The repaired effective image provides accurate data for subsequent calculations.
[0011] In another possible implementation manner, analyzing the valid image to obtain the cloud category includes: Performing color feature extraction on the effective image to obtain a first image feature; Extracting texture features from the effective image to obtain a second image feature; Performing shape feature extraction on the effective image to obtain a third image feature; The first image feature, the second image feature and the third image feature are input into a pre-trained classification model to obtain a cloud layer category.
[0012] By adopting the above technical solution, by extracting and classifying multiple features of the effective image, the solution can not only obtain the category information of the cloud layer, but also further analyze the detailed features of the cloud layer such as color, texture and shape. Inputting the first image feature, the second image feature and the third image feature into the pre-trained classification model can quickly process and classify the input features, thereby improving the efficiency of the entire classification process.
[0013] In another possible implementation manner, extracting cloud information within a preset time period based on the cloud layer category includes: Loading the image sequence within the preset time period; Based on the image sequence, a time and position coordinate system is established to determine the position of each frame of the image and the time of each frame of the image; Based on the position of each frame image and the time of each frame image, the cloud position change between adjacent frames and the time interval between adjacent frames are calculated; The cloud speed is calculated by the cloud position change and the time interval.
[0014] By adopting the above technical solution, by loading the image sequence within the preset time period and establishing the time and position coordinate system, the position of the cloud in each frame of the image can be accurately tracked. Then, by calculating the change in the cloud position and the time interval between adjacent frames, the movement of the cloud can be quantified. It can accurately reflect the movement speed of the cloud within the preset time period.
[0015] In another possible implementation manner, determining the predicted cloud movement trajectory based on the cloud information includes: Use time as the horizontal coordinate and speed as the vertical coordinate to establish the motion trajectory coordinate system; Annotating the image sequence in the motion trajectory coordinate system to obtain at least one cloud trajectory feature; The at least one cloud trajectory feature is connected to obtain a first cloud motion trajectory.
[0016] By adopting the above technical solution, a motion trajectory coordinate system is established by taking time as the horizontal coordinate and speed as the vertical coordinate. This solution can intuitively display the motion state of clouds at different time points. The cloud information in the image sequence is marked in the motion trajectory coordinate system and connected into cloud trajectory features, which can accurately predict the future motion trajectory of the cloud. This prediction not only takes into account the current position and speed of the cloud, but also incorporates the historical motion information of the cloud, thereby improving the accuracy and reliability of the prediction.
[0017] In another possible implementation, the method further includes: Inputting the position of each frame of image and the time of each frame of image into a pre-trained prediction model to obtain a second cloud movement trajectory; Comparing the first cloud group movement trajectory with the second cloud group movement trajectory to determine whether the first cloud group movement trajectory is consistent with the second cloud group movement trajectory; If the first cloud group motion trajectory is consistent with the second cloud group motion trajectory, then the first cloud group trajectory is the target cloud group motion trajectory; If the first cloud group movement trajectory is inconsistent with the second cloud group movement trajectory, the first cloud group trajectory is updated.
[0018] By adopting the above technical solution, the motion trajectory of the second cloud group is the motion trajectory automatically predicted by the model, and the motion trajectory of the first cloud group is the motion trajectory obtained by data inference. When the motion trajectory of the first cloud group is consistent with the motion trajectory of the second cloud group, it means that the motion trajectory inferred by the data is correct. When the motion trajectory of the first cloud group is inconsistent with the motion trajectory of the second cloud group, it means that one of the model prediction or the data inference is wrong or both are inaccurate, and re-prediction is needed to improve the accuracy of the preset.
[0019] In a second aspect, the present application provides a device for predicting cloud movement trajectories, which adopts the following technical solution: A device for predicting cloud movement trajectory, comprising: An image acquisition module, used for acquiring sky images; An image analysis module, used for analyzing the sky image to obtain a valid image, wherein the valid image is an image containing cloud layer and clear sky information in the sky image; A category analysis module, used for analyzing the effective image to obtain cloud categories, wherein the cloud categories include cumulus, stratus, and cirrus; An information extraction module, used to extract cloud cluster information within a preset time period based on the cloud layer category, wherein the cloud cluster information is the position and speed of each frame of the cloud cluster within the preset time period; The first trajectory prediction module is used to determine the predicted cloud movement trajectory based on the cloud information.
[0020] By adopting the above technical solution, after acquiring the sky image, the image acquisition module uses the image analysis module to perform a detailed analysis of the sky image, and screens out valid images containing cloud and clear sky information, and then the category analysis module identifies the specific cloud category. This classification process helps to more accurately understand the characteristics and behavior patterns of clouds, thereby improving the accuracy of motion trajectory prediction. The information extraction module can fully capture the changes in the motion state of clouds by extracting the position and speed information of each frame of clouds within a preset time period. This allows the first trajectory prediction module to track the movement trajectory of clouds according to different types of clouds and different types of clouds, so that the motion trajectory of clouds can be accurately predicted, providing a basis for ultra-short-term prediction of photovoltaic power.
[0021] In another possible implementation, when the image analysis module analyzes the sky image to obtain a valid image, it is specifically used to: Performing mask processing on the sky image to obtain a target area, where the target area is an area including the sky; Performing grayscale processing on the target area to determine a grayscale value of at least one pixel; Compare the grayscale value of each pixel with a preset grayscale threshold to obtain a highlight area, where the highlight area is an area where the grayscale value is greater than the preset grayscale threshold; Extracting features from the highlighted area to obtain a feature contour of the highlighted area; Based on the characteristic contour of the highlighted area, the target area is repaired to obtain a valid image.
[0022] In another possible implementation, when the image analysis module repairs the target area based on the feature contour of the highlight area to obtain a valid image, it is specifically used to: Compare the highlighted area feature contour with a preset cloud layer contour to determine whether there is a cloud layer in the highlighted area feature contour; If there is a cloud layer in the characteristic contour of the highlight area, the highlight area is interpolated to obtain a valid image.
[0023] In another possible implementation, when the category analysis module analyzes the valid image to obtain the cloud category, it is specifically used to: Performing color feature extraction on the effective image to obtain a first image feature; Extracting texture features from the effective image to obtain second image features; Performing shape feature extraction on the effective image to obtain a third image feature; The first image feature, the second image feature and the third image feature are input into a pre-trained classification model to obtain a cloud layer category.
[0024] In another possible implementation, when the information extraction module extracts the cloud information within a preset time period based on the cloud layer category, it is specifically used to: Loading the image sequence within the preset time period; Based on the image sequence, a time and position coordinate system is established to determine the position of each frame of the image and the time of each frame of the image; The position of each frame image and the time of each frame image are used to calculate the cloud position change between adjacent frames and the time interval between adjacent frames; The cloud speed is calculated by the cloud position change and the time interval.
[0025] In another possible implementation manner, when determining the predicted cloud movement trajectory based on the cloud information, the first trajectory prediction module is specifically configured to: Use time as the horizontal coordinate and speed as the vertical coordinate to establish the motion trajectory coordinate system; Annotating the image sequence in the motion trajectory coordinate system to obtain at least one cloud trajectory feature; The at least one cloud trajectory feature is connected to obtain a first cloud motion trajectory.
[0026] In another possible implementation, the device further includes: A second trajectory prediction module is used to input the position of each frame image and the time of each frame image into a pre-trained prediction model to obtain a second cloud movement trajectory; A trajectory judgment module, used for comparing the first cloud group motion trajectory with the second cloud group motion trajectory to judge whether the first cloud group motion trajectory is consistent with the second cloud group motion trajectory; a target trajectory determination module, configured to determine that if the first cloud group motion trajectory is consistent with the second cloud group motion trajectory, the first cloud group trajectory is the target cloud group motion trajectory; The trajectory updating module is used to update the first cloud trajectory if the first cloud movement trajectory is inconsistent with the second cloud movement trajectory.
[0027] In a third aspect, the present application provides an electronic device, which adopts the following technical solution: An electronic device, comprising: at least one processor; Memory; At least one application, wherein at least one application is stored in a memory and configured to be executed by at least one processor, and at least one application is used to: execute the cloud movement trajectory prediction method shown in any possible implementation of the first aspect.
[0028] In a fourth aspect, the present application provides a computer-readable storage medium, which adopts the following technical solution: A computer-readable storage medium, when the computer program is executed in a computer, enables the computer to execute the cloud movement trajectory prediction method described in any one of the first aspects.
[0029] In summary, the present application includes at least one of the following beneficial technical effects: 1. After acquiring the sky image, through detailed analysis of the sky image, screen out the valid images containing cloud and clear sky information, and then identify the specific cloud category. This classification process helps to understand the characteristics and behavior patterns of clouds more accurately, thereby improving the accuracy of motion trajectory prediction. By extracting the position and speed information of each frame of clouds in a preset time period, the motion state changes of clouds can be fully captured. Therefore, the movement trajectory of clouds can be tracked according to different types of clouds, so that the motion trajectory of clouds can be accurately predicted, providing a basis for ultra-short-term prediction of photovoltaic power; 2. Through mask processing, the target area containing the sky can be accurately identified and extracted, and unnecessary background or interference parts in the image can be removed, thereby improving the image quality of subsequent processing. After converting the color image to a grayscale image, the amount of data processed is greatly reduced, while retaining sufficient information for the identification of cloud pixels. The processing process is simplified and the processing efficiency is improved. By setting a preset grayscale threshold and comparing it with the grayscale value of each pixel, the highlight area, that is, the overexposed area or the cloud area, can be accurately identified. Feature extraction of the highlight area can obtain the characteristic contour of the cloud. These characteristic contours not only help to identify the cloud, but also provide important data support for the subsequent cloud classification and cloud movement trajectory prediction. Repairing the target area based on the characteristic contour of the highlight area can effectively remove image defects caused by overexposure or occlusion, making the repaired image closer to the real situation and improving the accuracy of the analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 is a flow chart of a cloud movement trajectory prediction method in an embodiment of the present application; Figure 2 It is a schematic diagram of the process of the device for predicting the cloud movement trajectory in the embodiment of the present application; Figure 3 It is a structural schematic diagram of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0031] The following is combined with Figure 1-3 This application is described in further detail.
[0032] After reading this specification, those skilled in the art may make non-creative modifications to this embodiment as needed, but such modifications are protected by patent law as long as they are within the scope of the claims of this application.
[0033] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0034] In addition, the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article, unless otherwise specified, generally means that the associated objects before and after are in an "or" relationship.
[0035] The embodiments of the present application are further described in detail below in conjunction with the drawings in the specification.
[0036] The embodiment of the present application provides a cloud group movement trajectory prediction method, which is executed by an electronic device, which can be a server or a terminal device, wherein the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services. The terminal device can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc., but is not limited to this. The terminal device and the server can be directly or indirectly connected via wired or wireless communication, and the embodiment of the present application does not limit this. Figure 1As shown, the method includes: step S10, step S11, step S12, step S13 and step S14, wherein: Step S10, acquiring a sky image; In the embodiment of the present application, the sky image can be taken by a camera, wherein it should be noted that the sky image can be static or dynamic, that is, it can be a photo or a video.
[0037] Step S11, analyzing the sky image to obtain a valid image, where the valid image is an image containing cloud layer and clear sky information in the sky image; In the embodiment of the present application, the acquired sky image is identified and the effective image area containing cloud layer and clear sky information is extracted by image processing technology, wherein the image processing technology includes but is not limited to threshold segmentation and edge detection. Thus, the cloud information can be accurately obtained, making the subsequent analysis more accurate.
[0038] Step S12, analyzing the valid image to obtain cloud categories, which include cumulus, stratus, and cirrus; In the embodiment of the present application, color features are extracted from the effective image to obtain the first image features; texture features are extracted from the effective image to obtain the second image features; shape features are extracted from the effective image to obtain the third image features; the first image features, the second image features and the third image features are input into a pre-trained classification model to obtain the cloud layer category, thereby providing accurate data for the subsequent prediction of the cloud movement trajectory.
[0039] Step S13, based on the cloud layer category, extracting cloud cluster information within a preset time period, where the cloud cluster information is the position and speed of each frame of the cloud cluster within the preset time period; In an embodiment of the present application, a sequence of images within a preset time period is loaded; Based on the image sequence, a coordinate system of time and position is established to determine the position and time of each frame of image; based on the position and time of each frame of image, the change in cloud position between adjacent frames and the time interval between adjacent frames are calculated; based on the change in cloud position and the time interval, the cloud velocity is calculated.
[0040] Step S14, determining the predicted cloud movement trajectory based on the cloud information.
[0041] In an embodiment of the present application, a motion trajectory coordinate system is established using time as the horizontal coordinate and speed as the vertical coordinate; the image sequence is annotated in the motion trajectory coordinate system to obtain at least one cloud trajectory feature; and at least one cloud trajectory feature is connected to obtain a first cloud motion trajectory.
[0042] A possible implementation of the embodiment of the present application is to analyze the sky image to obtain a valid image, including: Perform mask processing on the sky image to obtain a target area, where the target area is an area containing the sky; Performing grayscale processing on the target area to determine the grayscale value of at least one pixel; Compare the grayscale value of each pixel with the preset grayscale threshold to obtain a highlight area, where the highlight area is an area where the grayscale value is greater than the preset grayscale threshold; Extract features from the highlight area to obtain the feature contour of the highlight area; Based on the characteristic contour of the highlighted area, the target area is repaired to obtain a valid image.
[0043] In an embodiment of the present application, when performing mask processing on a sky image, it is necessary to define a mask, wherein the mask can be pre-made or dynamically generated, and is used to identify the sky area in the image. Specifically, image processing software such as MATLAB or OpenCV can be used to perform logical operations (such as multiplication) on the mask and the original sky image to obtain an image of the target area containing only the sky. After the target area image is determined, each pixel in the target area image is traversed, usually through a double loop, one loop traversing each row (or column) of the image, and the other loop traversing each pixel in each row (or column). For each pixel, it is necessary to calculate the gray value based on its original color value (red, green, and blue components). Specifically, the weighted average method is used when calculating the gray value, that is, the formula gray value = red × 0.30 + green × 0.59 + blue × 0.11 is used. After the gray value is calculated, the red, green, and blue components of the pixel need to be set to this gray value, so that the pixel becomes a point in the gray image. Repeat the above steps until all pixels in the target area image are traversed.
[0044] The preset grayscale threshold can be set according to the specific situation and processing requirements, and then the grayscale value of each pixel is compared with the preset grayscale threshold. If the grayscale value of a pixel is greater than the preset grayscale threshold, the pixel is considered to belong to the highlight area. This pixel can be marked or distinguished in some way (such as setting a mark, changing the pixel value, etc.). In actual operation, a new image (or mask) of the same size as the original image may be created to record the position of the highlight area. At the corresponding position of the highlight area, the pixel value of the new image (or mask) will be set to a specific value (such as white, 1 or other identification value), while at the corresponding position of the non-highlight area, another value (such as black, 0 or other background value) is maintained. Repeat the above steps until all pixels in the target area image are traversed. At this time, the position and shape of the highlight area will be clearly displayed in the new image (or mask).
[0045] The highlight area and the background area are binarized, usually by setting the pixel value of the highlight area to 255 (white) and the pixel value of the background area to 0 (black). The edge detection algorithm is used to detect the boundary of the highlight area, so as to identify the area with significant grayscale changes in the image, that is, the outline of the highlight area. The edge detection algorithm can be but is not limited to the Canny edge detector and the Sobel operator. The contour tracking or contour finding algorithm extracts the complete contour line from the edge detection result to determine the precise boundary of the highlight area.
[0046] Finally, based on the extracted feature contours of the highlight area, we understand its characteristics, such as shape, size, and position, and then select a suitable image restoration method based on texture synthesis, image block matching, and deep learning. Then, we fill in missing parts of the image, smooth transition areas, adjust color and brightness, etc. After the above steps, the highlight area is restored and an effective image that maintains consistency with the surrounding image is obtained. A possible implementation of the embodiment of the present application is to repair the target area based on the feature contour of the highlight area to obtain a valid image, including: Compare the highlighted area feature outline with the preset cloud layer outline to determine whether there is a cloud layer in the highlighted area feature outline; If there are clouds in the characteristic contour of the highlighted area, the highlighted area is interpolated to obtain a valid image.
[0047] In an embodiment of the present application, a group or multiple preset cloud contour models are required. These models can be simplified representations based on cloud morphological features, such as circles, ellipses, irregular polygons, etc., or they can be complex contours obtained by feature extraction and modeling of real cloud images. Among them, these preset cloud contours should be able to cover common cloud types so that they can be accurately identified during the comparison process. When comparing the feature contour of the highlighted area with the preset cloud contour, the presence of clouds can be determined by, but not limited to, the Hausdorff distance algorithm, the contour similarity measurement algorithm, and the feature matching algorithm. Since the interpolation processing is intended to fill the information gap caused by clouds in order to restore or reconstruct a valid image, when there are clouds in the highlighted area, specific image processing techniques, such as contour extraction or edge detection algorithms, are used to estimate the surface features under cloud cover. Thereby accurately obtaining an effective image. A possible implementation of the embodiment of the present application is to analyze the valid image to obtain the cloud category, including: Extracting color features from the effective image to obtain a first image feature; Extracting texture features from the effective image to obtain second image features; Perform shape feature extraction on the effective image to obtain a third image feature; The first image feature, the second image feature and the third image feature are input into a pre-trained classification model to obtain a cloud category.
[0048] In an embodiment of the present application, a color histogram can reflect the global distribution of colors in an image, that is, the proportion of different colors in the entire image. Therefore, color features are extracted from valid images using methods such as color histograms, color sets or color moments. When extracting texture features, grayscale co-occurrence matrices, Tamura texture features, autoregressive texture models, wavelet transforms, etc. are used for texture feature extraction. When extracting shape features, Hough transforms, boundary direction histograms, Fourier shape descriptors, etc. are used. Since color features describe the surface properties of an image or an image area, texture features describe the spatial color distribution and light intensity distribution of an image or an image area, and shape features describe the boundaries or overall shapes of objects in an image, in order to obtain an accurate cloud category, it is necessary to combine the extracted color features, texture features, and shape features into a feature vector, and input this feature vector into a pre-trained classification model. This model can be based on machine learning (such as support vector machines SVM, random forests, etc.) or based on deep learning (such as convolutional neural networks CNN). The classification model outputs the category of the cloud layer based on the input feature vector.
[0049] A possible implementation of the embodiment of the present application is to extract cloud information within a preset time period based on cloud layer categories, including: Loading a sequence of images within a preset time period; Based on the image sequence, a time and position coordinate system is established to determine the position and time of each frame of the image; The position of each frame image and the time of each frame image are used to calculate the cloud position change between adjacent frames and the time interval between adjacent frames; The cloud speed is calculated based on the cloud position change and time interval.
[0050] In an embodiment of the present application, all image files within a preset time period are loaded from a storage medium to form an image sequence. Ensure that the image sequence is arranged in chronological order for subsequent analysis. Establish a two-dimensional coordinate system for the image sequence, in which the horizontal axis represents time and the dimensions other than the vertical and horizontal axes represent spatial positions. The time of each frame of the image can be obtained from the metadata of the image, or calculated from the actual time and frame rate of image acquisition; the position of each frame of the image can be obtained by image processing techniques such as threshold segmentation, edge detection, and feature matching. When calculating the time interval between adjacent frames, it is calculated based on the frame rate of image acquisition or the timestamp information of the image file. When calculating the change in the cloud position between adjacent frames, the pixel coordinate difference of the center point of the cloud in two adjacent frames is calculated. Finally, the speed of the cloud is calculated by using the change in the cloud position and the time interval. The speed (v) can be calculated by dividing the position change (Δx) by the time interval (Δt), that is, v=Δx / Δt.
[0051] A possible implementation of the embodiment of the present application is to determine the predicted cloud movement trajectory based on cloud information, including: Use time as the horizontal coordinate and speed as the vertical coordinate to establish the motion trajectory coordinate system; Annotate the image sequence in the motion trajectory coordinate system to obtain at least one cloud trajectory feature; At least one cloud trajectory feature is connected to obtain a first cloud motion trajectory.
[0052] In an embodiment of the present application, the horizontal axis (X-axis) is determined to be time (t), and the vertical axis (Y-axis) is determined to be speed (v). In this two-dimensional rectangular coordinate system, each point (t, v) represents the speed value at a certain moment. The estimated speed value (v) and the corresponding time point (t) are marked in the motion trajectory coordinate system to form a series of points (t, v). The cloud trajectory feature points marked in the motion trajectory coordinate system are connected by curve fitting or interpolation methods. If the image sequence contains multiple clouds, the above steps can be repeated to establish a motion trajectory coordinate system for each cloud, and mark and connect them.
[0053] In a possible implementation manner of the embodiment of the present application, the method further includes: The position and time of each frame of the image are input into a pre-trained prediction model to obtain the motion trajectory of the second cloud group; Comparing the motion trajectory of the first cloud group with the motion trajectory of the second cloud group to determine whether the motion trajectory of the first cloud group is consistent with the motion trajectory of the second cloud group; If the motion trajectory of the first cloud group is consistent with the motion trajectory of the second cloud group, then the first cloud group trajectory is the target cloud group trajectory; If the first cloud group movement trajectory is inconsistent with the second cloud group movement trajectory, the first cloud group trajectory is updated.
[0054] In an embodiment of the present application, the position of each frame image and the time of each frame image are used as input data and input into a pre-trained prediction model. Among them, the prediction model can be a convolutional neural network or a recurrent neural network. The prediction model outputs a predicted sequence of future cloud positions, i.e., the second cloud motion trajectory, based on the input position and time data. It should be noted that the first cloud motion trajectory is a trajectory obtained based on actual image data, and the second cloud motion trajectory is a trajectory obtained based on the prediction model. Therefore, in order to obtain an accurate motion trajectory, the first cloud trajectory is compared with the second cloud trajectory, and the distance and angle difference between the corresponding points on the two trajectories are calculated, or the two trajectories are judged to be consistent by Euclidean distance and dynamic time warping. If the difference between all corresponding points is less than the set threshold, or the overall similarity measurement result is higher than a certain standard, the two trajectories are considered to be consistent. If the judgment result is inconsistent, the first cloud trajectory needs to be updated.
[0055] The above embodiment introduces a cloud movement trajectory prediction method from the perspective of method flow, and the following embodiment introduces a cloud movement trajectory prediction device 20 from the perspective of a virtual module or a virtual unit. For details, please refer to the following embodiment.
[0056] The present application embodiment provides a device 20 for predicting cloud movement trajectory, such as Figure 2 As shown, the cloud movement trajectory prediction device may specifically include: A device 20 for predicting cloud movement trajectory, comprising: An image acquisition module 201 is used to acquire a sky image; An image analysis module 202 is used to analyze the sky image to obtain a valid image, where the valid image is an image containing cloud layer and clear sky information in the sky image; A category analysis module 203 is used to analyze the valid image to obtain cloud categories, where the cloud categories include cumulus, stratus, and cirrus; The information extraction module 204 is used to extract cloud cluster information within a preset time period based on the cloud layer category, where the cloud cluster information is the position and speed of each frame of the cloud cluster within the preset time period; The first trajectory prediction module 205 is used to determine the predicted cloud movement trajectory based on the cloud information.
[0057] By adopting the above technical solution, after acquiring the sky image, the image acquisition module 201 uses the image analysis module 202 to perform a detailed analysis of the sky image, and screens out valid images containing cloud and clear sky information, and then the category analysis module 203 identifies the specific cloud category. This classification process helps to more accurately understand the characteristics and behavior patterns of clouds, thereby improving the accuracy of motion trajectory prediction. The information extraction module 204 can fully capture the changes in the motion state of clouds by extracting the position and speed information of each frame of clouds within a preset time period. As a result, the first trajectory prediction module 205 can track the movement trajectory of clouds according to different types of clouds, so as to accurately predict the motion trajectory of clouds, providing a basis for ultra-short-term prediction of photovoltaic power.
[0058] In a possible implementation of the embodiment of the present application, when the image analysis module 202 analyzes the sky image to obtain a valid image, it is specifically used to: Perform mask processing on the sky image to obtain a target area, where the target area is an area containing the sky; Performing grayscale processing on the target area to determine the grayscale value of at least one pixel; Compare the grayscale value of each pixel with the preset grayscale threshold to obtain a highlight area, where the highlight area is an area where the grayscale value is greater than the preset grayscale threshold; Extract features from the highlight area to obtain the feature contour of the highlight area; Based on the characteristic contour of the highlighted area, the target area is repaired to obtain a valid image.
[0059] In a possible implementation of the embodiment of the present application, when the image analysis module 202 repairs the target area based on the feature contour of the highlight area to obtain a valid image, it is specifically used to: Compare the highlighted area feature outline with the preset cloud layer outline to determine whether there is a cloud layer in the highlighted area feature outline; If there are clouds in the characteristic contour of the highlighted area, the highlighted area is interpolated to obtain a valid image.
[0060] In a possible implementation of the embodiment of the present application, when the category analysis module 203 analyzes the valid image to obtain the cloud category, it is specifically used to: Extracting color features from the effective image to obtain a first image feature; Extracting texture features from the effective image to obtain second image features; Perform shape feature extraction on the effective image to obtain a third image feature; The first image feature, the second image feature and the third image feature are input into a pre-trained classification model to obtain a cloud category.
[0061] In a possible implementation of the embodiment of the present application, when the information extraction module 204 extracts the cloud cluster information within a preset time period based on the cloud layer category, it is specifically used to: Loading a sequence of images within a preset time period; Based on the image sequence, a time and position coordinate system is established to determine the position and time of each frame of the image; The position of each frame image and the time of each frame image are used to calculate the cloud position change between adjacent frames and the time interval between adjacent frames; The cloud speed is calculated based on the cloud position change and time interval.
[0062] In a possible implementation of the embodiment of the present application, when the first trajectory prediction module 205 determines the predicted cloud movement trajectory based on the cloud information, it is specifically used to: Use time as the horizontal coordinate and speed as the vertical coordinate to establish the motion trajectory coordinate system; Annotate the image sequence in the motion trajectory coordinate system to obtain at least one cloud trajectory feature; At least one cloud trajectory feature is connected to obtain a first cloud motion trajectory.
[0063] In a possible implementation of the embodiment of the present application, the device 20 further includes: A second trajectory prediction module is used to input the position of each frame image and the time of each frame image into a pre-trained prediction model to obtain a second cloud movement trajectory; A trajectory judgment module, used to compare the first cloud group motion trajectory with the second cloud group motion trajectory to determine whether the first cloud group motion trajectory is consistent with the second cloud group motion trajectory; A target trajectory determination module, for determining that if the first cloud group motion trajectory is consistent with the second cloud group motion trajectory, the first cloud group trajectory is the target cloud group motion trajectory; The trajectory updating module is used to update the trajectory of the first cloud group if the motion trajectory of the first cloud group is inconsistent with the motion trajectory of the second cloud group.
[0064] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0065] An electronic device is provided in an embodiment of the present application, such as Figure 3 As shown, Figure 3The electronic device 30 shown includes: a processor 301 and a memory 303. The processor 301 and the memory 303 are connected, such as through a bus 302. Optionally, the electronic device 30 may also include a transceiver 304. It should be noted that in actual applications, the transceiver 304 is not limited to one, and the structure of the electronic device 30 does not constitute a limitation on the embodiments of the present application.
[0066] The processor 301 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. The processor 301 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0067] The bus 302 may include a path to transmit information between the above components. The bus 302 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 302 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one thick line is used in the diagram, but it does not mean that there is only one bus or only one type of bus.
[0068] The memory 303 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
[0069] The memory 303 is used to store the application code for executing the solution of the present application, and the execution is controlled by the processor 301. The processor 301 is used to execute the application code stored in the memory 303 to implement the contents shown in the above method embodiment.
[0070] The electronic devices include, but are not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), and fixed terminals such as digital TVs, desktop computers, etc. It can also be a server, etc. Figure 3 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0071] The embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer-readable storage medium is run on a computer, the computer can execute the corresponding content in the aforementioned method embodiment. Compared with the related art, after acquiring the sky image, the image acquisition module in the embodiment of the present application uses the image analysis module to perform a detailed analysis of the sky image, screen out the effective image containing cloud layer and clear sky information, and then the category analysis module identifies the specific cloud layer category. This classification process helps to more accurately understand the characteristics and behavior patterns of the cloud group, thereby improving the accuracy of the motion trajectory prediction. The information extraction module can fully capture the changes in the motion state of the cloud group by extracting the position and speed information of each frame of the cloud group within a preset time period. Thereby, the first trajectory prediction module can track the moving trajectory of the cloud group according to different types of cloud layers and different types of cloud layers, so that the motion trajectory of the cloud group can be accurately predicted, providing a basis for the ultra-short-term prediction of photovoltaic power.
[0072] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0073] The above are only some implementation methods of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A cloud movement trajectory prediction method, characterized in that: include: Get sky images; Analyze the sky image to obtain a valid image, where the valid image is an image containing cloud layer and clear sky information in the sky image; Analyzing the effective image to obtain cloud categories, wherein the cloud categories include cumulus, stratus, and cirrus; Based on the cloud layer category, extract cloud cluster information within a preset time period, wherein the cloud cluster information is the position and speed of each frame of the cloud cluster within the preset time period; A predicted cloud movement trajectory is determined based on the cloud information.
2. The cloud movement trajectory prediction method according to claim 1, characterized in that: The step of analyzing the sky image to obtain a valid image includes: Performing mask processing on the sky image to obtain a target area, where the target area is an area including the sky; Performing grayscale processing on the target area to determine a grayscale value of at least one pixel; Compare the grayscale value of each pixel with a preset grayscale threshold to obtain a highlight area, where the highlight area is an area where the grayscale value is greater than the preset grayscale threshold; Extracting features from the highlighted area to obtain a feature contour of the highlighted area; Based on the characteristic contour of the highlighted area, the target area is repaired to obtain a valid image.
3. The cloud movement trajectory prediction method according to claim 2, characterized in that: The step of repairing the target area based on the characteristic contour of the highlight area to obtain a valid image includes: Compare the highlighted area feature contour with a preset cloud layer contour to determine whether there is a cloud layer in the highlighted area feature contour; If there is a cloud layer in the characteristic contour of the highlight area, the highlight area is interpolated to obtain a valid image.
4. The cloud movement trajectory prediction method according to claim 1, characterized in that: The analyzing the valid image to obtain the cloud category includes: Performing color feature extraction on the effective image to obtain a first image feature; Extracting texture features from the effective image to obtain a second image feature; Performing shape feature extraction on the effective image to obtain a third image feature; The first image feature, the second image feature and the third image feature are input into a pre-trained classification model to obtain a cloud layer category.
5. The cloud movement trajectory prediction method according to claim 1, characterized in that: The extracting cloud information within a preset time period based on the cloud layer category includes: Loading the image sequence within the preset time period; Based on the image sequence, a time and position coordinate system is established to determine the position of each frame of the image and the time of each frame of the image; Based on the position of each frame image and the time of each frame image, the cloud position change between adjacent frames and the time interval between adjacent frames are calculated; The cloud velocity is calculated by the cloud position change and the time interval.
6. The cloud movement trajectory prediction method according to claim 5, characterized in that: The determining of the predicted cloud movement trajectory based on the cloud information includes: Use time as the horizontal coordinate and speed as the vertical coordinate to establish the motion trajectory coordinate system; Annotating the image sequence in the motion trajectory coordinate system to obtain at least one cloud trajectory feature; The at least one cloud trajectory feature is connected to obtain a first cloud motion trajectory.
7. The cloud movement trajectory prediction method according to claim 6, characterized in that: The method further comprises: Inputting the position of each frame of image and the time of each frame of image into a pre-trained prediction model to obtain a second cloud movement trajectory; Comparing the first cloud group movement trajectory with the second cloud group movement trajectory to determine whether the first cloud group movement trajectory is consistent with the second cloud group movement trajectory; If the first cloud group motion trajectory is consistent with the second cloud group motion trajectory, then the first cloud group trajectory is the target cloud group motion trajectory; If the first cloud group movement trajectory is inconsistent with the second cloud group movement trajectory, the first cloud group trajectory is updated.
8. A device for predicting cloud movement trajectory, characterized in that: include: An image acquisition module, used for acquiring sky images; An image analysis module, used for analyzing the sky image to obtain a valid image, wherein the valid image is an image containing cloud layer and clear sky information in the sky image; A category analysis module, used for analyzing the effective image to obtain cloud categories, wherein the cloud categories include cumulus, stratus, and cirrus; An information extraction module, used to extract cloud cluster information within a preset time period based on the cloud layer category, wherein the cloud cluster information is the position and speed of each frame of the cloud cluster within the preset time period; The first trajectory prediction module is used to determine the predicted cloud movement trajectory based on the cloud information.
9. An electronic device, characterized in that: It includes: at least one processor; Memory; At least one application, wherein the at least one application is stored in the memory and is configured to be executed by the at least one processor, and the at least one application is used to execute the cloud movement trajectory prediction method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed in a computer, the computer is caused to execute the cloud movement trajectory prediction method according to any one of claims 1 to 7.
Citation Information
Cited By
Photovoltaic support adaptive tracking control method and system
CN121254903A
Photovoltaic support adaptive tracking control method and system
CN121254903B