Northwest region sunshine duration prediction method and system

By adjusting the weather type assignment in the seven-point method and combining it with a deep learning model, the universality and accuracy issues of sunshine duration prediction in the northwest region were solved, achieving a more accurate sunshine duration prediction.

CN120806260AActive Publication Date: 2025-10-17CHINA AGRI UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510959395.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-11
Publication Date
2025-10-17
Estimated Expiration
2045-07-11

AI Technical Summary

Technical Problem

The existing seven-point method has problems of insufficient universality and low accuracy in predicting sunshine hours in the northwest region. It cannot accurately consider differences in factors such as terrain and latitude, resulting in large differences between the predicted results and the actual sunshine hours.

Method used

By obtaining the target city's altitude, historical forecast data, and actual relative sunshine hours, the weather type assignment in the seven-point method is adjusted. Combined with the CNN-LSTM-Attention deep learning model, accurate predictions are made using factors such as maximum temperature, daily temperature range, wind speed, and day number.

Benefits of technology

The accuracy and specificity of sunshine hours prediction have been improved, spatial and temporal differences have been taken into account, the assignment of relative sunshine hours has been improved, and the robustness and accuracy of the prediction model have been enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120806260A_ABST
    Figure CN120806260A_ABST
Patent Text Reader

Abstract

The invention provides a northwest region sunshine duration prediction method and system, and belongs to the technical field of data processing, and the method comprises the steps: obtaining the altitude of a target city and historical data of multiple days, obtaining the update assignment of the relative sunshine duration under each weather type in the first update seven-score method of the target city and the specific relative sunshine duration of the target city in each day; and obtaining a prediction model of the relative sunshine duration of the target city according to the specific relative sunshine duration, the actual daily maximum temperature, the actual daily minimum temperature, the actual wind speed, the daily ordinal number and the actual weather type of the target city in each day and the update assignment of the relative sunshine duration under each weather type. The invention aims to solve the problem that the difference between the sunshine duration of a target city and the actual sunshine duration forecasted by the current seven-division method is too large because the current seven-division method has high universality and cannot reflect the unique characteristics of each city and each day.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the field of data processing, and particularly relates to a sunshine duration prediction method and system in the northwest region. BACKGROUND

[0002] In recent years, climate change has attracted worldwide attention, and water shortage caused by climate change is increasingly obvious. Developing efficient water-saving irrigation technology is one of the effective measures to alleviate the tense water situation in the northwest arid region. Studies have shown that the prediction accuracy of reference crop evapotranspiration (ETo) is related to the accuracy of crop irrigation prediction. There are a large number of studies on the estimation method of ETo, including mathematical models and empirical formulas. Among them, the PM formula is recommended by the Food and Agriculture Organization of the United Nations as a reliable method for estimating ETo, and it is recognized worldwide. When using the PM formula to predict ETo, the future solar radiation value is often needed as input. Since the future solar radiation value cannot be accurately measured and obtained, it is considered to be indirectly calculated through available future public weather forecast data. The current method for obtaining solar radiation based on weather forecast information is mainly through assigning values to the relative sunshine duration (n / N) to calculate the solar radiation using sunshine duration as the medium. The current method for determining the effectiveness of crop irrigation at different times based on crop evapotranspiration is to obtain the best irrigation time for crops. Since the crop evapotranspiration of each day is calculated by the PM formula, the solar radiation value of each day is the input of the PM formula. Therefore, it is necessary to predict the solar radiation value of each day in each city in the northwest region.

[0003] The current method is based on the weather type predicted by the public weather forecast for each day, and the assignment of the relative sunshine duration for each day type in the current seven-eighths method to obtain the relative sunshine duration for each day. The actual sunshine duration is obtained through the relative sunshine duration, and the solar radiation value is calculated using the actual sunshine duration as the medium. Since the seven-eighths method can only assign values to the relative sunshine duration for seven weather types, and the cities in the northwest region have certain differences from Nanjing, the city corresponding to the current seven-eighths method, there is a certain difference between the predicted sunshine duration and the actual sunshine duration of the target city in the northwest region obtained based on the current seven-eighths method. Therefore, the method for obtaining the predicted sunshine duration of each city in the northwest region is modified. SUMMARY

[0004] In order to solve the problem of too large difference between the predicted sunshine duration and the actual sunshine duration of the target city obtained by the current seven-eighths method, the application provides a sunshine duration prediction method in the northwest region.

[0005] In order to achieve the above purpose, the application provides the following technical scheme: obtain the elevation of the target city, historical forecast data of multiple days, actual relative sunshine hours, maximum possible sunshine hours of each day of the target city, and the elevation of the city corresponding to the current seven-point method; obtain the weather type in the first updated seven-point method of the target city and the assignment of each weather type according to the historical forecast data of multiple days of the target city and the actual relative sunshine hours of each day; obtain the normal historical data of the target city according to the assignment of each weather type in the current seven-point method, the actual relative sunshine hours and the historical forecast data of each day of the target city, and adjust the assignment of each weather type in the first updated seven-point method of the target city multiple times downward according to the difference between the elevation of the target city and the elevation of the city corresponding to the current seven-point method, to obtain multiple assignment adjustment values of each weather type in the first updated seven-point method of the target city; obtain the updated assignment of each weather type in the first updated seven-point method of the target city according to the difference between the actual relative sunshine hours in all normal historical data under the same weather type and each assignment adjustment value in the first updated seven-point method of the target city; train the deep learning model based on CNN-LSTM-Attention by taking the actual relative sunshine hours, historical forecast data, day number, and updated assignment of relative sunshine hours of each weather type in the first updated seven-point method of the target city as inputs of the model, to obtain a prediction model of the relative sunshine hours of the target city; obtain the predicted relative sunshine hours of the target city in the day to be predicted by taking the forecast data of the target city in the day to be predicted as the input of the prediction model of the relative sunshine hours of the target city, and obtain the predicted actual sunshine hours of the target city in the day to be predicted by multiplying the predicted relative sunshine hours of the target city in the day to be predicted by the maximum possible sunshine hours.

