Micro-channel temperature field rapid reconstruction method based on self-attention mechanism
Through the Transformer model based on the self-attention mechanism, the real-time and accuracy issues of temperature field reconstruction in microchannel radiators are solved, and the temperature field is quickly and accurately reconstructed to meet the real-time thermal management needs of electronic equipment.
Patent Information
- Application Number
- CN202510767765.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-10
- Publication Date
- 2025-09-12
AI Technical Summary
Existing technologies make it difficult to achieve fast, accurate and real-time reconstruction of the temperature field in microchannel heat sinks. Traditional methods have problems such as limited measurement points, long calculation time and insufficient prediction accuracy, and cannot meet the real-time thermal management needs of electronic equipment.
A Transformer model based on the self-attention mechanism is adopted. Standardized training data is obtained through the simulation model. A directory index of working conditions and temperature field data is established. The prediction model of the self-attention mechanism is trained, including linear layers, position encoding and Transformer decoder architecture. Multi-head attention mechanism and cross-attention mechanism are used to extract data features and realize rapid reconstruction of the temperature field.
The rapid and accurate prediction of temperature distribution in the microchannel flow and heat transfer process was achieved, meeting the real-time and global requirements. The prediction accuracy reached a mean absolute error of 0.0756K, improving the accuracy and efficiency of temperature field reconstruction.
Smart Images

