Microclimate prediction method, system, terminal and storage medium based on physical information multi-task learning
Through the physical information multi-task learning method, a global shared feature extraction skeleton and branch skeleton are constructed, combined with the loss weighted optimization mechanism, which solves the problems of information redundancy and poor generalization ability caused by single-task modeling, realizes efficient collaborative prediction of wind speed, temperature and humidity, and improves the accuracy and efficiency of microclimate prediction.
Patent Information
- Application Number
- CN202510758637.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-09
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2045-06-09
AI Technical Summary
Existing technologies independently predict each meteorological element through single-task modeling, without utilizing the correlation between data, resulting in information redundancy and poor model generalization ability, making it difficult to achieve efficient and coordinated prediction of multiple meteorological elements, resulting in inaccurate climate forecast results.
A physical information-based multi-task learning method is adopted to construct a global shared feature extraction skeleton, a wind speed independent branch skeleton, and a temperature and humidity joint branch skeleton. Combined with the loss weighted optimization mechanism, efficient joint prediction of wind speed, temperature and humidity is performed simultaneously.
It has improved the coordination and consistency of predictions, enhanced the generalization ability of the model, and significantly improved the accuracy and efficiency of microclimate predictions.
Smart Images

Figure CN120276073B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of climate prediction technology, and in particular to a microclimate prediction method, system, terminal and computer-readable storage medium based on physical information multi-task learning. Background Art
[0002] Against the backdrop of rapid urbanization, climate and environmental issues at the block level are becoming increasingly prominent. The wind, temperature, and humidity of a block directly impact residents' thermal comfort, air quality, and building energy consumption. Therefore, accurate and rapid prediction of urban microclimates is crucial for sustainable urban development.
[0003] With the widespread application of artificial intelligence (AI), data-driven machine learning methods are widely used for urban microclimate prediction. However, traditional machine learning methods typically adopt a single-task learning framework, independently modeling a single meteorological factor (e.g., wind speed, temperature, or humidity), predicting each separately and then combining them to produce a comprehensive neighborhood microclimate prediction. However, these methods have the following significant limitations: First, meteorological variables are often strongly physically coupled (e.g., temperature gradients drive airflow, and humidity influences evaporative cooling), making independent modeling prone to overlooking the inherent relationships between variables. Second, parallel training of multiple models requires repeated extraction of similar surface environmental features (e.g., building form, green space distribution), resulting in computational redundancy and reduced real-time prediction capabilities. Third, prediction models constructed using single-task methods struggle to transfer information across tasks, making them less adaptable to the complexities of urban microclimates (e.g., neighborhood differences and extreme weather scenarios).
[0004] Therefore, the existing technology still needs to be improved and developed. Summary of the Invention
[0005] The main purpose of the present invention is to provide a microclimate prediction method, system, terminal and storage medium based on physical information multi-task learning, aiming to solve the problem that the existing technology uses single-task modeling to independently predict each meteorological element, does not utilize the correlation between data, leads to information redundancy and poor model generalization ability, and thus makes it difficult to achieve efficient and coordinated prediction of multiple meteorological elements, resulting in inaccurate climate prediction results.
[0006] To achieve the above objectives, the present invention provides a microclimate prediction method based on physical information multi-task learning, which comprises the following steps:
[0007] Acquire collaborative prediction targets for wind speed, temperature, and humidity tasks, and construct a corresponding microclimate prediction model based on multi-task learning according to the collaborative prediction targets;
[0008] Creating a microclimate training set, and training the microclimate prediction model according to the microclimate training set to obtain a trained microclimate prediction model;
[0009] The spatial characteristic information and the time series meteorological information of the target block are obtained, and the spatial characteristic information and the time series meteorological information are input into the trained microclimate prediction model to obtain the microclimate prediction result of the target block.
[0010] Optionally, the microclimate prediction method based on physical information multi-task learning, wherein the step of obtaining collaborative prediction targets for wind speed, temperature, and humidity tasks, and constructing a corresponding microclimate prediction model based on multi-task learning according to the collaborative prediction targets, specifically includes:
[0011] Obtaining collaborative prediction targets for wind speed tasks, temperature tasks, and humidity tasks, and obtaining common feature extraction requirements for the collaborative prediction targets;
[0012] A global shared feature extraction skeleton is constructed based on the common feature extraction requirements, a wind speed independent branch skeleton is constructed based on the spatial dynamic feature dependency of the wind speed task, and a temperature and humidity joint branch skeleton is constructed based on the highly coupled relationship between the temperature task and the humidity task;
[0013] A model is constructed based on the global shared feature extraction skeleton, the wind speed independent branch skeleton and the temperature and humidity joint branch skeleton to obtain a microclimate prediction model based on multi-task learning.
[0014] Optionally, the microclimate prediction method based on physical information multi-task learning, wherein the creating a microclimate training set, training the microclimate prediction model according to the microclimate training set, and obtaining a trained microclimate prediction model, specifically includes:
[0015] Acquiring historical spatial feature information and historical time-series meteorological information of a plurality of blocks, creating a microclimate training set based on the historical spatial feature information and the historical time-series meteorological information, and inputting a group of microclimate training samples in the microclimate training set into the microclimate prediction model;
[0016] Encoding the target historical spatial feature information of the microclimate training sample to obtain a spatial feature tensor, and extracting the time series features of the target historical time series meteorological information of the microclimate training sample to obtain a time feature tensor;
[0017] fusing the spatial feature tensor and the temporal feature tensor using the global shared feature extraction framework to obtain a joint spatiotemporal feature tensor;
[0018] Reconstructing and restoring the joint spatiotemporal feature tensor through the wind speed independent branch skeleton to obtain a complete wind speed distribution tensor;
[0019] Reconstructing and restoring the joint spatiotemporal feature tensor through the temperature and humidity joint branch skeleton to obtain a complete temperature distribution tensor and a complete humidity distribution tensor;
[0020] Obtaining a microclimate prediction result according to the complete wind speed distribution tensor, the complete temperature distribution tensor, and the complete humidity distribution tensor, performing a loss value calculation on the microclimate prediction result to obtain a target loss value, and modifying parameters of the microclimate prediction model according to the target loss value;
[0021] The next set of microclimate training samples is input into the microclimate prediction model until the training status of the microclimate prediction model meets the preset conditions, thereby obtaining a trained microclimate prediction model.
[0022] Optionally, the microclimate prediction method based on physical information multi-task learning, wherein the reconstructing and restoring the joint spatiotemporal feature tensor by using the wind speed independent branch skeleton to obtain a complete wind speed distribution tensor, specifically includes:
[0023] Performing wind speed collaborative distribution processing and spatial structure perception processing on the joint spatiotemporal feature tensor through the wind speed independent branch skeleton to obtain an initial wind speed tensor;
[0024] The initial wind speed tensor is reconstructed to obtain a target wind speed tensor, and wind speed data of the target wind speed tensor is restored to obtain a complete wind speed distribution tensor.
[0025] Optionally, the microclimate prediction method based on physical information multi-task learning, wherein the reconstructing and restoring the joint spatiotemporal feature tensor by using the temperature and humidity joint branch skeleton to obtain a complete temperature distribution tensor and a complete humidity distribution tensor, specifically includes:
[0026] Extracting features from the joint spatiotemporal feature tensor using the temperature and humidity joint branch skeleton to obtain a temperature and humidity collaborative feature, and performing channel feature perception processing and local feature sensitivity processing on the temperature and humidity collaborative feature to obtain an initial temperature tensor and an initial humidity tensor;
[0027] Performing tensor reconstruction on the initial temperature tensor to obtain a target temperature tensor, and performing temperature data restoration based on the target temperature tensor to obtain a complete temperature distribution tensor;
[0028] The initial humidity tensor is tensor reconstructed to obtain a target humidity tensor, and humidity data is restored according to the target temperature tensor to obtain a complete temperature distribution tensor.
[0029] Optionally, in the microclimate prediction method based on physical information multi-task learning, the step of calculating a loss value on the microclimate prediction result to obtain a target loss value specifically includes:
[0030] Performing task extraction on the microclimate prediction results to obtain target wind speed tasks, target temperature tasks, and target humidity tasks;
[0031] Calculating the wind speed loss value of the target wind speed task to obtain a plurality of wind speed data loss values and a plurality of wind speed physical loss values, and averaging all of the wind speed data loss values and all of the wind speed physical loss values to obtain an average wind speed data loss value and an average wind speed physical loss value;
[0032] Calculating the temperature loss value of the target temperature task to obtain a plurality of temperature data loss values and a plurality of temperature physical loss values, and averaging all of the temperature data loss values and all of the temperature physical loss values to obtain an average temperature data loss value and an average temperature physical loss value;
[0033] Calculating the humidity loss value of the target humidity task to obtain a plurality of humidity data loss values and a plurality of humidity physical loss values, and averaging all of the humidity data loss values and all of the humidity physical loss values to obtain an average humidity data loss value and an average humidity physical loss value;
[0034] weighting the target wind speed task, the target temperature task, and the target humidity task according to the inverse weighting method to obtain a task weight result, wherein the task weight result includes a weight of the wind speed data loss value, a weight of the wind speed physical loss value, a weight of the temperature data loss value, a weight of the temperature physical loss value, a weight of the humidity data loss value, and a weight of the humidity physical loss value;
[0035] According to the task weight result, a joint loss calculation is performed on the average loss value of the wind speed data, the average physical loss value of the wind speed, the average loss value of the temperature data, the average physical loss value of the temperature, the average loss value of the humidity data and the average physical loss value of the humidity to obtain a target loss value.
[0036] Optionally, in the microclimate prediction method based on physical information multi-task learning, the joint loss calculation of the wind speed data average loss value, the wind speed physical average loss value, the temperature data average loss value, the temperature physical average loss value, the humidity data average loss value, and the humidity physical average loss value is performed according to the task weight result, specifically as follows:
[0037] ;
[0038] in, is the target loss value, is the weight of the wind speed data loss value, is the wind speed data loss value, is the weight of the temperature data loss value, is the temperature data loss value, is the weight of the humidity data loss value, is the humidity data loss value, is the weight of the wind speed physical loss value, is the wind speed physical loss value, is the weight of the temperature physical loss value, is the temperature physical loss value, is the weight of the humidity physical loss value, is the humidity physical loss value.
[0039] Optionally, the microclimate prediction method based on physical information multi-task learning, wherein the microclimate prediction system based on physical information multi-task learning includes:
[0040] A model building module is used to obtain the collaborative prediction targets of the wind speed task, temperature task and humidity task, and to build a corresponding microclimate prediction model based on multi-task learning according to the collaborative prediction targets;
[0041] A model training module is used to create a microclimate training set, train the microclimate prediction model according to the microclimate training set, and obtain a trained microclimate prediction model;
[0042] The microclimate prediction module is used to obtain the spatial characteristic information and time series meteorological information of the target block, input the spatial characteristic information and the time series meteorological information into the trained microclimate prediction model, and obtain the microclimate prediction result of the target block.
[0043] In addition, to achieve the above-mentioned purpose, the present invention also provides a terminal, wherein the terminal includes: a memory, a processor, and a microclimate prediction program based on physical information multi-task learning stored in the memory and runnable on the processor. When the microclimate prediction program based on physical information multi-task learning is executed by the processor, the steps of the microclimate prediction method based on physical information multi-task learning as described above are implemented.
[0044] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a microclimate prediction program based on physical information multi-task learning, and when the microclimate prediction program based on physical information multi-task learning is executed by a processor, the steps of the microclimate prediction method based on physical information multi-task learning as described above are implemented.
[0045] In the present invention, the collaborative prediction targets of the wind speed task, the temperature task, and the humidity task are obtained, and a corresponding microclimate prediction model based on multi-task learning is constructed according to the collaborative prediction targets; a microclimate training set is created, and the microclimate prediction model is trained according to the microclimate training set to obtain a trained microclimate prediction model; the spatial feature information and time series meteorological information of the target block are obtained, and the spatial feature information and the time series meteorological information are input into the trained microclimate prediction model to obtain the microclimate prediction result of the target block. The present invention proposes a collaborative prediction framework based on a multi-task learning mechanism. By constructing a hierarchical and shared multi-task architecture and a physical consistency loss function, and adopting a loss-weighted optimization mechanism, it can simultaneously and efficiently jointly predict the three types of microclimate elements of wind speed, temperature, and humidity, which not only improves the coordination and consistency of the prediction, but also enhances the generalization ability of the model while improving the prediction accuracy and efficiency, and significantly improves the overall prediction effect of the microclimate prediction model. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 It is a flow chart of a preferred embodiment of the microclimate prediction method based on physical information multi-task learning of the present invention;
[0047] Figure 2 Schematic diagram of a multi-task prediction block microclimate framework in a preferred embodiment of the present invention;
[0048] Figure 3 Schematic diagram of a microclimate prediction model in a preferred embodiment of the present invention;
[0049] Figure 4 1 is a schematic diagram of the loss function setting process in a preferred embodiment of the present invention;
[0050] Figure 5 1 is a structural diagram of a preferred embodiment of a microclimate prediction system based on physical information multi-task learning according to the present invention;
[0051] Figure 6 Schematic diagram of the operating environment of a preferred embodiment of the terminal of the present invention. DETAILED DESCRIPTION
[0052] In order to make the purpose, technical solutions and advantages of the present invention more clear and distinct, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0053] It should be noted that if the embodiments of the present invention involve directional indications (such as up, down, left, right, front, back, etc.), such directional indications are only used to explain the relative position relationship, movement status, etc. between the various components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0054] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present invention, the descriptions of "first", "second", etc. are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features specified as "first" and "second" may explicitly or implicitly include at least one of such features. In addition, the technical solutions between the various embodiments can be combined with each other, but this must be based on the fact that ordinary technicians in this field can implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0055] The microclimate prediction method based on physical information multi-task learning described in the preferred embodiment of the present invention is as follows: Figure 1 As shown, the microclimate prediction method based on physical information multi-task learning includes the following steps:
[0056] Step S10: Acquire collaborative prediction targets for the wind speed task, the temperature task, and the humidity task, and construct a corresponding microclimate prediction model based on multi-task learning according to the collaborative prediction targets.
[0057] Specifically, in an embodiment of the present invention, in order to solve the problem that traditional single-task modeling independently predicts each meteorological element, the correlation between data is not utilized, resulting in information redundancy and poor model generalization ability, and it is often difficult to achieve efficient and collaborative prediction of multiple meteorological elements; multi-task learning can consider the inherent coupling relationship between various types of meteorological data and use it as an inductive bias to improve the generalization ability of the model while maintaining good training efficiency; therefore, the present invention takes into account that the wind speed task is mainly affected by spatial dynamic characteristics such as building layout, ventilation corridors and street density at the block scale, while the temperature task and humidity task are jointly regulated by thermal and hygrodynamic mechanisms such as surface radiation, evaporative cooling and vegetation cover. The three tasks have different degrees of task correlation in the urban microclimate system. A partially shared hierarchical multi-task urban microclimate prediction framework is designed for the collaborative prediction of wind speed, temperature and humidity at the urban block scale. According to the feature differences between wind speed and temperature and humidity tasks, differentiated sharing strategies are designed to avoid information interference and negative transfer between tasks, so as to achieve more efficient joint prediction capabilities, such as Figure 2 As shown in the figure, the framework as a whole consists of three modules: global shared layer, wind speed independent branch and temperature and humidity joint branch.
[0058] In the embodiment of the present invention, the framework is constructed based on the convolutional neural network Inception, so as to construct the corresponding microclimate prediction model. The specific architecture diagram is as follows: Figure 3 As shown, the microclimate prediction model is obtained by training, specifically, obtaining the collaborative prediction targets of wind speed task, temperature task and humidity task, and obtaining the common feature extraction requirements of the collaborative prediction targets; constructing a global shared feature extraction skeleton according to the common feature extraction requirements, wherein the global shared feature extraction skeleton corresponds to the global shared layer, and the global shared layer is composed of a backbone initial module and multiple stacked multi-branch convolution modules, and combined with the downsampling layer for spatial dimension control to form a global shared feature extraction skeleton for extracting the common feature expression between the three tasks of wind speed, temperature and humidity. The backbone initial module extracts low-order spatial features at the block scale through multi-scale convolution and pooling operations to compress the input dimension, smooth the noise channel, and provide stable and normalized input features for subsequent multi-branch convolution modules; multi-branch convolution module stacking: extracting spatial features at different scales through parallel convolution kernels of different sizes; the dimensionality reduction module is used to gradually compress the spatial resolution and expand the receptive field to enhance the expression ability of the overall regional climate pattern.
[0059] The present invention takes into account the high dependence of wind speed prediction on spatial dynamic characteristics such as building layout and street ventilation corridors. The model designs a dedicated independent branch for the wind speed task after the shared layer, that is, a wind speed independent branch skeleton is constructed according to the spatial dynamic characteristic dependency of the wind speed task, including a spatial attention module, a three-dimensional residual block stacking and a channel-space joint attention module. Among them, the spatial attention module is to enhance the responsiveness to local ventilation structures; the three-dimensional residual block stacking is to capture the coordinated distribution characteristics of wind speed in the three dimensions of time, space and height; the channel-space joint attention module is to integrate the attention mechanisms of the spatial and channel dimensions to enhance the perception of wind speed-related spatial structures.
[0060] The present invention also takes into account the high coupling of temperature and humidity in the thermal-humidity physical mechanism. The model designs a combination of a temperature-humidity sharing structure and task-specific branches, that is, a temperature-humidity joint branch skeleton is constructed according to the highly coupled relationship between the temperature task and the humidity task, including a temperature-humidity sharing layer, a temperature task branch and a humidity task branch. The temperature-humidity sharing layer extracts temperature-humidity collaborative features through a three-dimensional residual block and an SE (Squeeze and Excitation, channel attention) module; the temperature task branch skeleton adopts a channel attention module to highlight the attention to channel features such as surface radiation and building materials; the humidity task branch skeleton adopts a spatial attention module to enhance the sensitivity of the humidity task to local features such as spatial vegetation and water body distribution; and the model is constructed based on the global shared feature extraction skeleton, the wind speed independent branch skeleton and the temperature-humidity joint branch skeleton to obtain a microclimate prediction model based on multi-task learning.
[0061] Step S20: creating a microclimate training set, and training the microclimate prediction model according to the microclimate training set to obtain a trained microclimate prediction model.
[0062] Specifically, after obtaining the microclimate prediction model, the microclimate prediction model needs to be trained. The specific training process is to obtain the historical spatial feature information and historical time-series meteorological information of multiple blocks, create a microclimate training set based on the historical spatial feature information and the historical time-series meteorological information, and input a group of microclimate training samples in the microclimate training set into the microclimate prediction model, wherein the microclimate training samples include target historical spatial feature information and target historical time-series meteorological information. The target historical spatial feature information includes variables such as building form, surface type, vegetation cover, and underlying surface material at the block scale, which comes from remote sensing images or urban building databases. After encoding, it constitutes a three-dimensional data tensor (i.e., spatial feature tensor) with dimensions of [H, W, Z], wherein H and W both represent plane space dimensions, and Z represents vertical space dimensions; the target historical time-series meteorological information is the wind speed history record, temperature history record, and humidity history record within the corresponding time window (for example, 24 hours), which serves as the time series input information for the prediction of the three tasks. To improve efficiency, a one-dimensional convolution module is used to perform channel compression and temporal feature extraction to generate a time feature tensor with a shape of [B, 1, T], where B represents the sample batch size and T represents the time step; then, the spatial feature tensor and the time feature tensor are input into the global shared layer, which expands the time feature tensor output by the one-dimensional convolution to [B, 1, H′, W′, T] through a broadcast mechanism, where H′ and W′ are both spatial dimensions after downsampling; and multiplies the spatial feature tensor element by element to generate a joint spatiotemporal feature tensor with a shape of [B, Cs, H′, W′, T], where Cs represents the number of channels in the intermediate feature tensor, is a feature dimension automatically extracted in the network, does not directly represent the physical meaning, is determined by the model structure, and is a hyperparameter in the model design. The joint spatiotemporal feature tensor serves as the shared input of the three task branches at the same time.
[0063] The wind speed independent branch skeleton is used to perform wind speed collaborative distribution processing and spatial structure perception processing on the joint spatiotemporal feature tensor respectively to obtain an initial wind speed tensor with a shape of [P, Q, C, Z, T], where P and Q are the number of local blocks, C is the number of channels, and is the dimension of the physical quantity in the output tensor. For the wind speed task, C=3, indicating the three directional component speeds of the wind speed; the initial wind speed tensor is reconstructed to obtain a target wind speed tensor, and the target wind speed tensor is reconstructed and restored to obtain a complete wind speed distribution tensor with a shape of [H, W, C, Z, T]. The joint spatiotemporal feature tensor is extracted through the temperature and humidity joint branch skeleton to obtain the temperature and humidity collaborative feature, and the temperature and humidity collaborative feature is processed by channel feature perception and local feature sensitivity respectively to obtain the initial temperature tensor and the initial humidity tensor; the initial temperature tensor is reconstructed to obtain the target temperature tensor, and the target temperature tensor is reconstructed and restored to obtain a complete temperature distribution tensor with a shape of [H, W, C, Z, T], where C=1 for the temperature task; the initial humidity tensor is reconstructed to obtain the target humidity tensor, and the target humidity tensor is reconstructed and restored to obtain a complete humidity distribution tensor with a shape of [H, W, C, Z, T], where C=1 for the humidity task.
[0064] Afterwards, the microclimate prediction result is obtained according to the complete wind speed distribution tensor, the complete temperature distribution tensor and the complete humidity distribution tensor, and the loss value of the microclimate prediction result is calculated to obtain the target loss value, specifically, because in the multi-task learning framework, the loss values of different tasks usually show different dimensional and scale characteristics. This inconsistency of loss scale is particularly significant in multivariate regression tasks, especially when it involves wind speed. ,temperature and humidity When performing prediction tasks with different physical units, if the multi-task losses are directly weighted without weighting or with equal weights, it is easy to cause the task with a larger loss magnitude to dominate the entire training process, so that the gradient contribution of other tasks in the back propagation is weakened, further causing the model to overfit or underfit some tasks. Therefore, in this embodiment of the present invention, an inverse weighting strategy based on initial loss estimation is proposed. By = 10 batches, is the number of initial batches, indicating the number of batches used to calculate the average initial loss) monitors the magnitude difference of each task's loss. The weight of each task is dynamically determined by the inverse of its initial training loss value to balance the contribution of different tasks to the overall loss function. Total loss (i.e. target loss value) L for: , ;in, For thek The weighting coefficient of each task, For the k The loss function of each task, For the k The average loss of tasks in the initial stage, K is the total number of tasks, where K = 3 (i.e. wind speed task, temperature task and humidity task), and then the physical loss item is The loss function construction is introduced to constrain the model prediction results to satisfy the wind-temperature and temperature-humidity relationships in the physical process, thereby improving the physical rationality of the prediction.
[0065] The final loss function determination step is as follows: Figure 4 As shown, specifically, before training the model The data loss values and physical loss values of the three tasks of wind speed, temperature and humidity are calculated separately in batches. The task extraction is performed on the microclimate prediction results to obtain the target wind speed task, target temperature task and target humidity task. The wind speed loss value of the target wind speed task is calculated to obtain multiple wind speed data loss values (denoted as ,in, t= 1, 2, ..., , t is the time step) and multiple wind speed physical loss values (denoted as ), calculate the temperature loss value of the target temperature task, and obtain multiple temperature data loss values (denoted as ) and multiple temperature physical loss values (denoted as ), calculate the humidity loss value of the target humidity task, and obtain multiple humidity data loss values (denoted as ) and multiple humidity physical loss values (denoted as ); Then, the average loss in the initial stage is calculated, that is, all the wind speed data loss values and all the wind speed physical loss values are averaged to obtain the average wind speed data loss value (denoted as ) and the average physical loss value of wind speed (denoted as ); Calculate the average of all the temperature data loss values and all the temperature physical loss values respectively to obtain the average temperature data loss value (denoted as ) and the average temperature physical loss value (denoted as ); Calculate the average of all the humidity data loss values and all the humidity physical loss values respectively to obtain the average humidity data loss value (denoted as ) and the average physical loss of humidity (denoted as ).
[0066] Afterwards, the target wind speed task, the target temperature task and the target humidity task are weighted according to the inverse weighting method to obtain the task weight result, wherein the task weight result includes the weight of the wind speed data loss value (using ), the weight of the temperature data loss value (expressed by ), the weight of the temperature physical loss value (expressed by ), the weight of the wind speed physical loss value (expressed by ), the weight of the humidity data loss value (expressed by ) and the weight of the humidity physical loss value (expressed by Specifically, , , , , , According to the task weight result, the wind speed data average loss value, the wind speed physical average loss value, the temperature data average loss value, the temperature physical average loss value, the humidity data average loss value and the humidity physical average loss value are jointly calculated to obtain the target loss value (using L The specific calculation process is: ; and modify the parameters of the microclimate prediction model according to the target loss value.
[0067] The next set of microclimate training samples is input into the microclimate prediction model, and the above process is repeated, which will not be repeated here; until the training of the microclimate prediction model meets the preset conditions, which include the number of training times reaching the preset number. The preset requirements can be determined according to the microclimate prediction model, which will not be detailed here, and finally a trained microclimate prediction model is obtained.
[0068] Step S30: Acquire spatial feature information and time-series meteorological information of the target block, input the spatial feature information and the time-series meteorological information into the trained microclimate prediction model, and obtain a microclimate prediction result of the target block.
[0069] Specifically, in an embodiment of the present invention, it is necessary to predict the microclimate of the target block, specifically, to obtain the spatial feature information and time series meteorological information of the target block, input the spatial feature information and the time series meteorological information into the trained microclimate prediction model, and obtain the target block microclimate prediction result, wherein the target block microclimate prediction result includes the wind speed prediction result, temperature prediction result and humidity prediction result of the target block; by breaking through the limitations of traditional single-task independent modeling, the present invention designs and implements a collaborative prediction framework based on a multi-task learning mechanism for the first time in a block-scale microclimate prediction scenario, which can simultaneously predict the three types of microclimate requirements of wind speed, temperature and humidity. The proposed method can efficiently joint predict the wind speed, temperature and humidity of the three tasks, significantly reduce model redundancy and training costs, and improve the coordination and consistency of predictions. In view of the differences in the correlation between wind speed and temperature-humidity tasks in physical mechanisms, a partially shared hierarchical multi-task architecture is proposed to alleviate the negative transfer problem in the traditional multi-task hard sharing structure and improve the joint prediction accuracy of wind speed, temperature and humidity tasks. In order to solve the problem of imbalanced multi-task loss scales, an inverse weighting mechanism based on initial loss estimation is proposed. The loss level of each task is monitored at the beginning of training. The static weighting coefficient is determined by the inverse of the loss value to balance the contribution of each task to the total loss, thereby improving the gradient balance problem of the model during multi-task training.
[0070] Furthermore, if Figure 5 As shown, based on the above-mentioned microclimate prediction method based on physical information multi-task learning, the present invention also provides a microclimate prediction system based on physical information multi-task learning, wherein the microclimate prediction system based on physical information multi-task learning includes:
[0071] A model building module 51 is used to obtain collaborative prediction targets for wind speed tasks, temperature tasks, and humidity tasks, and to build a corresponding microclimate prediction model based on multi-task learning according to the collaborative prediction targets;
[0072] The model training module 52 is used to create a microclimate training set, train the microclimate prediction model according to the microclimate training set, and obtain a trained microclimate prediction model;
[0073] The microclimate prediction module 53 is used to obtain spatial feature information and time series meteorological information of the target block, input the spatial feature information and the time series meteorological information into the trained microclimate prediction model, and obtain the microclimate prediction result of the target block.
[0074] Furthermore, if Figure 6 As shown, based on the above-mentioned microclimate prediction method based on physical information multi-task learning, the present invention also provides a terminal, which includes a processor 10, a memory 20 and a display 30. Figure 6Only some of the components of the terminal are shown, but it should be understood that implementation of all of the shown components is not required, and more or fewer components may be implemented instead.
[0075] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as a hard disk or memory of the terminal. In other embodiments, the memory 20 may also be an external storage device of the terminal, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal. Furthermore, the memory 20 may also include both an internal storage unit of the terminal and an external storage device. The memory 20 is used to store application software and various types of data installed on the terminal, such as program codes of the installation terminal. The memory 20 may also be used to temporarily store data that has been output or is to be output. In one embodiment, a microclimate prediction program 40 based on physical information multi-task learning is stored on the memory 20. The microclimate prediction program 40 based on physical information multi-task learning can be executed by the processor 10, thereby realizing the microclimate prediction method based on physical information multi-task learning in this application.
[0076] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor, or other data processing chip, configured to execute program code or process data stored in the memory 20, such as executing the microclimate prediction method based on multi-task learning of physical information.
[0077] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. The display 30 is used to display information on the terminal and to display a visual user interface. The components of the terminal communicate with each other via a system bus.
[0078] In one embodiment, when the processor 10 executes the microclimate prediction program 40 based on physical information multi-task learning in the memory 20, the following steps are implemented:
[0079] Acquire collaborative prediction targets for wind speed, temperature, and humidity tasks, and construct a corresponding microclimate prediction model based on multi-task learning according to the collaborative prediction targets;
[0080] Creating a microclimate training set, and training the microclimate prediction model according to the microclimate training set to obtain a trained microclimate prediction model;
[0081] The spatial characteristic information and the time series meteorological information of the target block are obtained, and the spatial characteristic information and the time series meteorological information are input into the trained microclimate prediction model to obtain the microclimate prediction result of the target block.
[0082] The step of obtaining the collaborative prediction targets of the wind speed task, the temperature task, and the humidity task, and constructing a corresponding microclimate prediction model based on multi-task learning according to the collaborative prediction targets, specifically includes:
[0083] Obtaining collaborative prediction targets for wind speed tasks, temperature tasks, and humidity tasks, and obtaining common feature extraction requirements for the collaborative prediction targets;
[0084] A global shared feature extraction skeleton is constructed based on the common feature extraction requirements, a wind speed independent branch skeleton is constructed based on the spatial dynamic feature dependency of the wind speed task, and a temperature and humidity joint branch skeleton is constructed based on the highly coupled relationship between the temperature task and the humidity task;
[0085] A model is constructed based on the global shared feature extraction skeleton, the wind speed independent branch skeleton and the temperature and humidity joint branch skeleton to obtain a microclimate prediction model based on multi-task learning.
[0086] The step of creating a microclimate training set and training the microclimate prediction model according to the microclimate training set to obtain a trained microclimate prediction model specifically includes:
[0087] Acquiring historical spatial feature information and historical time-series meteorological information of a plurality of blocks, creating a microclimate training set based on the historical spatial feature information and the historical time-series meteorological information, and inputting a group of microclimate training samples in the microclimate training set into the microclimate prediction model;
[0088] Encoding the target historical spatial feature information of the microclimate training sample to obtain a spatial feature tensor, and extracting the time series features of the target historical time series meteorological information of the microclimate training sample to obtain a time feature tensor;
[0089] fusing the spatial feature tensor and the temporal feature tensor using the global shared feature extraction framework to obtain a joint spatiotemporal feature tensor;
[0090] Reconstructing and restoring the joint spatiotemporal feature tensor through the wind speed independent branch skeleton to obtain a complete wind speed distribution tensor;
[0091] Reconstructing and restoring the joint spatiotemporal feature tensor through the temperature and humidity joint branch skeleton to obtain a complete temperature distribution tensor and a complete humidity distribution tensor;
[0092] Obtaining a microclimate prediction result according to the complete wind speed distribution tensor, the complete temperature distribution tensor, and the complete humidity distribution tensor, performing a loss value calculation on the microclimate prediction result to obtain a target loss value, and modifying parameters of the microclimate prediction model according to the target loss value;
[0093] The next set of microclimate training samples is input into the microclimate prediction model until the training status of the microclimate prediction model meets the preset conditions, thereby obtaining a trained microclimate prediction model.
[0094] The reconstructing and restoring of the joint spatiotemporal feature tensor by using the wind speed independent branch skeleton to obtain a complete wind speed distribution tensor specifically includes:
[0095] Performing wind speed collaborative distribution processing and spatial structure perception processing on the joint spatiotemporal feature tensor through the wind speed independent branch skeleton to obtain an initial wind speed tensor;
[0096] The initial wind speed tensor is reconstructed to obtain a target wind speed tensor, and wind speed data of the target wind speed tensor is restored to obtain a complete wind speed distribution tensor.
[0097] The reconstructing and restoring of the joint spatiotemporal feature tensor by the temperature and humidity joint branch skeleton to obtain a complete temperature distribution tensor and a complete humidity distribution tensor specifically includes:
[0098] Extracting features from the joint spatiotemporal feature tensor using the temperature and humidity joint branch skeleton to obtain a temperature and humidity collaborative feature, and performing channel feature perception processing and local feature sensitivity processing on the temperature and humidity collaborative feature to obtain an initial temperature tensor and an initial humidity tensor;
[0099] Performing tensor reconstruction on the initial temperature tensor to obtain a target temperature tensor, and performing temperature data restoration based on the target temperature tensor to obtain a complete temperature distribution tensor;
[0100] The initial humidity tensor is tensor reconstructed to obtain a target humidity tensor, and humidity data is restored according to the target temperature tensor to obtain a complete humidity distribution tensor.
[0101] The step of calculating the loss value of the microclimate prediction result to obtain the target loss value specifically includes:
[0102] Performing task extraction on the microclimate prediction results to obtain target wind speed tasks, target temperature tasks, and target humidity tasks;
[0103] Calculating the wind speed loss value of the target wind speed task to obtain a plurality of wind speed data loss values and a plurality of wind speed physical loss values, and averaging all of the wind speed data loss values and all of the wind speed physical loss values to obtain an average wind speed data loss value and an average wind speed physical loss value;
[0104] Calculating the temperature loss value of the target temperature task to obtain a plurality of temperature data loss values and a plurality of temperature physical loss values, and averaging all of the temperature data loss values and all of the temperature physical loss values to obtain an average temperature data loss value and an average temperature physical loss value;
[0105] Calculating the humidity loss value of the target humidity task to obtain a plurality of humidity data loss values and a plurality of humidity physical loss values, and averaging all of the humidity data loss values and all of the humidity physical loss values to obtain an average humidity data loss value and an average humidity physical loss value;
[0106] weighting the target wind speed task, the target temperature task, and the target humidity task according to the inverse weighting method to obtain a task weight result, wherein the task weight result includes a weight of the wind speed data loss value, a weight of the wind speed physical loss value, a weight of the temperature data loss value, a weight of the temperature physical loss value, a weight of the humidity data loss value, and a weight of the humidity physical loss value;
[0107] According to the task weight result, a joint loss calculation is performed on the average loss value of the wind speed data, the average physical loss value of the wind speed, the average loss value of the temperature data, the average physical loss value of the temperature, the average loss value of the humidity data and the average physical loss value of the humidity to obtain a target loss value.
[0108] The joint loss calculation of the wind speed data average loss value, the wind speed physical average loss value, the temperature data average loss value, the temperature physical average loss value, the humidity data average loss value, and the humidity physical average loss value is performed according to the task weight result, specifically:
[0109] ;
[0110] in, is the target loss value, is the weight of the wind speed data loss value, is the wind speed data loss value, is the weight of the temperature data loss value, is the temperature data loss value, is the weight of the humidity data loss value, is the humidity data loss value, is the weight of the wind speed physical loss value, is the wind speed physical loss value, is the weight of the temperature physical loss value, is the temperature physical loss value, is the weight of the humidity physical loss value, is the humidity physical loss value.
[0111] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a microclimate prediction program based on physical information multi-task learning, and when the microclimate prediction program based on physical information multi-task learning is executed by a processor, the steps of the microclimate prediction method based on physical information multi-task learning as described above are implemented.
[0112] In summary, the present invention provides a microclimate prediction method, system, terminal, and storage medium based on physical information multi-task learning. The method includes: obtaining collaborative prediction targets for wind speed tasks, temperature tasks, and humidity tasks, and constructing a corresponding microclimate prediction model based on multi-task learning according to the collaborative prediction targets; creating a microclimate training set, training the microclimate prediction model according to the microclimate training set, and obtaining a trained microclimate prediction model; obtaining spatial feature information and time-series meteorological information of the target block, inputting the spatial feature information and the time-series meteorological information into the trained microclimate prediction model, and obtaining a microclimate prediction result for the target block. The present invention proposes a collaborative prediction framework based on a multi-task learning mechanism. By constructing a hierarchical and shared multi-task architecture and a physical consistency loss function, and adopting a loss-weighted optimization mechanism, it is possible to simultaneously and efficiently jointly predict three types of microclimate elements: wind speed, temperature, and humidity. This not only improves the coordination and consistency of the prediction, but also enhances the generalization ability of the model while improving the prediction accuracy and efficiency, significantly improving the overall prediction effect of the microclimate prediction model.
[0113] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or terminal comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or terminal. In the absence of further limitations, an element defined by the phrase "comprising a..." does not preclude the presence of other identical elements in the process, method, article, or terminal comprising the element.
[0114] Of course, those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing related hardware (such as a processor, controller, etc.) through a computer program. The program can be stored in a computer-readable storage medium that can be read by a computer. When executed, the program can include the processes in the above-described method embodiments. The computer-readable storage medium can be a memory, a magnetic disk, an optical disk, etc.
[0115] It should be understood that the application of the present invention is not limited to the above examples. For those skilled in the art, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.
Claims
1. A microclimate prediction method based on physical information multi-task learning, characterized in that: The microclimate prediction method based on physical information multi-task learning includes: Acquire collaborative prediction targets for wind speed, temperature, and humidity tasks, and construct a corresponding microclimate prediction model based on multi-task learning according to the collaborative prediction targets; The step of obtaining collaborative prediction targets for wind speed, temperature, and humidity tasks, and constructing a corresponding microclimate prediction model based on multi-task learning according to the collaborative prediction targets, specifically includes: Obtaining collaborative prediction targets for wind speed tasks, temperature tasks, and humidity tasks, and obtaining common feature extraction requirements for the collaborative prediction targets; A global shared feature extraction skeleton is constructed based on the common feature extraction requirements, a wind speed independent branch skeleton is constructed based on the spatial dynamic feature dependency of the wind speed task, and a temperature and humidity joint branch skeleton is constructed based on the highly coupled relationship between the temperature task and the humidity task; A model is constructed based on the global shared feature extraction skeleton, the wind speed independent branch skeleton, and the temperature and humidity joint branch skeleton to obtain a microclimate prediction model based on multi-task learning; Creating a microclimate training set, and training the microclimate prediction model according to the microclimate training set to obtain a trained microclimate prediction model; The spatial characteristic information and the time series meteorological information of the target block are obtained, and the spatial characteristic information and the time series meteorological information are input into the trained microclimate prediction model to obtain the microclimate prediction result of the target block.
2. The microclimate prediction method based on physical information multi-task learning according to claim 1 is characterized in that: The creating of the microclimate training set and training the microclimate prediction model according to the microclimate training set to obtain the trained microclimate prediction model specifically includes: Acquiring historical spatial feature information and historical time-series meteorological information of a plurality of blocks, creating a microclimate training set based on the historical spatial feature information and the historical time-series meteorological information, and inputting a group of microclimate training samples in the microclimate training set into the microclimate prediction model; Encoding the target historical spatial feature information of the microclimate training sample to obtain a spatial feature tensor, and extracting the time series features of the target historical time series meteorological information of the microclimate training sample to obtain a time feature tensor; fusing the spatial feature tensor and the temporal feature tensor using the global shared feature extraction framework to obtain a joint spatiotemporal feature tensor; Reconstructing and restoring the joint spatiotemporal feature tensor through the wind speed independent branch skeleton to obtain a complete wind speed distribution tensor; Reconstructing and restoring the joint spatiotemporal feature tensor through the temperature and humidity joint branch skeleton to obtain a complete temperature distribution tensor and a complete humidity distribution tensor; Obtaining a microclimate prediction result according to the complete wind speed distribution tensor, the complete temperature distribution tensor, and the complete humidity distribution tensor, performing a loss value calculation on the microclimate prediction result to obtain a target loss value, and modifying parameters of the microclimate prediction model according to the target loss value; The next set of microclimate training samples is input into the microclimate prediction model until the training status of the microclimate prediction model meets the preset conditions, thereby obtaining a trained microclimate prediction model.
3. The microclimate prediction method based on physical information multi-task learning according to claim 2 is characterized in that: The reconstructing and restoring the joint spatiotemporal feature tensor by using the wind speed independent branch skeleton to obtain a complete wind speed distribution tensor specifically includes: Performing wind speed collaborative distribution processing and spatial structure perception processing on the joint spatiotemporal feature tensor through the wind speed independent branch skeleton to obtain an initial wind speed tensor; The initial wind speed tensor is reconstructed to obtain a target wind speed tensor, and wind speed data of the target wind speed tensor is restored to obtain a complete wind speed distribution tensor.
4. The microclimate prediction method based on physical information multi-task learning according to claim 2 is characterized in that: The reconstructing and restoring the joint spatiotemporal feature tensor by using the temperature and humidity joint branch skeleton to obtain a complete temperature distribution tensor and a complete humidity distribution tensor specifically includes: Extracting features from the joint spatiotemporal feature tensor using the temperature and humidity joint branch skeleton to obtain a temperature and humidity collaborative feature, and performing channel feature perception processing and local feature sensitivity processing on the temperature and humidity collaborative feature to obtain an initial temperature tensor and an initial humidity tensor; Performing tensor reconstruction on the initial temperature tensor to obtain a target temperature tensor, and performing temperature data restoration based on the target temperature tensor to obtain a complete temperature distribution tensor; The initial humidity tensor is tensor reconstructed to obtain a target humidity tensor, and humidity data is restored according to the target temperature tensor to obtain a complete humidity distribution tensor.
5. The microclimate prediction method based on physical information multi-task learning according to claim 2, characterized in that: Calculating the loss value of the microclimate prediction result to obtain a target loss value specifically includes: Performing task extraction on the microclimate prediction results to obtain target wind speed tasks, target temperature tasks, and target humidity tasks; Calculating the wind speed loss value of the target wind speed task to obtain a plurality of wind speed data loss values and a plurality of wind speed physical loss values, and averaging all of the wind speed data loss values and all of the wind speed physical loss values to obtain an average wind speed data loss value and an average wind speed physical loss value; Calculating the temperature loss value of the target temperature task to obtain a plurality of temperature data loss values and a plurality of temperature physical loss values, and averaging all of the temperature data loss values and all of the temperature physical loss values to obtain an average temperature data loss value and an average temperature physical loss value; Calculating the humidity loss value of the target humidity task to obtain a plurality of humidity data loss values and a plurality of humidity physical loss values, and averaging all of the humidity data loss values and all of the humidity physical loss values to obtain an average humidity data loss value and an average humidity physical loss value; weighting the target wind speed task, the target temperature task, and the target humidity task according to the inverse weighting method to obtain a task weight result, wherein the task weight result includes a weight of the wind speed data loss value, a weight of the wind speed physical loss value, a weight of the temperature data loss value, a weight of the temperature physical loss value, a weight of the humidity data loss value, and a weight of the humidity physical loss value; According to the task weight result, a joint loss calculation is performed on the average loss value of the wind speed data, the average physical loss value of the wind speed, the average loss value of the temperature data, the average physical loss value of the temperature, the average loss value of the humidity data and the average physical loss value of the humidity to obtain a target loss value.
6. The microclimate prediction method based on physical information multi-task learning according to claim 5, characterized in that: The joint loss calculation of the wind speed data average loss value, the wind speed physical average loss value, the temperature data average loss value, the temperature physical average loss value, the humidity data average loss value, and the humidity physical average loss value is performed according to the task weight result, specifically as follows: ; in, is the target loss value, is the weight of the wind speed data loss value, is the wind speed data loss value, is the weight of the temperature data loss value, is the temperature data loss value, is the weight of the humidity data loss value, is the humidity data loss value, is the weight of the wind speed physical loss value, is the wind speed physical loss value, is the weight of the temperature physical loss value, is the temperature physical loss value, is the weight of the humidity physical loss value, is the humidity physical loss value.
7. A microclimate prediction system based on physical information multi-task learning, characterized by: The microclimate prediction system based on physical information multi-task learning is applied to the microclimate prediction method based on physical information multi-task learning according to any one of claims 1 to 6, and the microclimate prediction system based on physical information multi-task learning includes: A model building module is used to obtain the collaborative prediction targets of the wind speed task, temperature task and humidity task, and to build a corresponding microclimate prediction model based on multi-task learning according to the collaborative prediction targets; A model training module is used to create a microclimate training set, train the microclimate prediction model according to the microclimate training set, and obtain a trained microclimate prediction model; The microclimate prediction module is used to obtain the spatial characteristic information and time series meteorological information of the target block, input the spatial characteristic information and the time series meteorological information into the trained microclimate prediction model, and obtain the microclimate prediction result of the target block.
8. A terminal, characterized in that: The terminal includes: a memory, a processor, and a microclimate prediction program based on physical information multi-task learning stored in the memory and runnable on the processor. When the microclimate prediction program based on physical information multi-task learning is executed by the processor, the steps of the microclimate prediction method based on physical information multi-task learning according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a microclimate prediction program based on physical information multi-task learning. When the microclimate prediction program based on physical information multi-task learning is executed by a processor, the steps of the microclimate prediction method based on physical information multi-task learning are implemented as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Wind speed probability prediction method and device, equipment and storage medium
CN114298444A
Training method and application method of wind speed space-time prediction network and electronic equipment
CN115099318A
Multitask learning meteorological element prediction method based on LSTM-GAN
CN119395789A