[0006] Further, the specific steps of obtaining the weather type in the first updated seven-point method of the target city and the assignment of each weather type are as follows: obtain the weather type set of the target city according to the forecast weather type of the target city in the current number of days; The historical forecast data of each day of the target city before the current number of days includes the forecast weather type, the forecast daily maximum temperature, the forecast daily minimum temperature, and the forecast wind speed of each day; record the average of the actual relative sunshine hours of all dates with the forecast weather type being the first non-A-to-B weather type of the target city as the assignment of the relative sunshine hours of the first non-A-to-B weather type in the first updated seven-point method of the target city; obtain the assignment of the relative sunshine hours of the first non-A-to-B weather type in the first updated seven-point method of the target city; obtain the assignment of the relative sunshine hours of the first non-A-to-B weather type in the first updated seven-point method of the target city; obtain the assignment of the relative sunshine hours of the first non-A-to-B weather type in the first updated seven-point method of the target city; The specific calculation formula of the assignment of the relative sunshine duration of the "A to B" weather type is as follows: In the formula, represents the assignment of the relative sunshine duration of the first updated seventh method in the target city, represents the assignment of the relative sunshine duration of the first updated seventh method in the target city, represents the assignment of the relative sunshine duration of the first weather type in the first updated seventh method in the target city, represents the assignment of the relative sunshine duration of the first weather type in the first updated seventh method in the target city, represents the assignment of the relative sunshine duration of the first weather type in the first updated seventh method in the target city, represents the assignment of the relative sunshine duration of the first weather type in the first updated seventh method in the target city, .

[0007] Further, the specific calculation steps of obtaining the normal historical data of the target city are as follows: If the absolute value of the difference between the actual relative sunshine duration of the target city on the day and the assignment of the relative sunshine duration of the forecast weather type in the current seventh method on the day is less than or equal to 0.8, the forecast weather type and the actual relative sunshine duration of the target city on the day are taken as two dimension values of a normal historical data, and a normal historical data is obtained; If the forecast weather type of the target city on the day does not exist in the weather types contained in the current seventh method, the average of the actual relative sunshine durations of all days in the historical data of the target city whose forecast weather type is the forecast weather type of the target city on the day is taken as the standard value of the forecast weather type of the target city on the day; If the absolute value of the difference between the actual relative sunshine duration of the target city on the day and the standard value of the forecast weather type of the target city on the day is less than or equal to 0.8, the forecast weather type and the actual relative sunshine duration obtained by the target city on the day are taken as two dimension values in a normal historical data.

[0008] Further, the specific calculation steps of the plurality of assignment adjustment values of each weather type in the first updated seventh method of the target city are as follows: The calculation formula of the step length of the assignment of the relative sunshine duration of the target city each time the assignment is adjusted is as follows: ​Where, Indicates the step size for each adjustment of the relative sunshine hours of the target city. Indicates the altitude of the target city. Indicates the altitude of Nanjing, the city corresponding to the current seven-point division. represents the normalization function, represents the absolute value function; The calculation formula for obtaining the maximum limit of the relative sunshine hours of the target city for upward or downward adjustment is as follows: Where, Indicates the maximum limit for adjusting the relative sunshine hours of the target city upward or downward. Indicates the altitude of the target city. Indicates the altitude of Nanjing, the city corresponding to the current seven-point division. Represents the normalization function like , then The relative sunshine hours of each weather type in the first updated seven-point method of the target city are adjusted upwards by the step size, and the adjustment range of the relative sunshine hours of each weather type in the first updated seven-point method of the target city is less than or equal to ; like <0, then The relative sunshine hours of each weather type in the first seven-point method of the target city are adjusted downwards for the step length, and the adjustment range of the relative sunshine hours of each weather type is less than or equal to ; like =0, then The relative sunshine hours assigned to each weather type in the first updated seven-point method of the target city are first adjusted upward, and then adjusted downward, and the adjustment range of the relative sunshine hours assigned to each weather type in the first updated seven-point method of the target city is less than or equal to 0.1; A plurality of assigned adjustment values ​​for each relative sunshine hours of each weather type in the first updated seven-part method of the target city are obtained.

[0009] Furthermore, the specific steps of obtaining the multiple assigned adjustment values ​​for each weather type in the first updated seven-part method of the target city are as follows: Get the first update of the seven points of the target city Weather type The specific calculation formula for the possibility of updating the assignment value of the relative sunshine hours is as follows: Where, Indicates the first seven-part update of the target city. Weather type The relative sunshine hours assignment adjustment value is the possibility of updating the assignment value. Indicates that the forecast weather type is the first updated seven-part method of the target city. The number of normal forecast data for each weather type, Indicates the first seven-part update of the target city. Weather type The relative sunshine hours are assigned an adjustment value. Indicates that the forecast weather type is the first updated seven-part method of the target city. Weather type The actual relative sunshine hours of normal historical data, represents the absolute value function, is an exponential function with a natural constant as its base; Update the first seven points of the target city The value adjustment value of all relative sunshine hours of each weather type is the possibility of updating the value. The maximum possibility corresponds to the first update of the target city in the seven-point method. The assigned adjustment value of all relative sunshine hours of each weather type is recorded as the first update of the seven-point method of the target city. Update the value of each weather type.

[0010] Furthermore, the specific steps of obtaining the prediction model of relative sunshine hours of the target city are as follows: Target cities The actual relative sunshine hours in the day is the target value, and the target city is The predicted maximum and minimum temperatures, wind speed, and day number of each day within the day, as well as the updated values ​​of the relative sunshine hours under each weather type in the first seven-point update method of the target city, are used as input factors. The CNN-LSTM-Attention model is used to obtain a prediction model for the relative sunshine hours of the target city.

[0011] Furthermore, the specific steps of obtaining the predicted relative sunshine hours of the target city on the day to be predicted are as follows: The target city is The updated values ​​of the forecast daily maximum temperature, forecast daily minimum temperature, forecast wind speed, day sequence number and relative sunshine hours of weather type are used as the input data of the prediction model of relative sunshine hours of the target city; the output of the model is used as the target city’s The predicted relative sunshine hours for the day.

[0012] Further, the specific steps of obtaining the predicted actual sunshine duration of the target city on the day to be predicted are as follows: , denoted as the target city .