Figure CN120633432A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of flow field temperature prediction in the microchannel heat dissipation process of electronic equipment thermal design. It specifically discloses a method for rapid reconstruction of microchannel temperature fields based on a self-attention mechanism. The method can quickly reconstruct the temperature field to obtain accurate and real-time flow heat transfer data and distribution characteristics for thermal distribution problems such as large temperature gradients and local overheating during the flow heat exchange process of microchannel heat sinks that can easily lead to equipment failure. Background Art
[0002] As electronic devices rapidly evolve toward miniaturization and high integration, microchannel heat sinks, as key heat dissipation units, face the severe challenges of high heat flux and non-uniform temperature distribution. These conditions can lead to localized overheating or hot spots, potentially causing failure or damage to electronic devices. To prevent thermal damage, it is imperative to accurately capture the global heat flux distribution under various operating conditions.
[0003] Existing flow field data prediction methods mainly use classic deep learning models to achieve nonlinear mapping between low-dimensional working variables and high-dimensional flow field data, thereby realizing field data prediction. Convolutional neural networks (CNNs), as a well-known and common model architecture in the field of deep learning, are widely used to predict high-precision velocity and pressure fields due to their ability to extract features from large amounts of training data (especially two-dimensional matrices). U-net architectures are commonly used to encode and decode flow field features, achieving accurate predictions of flow characteristics under different conditions and structures. In addition, the combination of graph convolutional networks (GCNs) and time series architectures (such as LSTMs) has also attracted widespread attention and achieved satisfactory accuracy in flow field reconstruction.
[0004] However, the temperature field reconstruction method in the prior art still has the following problems:
[0005] Traditional temperature field measurement methods, including thermocouple monitoring, infrared thermal imaging, and thermometers based on luminescent particles, all have limitations, such as limited measurement points, insufficient penetration, and complex post-processing. While computational fluid dynamics (CFD) methods can provide accurate global temperature field information, they are computationally time-consuming and cannot meet the real-time requirements of dynamic working conditions.
[0006] While deep learning methods offer new insights into the rapid reconstruction of flow and temperature fields, current research focuses primarily on flow field prediction, with few developing predictive models with high real-time performance, stability, and accuracy tailored to the needs of microchannel thermal management. Furthermore, research on optimizing data feature extraction and model training for rapid temperature field reconstruction remains lacking, resulting in insufficient prediction accuracy for temperature fields, particularly at solid-liquid boundaries.
[0007] Prediction models based on architectures such as CNN, Unet, MLP, and lightGBM are far inferior to the Transformer model based on the attention mechanism in terms of global feature extraction capabilities, resulting in inferior performance in terms of prediction accuracy and generalization. Furthermore, compared to the parallel operation of the multi-head attention mechanism, classic deep learning models consume more computing power and memory.
[0008] Prediction methods based on mathematical statistics are unable to analyze the mechanisms of carbon emissions and provide practical guidance for energy conservation and emission reduction in water transport infrastructure such as ports and docks. Existing traditional machine learning algorithms, such as regression, decision tree, support vector machine, KNN, and ant search algorithms, suffer from limitations such as underfitting, overfitting, and susceptibility to noise. Their prediction accuracy and generalization capabilities often fall short of those of neural network models. Summary of the Invention
[0009] In view of this, the present invention provides a method for rapid reconstruction of the microchannel temperature field based on the attention mechanism, builds a data-driven prediction model, solves the problem of accurate and rapid reconstruction of the temperature field of the microchannel flow and heat transfer process, and solves the technical problem in the existing technology that traditional experimental and simulation methods cannot capture the global temperature field in real time.
[0010] The present invention provides a method for rapid reconstruction of microchannel temperature field based on attention mechanism, and the specific steps are as follows:
[0011] Step 1. Obtain a standardized microchannel training dataset through a simulation model;
[0012] Step 2. Based on the microchannel standardized training data set, a directory index of the working conditions and their corresponding temperature field data graphs is established;
[0013] Step 3. Based on the directory index of the working conditions and their corresponding temperature field data maps obtained from the microchannel standardized training dataset, a prediction model based on the self-attention mechanism is trained;
[0014] Among them, the prediction model based on the self-attention mechanism includes linear layers, position encoding, and Transformer decoder architecture;
[0015] The Transformer decoder architecture consists of multiple stages, each of which includes an upsampling module and a Transformer module.
[0016] The Transformer module is used to extract data features and set up multiple self-attention mechanism layers, including cross-attention mechanism, normalization layer, multi-head attention mechanism, normalization layer and fully connected layer;
[0017] Step 4. Use the trained prediction model based on the self-attention mechanism to reconstruct the microchannel temperature field.
[0018] Optionally, a microchannel data set obtained by simulating the simulation model is subjected to maximum and minimum value normalization to obtain a microchannel standardized training data set.
[0019] Optionally, the data of the microchannel data set includes temperature field distribution data of the microchannel heat sink under uniform heating power, non-uniform heating power, different flow rates, and flow directions.
[0020] Optionally, the microchannel data set is normalized by maximum and minimum values to obtain a microchannel normalized training data set, which is expressed as:
[0021]
[0022] Among them, X normalization,i represents the standardized training data; X i represents the i-th input data set; x j,i represents the jth element in the i-th input dataset; n represents the total number of data in the dataset.
[0023] Optionally, the expression of the self-attention mechanism is:
[0024]
[0025] Where Q represents the query matrix; K represents the key matrix; V represents the value matrix; d k Represents a key-value dimension.
[0026] Alternatively, the expression for the cross attention mechanism to obtain the cross attention of two different variables is:
[0027] CrossAttention(x,Embedding)=Attention(Q x ,K embedding ,V embedding )
[0028] Among them, CrossAttention(.) represents cross attention; x represents the original variable; Embedding represents the embedded variable; Attention(.) represents the self-attention mechanism; Q x Represents the query matrix of the original variable; K embedding represents the key matrix of embedded variables; V embedding A matrix representing the values of the embedded variables.
[0029] Compared with existing technologies, this invention has at least the following advantages: it enables rapid prediction of heat sink (i.e., radiator) temperature distribution data during microchannel flow heat transfer, meeting real-time, accurate, and global data requirements. In the field of flow heat transfer, a Transformer decoder is constructed using a deep learning prediction model architecture with a self-attention mechanism, achieving rapid temperature field reconstruction with higher accuracy than traditional prediction models such as CNNs. The model's prediction accuracy achieves a MAE of 0.0756K, demonstrating excellent prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The drawings are only for purposes of illustrating particular embodiments and are not to be considered limiting of the invention.
[0031] Figure 1 Flowchart of the attention mechanism in the microchannel temperature field rapid reconstruction method of the present invention;
[0032] Figure 2 Flowchart of the multi-head attention mechanism in the microchannel temperature field rapid reconstruction method of the present invention;
[0033] Figure 3 This is a flow chart of the method for rapid reconstruction of microchannel temperature field of the present invention;
[0034] Figure 4 This is a structural diagram of the Transformer prediction model based on the self-attention mechanism of the present invention;
[0035] Figure 5 This is the Transformer module structure diagram of the present invention;
[0036] Figure 6 This is the temperature field distribution diagram of the CFD simulation of the present invention;
[0037] Figure 7 The temperature field distribution diagram of the CFD simulation and the error curve of the prediction result of the present invention;
[0038] Figure 8 It is the prediction result of the present invention, the temperature field distribution diagram of CFD simulation and the prediction error diagram. DETAILED DESCRIPTION
[0039] In order to more clearly understand the above-mentioned objects, features and advantages of the present invention, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other. In addition, the present invention can also be implemented in other ways different from those described herein. Therefore, the scope of protection of the present invention is not limited by the specific embodiments disclosed below.
[0040] A specific embodiment of the present invention, as Figures 1-8 , discloses a method for fast reconstruction of microchannel temperature field based on attention mechanism, the specific steps are as follows:
[0041] Step 1. Obtain a standardized microchannel training dataset through the simulation model.
[0042] Specifically, various microchannel data sets are acquired through CFD simulation models;
[0043] Various microchannel data sets include temperature field distribution data of microchannel heat sinks under uniform heating power, non-uniform heating power, different flow rates, flow directions and other variables.
[0044] Furthermore, the mesh of the CFD simulation model uses unstructured mesh elements with a cell size range of 6.83×10 -5 m to 5×10 -4 m, the minimum orthogonality quality to meet the criteria.
[0045] Furthermore, when acquiring uniform heating power data, 4 heaters and 324 working conditions were set, including 4 inlet / outlet position combinations, 9 sets of uniform heating power and 9 sets of flow rates. The power P and flow rate Q of the four heaters are:
[0046] P k=1,2,3,4 =1W,1.5W,2W,…,4.5W,5W
[0047] Q=0.4ml / s, 0.6ml / s,…, 1.8ml / s, 2.0ml / s.
[0048] Furthermore, when acquiring the non-uniform heating power data, 4 heaters and 320 working conditions were set, among which a high power heater P hotspot The power is higher than the other three conventional heaters P normal 2 W higher. In addition, the total power of the four heaters increased from 6 W to 18 W in steps of 4 W;
[0049] P normal =1W, 2W, 3W, 4W
[0050] P hotspot =3W, 4W, 5W, 6W
[0051] The flow rate Q is:
[0052] Q=0.4ml / s,0.8ml / s,…,1.6ml / s,2.0ml / s
[0053] Under each operating condition, the power of the four heaters and the inlet flow rate were kept constant. The inlet water temperature was set at 293.15 K. The microchannel heat sink was made of 6061-T6 aluminum, which has a thermal conductivity of 167 W / (m·K) and a specific heat capacity of 896 J / (kg·K).
[0054] Furthermore, the flow velocity of the solid wall inside the microchannel is set to zero, and the adiabatic boundary condition outside the microchannel is satisfied.
[0055] Ultimately, the microchannel data set generated by the CFD simulation model includes a total of 644 sets of temperature field data, covering a variety of combined working conditions with varying flow rates, flow directions, and heating power.
[0056] Furthermore, each microchannel data set is normalized by maximum and minimum values to obtain a microchannel standardized training data set, which is expressed as:
[0057]
[0058] Among them, X normalization,i represents the standardized training data; X i represents the i-th input data set; x j,i represents the jth element in the i-th input dataset; n represents the total number of data in the dataset.
[0059] For example, the input dataset X i Including variables such as uniform heating power, non-uniform heating power, different flow rates, flow directions, etc. of the microchannel heat sink.
[0060] Step 2. Based on the microchannel standardized training data set, establish a directory index of the working conditions and their corresponding temperature field data maps.
[0061] For example, the working condition is a one-dimensional vector of 1×9, such as [0,1,1,0,2,2,4,2,0.8]. The first four digits are the opening and closing of the corresponding microchannel inlet and outlet, the middle four digits are the heating power of the microchannel bottom heater, in watts, and the last digit is the flow rate of the cooling medium at the inlet, in milliliters per second. The index can quickly reconstruct the microchannel temperature field model and quickly locate the true value data of the CFD simulation model, so as to obtain the prediction error and iteratively optimize it. See the temperature distribution. Figure 6 shown.
[0062] Step 3. Based on the directory index of the working conditions and their corresponding temperature field data maps obtained from the microchannel standardized training dataset, a prediction model based on the self-attention mechanism is trained.
[0063] Furthermore, the prediction model based on the self-attention mechanism includes a linear layer, position encoding, and a Transformer decoder architecture. The Transformer decoder architecture consists of four stages, and each stage includes an upsampling module and a Transformer module.
[0064] Specifically, the input of the prediction model based on the self-attention mechanism is the working condition of a one-dimensional vector. The working condition of the one-dimensional vector is expanded to the same resolution as the simulated temperature map through a linear layer, and the features are fully extracted through the upsampling of the four blocks Stage of the Transformer decoder architecture and the Transformer module to obtain the prediction result. The mean absolute MAE error between the prediction result and the real data (obtained through the CFD simulation model) is used as the iterative loss function for training the prediction model based on the self-attention mechanism to update the threshold and weight, so that the dimension H×W of the prediction result is the same as the dimension H0×W0 of the simulated temperature map, where H0 represents the height of the simulated temperature map, W0 represents the width of the simulated temperature map, and H and W are the height and width of the prediction result, respectively. The output of the prediction model based on the self-attention mechanism is a two-dimensional temperature field distribution map. The specific model structure is shown in the figure.
[0065] Furthermore, the prediction results are compared with the ground truth data indexed by the CFD simulation model. This model uses L1 Loss to calculate the MAE of the prediction error. This MAE is then propagated backwards to update the optimized query matrix Q, query matrix K, and V matrix for each attention mechanism. Iterations are repeated and convergence conditions are determined. When the prediction error meets the conditions and is less than the set error value, model training is complete. At this point, the model can be used to predict temperature field distribution data.
[0066] Specifically, see Figure 5The Transformer module is used to extract data features and includes multiple self-attention mechanism layers, which include a cross-attention mechanism, a normalization layer, a multi-head attention mechanism, a normalization layer, and a fully connected layer in sequence. After the feature map input to the Transformer model is normalized, position encoding information is added as the input of the cross-attention mechanism layer. The cross-attention mechanism calculates the cross-features of the input feature vector and the working condition vector, copies the cross-features of the input feature vector and the working condition vector, and normalizes the cross-features of the input feature vector and the working condition vector as the input of the multi-head attention mechanism layer to obtain the multi-head attention feature. The copied cross-features of the input feature vector and the working condition vector and the multi-head attention feature are vector-added to obtain fusion feature 1. The fusion feature 1 is copied and subjected to the final normalization and fully connected layer as the model output to obtain fusion feature 2. The copied fusion feature 1 and the fusion feature 2 are vector-added to obtain the extracted data features. The feature map calculated by the multi-head attention and the feature map calculated by the cross-attention are reused, which improves the continuity and utilization of features in the calculation process. The multi-head attention mechanism of the present invention is used to extract high-dimensional data features. Compared with the self-attention mechanism, it can realize parallel computing and reduce computational complexity. At the same time, it can maximize the retention of high-dimensional data features and avoid the risk of overfitting. It is divided into multi-head parallel computing, wherein the query matrix Q, key matrix K and matrix value V are divided into multiple heads, and the self-attention mechanism is calculated separately. The calculation results are synthesized by the Concat function and finally exported through the linear layer.
[0067] Furthermore, the expression of the self-attention mechanism is:
[0068]
[0069] Where Q represents the query matrix; K represents the key matrix; V represents the value matrix; d k Represents the key-value dimension;
[0070] The cross attention mechanism of the present invention is used to obtain the cross attention of two different variables. The calculation formula is similar to the above, but the input variables come from the embedding variable embedding and the original variable x. The expression is:
[0071] CrossAttention(x,Embedding)=Attention(Q x ,K embedding ,V embedding )
[0072] Among them, CrossAttention(.) represents cross attention; x represents the original variable (i.e., the model input variable); Embedding represents the embedded variable (i.e., the feature variable); Attention(.) represents the self-attention mechanism; Q xRepresents the query matrix of the original variable; K embedding represents the key matrix of embedded variables; V embedding A matrix representing the values of the embedded variables.
[0073] For example, the original variable x represents an input feature image with a resolution of H × W. Embedding represents a variable containing working conditions.
[0074] The prediction model based on the self-attention mechanism is complex, involving hyperparameters such as the number of Transformer modules in each stage, the size of the data feature map, and the number of heads in the multi-head attention. Through ablation experiments, we selected the optimal hyperparameter combination and tuned parameters such as the learning rate and training batch size to obtain a training model with minimal prediction error, completing the training.
[0075] Step 4. Use the trained prediction model based on the self-attention mechanism to reconstruct the microchannel temperature field.
[0076] The above description is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by any technician familiar with this technical field within the technical scope disclosed by the present invention should be covered by the scope of protection of the present invention.
Claims
1. A fast reconstruction method of microchannel temperature field based on attention mechanism, characterized in that: The specific steps are as follows: Step 1. Obtain a standardized microchannel training dataset through a simulation model; Step 2. Based on the microchannel standardized training data set, a directory index of the working conditions and their corresponding temperature field data graphs is established; Step 3. Based on the directory index of the working conditions and their corresponding temperature field data maps obtained from the microchannel standardized training dataset, a prediction model based on the self-attention mechanism is trained; Among them, the prediction model based on the self-attention mechanism includes linear layers, position encoding, and Transformer decoder architecture; The Transformer decoder architecture consists of multiple stages, each of which includes an upsampling module and a Transformer module. The Transformer module is used to extract data features and set up multiple self-attention mechanism layers, including cross-attention mechanism, normalization layer, multi-head attention mechanism, normalization layer and fully connected layer; Step 4. Use the trained prediction model based on the self-attention mechanism to reconstruct the microchannel temperature field.
2. The microchannel temperature field rapid reconstruction method according to claim 1, characterized in that: The microchannel data set obtained by simulation model simulation is normalized to the maximum and minimum values to obtain a microchannel standardized training data set.
3. The microchannel temperature field rapid reconstruction method according to claim 2, characterized in that: The data of the microchannel data set include the temperature field distribution data of the microchannel heat sink under uniform heating power, non-uniform heating power, different flow rates, and flow directions.
4. The microchannel temperature field rapid reconstruction method according to claim 3, characterized in that: The microchannel data set is normalized by the maximum and minimum values to obtain the microchannel standardized training data set, which is expressed as: Among them, X normalization,i represents the standardized training data; X i represents the i-th input data set; x j,i represents the jth element in the i-th input dataset; n represents the total number of data in the dataset.
5. The microchannel temperature field rapid reconstruction method according to claim 1, characterized in that: The expression of the self-attention mechanism is: Where Q represents the query matrix; K represents the key matrix; V represents the value matrix; d k Represents a key-value dimension.
6. The microchannel temperature field rapid reconstruction method according to claim 1, characterized in that: The expression for the cross attention mechanism to obtain the cross attention of two different variables is: CrossAttention(x,Embedding)=Attention(Q x ,K embedding ,V embedding ) Among them, CrossAttention(.) represents cross attention; x represents the original variable; Embedding represents the embedded variable; Attention(.) represents the self-attention mechanism; Q x The query matrix representing the original variables; K embedding represents the key matrix of embedded variables; V embedding A matrix representing the values of the embedded variables.