A personal thermal comfort prediction method and system
Through the deep neural network combining environment and personal data, dynamic adjustment of user thermal comfort status is realized in real time, solving the problems of low prediction accuracy and energy waste in the prior art, and providing an efficient thermal comfort prediction method.
Patent Information
- Application Number
- CN202210479206.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-05
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2042-05-05
AI Technical Summary
The existing thermal comfort modeling methods are difficult to realize real-time perception of the user's thermal comfort state and dynamic adjustment, and the prediction accuracy is low, so it cannot effectively reduce energy waste.
A deep neural network is used to combine environmental data, personal physiological data and facial thermal imaging to predict personal thermal comfort level through the division and cross attention modules of support sets and query sets, and the model is updated through the gradient descent method.
Supports small sample learning, reduces computational complexity, improves prediction accuracy, and can update models in dynamic environments to adapt to changes in individual thermal comfort preferences.
Smart Images

Figure CN114969452B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a personal thermal comfort prediction method and system, and belongs to the cross-technical field of artificial intelligence and building energy management. Background Art
[0002] Building energy consumption accounts for about 30%-40% of a country's energy consumption. Of the building energy consumption, HVAC systems account for about 40%. Among them: the purpose of the HVAC system is to create a comfortable and healthy space for indoor users, thereby improving user work efficiency, quality of life, etc.; however, most HVAC systems currently operate in an open-loop mode, that is, the user's thermal comfort state is not in the control closed loop of the entire HVAC system; the ideal situation is that the HVAC system can sense the user's thermal comfort level in real time and dynamically adjust its own temperature setting point, thereby achieving improved thermal comfort and reduced energy waste.
[0003] To address these challenges, existing studies have proposed many thermal comfort modeling methods. Traditional thermal comfort models, such as the predicted mean vote (PMV) model and the adaptive model, have been widely adopted. Although these models have certain advantages, they still have the following shortcomings: (1) The implementation of the PMV model requires knowledge of all input variables, while obtaining the values of some variables is difficult or costly. (2) Since these models are used to predict the average thermal comfort of a group, even if the values of all input variables can be accurately obtained, these models still show poor prediction performance when applied to individuals. (3) These models cannot adjust themselves through learning and cannot update model parameters based on user feedback and field data collected in new environments. (4) These models do not allow modification of their respective input variable sets and cannot include other variables that may be associated with user thermal comfort, thereby reducing the potential for improving prediction accuracy.
[0004] With the emergence of IoT wearable devices, the introduction of cloud computing and the rapid development of machine learning, the development of thermal comfort modeling has entered a new stage. Specifically, wearable devices have brought great convenience in tracking users' personal physiological signals (such as metabolic rate, heart rate and skin temperature). These personal physiological signals can help realize online personal thermal comfort modeling. Cloud computing and deep learning process the collected personal physiological data and provide assistance in obtaining users' personal thermal comfort feedback data. Based on the above technologies, many methods of personal thermal comfort modeling have been proposed, including: logistic regression, naive Bayes, k-nearest neighbor, decision tree, support vector classification, etc. These machine learning-based personal thermal comfort models have the functions of "self-learning" and "self-correction". Compared with traditional thermal comfort models (PMV model, adaptive model), they have improved the prediction accuracy, but there are still some shortcomings: (1) a large amount of data needs to be obtained before modeling, which is not suitable for actual application scenarios; (2) the time and space complexity of updating the model to adapt to the dynamic changes of individual thermal comfort preferences with the environment is high. Summary of the invention
[0005] The purpose of the present invention is to provide a personal thermal comfort prediction method and system, which supports small sample learning, has strong practicality, low computational complexity, and improves prediction accuracy.
[0006] To achieve the above objectives, the present invention is implemented by adopting the following technical solutions:
[0007] In a first aspect, the present invention provides a method for predicting personal thermal comfort, comprising:
[0008] Obtain environmental data, personal physiological data, personal facial thermal imaging, and personal thermal comfort feedback data and divide them into a support set and a query set;
[0009] Input the data of the support set and query set into the pre-trained deep neural network to obtain the personal thermal comfort level;
[0010] The method for training the deep neural network includes:
[0011] Get the data of support set and query set;
[0012] Input the data of the support set and the query set into the embedding module in the deep neural network to obtain the class feature map and the query feature map;
[0013] Input the class feature map and the query feature map into the cross attention module in the deep neural network to obtain a class feature pair and a query feature pair;
[0014] Input the class feature pair and the query feature pair into the classification module in the deep neural network to obtain the personal thermal comfort level and update the deep neural network;
[0015] Repeat all the above steps until convergence and complete the training.
[0016] Combined with the first aspect, further, the data of the support set and the query set are input into the pre-trained deep neural network to obtain the personal thermal comfort level, including:
[0017] The data of the support set and the query set are input into the embedding module in the pre-trained deep neural network to obtain the class feature map and the query feature map.
[0018] Combined with the first aspect, further, the data of the support set and the query set are input into the pre-trained deep neural network to obtain the personal thermal comfort level, including:
[0019] The class feature map and the query feature map are input into the cross attention module in the pre-trained deep neural network to obtain the class feature pair and the query feature pair. The calculation formula includes:
[0020]
[0021]
[0022]
[0023] Among them, R ij is the element in the i-th row and j-th column of the relevant map, R p is a class-dependent mapping, R q is the query-related mapping, p i is the local class feature vector at the i-th spatial position in the class feature map, q j is the local query feature vector at the jth spatial position in the query feature map, ||p i ||2 is p i The Euclidean norm of ||q j ||2 is q j The Euclidean norm of , T represents the transpose, m is the total spatial position of the two feature maps, Respectively represent the correlation between each local class feature vector and all local query feature vectors, Respectively represent the correlation between each local query feature vector and all local class feature vectors;
[0024]
[0025]
[0026] w p =W2(σ(W1(GAP(R P ))))
[0027] w q =W2(σ(W1(GAP(R q ))))
[0028] in, is the class attention of the ith position, is the query attention of the ith position, w p is the first kernel function calculated using class-related mapping, w q is the second kernel function calculated using the query-related mapping, T represents transposition, r i q Represents the local class feature vector p i The correlation between all local query feature vectors, r i q Represents the local query feature vector q i The correlation between all local class feature vectors, t represents the temperature hyperparameter, σ is the activation function, GAP represents the global average pooling operation, and W1 and W2 are the parameters of the meta-learner;
[0029]
[0030]
[0031] in, is a class feature pair, P k is the class feature map, is the query feature pair, Q b is the query feature map, A p is the class attention, A q It is a query attention.
[0032] Combined with the first aspect, further, the data of the support set and the query set are input into the pre-trained deep neural network to obtain the personal thermal comfort level, including:
[0033] The class feature pair and the query feature pair are input into the classification module in the deep neural network to obtain the predicted value of the query feature, thereby obtaining the personal thermal comfort level corresponding to the predicted value. The calculation formula includes:
[0034]
[0035] in, is the predicted value of the query feature, Indicates the value of k when the cosine distance between two features is minimized. is a class feature pair, is a query feature pair, and GAP represents the global average pooling operation.
[0036] In combination with the first aspect, further, the method for updating the deep neural network is a gradient descent method.
[0037] Combined with the first aspect, further, the calculation formula of the total classification loss when the deep neural network is updated using the gradient descent method is:
[0038] L=λL1+L2
[0039] Among them, L is the total loss, λ is the weight factor that balances the impact of different losses, L1 is the nearest neighbor classifier loss, and L2 is the global classifier loss.
[0040] In combination with the first aspect, further, the calculation formula of the nearest neighbor classifier loss is:
[0041]
[0042] Among them, L1 is the nearest neighbor classifier loss, The nearest neighbor classifier converts the local query features Predicted to be The probability of the class, n q is the number of samples in the query set, and m represents the total number of classes.
[0043] In combination with the first aspect, further, the calculation formula of the global classifier loss is:
[0044]
[0045] Where L2 is the global classifier loss, n q is the number of samples in the query set, m represents the total number of classes, It is a local query feature The classification probability vector, The true global class representing a queryset sample.
[0046] In a second aspect, the present invention further provides a personal thermal comfort prediction system, comprising:
[0047] Data acquisition module: used to acquire environmental data, personal physiological data, personal facial thermal imaging and personal thermal comfort feedback data and divide them into support sets and query sets;
[0048] Thermal comfort level prediction module: used to input the data of the support set and the query set into the pre-trained deep neural network to obtain the personal thermal comfort level.
[0049] Compared with the prior art, the beneficial effects achieved by the present invention are:
[0050] The present invention provides a personal thermal comfort prediction method and system, which combine environmental data, personal physiological data, personal facial thermal imaging and personal thermal comfort feedback data. The personal thermal comfort feedback data is represented by thermal satisfaction degrees of different discrete levels. The data is sparse, that is, the number of thermal feedbacks from users is small. Therefore, the scheme of the present invention supports small sample learning, does not require a large amount of personal thermal comfort feedback data, and has strong practicality. All acquired data are divided into a support set and a query set and then input into a pre-trained deep neural network. During the pre-training process, only one or a small number of updates are required to realize sample learning. Therefore, it has the advantage of low computational complexity and can support model updates in dynamic environments. Through the above scheme, the present invention can achieve higher prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 This is one of the flow charts of a method for predicting personal thermal comfort provided by an embodiment of the present invention;
[0052] Figure 2 This is the second flowchart of a method for predicting personal thermal comfort provided by an embodiment of the present invention;
[0053] Figure 3 This is one of the comparison diagrams of the prediction accuracy and mean absolute error of the method of the present invention and other methods provided in the embodiments of the present invention;
[0054] Figure 4 This is the second comparison chart of the prediction accuracy and mean absolute error of the method of the present invention and other methods provided by the embodiments of the present invention;
[0055] Figure 5 This is the third comparison chart of the prediction accuracy and mean absolute error of the method of the present invention and other methods provided by the embodiment of the present invention;
[0056] Figure 6 It is a comparison chart of the prediction accuracy and mean absolute error of the method of the present invention provided by the embodiment of the present invention before and after the environment undergoes dynamic changes. DETAILED DESCRIPTION
[0057] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and are not intended to limit the protection scope of the present invention.
[0058] Example 1
[0059] like Figure 1 and Figure 2 As shown, an embodiment of the present invention provides a method for predicting personal thermal comfort, comprising:
[0060] S1. Obtain environmental data, personal physiological data, personal facial thermal imaging and personal thermal comfort feedback data and divide them into support sets and query sets.
[0061] Environmental data include average indoor temperature (°C) and average relative humidity (%).
[0062] Personal physiological data include age, gender (1: male; 2: female), height (cm), weight (kg), metabolic rate (met), clothing insulation, heart rate per minute (bpm) and skin temperature (℃).
[0063] Facial thermal imaging reflects the changes in the participants' facial temperature; specifically, the lower the temperature, the clearer the facial contour and the purpler the color, while the lower the temperature, the blurrier the facial contour and the yellower the color.
[0064] Personal thermal comfort feedback data are represented by different discrete levels of thermal satisfaction, which is specifically the actual thermal comfort level of the participants, represented by seven Arabic numerals from 1 to 7, corresponding to the seven thermal comfort levels of hot, warm, slightly warm, neutral, slightly cool, cool, and cold.
[0065] Personal thermal comfort feedback data is sparse, that is, the number of users' thermal comfort feedback is small; specifically, there are only seventy sets of personal thermal comfort feedback data for a single user, with ten sets of data for each thermal comfort level.
[0066] The acquired environmental data, personal physiological data, personal facial thermal imaging and personal thermal comfort feedback data are divided into a support set and a query set.
[0067] S2. Input the data of the support set and the query set into the pre-trained deep neural network to obtain the personal thermal comfort level.
[0068] The deep neural network in this embodiment includes an embedding module, a cross-attention module and a classification module.
[0069] The deep neural network in this embodiment has been pre-trained, and the training method is as follows:
[0070] Get the data of support set and query set;
[0071] Input the data of the support set and the query set into the embedding module in the deep neural network to obtain the class feature map and the query feature map;
[0072] Input the class feature map and the query feature map into the cross attention module in the deep neural network to obtain a class feature pair and a query feature pair;
[0073] Input the class feature pair and the query feature pair into the classification module in the deep neural network to obtain the personal thermal comfort level, and update the deep neural network by the gradient descent method;
[0074] Repeat all the above steps until convergence and complete the training.
[0075] The data of the support set and query set are input into the pre-trained deep neural network to obtain the personal thermal comfort level.
[0076] The data of the support set and query set are input into the embedding module in the pre-trained deep neural network. The embedding module consists of five cascaded convolutional layers, which reshape the input support set and query set data into class feature maps P k and query feature map Q b .
[0077] The criss-cross attention module consists of a correlation layer and a meta-fusion layer.
[0078] The correlation layer uses cosine distance to calculate the semantic correlation between the class feature map and the query feature map, and obtains the class correlation map and the query correlation map. The calculation formula is:
[0079]
[0080]
[0081]
[0082] Among them, R ij is the element in the i-th row and j-th column of the relevant map, R p is a class-dependent mapping, R q is the query-related mapping, p i is the local class feature vector at the i-th spatial position in the class feature map, q j is the local query feature vector at the jth spatial position in the query feature map, ||p i ||2 is p i The Euclidean norm of ||q j ||2 is q j The Euclidean norm of , T represents the transpose, m is the total spatial position of the two feature maps, Respectively represent the correlation between each local class feature vector and all local query feature vectors, They represent the correlation between each local query feature vector and all local class feature vectors.
[0083] The meta-fusion layer takes the class-related map and the query-related map as input, and fuses each local feature vector of the class-related map and the query-related map into an attention scalar by performing a convolution operation; then the attention scalar is normalized using the softmax function to obtain the class attention and query attention of the i-th position, and the calculation formula is:
[0084]
[0085]
[0086] w p =W2(σ(W1(GAP(R P ))))
[0087] w q =W2(σ(W1(GAP(R q ))))
[0088] in, is the class attention of the ith position, is the query attention of the ith position, w p is the first kernel function calculated using class-related mapping, w q is the second kernel function calculated using the query-related mapping, T represents transposition, r i q Represents the local class feature vector p i The correlation between all local query feature vectors, r i q Represents the local query feature vector q i with the correlation between all local class feature vectors, t represents the temperature hyperparameter, σ is the activation function, GAP represents the global average pooling operation, and W1 and W2 are the parameters of the meta-learner.
[0089] Finally, the initial class feature map, query feature map, class attention, and query attention are element-weighted to obtain the class feature pair and query feature pair The calculation formula is:
[0090]
[0091]
[0092] in, is a class feature pair, P k is the class feature map, is the query feature pair, Q b is the query feature map, A p is the class attention, A q It is a query attention.
[0093] The classification module consists of a nearest neighbor classifier and a global classifier.
[0094] The nearest neighbor classifier classifies the samples of the query set into C support classes according to a predefined similarity measure. The classifier predicts the local query features The probability of being the kth class is:
[0095]
[0096] in, Represents the query feature pair The eigenvector at the ith spatial position, Represents the query feature pair The cosine distance between the feature vector at the i-th spatial position and the average class feature after global average pooling; after calculating the cosine distance, use the softmax function to normalize the above cosine distance to obtain the predicted local query feature is the probability of the kth class.
[0097] The global classifier uses a fully connected layer and a softmax layer to classify each sample in the query set. Each local query feature The classification probability vector The calculation formula is:
[0098]
[0099] Among them, W C are the weights of the fully connected layer, Represents the query feature pair In the feature vector at the i-th spatial position, softmax maps multiple scalars into a probability distribution, is the true label value of the query set sample.
[0100] Finally, the label of the query set sample is predicted by finding the nearest average class feature under the cosine distance metric to obtain the predicted value of the query feature, thereby obtaining the personal thermal comfort level corresponding to the predicted value. The calculation formula of the predicted value of the query feature is:
[0101]
[0102] in, is the predicted value of the query feature, Indicates the value of k when the cosine distance between two features is minimized, k∈[-3,3], is a class feature pair, is a query feature pair, and GAP represents the global average pooling operation.
[0103] The total classification loss when updating the weights of a deep neural network using the gradient descent method is calculated as:
[0104] L=λL1+L2
[0105] Among them, L is the total loss, λ is the weight factor that balances the impact of different losses, L1 is the nearest neighbor classifier loss, and L2 is the global classifier loss.
[0106] The nearest neighbor classifier loss is calculated as:
[0107]
[0108] Among them, L1 is the nearest neighbor classifier loss, The nearest neighbor classifier converts the local query features Predicted to be The probability of the class, n q is the number of samples in the query set, and m represents the total number of classes.
[0109] The global classifier loss is calculated as:
[0110]
[0111] Where L2 is the global classifier loss, n q is the number of samples in the query set, m represents the total number of classes, It is a local query feature The classification probability vector, The true global class representing a queryset sample.
[0112] In order to demonstrate the effectiveness of the method of the present invention, other methods are introduced in this embodiment for comparison. Specifically, the seven comparison methods are predicted average voting, Gaussian naive Bayes, K nearest neighbor, decision tree, support vector machine classification, logistic regression, and random forest.
[0113] Figures 3 to 5 The comparison diagrams of the prediction accuracy and mean absolute error of the method of the present invention and other methods obtained by experiments on three users are respectively shown. The mean absolute error represents the average value of the absolute error between the target prediction value and the target true value, and its calculation formula is:
[0114]
[0115] Where n represents the number of target values. is the predicted value of the ith target, and y is the true value of the ith target.
[0116] Figures 3 to 5Each set of results in the figure is the average value after ten random experiments. It can be seen from the figure that the prediction accuracy and the average absolute error will be different for different users, but it is worth noting that even for different users, the prediction accuracy of the method of the present invention is still the highest among all methods, and the prediction accuracy for the three users is 92.85%, 72.85% and 70.00% respectively, and the average absolute error of the method of the present invention is also the lowest among all methods, and the prediction accuracy for the three users is 0.121, 0.571 and 0.613 respectively.
[0117] Figure 6 (a) shows the change in prediction accuracy of the method of the present invention before and after the environment undergoes dynamic changes. Figure 6 (b) shows the change in the mean absolute error of the method of the present invention before and after the environment undergoes dynamic changes. The result is also the average value after ten random experiments. As can be seen from the figure, the prediction accuracy and the mean absolute error of the method of the present invention are basically the same before and after the environment undergoes dynamic changes. The prediction accuracy has only a difference of 4.28%, and the mean absolute error has only a difference of 0.028. This shows that the method of the present invention is compatible and can adapt well to dynamic changes in the environment.
[0118] Example 2
[0119] An embodiment of the present invention provides a personal thermal comfort prediction system, comprising:
[0120] Data acquisition module: used to acquire environmental data, personal physiological data, personal facial thermal imaging and personal thermal comfort feedback data and divide them into support sets and query sets;
[0121] Thermal comfort level prediction module: used to input the data of the support set and the query set into the pre-trained deep neural network to obtain the personal thermal comfort level.
[0122] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0123] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0124] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0125] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0126] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for predicting personal thermal comfort, characterized in that: include: Obtain environmental data, personal physiological data, personal facial thermal imaging, and personal thermal comfort feedback data and divide them into a support set and a query set; Input the data of the support set and query set into the pre-trained deep neural network to obtain the personal thermal comfort level; The method for training the deep neural network includes: Get the data of support set and query set; Input the data of the support set and the query set into the embedding module in the deep neural network to obtain the class feature map and the query feature map; Input the class feature map and the query feature map into the cross attention module in the deep neural network to obtain a class feature pair and a query feature pair; Input the class feature pair and the query feature pair into the classification module in the deep neural network to obtain the personal thermal comfort level and update the deep neural network; Repeat all the above steps until convergence and complete the training; The data of the support set and query set are input into the pre-trained deep neural network to obtain the personal thermal comfort level, including: Input the data of the support set and the query set into the embedding module of the pre-trained deep neural network to obtain the class feature map and the query feature map; The data of the support set and query set are input into the pre-trained deep neural network to obtain the personal thermal comfort level, including: The class feature map and the query feature map are input into the cross attention module in the pre-trained deep neural network to obtain the class feature pair and the query feature pair. The calculation formula includes: Among them, R ij is the element in the i-th row and j-th column of the relevant map, R p is a class-dependent mapping, R q is the query-related mapping, p i is the local class feature vector at the i-th spatial position in the class feature map, q j is the local query feature vector at the jth spatial position in the query feature map, ||p i ||2 is p i The Euclidean norm of ||q j ||2 is q j The Euclidean norm of , T represents the transpose, m is the total spatial position of the two feature maps, Respectively represent the correlation between each local class feature vector and all local query feature vectors, Respectively represent the correlation between each local query feature vector and all local class feature vectors; w p =W2(σ(W1(GAP(R P )))) w q =W2(σ(W1(GAP(R q )))) in, is the class attention of the ith position, is the query attention of the ith position, w p is the first kernel function calculated using class-related mapping, w q is the second kernel function calculated using the query-related mapping, T represents transposition, r i q Represents the local class feature vector p i The correlation between all local query feature vectors, r i q Represents the local query feature vector q i The correlation between all local class feature vectors, t represents the temperature hyperparameter, σ is the activation function, GAP represents the global average pooling operation, and W1 and W2 are the parameters of the meta-learner; in, is a class feature pair, P k is the class feature map, is the query feature pair, Q b is the query feature map, A p is the class attention, A q It is query attention; The data of the support set and query set are input into the pre-trained deep neural network to obtain the personal thermal comfort level, including: The class feature pair and the query feature pair are input into the classification module in the deep neural network to obtain the predicted value of the query feature, thereby obtaining the personal thermal comfort level corresponding to the predicted value. The calculation formula includes: in, is the predicted value of the query feature, Indicates the value of k when the cosine distance between two features is minimized. is a class feature pair, is a query feature pair, and GAP represents the global average pooling operation.
2. A personal thermal comfort prediction method according to claim 1, characterized in that: The method for updating deep neural networks is gradient descent.
3. A personal thermal comfort prediction method according to claim 2, characterized in that: The total classification loss when updating a deep neural network using gradient descent is calculated as: L=λL1+L2 Among them, L is the total loss, λ is the weight factor that balances the impact of different losses, L1 is the nearest neighbor classifier loss, and L2 is the global classifier loss.
4. A personal thermal comfort prediction method according to claim 3, characterized in that: The calculation formula of the nearest neighbor classifier loss is: Among them, L1 is the nearest neighbor classifier loss, The nearest neighbor classifier converts the local query features Predicted to be The probability of the class, n q is the number of samples in the query set, and m represents the total number of classes.
5. A personal thermal comfort prediction method according to claim 3, characterized in that: The calculation formula of the global classifier loss is: Where L2 is the global classifier loss, n q is the number of samples in the query set, m represents the total number of classes, It is a local query feature The classification probability vector, The true global class representing a queryset sample.
6. A personal thermal comfort prediction system, characterized in that: include: Data acquisition module: used to acquire environmental data, personal physiological data, personal facial thermal imaging and personal thermal comfort feedback data and divide them into support sets and query sets; Thermal comfort level prediction module: used to input the data of the support set and the query set into the pre-trained deep neural network to obtain the personal thermal comfort level; In the thermal comfort level prediction module, the data of the support set and the query set are input into the pre-trained deep neural network to obtain the personal thermal comfort level, including: Input the data of the support set and the query set into the embedding module of the pre-trained deep neural network to obtain the class feature map and the query feature map; The data of the support set and query set are input into the pre-trained deep neural network to obtain the personal thermal comfort level, including: The class feature map and the query feature map are input into the cross attention module in the pre-trained deep neural network to obtain the class feature pair and the query feature pair. The calculation formula includes: Among them, R ij is the element in the i-th row and j-th column of the relevant map, R p is a class-dependent mapping, R q is the query-related mapping, p i is the local class feature vector at the i-th spatial position in the class feature map, q j is the local query feature vector at the jth spatial position in the query feature map, ||p i ||2 is p i The Euclidean norm of ||q j ||2 is q j The Euclidean norm of , T represents the transpose, m is the total spatial position of the two feature maps, Respectively represent the correlation between each local class feature vector and all local query feature vectors, Respectively represent the correlation between each local query feature vector and all local class feature vectors; w p =W2(σ(W1(GAP(R P )))) w q =W2(σ(W1(GAP(R q )))) in, is the class attention of the ith position, is the query attention of the ith position, w p is the first kernel function calculated using class-related mapping, w q is the second kernel function calculated using the query-related mapping, T represents transposition, r i q Represents the local class feature vector p i The correlation between all local query feature vectors, r i q Represents the local query feature vector q i The correlation between all local class feature vectors, t represents the temperature hyperparameter, σ is the activation function, GAP represents the global average pooling operation, and W1 and W2 are the parameters of the meta-learner; in, is a class feature pair, P k is the class feature map, is the query feature pair, Q b is the query feature map, A p is the class attention, A q It is query attention; The data of the support set and query set are input into the pre-trained deep neural network to obtain the personal thermal comfort level, including: The class feature pair and the query feature pair are input into the classification module in the deep neural network to obtain the predicted value of the query feature, thereby obtaining the personal thermal comfort level corresponding to the predicted value. The calculation formula includes: in, is the predicted value of the query feature, Indicates the value of k when the cosine distance between two features is minimized. is a class feature pair, is a query feature pair, and GAP represents the global average pooling operation.
Citation Information
Cited By
Air conditioner control method and system based on fuzzy control
CN116538667A