[0013] Further, the specific steps of obtaining the predicted actual sunshine duration of the target city on the day to be predicted are as follows: The data acquisition module acquires the altitude of the target city, historical forecast data of multiple days, actual relative sunshine duration, maximum possible sunshine duration of each day of the target city, and altitude of the city corresponding to the current seven-point method; The model construction module obtains the weather type in the first updated seven-point method of the target city and the assignment of each weather type according to the historical forecast data of multiple days of the target city and the actual relative sunshine duration of each day; According to the assignment of each weather type in the current seven-point method, the actual relative sunshine duration and the historical forecast data of each day of the target city, the normal historical data of the target city is obtained; according to the difference between the altitude of the target city and the altitude of the city corresponding to the current seven-point method, the assignment of each weather type in the first updated seven-point method of the target city is adjusted multiple times downward to obtain multiple assignment adjustment values of each weather type in the first updated seven-point method of the target city; According to the difference between the actual relative sunshine duration in all normal historical data under the same weather type and each assignment adjustment value in the first updated seven-point method of the target city, the updated assignment of each weather type in the first updated seven-point method of the target city is obtained; According to the actual relative sunshine duration, historical forecast data, day sequence number and updated assignment of relative sunshine duration of each weather type in the first updated seven-point method of the target city on each day as the input of the model, the deep learning model based on CNN-LSTM-Attention is trained to obtain the prediction model of the relative sunshine duration of the target city; The acquisition module takes the forecast data of the target city on the day to be predicted as the input of the prediction model of the relative sunshine duration of the target city, and obtains the predicted relative sunshine duration of the target city on the day to be predicted; the predicted relative sunshine duration of the target city on the day to be predicted is multiplied by the maximum possible sunshine duration to obtain the predicted actual sunshine duration of the target city on the day to be predicted.

[0014] The northwest region sunshine duration prediction method provided by the application has the following beneficial effects: Improvement point 1: In this application, the value of the seven-point method is improved by comprehensively considering the past weather type, historical relative sunshine duration, latitude, terrain and other factors, so that it changes from universality to pertinence, and the accuracy of the assignment part is improved. For the blank part of the weather type, a solution of taking the mean value of the historical data is proposed. Therefore, the assignment of relative sunshine duration by the optimized seven-point method can more accurately and comprehensively consider the spatial and terrain differences of relative sunshine duration.

[0015] Improvement point 2: When the original seven-point method establishes a prediction model, it is based on the division of weather types to quantize the relative sunshine duration, and introduces the maximum temperature Tmax and the temperature range TR as correction factors. This application proposes to introduce the daily minimum temperature Tmin, wind speed (u) and day sequence number (J) to improve the accuracy of relative sunshine duration prediction. On the one hand, it considers that there is a close relationship between sunshine duration and wind speed u, and on the other hand, the change of sunshine duration presents periodicity, and the sunshine duration will change with the change of day sequence number; Improvement point 3: This application combines CNN-LSTM-Attention to build a deep learning prediction model. The CNN layer can extract the spatial features in the input data. In the prediction of relative sunshine duration, CNN can capture the spatial correlation between the input data. Through convolution operation, CNN extracts local features and reduces feature dimension through pooling operation, so as to provide more compact feature representation for the subsequent LSTM layer. LSTM is good at processing the time dependence relationship in sequence data. In the prediction of relative sunshine duration, LSTM can capture the change rule of relative sunshine duration with time. Through the control mechanism of input gate, forget gate and output gate, LSTM can effectively remember or ignore the key information in the sequence, so as to avoid the problem of gradient disappearance. The attention mechanism can automatically identify important time steps in the sequence, so as to improve the attention degree of the model to the key information. In the prediction of relative sunshine duration, the attention mechanism can help the model focus on the historical time points that have greater influence on the change of relative sunshine duration, such as continuous sunny or cloudy days. By calculating the attention weight of each time step, the model can weight sum the information of the whole sequence, so as to more accurately predict the future relative sunshine duration. BRIEF DESCRIPTION OF DRAWINGS

[0016] In order to more clearly illustrate the embodiments of the present application and the design scheme thereof, the drawings required by the present embodiments will be briefly introduced as follows. The drawings in the following description are only part of the embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor on the basis of these drawings.

[0017] Figure 1 The flowchart of a sunshine duration prediction method in northwest region according to Embodiment 1 of the present application; Figure 2 A technical roadmap for an improved method for predicting relative sunshine hours based on a seven-point method using deep learning; Figure 3 A CNN-LSTM-Attention model structure diagram. DETAILED DESCRIPTION

[0018] In order to better understand the technical solutions of the present application and to enable one skilled in the art to carry out the present application, the present application will be described in detail below with reference to the accompanying drawings and specific embodiments. The following embodiments are only used to more clearly illustrate the technical solutions of the present application, and cannot be used to limit the protection scope of the present application.

[0019] Example 1 The present application provides a sunshine hours prediction method for the northwest region, specifically as shown in the following steps: Figure 1 Step S001: Obtain the altitude of the target city, historical prediction data for multiple days, actual relative sunshine hours, maximum possible sunshine hours of the target city each day, and the altitude of the current seven-point method corresponding city.

[0020] It should be noted that research shows that there is a corresponding relationship between weather indicators considering different cloud amounts and weather type conditions (Table 1). In actual application, the interval range cannot directly determine the specific value of the relative sunshine hours, but a certain determined value needs to be selected. Currently, the empirical assignment method for relative sunshine hours is mainly the seven-point method and the five-point method. The five-point method defines the weather type in weather forecast as five basic weather types of sunny, sunny with little cloud, cloudy, overcast, and rain, respectively assigning n / N values of 0.9, 0.7, 0.5, 0.3 and 0.1. The seven-point method defines it as seven basic weather types of sunny, sunny to little cloud, sunny to cloudy, cloudy, overcast, overcast haze (fog), and rain, respectively assigning n / N values of 0.920, 0.775, 0.650, 0.525, 0.375, 0.225 and 0.075 (Table 2). The seven-point method was used for sunshine hours prediction at Nanjing Station (north latitude 31-32°, plain area) in the early stage of research, and the prediction results were good. Compared with the five-point method, the seven-point method has more detailed weather condition classification, and the relative sunshine hours of each weather type are assigned from the interval value, which is more suitable. This application unifies the weather types containing rain and snow as "rain", and proposes an improved method based on the seven-point interval method (Table 1) and the seven-point method (Table 2).

[0021] ​It needs to be further explained that, since the current seven-point method is obtained according to the weather in Nanjing, it has strong universality and does not have the characteristics of a city, such as the floating dust and sand weather type unique to the northwest region of China, which cannot be assigned. Table 1 is the current seven-point interval method corresponding table, and Table 2 is the seven-point method corresponding table. Therefore, the historical information of the target city for multiple days is obtained. The current seven-point method has universality for the assignment of relative sunshine hours, and does not consider the spatial and temporal variation of sunshine hours. Spatially, the cloud amount difference between regions, such as the altitude of each region, will affect the cloud amount distribution and thus the size of the relative sunshine hours, and the assignment lacks accuracy; temporally, the time sequence problem is not considered, and the cloud amount also differs between different seasons, that is, the sunshine hours under the same weather type differ in different regions and at different times. And the current seven-point method corresponding city Nanjing is located in the third step of the terrain of China, with an average altitude of several hundred meters, while the northwest region is located in the second step of the terrain of China, making the altitude difference between the cities in the northwest region and Nanjing too large. Therefore, the altitude of the target city located in the northwest region is obtained.

