Microclimate prediction method and system based on physical information multi-task learning, terminal and storage medium
Through the method of multi-task learning based on physical information, a global sharing and branching skeleton is built, combined with loss weighted optimization, the coordinated prediction of wind speed, temperature and humidity is achieved, and the problems of information redundancy and poor generalization capabilities caused by single task modeling are solved, improving the accuracy and efficiency of microclimate prediction.
Patent Information
- Application Number
- CN202510758637.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-09
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2045-06-09
AI Technical Summary
The existing technology independently predicts each meteorological element through single task modeling, without using the correlation between data, resulting in poor information redundancy and model generalization capabilities, making it difficult to achieve efficient and coordinated prediction of multiple meteorological elements, resulting in inaccurate climate prediction results.
Using a multi-task learning method based on physical information, a global shared feature extraction skeleton, a wind speed independent branch skeleton, and a temperature and humidity joint branch skeleton are constructed, combined with a loss weighted optimization mechanism, and synchronous prediction of wind speed, temperature and humidity are carried out.
It improves the synergy and consistency of predictions, enhances the generalization ability of the model, and significantly improves the overall prediction effect of the microclimate prediction model.
Smart Images

Figure CN120276073A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of climate prediction, and in particular to a microclimate prediction method, system, terminal and computer-readable storage medium based on physics-informed multi-task learning. Background Art
[0002] Under the background of the rapid development of urbanization, the climate environment problems at the urban block level are becoming increasingly prominent. The wind, temperature and humidity environments of the blocks directly affect the thermal comfort of residents, air quality and building energy consumption. Therefore, accurately and quickly predicting the urban microclimate is crucial for sustainable urban development.
[0003] With the wide application of artificial intelligence, data-driven machine learning methods have been widely used in urban microclimate prediction. However, traditional machine learning methods usually adopt a single-task learning framework, that is, independent modeling is carried out for a single meteorological element (for example, wind speed, temperature or humidity), and after separate predictions, they are combined to obtain the complete block microclimate prediction result. But there are the following obvious limitations: First, there is a strong physical coupling among meteorological variables (for example, temperature gradient drives air flow movement, humidity affects the evaporation cooling effect), and independent modeling is likely to ignore the internal relationship between variables; Second, repeated extraction of similar surface environment features (for example, building form, green space distribution) is required for parallel training of multiple models, resulting in computational redundancy and reducing the real-time prediction ability; Third, the prediction models constructed by single-task methods are difficult to achieve cross-task information transfer, and the models are insufficiently adaptable when facing the complexity of urban microclimate (for example, differences between blocks, extreme meteorological 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 physics-informed multi-task learning, aiming to solve the problem that the existing technology independently predicts each meteorological element through single-task modeling, without using the association between data, resulting in information redundancy and poor model generalization ability, thus making it difficult to achieve efficient and collaborative prediction of multiple meteorological elements and resulting in inaccurate climate prediction results.
[0006] To achieve the above object, the present invention provides a microclimate prediction method based on physics-informed multi-task learning. The microclimate prediction method based on physics-informed multi-task learning includes the following steps: Obtain the collaborative prediction targets of the wind speed task, temperature task and humidity task, and construct a corresponding microclimate prediction model based on multi-task learning according to the collaborative prediction targets; Create a microclimate training set, and train the microclimate prediction model according to the microclimate training set to obtain a trained microclimate prediction model; Obtain the spatial feature information and temporal meteorological information of the target block, and input the spatial feature information and the temporal meteorological information into the trained microclimate prediction model to obtain the microclimate prediction result of the target block.
[0007] Optionally, for the microclimate prediction method based on physical information multi-task learning, wherein, obtaining the collaborative prediction objectives of the wind speed task, temperature task and humidity task, and constructing a corresponding microclimate prediction model based on multi-task learning according to the collaborative prediction objectives, specifically includes: Obtain the collaborative prediction objectives of the wind speed task, temperature task and humidity task, and obtain the common feature extraction requirements of the collaborative prediction objectives; Construct a global shared feature extraction framework according to the common feature extraction requirements, construct a wind speed independent branch framework according to the spatial dynamic feature dependence relationship of the wind speed task, and construct a temperature and humidity joint branch framework according to the high coupling relationship between the temperature task and the humidity task; Perform model construction according to the global shared feature extraction framework, the wind speed independent branch framework and the temperature and humidity joint branch framework to obtain a microclimate prediction model based on multi-task learning.
[0008] Optionally, for the microclimate prediction method based on physical information multi-task learning, wherein, 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: Obtain the historical spatial feature information and historical temporal meteorological information of multiple blocks, create a microclimate training set according to the historical spatial feature information and the historical temporal meteorological information, and input a set of microclimate training samples in the microclimate training set into the microclimate prediction model; Perform encoding processing on the target historical spatial feature information of the microclimate training sample to obtain a spatial feature tensor, and perform temporal feature extraction on the target historical temporal meteorological information of the microclimate training sample to obtain a temporal feature tensor; Perform fusion processing on the spatial feature tensor and the temporal feature tensor through the global shared feature extraction framework to obtain a joint spatio-temporal feature tensor; Perform reconstruction and restoration on the joint spatio-temporal feature tensor through the wind speed independent branch framework to obtain a complete wind speed distribution tensor; Perform reconstruction and restoration on the joint spatio-temporal feature tensor through the temperature and humidity joint branch framework to obtain a complete temperature distribution tensor and a complete humidity distribution tensor; Obtain a microclimate prediction result based on the complete wind speed distribution tensor, the complete temperature distribution tensor, and the complete humidity distribution tensor, calculate a loss value for the microclimate prediction result to obtain a target loss value, and correct the parameters of the microclimate prediction model according to the target loss value; Input the next set of microclimate training samples into the microclimate prediction model until the training condition of the microclimate prediction model meets a preset condition, and obtain a trained microclimate prediction model.
[0009] Optionally, in the microclimate prediction method based on physics-informed multi-task learning, where the reconstruction and restoration of the joint spatio-temporal feature tensor through the wind speed independent branch skeleton to obtain a complete wind speed distribution tensor specifically includes: Perform wind speed collaborative distribution processing and spatial structure perception processing on the joint spatio-temporal feature tensor through the wind speed independent branch skeleton to obtain an initial wind speed tensor; Perform tensor reconstruction on the initial wind speed tensor to obtain a target wind speed tensor, and perform wind speed data restoration on the target wind speed tensor to obtain a complete wind speed distribution tensor.
[0010] Optionally, in the microclimate prediction method based on physics-informed multi-task learning, where the reconstruction and restoration of the joint spatio-temporal feature tensor through the temperature-humidity joint branch skeleton to obtain a complete temperature distribution tensor and a complete humidity distribution tensor specifically includes: Extract features from the joint spatio-temporal feature tensor through the temperature-humidity joint branch skeleton to obtain temperature-humidity collaborative features, and perform channel feature perception processing and local feature sensitivity processing on the temperature-humidity collaborative features respectively to obtain an initial temperature tensor and an initial humidity tensor; Perform tensor reconstruction on the initial temperature tensor to obtain a target temperature tensor, and perform temperature data restoration according to the target temperature tensor to obtain a complete temperature distribution tensor; Perform tensor reconstruction on the initial humidity tensor to obtain a target humidity tensor, and perform humidity data restoration according to the target temperature tensor to obtain a complete temperature distribution tensor.
[0011] Optionally, in the microclimate prediction method based on physics-informed multi-task learning, where the calculation of the loss value for the microclimate prediction result to obtain a target loss value specifically includes: Extract tasks from the microclimate prediction result to obtain a target wind speed task, a target temperature task, and a target humidity task; Calculate the wind speed loss value for the target wind speed task, obtain multiple wind speed data loss values and multiple wind speed physical loss values, and perform average calculations on all the wind speed data loss values and all the wind speed physical loss values respectively to obtain the average wind speed data loss value and the average wind speed physical loss value; Calculate the temperature loss value for the target temperature task, obtain multiple temperature data loss values and multiple temperature physical loss values, and perform average calculations on all the temperature data loss values and all the temperature physical loss values respectively to obtain the average temperature data loss value and the average temperature physical loss value; Calculate the humidity loss value for the target humidity task, obtain multiple humidity data loss values and multiple humidity physical loss values, and perform average calculations on all the humidity data loss values and all the humidity physical loss values respectively to obtain the average humidity data loss value and the average humidity physical loss value; Set weights for the target wind speed task, the target temperature task, and the target humidity task according to the reciprocal weighting method to obtain the task weight result, where the task weight result includes the weight of the wind speed data loss value, the weight of the wind speed physical loss value, the weight of the temperature data loss value, the weight of the temperature physical loss value, the weight of the humidity data loss value, and the weight of the humidity physical loss value; Perform joint loss calculation on the average wind speed data loss value, the average wind speed physical loss value, the average temperature data loss value, the average temperature physical loss value, the average humidity data loss value, and the average humidity physical loss value according to the task weight result to obtain the target loss value.
[0012] Optionally, for the microclimate prediction method based on physical information multi-task learning, where the performing joint loss calculation on the average wind speed data loss value, the average wind speed physical loss value, the average temperature data loss value, the average temperature physical loss value, the average humidity data loss value, and the average humidity physical loss value according to the task weight result is specifically: ; where, 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 physical temperature loss value, is the physical temperature loss value, is the weight of the physical humidity loss value, is the physical humidity loss value.
[0013] Optionally, in the microclimate prediction method based on physical information multi-task learning, the microclimate prediction system based on physical information multi-task learning includes: A model construction module, configured to obtain collaborative prediction targets for the wind speed task, temperature task, and humidity task, and construct a corresponding microclimate prediction model based on multi-task learning according to the collaborative prediction targets; A model training module, configured to create a microclimate training set, and train the microclimate prediction model according to the microclimate training set to obtain a trained microclimate prediction model; A microclimate prediction module, configured to obtain spatial feature information and temporal meteorological information of a target block, and input the spatial feature information and the temporal meteorological information into the trained microclimate prediction model to obtain a microclimate prediction result of the target block.
[0014] In addition, to achieve the above object, the present invention further provides a terminal, where the terminal includes: a memory, a processor, and a microclimate prediction program based on physical information multi-task learning stored on the memory and executable on the processor. When the microclimate prediction program based on physical information multi-task learning is executed by the processor, the steps of the above-mentioned microclimate prediction method based on physical information multi-task learning are implemented.
[0015] In addition, to achieve the above object, the present invention further provides a computer-readable storage medium, where 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 above-mentioned microclimate prediction method based on physical information multi-task learning are implemented.
[0016] In the present invention, a collaborative prediction target for a wind speed task, a temperature task, and a humidity task is obtained, and a corresponding microclimate prediction model based on multi-task learning is constructed according to the collaborative prediction target; 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; spatial feature information and temporal meteorological information of a target block are obtained, and the spatial feature information and the temporal meteorological information are input into the trained microclimate prediction model to obtain a 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 shared multi-task architecture and a physical consistency loss function, and adopting a loss weighted optimization mechanism, it is possible to efficiently jointly predict three types of microclimate elements, namely wind speed, temperature, and humidity, synchronously. This not only improves the collaboration 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. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 is a flowchart of a preferred embodiment of the microclimate prediction method based on physics-informed multi-task learning of the present invention; Figure 2 is a schematic diagram of a multi-task prediction framework for microclimate in a preferred embodiment of the present invention; Figure 3 is a schematic diagram of a microclimate prediction model in a preferred embodiment of the present invention; Figure 4 is a schematic diagram of a loss function setting process in a preferred embodiment of the present invention; Figure 5 is a structural diagram of a preferred embodiment of the microclimate prediction system based on physics-informed multi-task learning of the present invention; Figure 6 is a schematic diagram of an operating environment of a preferred embodiment of the terminal of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0018] To make the objectives, technical solutions, and advantages of the present invention clearer and more explicit, the following further elaborates on the present invention by way of examples with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0019] It should be noted that if there are directional indications (such as up, down, left, right, front, back...) involved in the embodiments of the present invention, the directional indications are only used to explain the relative positional relationship and movement conditions between components in a specific posture (as shown in the drawings). If the specific posture changes, the directional indications will also change accordingly.
[0020] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present invention, such descriptions of "first", "second", etc. are only for descriptive purposes and should not be construed as indicating or implying their relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first", "second" may explicitly or implicitly include at least one such feature. In addition, the technical solutions between various embodiments may be combined with each other, but it must be based on the ability of those of ordinary skill in the art to implement. When the combination of technical solutions results in contradictions or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0021] The microclimate prediction method based on physics-informed multi-task learning according to a preferred embodiment of the present invention is as Figure 1 shown. The microclimate prediction method based on physics-informed multi-task learning includes the following steps: Step S10: Obtain the collaborative prediction targets of the wind speed task, temperature task, and humidity task, and construct a corresponding microclimate prediction model based on multi-task learning according to the collaborative prediction targets.
[0022] Specifically, in the embodiments of the present invention, to solve the problem that traditional single-task modeling independently predicts each meteorological element without using the association between data, resulting in information redundancy and poor model generalization ability, and it is often difficult to achieve efficient and collaborative prediction of multiple meteorological elements; while multi-task learning can consider the inherent coupling relationship between various meteorological data and use it as an inductive bias to improve the model generalization ability while maintaining good training efficiency; therefore, in view of the fact 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, and the temperature task and humidity task are jointly regulated by heat and humidity mechanical mechanisms such as surface radiation, evaporative cooling, and vegetation cover, and there are different degrees of task correlations among the three 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. A differentiated sharing strategy is designed for the feature differences between the wind speed and temperature / humidity tasks to avoid information interference and negative transfer between tasks and achieve more efficient joint prediction ability, as Figure 2 shown. The overall framework includes three major modules: a global shared layer, a wind speed independent branch, and a temperature / humidity joint branch.
[0023] In the embodiments of the present invention, the framework is constructed based on the convolutional neural network Inception, thereby constructing a corresponding microclimate prediction model. The specific architecture diagram is as Figure 3As shown, the microclimate prediction model is obtained through training. Specifically, the collaborative prediction targets of the wind speed task, temperature task, and humidity task are obtained, and the common feature extraction requirements of the collaborative prediction targets are obtained; a global shared feature extraction framework is constructed according to the common feature extraction requirements. Among them, the global shared feature extraction framework corresponds to a global shared layer, and the global shared layer is composed of a backbone initial module and multiple stacked multi-branch convolution modules, and is combined with a downsampling layer to control the spatial dimension, forming a global shared feature extraction framework for extracting the common feature expressions among the three tasks of wind speed, temperature, and humidity. The backbone initial module extracts the low-order spatial features at the block scale through multi-scale convolution and pooling operations to compress the input dimension and smooth the noise channels, providing stable and standardized input features for the subsequent multi-branch convolution modules; stacking of multi-branch convolution modules: 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, enhancing the expression ability for the overall regional climate pattern.
[0024] The present invention considers the high dependence of wind speed prediction on the spatial dynamic characteristics such as building layout and street ventilation corridors. After the shared layer, the model designs an exclusive independent branch for the wind speed task, that is, a wind speed independent branch framework is constructed according to the spatial dynamic characteristic dependence relationship of the wind speed task, including a spatial attention module, a three-dimensional residual block stack, and a channel-spatial joint attention module. Among them, the spatial attention module is to enhance the response ability to the local ventilation structure; the three-dimensional residual block stack is to capture the collaborative distribution characteristics of wind speed in the three dimensions of time, space, and height; the channel-spatial joint attention module is to fuse the attention mechanisms in the spatial and channel dimensions to improve the perception ability of the wind speed-related spatial structure.
[0025] The present invention also considers the high coupling between temperature and humidity in the heat-moisture physical mechanism. The model designs a combined form of a temperature-humidity shared structure and task-specific branches, that is, a temperature-humidity joint branch framework is constructed according to the high coupling relationship between the temperature task and the humidity task, including a temperature-humidity shared layer, a temperature task branch, and a humidity task branch. Among them, the temperature-humidity shared layer extracts temperature-humidity collaborative features through three-dimensional residual blocks and SE (Squeeze and Excitation, channel attention) modules; the temperature task branch framework adopts a channel attention module to highlight the attention to channel features such as surface radiation and building materials; the humidity task branch framework 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 according to the global shared feature extraction framework, the wind speed independent branch framework, and the temperature-humidity joint branch framework to obtain a microclimate prediction model based on multi-task learning.
[0026] Step S20: Create a microclimate training set and train the microclimate prediction model according to the microclimate training set to obtain a trained microclimate prediction model.
[0027] Specifically, after obtaining the microclimate prediction model, it is necessary to train the microclimate prediction model. The specific training process is as follows: Obtain the historical spatial feature information and historical time-series meteorological information of multiple blocks, create a microclimate training set according to the historical spatial feature information and the historical time-series meteorological information, and input a set of microclimate training samples in the microclimate training set into the microclimate prediction model. Among them, the microclimate training sample includes 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 are sourced from remote sensing images or urban building databases and are encoded to form a three-dimensional data tensor (i.e., a spatial feature tensor) with a dimension of [H, W, Z], where H and W both represent the planar spatial dimensions, and Z represents the vertical spatial dimension; the target historical time-series meteorological information is the wind speed historical record, temperature historical record, and humidity historical record within a corresponding time window (e.g., 24 hours), which are used as the time-series input information for three task predictions. To improve efficiency, a one-dimensional convolutional module is used to compress the channels and extract the time-series features, generating 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, and the global shared layer expands the time feature tensor output by the one-dimensional convolution to [B, 1, H′, W′, T] through the broadcast mechanism, where H′ and W′ are both the downsampled spatial dimensions; and multiply it element-wise with the spatial feature tensor to generate a joint spatio-temporal feature tensor with a shape of [B, Cs, H′, W′, T], where Cs represents the number of channels in the intermediate feature tensor, which is the feature dimension automatically extracted by the network, does not directly represent the physical meaning, is determined by the model structure, and is a hyperparameter in the model design. This joint spatio-temporal feature tensor serves as the shared input for all three task branches at the same time.
[0028] The joint spatio-temporal feature tensor is respectively subjected to wind speed collaborative distribution processing and spatial structure perception processing through the wind speed independent branch skeleton to obtain an initial wind speed tensor with a shape of [P, Q, C, Z, T], where P and Q are both the number of local blocks, C is the number of channels, which is the dimension of the physical quantity in the output tensor. For the wind speed task, C = 3, representing the three directional component velocities of the wind speed; the initial wind speed tensor is reconstructed to obtain a target wind speed tensor, and reconstruction reduction is performed according to the target wind speed tensor to obtain a complete wind speed distribution tensor with a shape of [H, W, C, Z, T]. The joint spatio-temporal feature tensor is subjected to feature extraction through the temperature and humidity joint branch skeleton to obtain temperature and humidity collaborative features, and the temperature and humidity collaborative features are respectively subjected to channel feature perception processing and local feature sensitivity processing to obtain an initial temperature tensor and an initial humidity tensor; the initial temperature tensor is reconstructed to obtain a target temperature tensor, and reconstruction reduction is performed according to the target temperature tensor to obtain a complete temperature distribution tensor with a shape of [H, W, C, Z, T], where for the temperature task, C = 1; the initial humidity tensor is reconstructed to obtain a target humidity tensor, and reconstruction reduction is performed according to the target humidity tensor to obtain a complete humidity distribution tensor with a shape of [H, W, C, Z, T], where for the humidity task, C = 1.
[0029] After that, a microclimate prediction result is obtained based on the complete wind speed distribution tensor, the complete temperature distribution tensor, and the complete humidity distribution tensor, and a loss value is calculated for the microclimate prediction result to obtain a target loss value. Specifically, in a multi-task learning framework, the loss values of different tasks usually exhibit different dimensional and scale characteristics. This inconsistency in loss scales is particularly significant in multi-variable regression tasks, especially when it involves wind speed , temperature and humidity and other prediction tasks with different physical units. If the multi-task loss is directly unweighted or equally weighted, it is easy to cause the task with a larger loss magnitude to dominate the overall training process, weakening the gradient contribution of other tasks in backpropagation, and further causing overfitting or underfitting phenomena of the model to some tasks. Therefore, in the embodiments of the present invention, an inverse weighting strategy based on initial loss estimation is proposed. By monitoring the magnitude differences of the losses of each task in the initial stage of training (for example, the first = 10 batches, is the initial batch number, representing the number of batches used to statistically calculate the average value of the initial loss), the weights of each task are dynamically determined by the reciprocal of their initial training loss values to balance the contribution degrees of different tasks to the overall loss function. The total loss (i.e., the target loss value) L is: , ; where, is thek The weighted coefficient of a task is the k loss function of the th task, k is the average loss of the th task in the initial stage. K is the total number of tasks, where K = 3 (i.e., the wind speed task, the temperature task, and the humidity task). After that, the present invention introduces the physical loss term
[0030] into the loss function construction to constrain the model prediction results to satisfy the wind-temperature and temperature-humidity relationships in the physical process, and improve the physical rationality of the prediction. Figure 4 The steps for determining the final loss function are as shown. Specifically, before training the model batches, separately calculate the data loss values and physical loss values of the three tasks of wind speed, temperature, and humidity, extract tasks from the microclimate prediction results to obtain the target wind speed task, the target temperature task, and the target humidity task; calculate the wind speed loss value of the target wind speed task to obtain multiple wind speed data loss values (denoted as t= 1, 2,..., , t where is the time step) and multiple wind speed physical loss values (denoted as ), calculate the temperature loss value of the target temperature task to 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 to obtain multiple humidity data loss values (denoted as ), and multiple humidity physical loss values (denoted as ); then, calculate the average loss in the initial stage, that is, separately average all the wind speed data loss values and all the wind speed physical loss values to obtain the wind speed data average loss value (denoted as ), and the wind speed physical average loss value (denoted as ); separately average all the temperature data loss values and all the temperature physical loss values to obtain the temperature data average loss value (denoted as ), and the temperature physical average loss value (denoted as ); separately average all the humidity data loss values and all the humidity physical loss values to obtain the humidity data average loss value (denoted as ), and the humidity physical average loss value (denoted as
[0031] After that, weight settings are performed on the target wind speed task, the target temperature task, and the target humidity task according to the reciprocal weighting method to obtain a task weight result, where the task weight result includes the weight of the wind speed data loss value (denoted by ), the weight of the temperature data loss value (denoted by ), the weight of the temperature physical loss value (denoted by ), the weight of the wind speed physical loss value (denoted by ), the weight of the humidity data loss value (denoted by ), and the weight of the humidity physical loss value (denoted by ); specifically, , , , , , . Joint loss calculation is performed on the average wind speed data loss value, the average wind speed physical loss value, the average temperature data loss value, the average temperature physical loss value, the average humidity data loss value, and the average humidity physical loss value according to the task weight result to obtain a target loss value (denoted by L ), and the specific calculation process is: ; And the parameters of the microclimate prediction model are corrected according to the target loss value.
[0032] Input the next set of microclimate training samples into the microclimate prediction model, and repeat the above process, which will not be elaborated here; until the training situation of the microclimate prediction model meets the preset conditions, the preset conditions include that the number of training times reaches the preset number of times, and the preset requirements can be determined according to the microclimate prediction model, which will not be described in detail here. Finally, a trained microclimate prediction model is obtained.
[0033] Step S30: Obtain the spatial feature information and the temporal meteorological information of the target block, and input the spatial feature information and the temporal meteorological information into the trained microclimate prediction model to obtain the microclimate prediction result of the target block.
[0034] Specifically, in the embodiments of the present invention, it is necessary to predict the microclimate of the target block. Specifically, the spatial feature information and the temporal meteorological information of the target block are obtained, and the spatial feature information and the temporal meteorological information are input into the trained microclimate prediction model to obtain the microclimate prediction result of the target block. Among them, the microclimate prediction result of the target block includes the wind speed prediction result, the temperature prediction result, and the 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 the microclimate prediction scenario at the block scale, which can efficiently jointly predict three microclimate elements, namely wind speed, temperature, and humidity, simultaneously, significantly reducing model redundancy and training costs, and improving the collaboration and consistency of prediction. In addition, aiming at the correlation differences in physical mechanisms between the wind speed and the temperature-humidity two tasks, 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 the three tasks of wind speed, temperature, and humidity. And to solve the problem of unbalanced multi-task loss scales, an inverse weighting mechanism based on initial loss estimation is proposed to monitor the loss levels of each task at the initial stage of training, and the static weighting coefficients are determined by using the reciprocals of the loss values to balance the contributions of each task to the total loss and improve the gradient balance problem of the model in the multi-task training process.
[0035] Further, as Figure 5 shown, based on the above microclimate prediction method based on physics-informed multi-task learning, the present invention also correspondingly provides a microclimate prediction system based on physics-informed multi-task learning. Among them, the microclimate prediction system based on physics-informed multi-task learning includes: A model construction module 51, configured to obtain the collaborative prediction targets of 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; A model training module 52, configured to create a microclimate training set, and train the microclimate prediction model according to the microclimate training set to obtain a trained microclimate prediction model; A microclimate prediction module 53, configured to obtain the spatial feature information and the temporal meteorological information of the target block, and input the spatial feature information and the temporal meteorological information into the trained microclimate prediction model to obtain the microclimate prediction result of the target block.
[0036] Further, as Figure 6 shown, based on the above microclimate prediction method based on physics-informed multi-task learning, the present invention also correspondingly provides a terminal, and the terminal includes a processor 10, a memory 20, and a display 30. Figure 6Only some components of the terminal are shown, but it should be understood that it is not required to implement all the shown components, and more or fewer components can be alternatively implemented.
[0037] The memory 20 may be an internal storage unit of the terminal in some embodiments, such as the hard disk or memory of the terminal. The memory 20 may also be an external storage device of the terminal in some other embodiments, such as a plug-in hard disk equipped on the terminal, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. Further, the memory 20 may also include both the internal storage unit and the external storage device of the terminal. The memory 20 is used to store application software installed on the terminal and various types of data, such as program codes for installing the terminal, etc. The memory 20 may also be used to temporarily store data that has been output or will be output. In one embodiment, a microclimate prediction program 40 based on physics-informed multi-task learning is stored on the memory 20, and the microclimate prediction program 40 based on physics-informed multi-task learning can be executed by the processor 10, so as to implement the microclimate prediction method based on physics-informed multi-task learning in the present application.
[0038] The processor 10 may be a central processing unit (CPU), a microprocessor or other data processing chips in some embodiments, and is used to run the program codes stored in the memory 20 or process data, such as executing the microclimate prediction method based on physics-informed multi-task learning, etc.
[0039] The display 30 may be an LED display, a liquid crystal display, a touch liquid crystal display, an OLED (Organic Light-Emitting Diode) toucher, etc. in some embodiments. 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 through a system bus.
[0040] In one embodiment, when the processor 10 executes the microclimate prediction program 40 based on physics-informed multi-task learning in the memory 20, the following steps are implemented: Obtain the collaborative prediction targets of 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; Create a microclimate training set, and train the microclimate prediction model according to the microclimate training set to obtain a trained microclimate prediction model; Obtain the spatial feature information and temporal meteorological information of the target block, and input the spatial feature information and the temporal meteorological information into the trained microclimate prediction model to obtain the microclimate prediction result of the target block.
[0041] Among them, the collaborative prediction objectives of the wind speed task, temperature task, and humidity task are obtained, and a corresponding microclimate prediction model based on multi-task learning is constructed according to the collaborative prediction objectives, specifically including: Obtain the collaborative prediction objectives of the wind speed task, temperature task, and humidity task, and obtain the common feature extraction requirements of the collaborative prediction objectives; Construct a global shared feature extraction framework according to the common feature extraction requirements, construct a wind speed independent branch framework according to the spatial dynamic feature dependence relationship of the wind speed task, and construct a temperature-humidity joint branch framework according to the high coupling relationship between the temperature task and the humidity task; Perform model construction according to the global shared feature extraction framework, the wind speed independent branch framework, and the temperature-humidity joint branch framework to obtain a microclimate prediction model based on multi-task learning.
[0042] Among them, the creation of the microclimate training set, and the training of the microclimate prediction model according to the microclimate training set to obtain the trained microclimate prediction model, specifically including: Obtain the historical spatial feature information and historical temporal meteorological information of multiple blocks, create a microclimate training set according to the historical spatial feature information and the historical temporal meteorological information, and input a set of microclimate training samples in the microclimate training set into the microclimate prediction model; Perform encoding processing on the target historical spatial feature information of the microclimate training sample to obtain a spatial feature tensor, and perform temporal feature extraction on the target historical temporal meteorological information of the microclimate training sample to obtain a time feature tensor; Perform fusion processing on the spatial feature tensor and the time feature tensor through the global shared feature extraction framework to obtain a joint spatio-temporal feature tensor; Perform reconstruction and restoration on the joint spatio-temporal feature tensor through the wind speed independent branch framework to obtain a complete wind speed distribution tensor; Perform reconstruction and restoration on the joint spatio-temporal feature tensor through the temperature-humidity joint branch framework to obtain a complete temperature distribution tensor and a complete humidity distribution tensor; Obtain the microclimate prediction result according to the complete wind speed distribution tensor, the complete temperature distribution tensor, and the complete humidity distribution tensor, calculate the loss value of the microclimate prediction result to obtain the target loss value, and correct the parameters of the microclimate prediction model according to the target loss value; Input the next set of microclimate training samples into the microclimate prediction model until the training condition of the microclimate prediction model meets the preset condition, and obtain a trained microclimate prediction model.
[0043] Among them, the reconstruction and restoration of the joint spatio-temporal feature tensor through the wind speed independent branch framework to obtain a complete wind speed distribution tensor specifically includes: Perform wind speed collaborative distribution processing and spatial structure perception processing on the joint spatio-temporal feature tensor through the wind speed independent branch framework to obtain an initial wind speed tensor; Perform tensor reconstruction on the initial wind speed tensor to obtain a target wind speed tensor, and perform wind speed data restoration on the target wind speed tensor to obtain a complete wind speed distribution tensor.
[0044] Among them, the reconstruction and restoration of the joint spatio-temporal feature tensor through the temperature-humidity joint branch framework to obtain a complete temperature distribution tensor and a complete humidity distribution tensor specifically includes: Extract features from the joint spatio-temporal feature tensor through the temperature-humidity joint branch framework to obtain temperature-humidity collaborative features, and perform channel feature perception processing and local feature sensitivity processing on the temperature-humidity collaborative features respectively to obtain an initial temperature tensor and an initial humidity tensor; Perform tensor reconstruction on the initial temperature tensor to obtain a target temperature tensor, and perform temperature data restoration according to the target temperature tensor to obtain a complete temperature distribution tensor; Perform tensor reconstruction on the initial humidity tensor to obtain a target humidity tensor, and perform humidity data restoration according to the target temperature tensor to obtain a complete humidity distribution tensor.
[0045] Among them, the calculation of the loss value for the microclimate prediction result to obtain a target loss value specifically includes: Extract tasks from the microclimate prediction result to obtain a target wind speed task, a target temperature task, and a target humidity task; Calculate 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 respectively perform average calculations on all the wind speed data loss values and all the wind speed physical loss values to obtain a wind speed data average loss value and a wind speed physical average loss value; Calculate 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 respectively perform average calculations on all the temperature data loss values and all the temperature physical loss values to obtain a temperature data average loss value and a temperature physical average loss value; Calculate the humidity loss values for the target humidity task to obtain multiple humidity data loss values and multiple humidity physical loss values, and respectively perform average calculations on all the humidity data loss values and all the humidity physical loss values to obtain the average humidity data loss value and the average humidity physical loss value; Set weights for the target wind speed task, the target temperature task, and the target humidity task according to the reciprocal weighting method to obtain a task weight result, where the task weight result includes the weight of the wind speed data loss value, the weight of the wind speed physical loss value, the weight of the temperature data loss value, the weight of the temperature physical loss value, the weight of the humidity data loss value, and the weight of the humidity physical loss value; Perform a combined loss calculation on the average wind speed data loss value, the average wind speed physical loss value, the average temperature data loss value, the average temperature physical loss value, the average humidity data loss value, and the average humidity physical loss value according to the task weight result to obtain the target loss value.
[0046] Among them, the performing a combined loss calculation on the average wind speed data loss value, the average wind speed physical loss value, the average temperature data loss value, the average temperature physical loss value, the average humidity data loss value, and the average humidity physical loss value according to the task weight result is specifically: ; Among them, 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.
[0047] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a microclimate prediction program based on physics-informed multi-task learning, and when the microclimate prediction program based on physics-informed multi-task learning is executed by a processor, the steps of the microclimate prediction method based on physics-informed multi-task learning as described above are implemented.
[0048] In summary, the present invention provides a microclimate prediction method, system, terminal, and storage medium based on physical information multitask learning. The method includes: obtaining collaborative prediction targets for the wind speed task, temperature task, and humidity task, and constructing a corresponding microclimate prediction model based on multitask learning according to the collaborative prediction targets; creating a microclimate training set, training the microclimate prediction model according to the microclimate training set to obtain a trained microclimate prediction model; obtaining the spatial feature information and temporal meteorological information of the target block, and inputting the spatial feature information and the temporal meteorological information 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 the multitask learning mechanism. By constructing a hierarchical shared multitask architecture and a physical consistency loss function, and adopting a loss weighted optimization mechanism, it can efficiently jointly predict three types of microclimate elements, namely wind speed, temperature, and humidity, synchronously. This not only improves the collaboration 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.
[0049] It should be noted that in this article, the term "including", "comprising", or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article, or terminal including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or elements inherent to such a process, method, article, or terminal. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of another identical element in the process, method, article, or terminal including that element.
[0050] Of course, those of ordinary skill in the art can understand that all or part of the processes of implementing the above method embodiments can be completed by instructing relevant 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 the program is executed, it can include the processes of the above method embodiments. The computer-readable storage medium can be a memory, a magnetic disk, an optical disc, etc.
[0051] It should be understood that the application of the present invention is not limited to the above examples. For those of ordinary skill in the art, improvements or transformations can be made according to the above description. All such improvements and transformations should fall within the protection scope of the appended claims of the present invention.
Claims
1. A microclimate prediction method based on physics-informed multi-task learning, characterized in that, The microclimate prediction method based on physics-informed multi-task learning includes: Obtaining the collaborative prediction targets for the wind speed task, temperature task, and humidity task, 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 the spatial feature information and temporal meteorological information of the target block, and inputting the spatial feature information and the temporal meteorological information into the trained microclimate prediction model to obtain the microclimate prediction result of the target block.
2. The microclimate prediction method based on physics-informed multi-task learning according to claim 1, characterized in that The obtaining of the collaborative prediction targets for the wind speed task, temperature task, and humidity task, and constructing a corresponding microclimate prediction model based on multi-task learning according to the collaborative prediction targets specifically includes: Obtaining the collaborative prediction targets for the 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 framework according to the common feature extraction requirements, constructing a wind speed independent branch framework according to the spatial dynamics feature dependency relationship of the wind speed task, and constructing a temperature-humidity joint branch framework according to the high coupling relationship between the temperature task and the humidity task; Performing model construction according to the global shared feature extraction framework, the wind speed independent branch framework, and the temperature-humidity joint branch framework to obtain a microclimate prediction model based on multi-task learning.
3. The microclimate prediction method based on physics-informed multi-task learning according to claim 2, characterized in that, The creating of a microclimate training set, training the microclimate prediction model according to the microclimate training set, and obtaining a trained microclimate prediction model specifically includes: Obtaining the historical spatial feature information and historical temporal meteorological information of multiple blocks, creating a microclimate training set according to the historical spatial feature information and the historical temporal meteorological information, and inputting a set of microclimate training samples in the microclimate training set into the microclimate prediction model; Performing encoding processing on the target historical spatial feature information of the microclimate training samples to obtain a spatial feature tensor, and performing temporal feature extraction on the target historical temporal meteorological information of the microclimate training samples to obtain a time feature tensor; Performing fusion processing on the spatial feature tensor and the time feature tensor through the global shared feature extraction framework to obtain a joint spatio-temporal feature tensor; Performing reconstruction and restoration on the joint spatio-temporal feature tensor through the wind speed independent branch framework to obtain a complete wind speed distribution tensor; Performing reconstruction and restoration on the joint spatio-temporal feature tensor through the temperature-humidity joint branch framework 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, calculating a loss value for the microclimate prediction result to obtain a target loss value, and correcting the parameters of the microclimate prediction model according to the target loss value; Inputting the next set of microclimate training samples into the microclimate prediction model until the training condition of the microclimate prediction model meets the preset condition, and obtaining a trained microclimate prediction model.
4. The microclimate prediction method based on physics-informed multi-task learning according to claim 3, wherein The reconstruction and restoration of the joint spatio-temporal feature tensor through the wind speed independent branch framework to obtain a complete wind speed distribution tensor specifically includes: Performing wind speed collaborative distribution processing and spatial structure perception processing on the joint spatio-temporal feature tensor through the wind speed independent branch framework to obtain an initial wind speed tensor; Performing tensor reconstruction on the initial wind speed tensor to obtain a target wind speed tensor, and performing wind speed data restoration on the target wind speed tensor to obtain a complete wind speed distribution tensor.
5. The microclimate prediction method based on physics-informed multi-task learning according to claim 3, characterized in that The reconstruction and restoration of the joint spatio-temporal feature tensor through the temperature-humidity joint branch framework to obtain a complete temperature distribution tensor and a complete humidity distribution tensor specifically includes: Performing feature extraction on the joint spatio-temporal feature tensor through the temperature-humidity joint branch framework to obtain temperature-humidity collaborative features, and performing channel feature perception processing and local feature sensitivity processing on the temperature-humidity collaborative features respectively 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; Performing tensor reconstruction on the initial humidity tensor to obtain a target humidity tensor, and performing humidity data restoration based on the target temperature tensor to obtain a complete humidity distribution tensor.
6. The microclimate prediction method based on physics-informed multi-task learning according to claim 3, characterized in that, The calculation of the loss value for the microclimate prediction result to obtain a target loss value specifically includes: Performing task extraction on the microclimate prediction result to obtain a target wind speed task, a target temperature task, and a target humidity task; Calculating the wind speed loss value of the target wind speed task to obtain multiple wind speed data loss values and multiple wind speed physical loss values, and respectively performing average calculations on all the wind speed data loss values and all the wind speed physical loss values to obtain a wind speed data average loss value and a wind speed physical average loss value; Calculating the temperature loss value of the target temperature task to obtain multiple temperature data loss values and multiple temperature physical loss values, and respectively performing average calculations on all the temperature data loss values and all the temperature physical loss values to obtain a temperature data average loss value and a temperature physical average loss value; Calculating the humidity loss value of the target humidity task to obtain multiple humidity data loss values and multiple humidity physical loss values, and respectively performing average calculations on all the humidity data loss values and all the humidity physical loss values to obtain a humidity data average loss value and a humidity physical average loss value; Setting weights for the target wind speed task, the target temperature task, and the target humidity task according to the reciprocal weighting method to obtain a task weight result, where the task weight result includes the weights of the wind speed data loss value, the wind speed physical loss value, the temperature data loss value, the temperature physical loss value, the humidity data loss value, and the humidity physical loss value; Perform joint loss calculation on the average loss value of the wind speed data, the physical average loss value of the wind speed, the average loss value of the temperature data, the physical average loss value of the temperature, the average loss value of the humidity data, and the physical average loss value of the humidity according to the task weight result to obtain the target loss value.
7. The microclimate prediction method based on physics-informed multi-task learning according to claim 6, characterized in that, The joint loss calculation on the average loss value of the wind speed data, the physical average loss value of the wind speed, the average loss value of the temperature data, the physical average loss value of the temperature, the average loss value of the humidity data, and the physical average loss value of the humidity according to the task weight result is specifically as follows: ; Among them, 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.
8. A microclimate prediction system based on physics-informed multi-task learning, characterized in that, The microclimate prediction system based on physics-informed multi-task learning includes: A model construction module, configured to obtain the collaborative prediction targets of 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; A model training module, configured to create a microclimate training set, and train the microclimate prediction model according to the microclimate training set to obtain a trained microclimate prediction model; A microclimate prediction module, configured to obtain the spatial feature information and the temporal meteorological information of the target block, and input the spatial feature information and the temporal meteorological information into the trained microclimate prediction model to obtain the microclimate prediction result of the target block.
9. A terminal, characterized in that, The terminal includes: a memory, a processor, and a microclimate prediction program based on physics-informed multi-task learning stored on the memory and executable on the processor. When the microclimate prediction program based on physics-informed multi-task learning is executed by the processor, the steps of the microclimate prediction method based on physics-informed multi-task learning according to any one of claims 1-7 are implemented.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a microclimate prediction program based on physics-informed multi-task learning. When the microclimate prediction program based on physics-informed multi-task learning is executed by a processor, the steps of the microclimate prediction method based on physics-informed multi-task learning according to any one of claims 1-7 are implemented.
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
Cited By
Photovoltaic fire-fighting temperature control prediction system
CN121115947A