[0022] Therefore, the present application solves the problem of insufficient applicability and low precision of the single seven-point interval method in the prior art, and proposes a northwest region sunshine hours prediction method. Referring to the weather type and n / NPAR corresponding situation of Table 1, the variation trend of the interval boundary value of different weather types is determined by comprehensively considering the terrain, latitude and other factors of the study area; combined with the average relative sunshine hours of the basic weather type, the improved relative sunshine hours assignment table is determined; then the maximum temperature, minimum temperature, wind speed, day sequence number prediction data and assigned relative sunshine hours obtained from the public weather forecast are used as model inputs to construct a deep learning model mixed with Convolutional Neural Networks (CNN), Attention mechanism and Long Short-Term Memory (LSTM), to predict the future relative sunshine hours; 80% of the historical data is selected as the training set, and the remaining 20% is used as the validation set, and the MAE is used as the evaluation index to judge the model precision, and finally a reliable and better robust model is provided for relative sunshine hours prediction.

[0023] It needs to be further explained that, since the purpose of the method is to obtain the predicted actual sunshine hours of each city according to the forecast data of each city. Therefore, the historical forecast data of the target city for multiple days in the northwest region, the actual relative sunshine hours of the target city every day and the maximum possible sunshine hours of the target city every day are obtained.

[0024] Specifically, the historical forecast data of the target city for multiple days before the current day is obtained through the China Meteorological Database and the China Weather Network. The historical prediction data of the day, and the actual relative sunshine hours and the actual sunshine hours of each day. Obtain the maximum possible sunshine hours of the target city in each day. Among them, the historical prediction data of the target city in each day before the current day includes the predicted weather type, the predicted daily maximum temperature, the predicted daily minimum temperature, and the predicted wind speed of each day. Among them, As the data of the preset historical days, the embodiment orders For example, other embodiments can be set to other values. Obtain the table corresponding to the current seven-eighths method and the seven-eighth interval method, and the obtained table is as follows:

[0025] Table 1 is a table corresponding to the current seven-eighth interval method: Table 2 is a table corresponding to the current seven-eighth method: Further, obtain the altitude of the target city and the altitude of the current seven-eighth method corresponding city Nanjing.

[0026] At this point, the altitude of the target city, the historical prediction data, the maximum possible sunshine hours and the relative sunshine hours of each day, and the altitude of the current seven-eighth method corresponding city are obtained.

[0027] Step S002: According to the historical prediction data of the target city for many days and the actual relative sunshine hours of each day, obtain the weather type in the first updated seven-eighth method of the target city and the assignment of each weather type.

[0028] It should be noted that due to the geographical location and surrounding environment and other characteristics of each city have certain differences with other cities, so that the weather type in the current seven-eighth method table and the relative sunshine hours corresponding to each weather type cannot be well applied to the target city, for example, there are floating, blowing sand, sandstorm and other weather types in the northwest region, which rarely appear in Nanjing. Therefore, according to the historical prediction data of the target city for many days, the first updated seven-eighth method of the target city is obtained.

[0029] It should be further noted that the weather type is divided into two different weather types, i.e. non-A to B weather type such as sunny, cloudy, overcast, rain and snow, and A to B weather type such as sunny to cloudy, sunny to little cloudy, etc.

[0030] and since the "A to B" weather type is composed of two weather types, i.e. the two weather types can exist alternately in a day, the relative sunshine duration of the target city in the first updated seven-point method under the "A to B" weather type is obtained according to the relative sunshine duration under the two weather types in the "A to B" weather type. Therefore, the relative sunshine duration of the target city in the first updated seven-point method under the non-"A to B" weather type is obtained according to the average of the forecasted relative sunshine duration of all days under each non-"A to B" weather type in the historical forecast data of the target city for multiple days.

[0031] It needs to be further explained that since the current research proves that the relative sunshine duration under the "A to B" weather type is more affected by the relative sunshine duration of the previous weather type than the relative sunshine duration of the subsequent weather type. Therefore, when obtaining the assignment of the relative sunshine duration of each "A to B" weather type in the first updated seven-point method of the target city, a larger influence weight is given to the relative sunshine duration of the previous weather type, and a smaller influence weight is given to the relative sunshine duration of the subsequent weather type. The assignment of the relative sunshine duration of each "A to B" weather type in the first updated seven-point method of the target city is obtained.

[0032] Specifically, according to the forecasted weather type of the target city in a day, the weather type set of the target city is obtained. The weather type set of the target city does not contain the same weather type, and only contains the non-"A to B" weather type and the "A to B" weather type.

[0033] Further, the average of the actual relative sunshine duration of all dates under the forecasted weather type of the target city as the first non-"A to B" weather type is recorded as the assignment of the relative sunshine duration of the first non-"A to B" weather type in the first updated seven-point method of the target city. Further, the assignment of the relative sunshine duration of the first "A to B" weather type in the first updated seven-point method of the target city is obtained.

[0034] Further, the assignment of the relative sunshine duration of the first "A to B" weather type in the first updated seven-point method of the target city is obtained. In the formula, S1 represents the assignment of the relative sunshine duration of the first non-"A to B" weather type in the first updated seven-point method of the target city, S2 represents the assignment of the relative sunshine duration of the second non-"A to B" weather type in the first updated seven-point method of the target city, S3 represents the assignment of the relative sunshine duration of the first weather type in the first non-"A to B" weather type in the first updated seven-point method of the target city, S4 represents the assignment of the relative sunshine duration of the second weather type in the first non-"A to B" weather type in the first updated seven-point method of the target city, S5 represents the assignment of the relative sunshine duration of the first weather type in the second non-"A to B" weather type in the first updated seven-point method of the target city, and ​​the last weather type in the first updated seven-point method of the target city, is a preset weight, and is a preset weight, and The embodiment allows For example, other values can be set in other embodiments.

[0035] Further, according to the weather type set of the target city and the assignment of the relative sunshine duration of each weather type in the first updated seven-point method of the target city, the first updated seven-point method of the target city is obtained.

[0036] Specifically, for the northwest arid region (taking the Hanghou site in Inner Mongolia as an example), all weather types from 2011 to 2023 are summarized, a total of 90 weather types, and it is determined whether there is a weather type other than sunny, sunny to little cloudy, sunny to cloudy, cloudy, overcast, overcast haze (fog) and rain (snow) in all non-A to B weather types. It is found that there is no “sunny to little cloudy” weather type at the Hanghou site, but there are three special weather types of “dust, floating sand, and sandstorm”. The two decimal places of the average relative sunshine duration under the three weather types are rounded to 0.55, which is used as the assignment of the three weather types. Therefore, the relative sunshine duration assignment table of the Hanghou site is still a “seven-point method”.

[0037] Thus, the first updated seven-point method of the target city is obtained.

[0038] Step S003: According to the assignment of each weather type in the current seven-point method and the actual relative sunshine duration and historical forecast data of each day of the target city, the normal historical data of the target city is obtained; according to the difference between the elevation of the target city and the elevation of the city corresponding to the current seven-point method and the difference between the actual relative sunshine duration in all normal historical data under the same weather type and the assignment adjustment value in the first updated seven-point method of the target city, the updated assignment of each weather type in the first updated seven-point method of the target city is obtained.

[0039] It should be noted that the cities in the northwest region are mostly located in the second step of the terrain of China, while Nanjing is located in the third step of the terrain of China, so there is a large difference between the elevation of the cities in the northwest region and the elevation of Nanjing. And if the elevation of an area is higher, the cloud layer above the area weakens the intensity of sunlight less. Therefore, the assignment of the relative sunshine duration corresponding to each weather type in the first updated seven-point method table of the target city located in the northwest region is adjusted multiple times to obtain the best assignment of each weather type.

[0040] It is further needed to be explained that, since the higher the altitude of the target city is than the altitude of the city corresponding to the current seven-point method, the smaller the weakening of the cloud layer above the target city to the intensity of sunlight is compared to Nanjing, i.e. a larger adjustment of the assignment of the relative sunshine hours corresponding to each weather type in the first updated seven-point method table of the target city is needed. Therefore, when the difference between the altitude of the target city and the altitude of Nanjing corresponding to the current seven-point method is larger, the assignment of the final relative sunshine hours is obtained by continuously increasing the assignment of the relative sunshine hours corresponding to each weather type in the first updated seven-point method table of the target city. And the larger the difference between the altitude of the target city and the altitude of Nanjing corresponding to the current seven-point method is, the larger the adjustment of the assignment of the relative sunshine hours under each weather type should be.

[0041] It is further needed to be explained that, since the current average relative error index is used to reflect the possibility of a data representing all data in a data set, the final assignment of the relative sunshine hours of each weather type in the first updated seven-point method of the target city is obtained by calculating the average relative error of each data and the actual relative sunshine real number of the target city under a weather type. Therefore, the value of the relative sunshine hours of each weather type in the first updated seven-point method of the target city is continuously adjusted to obtain the final assignment of the relative sunshine hours of each weather type.

[0042] It is further needed to be explained that, since the forecast data of the target city is obtained, the weather type predicted by the forecast data may not be the actual weather type of the day, so that the actual relative sunshine hours of the target city under a weather type cannot be well reflected according to the forecasted weather type of a day and the actual relative sunshine real number of the day. For example, it is predicted on June 19 that June 20 is sunny, but June 20 is not sunny, so that the forecast data of June 20 is sunny, but the relative sunshine hours under this weather type are the relative sunshine hours of other weather types, so that June 20 is not normal historical data. Therefore, the normal historical data is obtained according to the actual relative sunshine hours of each day of the target city and the forecast weather type of the historical forecast data. And since the historical data of the target city may contain abnormal data, if the altitude of the target city is equal to the altitude of Nanjing, the assignment of each weather type in the first updated seven-point method of the target city is also adjusted multiple times to obtain a best assignment of each weather type in the first updated seven-point method of the target city.

[0043] It is further needed to be explained that the assignment of the relative sunshine duration of each weather type in the current seven-part method can well represent the relative sunshine duration of other cities under the weather type. That is, the current seven-part method has strong universality. Therefore, according to the assignment of the relative sunshine duration of each weather type in the current seven-part method and the actual sunshine duration of each forecast weather type of the target city in the historical days, the abnormal historical data is removed. According to the data after removing the abnormal data, the final assignment of the relative sunshine duration of each weather type in the first updated seven-part method of the target city is obtained. Since the target city located in the northwest region may contain weather types not in the current seven-part method. Therefore, if the weather type of the target city does not exist in the current seven-part method, the mean value of the relative sunshine duration of the target city in the historical data of the target city in the weather type is taken as a standard value, so as to remove the abnormal data.

[0044] Specifically, if the absolute value of the difference between the actual relative sunshine duration of the target city on the day and the assignment of the relative sunshine duration of the forecast weather type in the current seven-part on the day is less than or equal to the difference threshold , the forecast weather type and the actual relative sunshine duration obtained by the target city on the day are recorded as two-dimensional values in a normal historical data, and a normal historical data is obtained. The difference threshold preset in the embodiment is , for example. Other values can be set in other embodiments.

[0045] Further, if the forecast weather type of the target city on the day does not exist in the weather types contained in the current seven-part method. Then the forecast weather type of the target city in the historical data of the target city on the day is recorded as the mean value of the actual relative sunshine duration of all days of the forecast weather type of the target city on the day, and the standard value of the forecast weather type of the target city on the day is recorded. At this time, if the absolute value of the difference between the actual relative sunshine duration of the target city on the day and the standard value of the forecast weather type of the target city on the day is less than or equal to the difference threshold , the forecast weather type and the actual relative sunshine duration obtained by the target city on the day are recorded as two-dimensional values in a normal historical data, and a normal historical data is obtained.

[0046] Further, the relative sunshine duration of each weather type in the first updated seven-point method of the target city is adjusted downward multiple times to obtain the updated sunshine duration of each weather type in the first updated seven-point method of the target city. In the embodiment, the initial maximum adjustment range of the relative sunshine duration is 0.1, and the step is 0.01, and in other embodiments, other values can be set.

[0047] wherein the maximum boundary of upward adjustment or downward adjustment of the relative sunshine duration of the target city is: wherein, denotes the maximum boundary of downward adjustment of the relative sunshine duration of the target city, denotes the altitude of the target city, denotes the altitude of Nanjing corresponding to the current seven-point method, denotes a normalization function, which is used for normalization in the embodiment.

[0048] wherein the step of adjustment of the relative sunshine duration of the target city each time is: wherein, denotes the step of adjustment of the relative sunshine duration of the target city each time, denotes the altitude of the target city, denotes the altitude of Nanjing corresponding to the current seven-point method, denotes a normalization function, which is used for normalization in the embodiment. denotes an absolute value function.

[0049] Further, if , the relative sunshine duration of each weather type in the first updated seven-point method of the target city is adjusted upward with as the step, and the adjustment range of the relative sunshine duration of each weather type in the first updated seven-point method of the target city is less than or equal to .

[0050] If <0, the relative sunshine duration of each weather type in the first updated seven-point method of the target city is adjusted downward with as the step, and the adjustment range of the relative sunshine duration of each weather type is less than or equal to .

[0051] If =0, the relative sunshine duration of each weather type in the first updated seven-point method of the target city is adjusted downward with The relative sunshine hours assigned to each weather type in the first updated seven-point method of the target city are first adjusted upward, and then adjusted downward, and the adjustment range of the relative sunshine hours assigned to each weather type in the first updated seven-point method of the target city is less than or equal to 0.1.

[0052] Thus, a plurality of assigned adjustment values ​​for each relative sunshine hours of each weather type in the first updated seven-part method of the target city are obtained.

[0053] Further, obtain the first update of the seven points of the target city Weather type The specific calculation formula for the possibility of updating the assignment value of the relative sunshine hours is as follows: Where, Indicates the first seven-part update of the target city. Weather type The relative sunshine hours assignment adjustment value is the possibility of updating the assignment value. Indicates that the forecast weather type is the first updated seven-part method of the target city. The number of normal historical data for each weather type, Indicates the first seven-part update of the target city. Weather type The relative sunshine hours are assigned an adjustment value. Indicates that the forecast weather type is the first updated seven-part method of the target city. Weather type The actual relative sunshine hours of normal historical data, represents the absolute value function, is an exponential function with a natural constant as the base, and this embodiment is used to express an inverse proportional relationship.

[0054] What needs to be explained is that The larger the value is, the higher the first update of the target city is in the seven-point method. Weather type The greater the difference between the assigned adjustment value of the relative sunshine hours and the actual relative sunshine hours, the greater the difference between the first seven-point method of the target city. Weather type The assigned adjustment value of the relative sunshine hours cannot reflect the overall situation well.

[0055] Among them, the change table of the relative sunshine hours assignment and updated assignment of weather types in the first updated seven-point method at Hanghou Station and the average relative error of historical data of the same weather type is as follows: Table 3 Summary of MAE changes before and after improvement Further, the assignment adjustment value of all relative sunshine hours of the first weather type in the first updated seven-division method of the target city in the possibility of updating assignment is the assignment adjustment value of all relative sunshine hours of the first weather type in the first updated seven-division method of the target city when the possibility is the largest, and is recorded as the updated assignment of the first weather type in the first updated seven-division method of the target city.

[0056] The table of the first updated seven-division method of Hangzhou station is as follows: Table 4 Relative sunshine hour quantification table of seven weather types after improvement Further, the embodiment also provides a method for obtaining the maximum possible sunshine hours and the specific relative sunshine hours of the target city on each day, and the specific steps are as follows: Specifically, the calculation formula of the magnetic declination of the day in the year is as follows: In the formula, the magnetic declination of the day in the year is represented by , the sine function in the trigonometric function is represented by , the number of days contained in the year is represented by , 180 degrees is represented by , and the order value of the day in the year is represented by

[0057] Further, the specific calculation formula of the sunset hour angle of the day in the year of the target city is as follows: In the formula, the sunset hour angle of the day in the year of the target city is represented by , the magnetic declination of the day in the year is represented by , the latitude of the target city is represented by , the tangent function is represented by , and the inverse cosine function is represented by

[0058] ​​​​​​​​​​​​​​​​​​Further, the specific calculation formula of the maximum possible sunshine duration of the target city on the day of the year is as follows: In the formula, the maximum possible sunshine duration of the target city on the day of the year is represented, is 180 degrees, the sunset hour angle of the target city on the day of the year is represented.

[0059] Further, the specific relative sunshine duration of the target city on the day of the year is calculated as follows: In the formula, the specific relative sunshine duration of the target city on the day of the year is represented, the maximum possible sunshine duration of the target city on the day of the year is represented, the actual sunshine duration of the target city on the day of the year is represented.

[0060] In addition, the method also provides a calculation method of wind speed, which is as follows: In the formula, is the wind speed value at 2m above the ground, is the wind speed value at z m above the ground, is the height of the station wind speed measurement.

[0061] Table 5 Wind force grade and corresponding wind speed at a distance of 10 meters from the ground (m / s) At this point, the updated assignment of each weather type in the first updated seven-point method of the target city is obtained.

[0062] Step S004: According to the actual relative sunshine duration of the target city on each day, the forecast daily maximum temperature, the forecast daily minimum temperature, the forecast wind speed, the day sequence number, the forecast weather type, and the updated assignment of the relative sunshine duration of each weather type in the first updated seven-point method, a prediction model of the relative sunshine duration of the target city is obtained.

[0063] It should be noted that the current relative sunshine duration forecast mostly uses a single regression model, and since there is no strong correlation between the input data, only the consistent trend is shown, so it is difficult for a single model to capture its potential features, the application uses a CNN-LSTM-Attention hybrid model, which introduces a CNN convolutional neural network into a single LSTM prediction model, which can better capture the deep relationship between the input data and the prediction target; At the same time, through the attention mechanism, focus on the historical time points that have a greater impact on the relative sunshine duration, such as consecutive sunny or cloudy days, by calculating the attention weight of each time step, the model can weight the sum of the information of the entire sequence, so as to more accurately predict the future relative sunshine duration. Among them, Figure 2 It is an improved technical roadmap for predicting relative sunshine duration based on deep learning seven-point method. Figure 3 It is a CNN-LSTM-Attention model structure diagram.

[0064] Specifically, the actual relative sunshine duration of the target city in days is taken as the target value, and the forecast daily maximum temperature, forecast daily minimum temperature, forecast wind speed, daily serial number, and the relative sunshine duration of the target city in days under the weather type of each day in the first update seven-point method in the target city are taken as input factors, and the CNN-LSTM-Attention model is used, and % of the historical data is selected as the training set, and the remaining (1- %) is the validation set, and NSE, RMSE, R2, and MAE are used as evaluation indexes to judge the model precision, and the data expression n / N=f(Tmax, Tmin, J, u, n / NPAR) between n / NOBS and n / NPAR, Tmax, Tmin, u, and J five independent variables is established, the modeling work is completed, and the prediction model of the relative sunshine duration of the target city is obtained. The preset value of the historical days in this embodiment is , and the preset proportion of the training set is , and other values can be set in other embodiments. The improved technical roadmap of the application is shown in , and Figure 2 is a CNN-LSTM-Attention model structure. Figure 3

[0065] At this point, the acquisition model of the relative sunshine duration prediction value of the target city in each day is obtained.

[0066] ​Step S005: taking the forecast data of the target city on the day to be predicted as the input of the prediction model of the relative sunshine duration of the target city, obtaining the predicted relative sunshine duration of the target city on the day to be predicted, and further obtaining the predicted actual sunshine duration of the target city on the day to be predicted.

[0067] Specifically, the forecast daily maximum temperature, the forecast daily minimum temperature, the forecast wind speed, the day sequence number of the target city on the day to be predicted, and the updated assignment of the relative sunshine duration of the weather type forecast on the day to be predicted in the first updated seven-point method of the target city are taken as the input of the prediction model of the relative sunshine duration of the target city. The output is the predicted relative sunshine duration of the target city on the day to be predicted. .

[0068] Further, the product of the maximum possible sunshine duration of the target city on the day to be predicted and the actual sunshine duration of the target city on the day to be predicted is recorded as the predicted actual sunshine duration of the target city on the day to be predicted.

[0069] Thus far, the embodiment is completed.

[0070] Another embodiment of the present application provides a sunshine duration prediction system based on weather forecast, comprising: A data acquisition module acquires the altitude of the target city, historical forecast data of multiple days, actual relative sunshine duration, maximum possible sunshine duration of the target city every day, and the altitude of the city corresponding to the current seven-point method.

[0071] A model construction module obtains the weather type in the first updated seven-point method of the target city and the assignment of each weather type according to the historical forecast data of the target city and the actual relative sunshine duration of each day.

[0072] According to the assignment of each weather type in the current seven-point method, the actual relative sunshine duration and the historical forecast data of the target city, the normal historical data of the target city is obtained; according to the difference between the altitude of the target city and the altitude of the city corresponding to the current seven-point method, the assignment of each weather type in the first updated seven-point method of the target city is adjusted multiple times downward to obtain multiple assignment adjustment values of each weather type in the first updated seven-point method of the target city.

[0073] According to the difference between the actual relative sunshine duration in all normal historical data under the same weather type and each assignment adjustment value in the first updated seven-point method of the target city, the updated assignment of each weather type in the first updated seven-point method of the target city is obtained.

[0074] ​​​​​​​According to the actual relative sunshine hours of the target city in each day, the historical prediction data, the day sequence number, and the updated assignment of the relative sunshine hours of each weather type in the first update seven-point method as the input of the model, the deep learning model based on CNN-LSTM-Attention is trained to obtain the prediction model of the relative sunshine hours of the target city.

[0075] The acquisition module takes the prediction data of the target city in the day to be predicted as the input of the prediction model of the relative sunshine hours of the target city, and obtains the predicted relative sunshine hours of the target city in the day to be predicted; multiplies the predicted relative sunshine hours of the target city in the day to be predicted by the maximum possible sunshine hours to obtain the predicted actual sunshine hours of the target city in the day to be predicted.

[0076] It should be noted that the above specific embodiments can enable those skilled in the art to more fully understand the present invention, but in no way limit the present invention. Therefore, although the present invention has been described in detail in the present specification and examples, those skilled in the art should understand that the present invention can still be modified or equivalently replaced; and all technical solutions and improvements that do not depart from the spirit and scope of the present invention are included in the protection scope of the patent of the present invention. Any reference signs in the claims should not be considered as limiting the claims involved.

Claims

1. A method for predicting sunshine hours in Northwest China, characterized in that: include: Obtain the target city's altitude, multiple days of historical forecast data, actual relative sunshine hours, the target city's maximum possible sunshine hours for each day, and the altitude of the city corresponding to the current seven-point method; According to the historical forecast data of the target city for multiple days and the actual relative sunshine hours of each day, the weather type of the target city in the first updated seven-point method and the value assigned to each weather type are obtained; According to the assigned value of each weather type in the current seven-point method and the actual relative sunshine hours of each day in the target city and the historical forecast data, the normal historical data of the target city is obtained; according to the difference between the altitude of the target city and the altitude of the city corresponding to the current seven-point method, the assigned value of each weather type in the first updated seven-point method of the target city is adjusted downward multiple times to obtain multiple assigned value adjustment values ​​for each weather type in the first updated seven-point method of the target city; According to the difference between the actual relative sunshine hours in all normal historical data under the same weather type and each assigned adjustment value in the first updated seven-point method of the target city, the updated assigned value of each weather type in the first updated seven-point method of the target city is obtained; The model uses the target city's actual relative sunshine hours for each day, historical forecast data, day number, and the updated relative sunshine hours for each weather type in the first seven-part update method as input. A deep learning model based on CNN-LSTM-Attention is trained to obtain a prediction model for the target city's relative sunshine hours. The forecast data of the target city on the day to be predicted is used as the input of the prediction model of the relative sunshine hours of the target city to obtain the predicted relative sunshine hours of the target city on the day to be predicted; the predicted relative sunshine hours of the target city on the day to be predicted are multiplied by the maximum possible sunshine hours to obtain the predicted actual sunshine hours of the target city on the day to be predicted.

2. A method for predicting sunshine hours in Northwest China according to claim 1, characterized in that: The specific steps of obtaining the weather type in the first updated seven-part method of the target city and assigning a value to each weather type are as follows: According to the target city The forecast weather type for the next day is used to obtain the weather type set of the target city; the historical forecast data of the target city for each day before the current day includes the forecast weather type, the maximum temperature on the forecast day, the minimum temperature on the forecast day, and the forecast wind speed for each day; Set the forecast weather type to the target city The average of the actual relative sunshine hours on all dates of the non-"A to B" weather type is recorded as the first update of the seven-point method of the target city. Assignment of relative sunshine hours for non-"A to B" weather types; Get the first update of the seven points of the target city The specific calculation formula for the relative sunshine hours of the "A to B" weather type is as follows: Where, Indicates the first seven-part update of the target city. The relative sunshine hours assignment for non-"A to B" weather types, Indicates the first seven-part update of the target city. The relative sunshine hours of the first weather type in the non-"A to B" weather type in the first updated seven-part method of the target city, Indicates the first seven-part update of the target city. The relative sunshine hours of the last weather type in the non-"A to B" weather type in the first updated seven-part method of the target city, .

3. The method for predicting sunshine hours in Northwest China according to claim 1, characterized in that: The specific calculation steps for obtaining the normal historical data of the target city are as follows: If the target city is If the absolute value of the difference between the actual relative sunshine hours of the day and the relative sunshine hours of the forecast weather type in the current seven minutes is less than or equal to 0.8, the target city will be ranked in the first The forecast weather type of the day and the actual relative sunshine hours are used as two dimensional values ​​of normal historical data to obtain a normal historical data; If the target city is The forecast weather type for the day does not exist in the weather types included in the current seven-point method. The weather forecast type of the target city in the historical data of the day is The average of the actual relative sunshine hours of all days of the forecast weather type of the day is recorded as the target city’s The standard value of the forecast weather type for the day; If the target city is The actual relative sunshine hours of the day and the target city in the If the absolute value of the difference between the standard values ​​of the forecast weather type for the day is less than or equal to 0.8, the target city will be placed in the The forecast weather type and the actual relative sunshine hours obtained within a day are recorded as two dimensional values ​​within a normal historical data.

4. The method for predicting sunshine hours in Northwest China according to claim 1, characterized in that: The specific calculation steps of the multiple assigned adjustment values ​​for each weather type in the first update seven-part method to the target city are as follows: The calculation formula for the step size of each adjustment of the relative sunshine hours of the target city is as follows: Where, Indicates the step size for each adjustment of the relative sunshine hours of the target city. Indicates the altitude of the target city. Indicates the altitude of Nanjing, the city corresponding to the current seven-point division. represents the normalization function, represents the absolute value function; The calculation formula for obtaining the maximum limit of the relative sunshine hours of the target city for upward or downward adjustment is as follows: Where, Indicates the maximum limit for adjusting the relative sunshine hours of the target city upward or downward. Indicates the altitude of the target city. Indicates the altitude of Nanjing, the city corresponding to the current seven-point division. Represents the normalization function like , then The relative sunshine hours of each weather type in the first updated seven-point method of the target city are adjusted upwards by the step size, and the adjustment range of the relative sunshine hours of each weather type in the first updated seven-point method of the target city is less than or equal to ; like <0, then The relative sunshine hours of each weather type in the first seven-point method of the target city are adjusted downwards for the step length, and the adjustment range of the relative sunshine hours of each weather type is less than or equal to ; like =0, then The relative sunshine hours assigned to each weather type in the first updated seven-point method of the target city are first adjusted upward, and then adjusted downward, and the adjustment range of the relative sunshine hours assigned to each weather type in the first updated seven-point method of the target city is less than or equal to 0.1; A plurality of assigned adjustment values ​​for each relative sunshine hours of each weather type in the first updated seven-part method of the target city are obtained.

5. The method for predicting sunshine hours in Northwest China according to claim 1, characterized in that: The specific steps of obtaining the multiple assigned adjustment values ​​for each weather type in the first updated seven-part method of the target city are as follows: Get the first update of the seven points of the target city Weather type The specific calculation formula for the possibility of updating the assignment value of the relative sunshine hours is as follows: Where, Indicates the first seven-part update of the target city. Weather type The relative sunshine hours assignment adjustment value is the possibility of updating the assignment value. Indicates that the forecast weather type is the first updated seven-part method of the target city. The number of normal forecast data for each weather type, Indicates the first seven-part update of the target city. Weather type The relative sunshine hours are assigned an adjustment value. Indicates that the forecast weather type is the first updated seven-part method of the target city. Weather type The actual relative sunshine hours of normal historical data, represents the absolute value function, is an exponential function with a natural constant as its base; Update the first seven points of the target city The value adjustment value of all relative sunshine hours of each weather type is the possibility of updating the value. The maximum possibility corresponds to the first update of the target city in the seven-point method. The assigned adjustment value of all relative sunshine hours of each weather type is recorded as the first update of the seven-point method of the target city. Update the value of each weather type.

6. The method for predicting sunshine hours in Northwest China according to claim 1, characterized in that: The specific steps of obtaining the prediction model of relative sunshine hours in the target city are as follows: Target cities The actual relative sunshine hours in the day is the target value, and the target city is The predicted maximum and minimum temperatures, wind speed, and day number of each day within the day, as well as the updated values ​​of the relative sunshine hours under each weather type in the first seven-point update method of the target city, are used as input factors. The CNN-LSTM-Attention model is used to obtain a prediction model for the relative sunshine hours of the target city.

7. The method for predicting sunshine hours in Northwest China according to claim 1, characterized in that: The specific steps of obtaining the predicted relative sunshine hours of the target city on the predicted day are as follows: The target city is The updated values ​​of the forecast daily maximum temperature, forecast daily minimum temperature, forecast wind speed, day sequence number and relative sunshine hours of weather type are used as the input data of the prediction model of relative sunshine hours of the target city; the output of the model is used as the target city’s The predicted relative sunshine hours for the day.

8. The method for predicting sunshine hours in Northwest China according to claim 1, characterized in that: The specific steps for obtaining the predicted actual sunshine hours for the target city on the day to be predicted are as follows: , recorded as the target city .

9. A sunshine hours forecasting system based on weather forecast, characterized in that: include: The data collection module obtains the altitude of the target city, historical forecast data for multiple days, actual relative sunshine hours, the maximum possible sunshine hours for each day in the target city, and the altitude of the city corresponding to the current seven-point method; The model building module obtains the weather type of the target city in the first updated seven-part method and the value of each weather type based on the historical forecast data of the target city for multiple days and the actual relative sunshine hours of each day; According to the assigned value of each weather type in the current seven-point method and the actual relative sunshine hours of each day in the target city and the historical forecast data, the normal historical data of the target city is obtained; according to the difference between the altitude of the target city and the altitude of the city corresponding to the current seven-point method, the assigned value of each weather type in the first updated seven-point method of the target city is adjusted downward multiple times to obtain multiple assigned value adjustment values ​​for each weather type in the first updated seven-point method of the target city; According to the difference between the actual relative sunshine hours in all normal historical data under the same weather type and each assigned adjustment value in the first updated seven-point method of the target city, the updated assigned value of each weather type in the first updated seven-point method of the target city is obtained; The model uses the target city's actual relative sunshine hours for each day, historical forecast data, day number, and the updated relative sunshine hours for each weather type in the first seven-part update method as input. A deep learning model based on CNN-LSTM-Attention is trained to obtain a prediction model for the target city's relative sunshine hours. The acquisition module uses the forecast data of the target city on the day to be predicted as the input of the prediction model of the relative sunshine hours of the target city to obtain the predicted relative sunshine hours of the target city on the day to be predicted; multiplies the predicted relative sunshine hours of the target city on the day to be predicted with the maximum possible sunshine hours to obtain the predicted actual sunshine hours of the target city on the day to be predicted.

Citation Information

Patent Citations

  • Method for quantizing sunshine duration based on descriptive data of weather forecast

    CN106326191A

  • Sunshine duration-based short-term solar radiation forecast improvement method

    CN115685388A

  • Sunshine duration forecasting method based on multiple modes

    CN120214968A