Room temperature and two-supply temperature collaborative prediction method and model training method based on double-tower-pointer network

By using a collaborative prediction method based on a dual-tower-pointer network, the problem of relying on manual experience for secondary heating temperature regulation in traditional heating systems is solved. This method achieves dynamic coupling and adaptive prediction between room temperature and secondary heating temperature, thereby improving prediction accuracy and heating efficiency.

CN121525519BActive Publication Date: 2026-03-24TIANJIN HONGDA CREDIT SUISSE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-13
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

In traditional centralized heating systems, the adjustment of secondary water supply temperature (secondary heating) relies on human experience, which cannot respond in a timely manner to weather changes and differences in building thermal inertia, resulting in low prediction accuracy and an inability to adapt to personalized heating needs.

Method used

A collaborative prediction method for room temperature and secondary heating supply based on a dual-tower pointer network is adopted. By using a dual-tower coupled interactive prediction network and a dynamic optimal step-size pointer network, dynamic coupling interaction and adaptive prediction of room temperature and secondary heating supply are achieved. The prediction step-size selection is optimized by combining a hybrid mechanism of generation branch and pointer branch.

Benefits of technology

It improves the accuracy of room temperature and secondary heating prediction and heating efficiency, and realizes dynamic adjustment of heat distribution according to weather changes and building characteristics, thereby improving the heating quality for users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121525519B_ABST
    Figure CN121525519B_ABST
Patent Text Reader

Abstract

The application relates to a room temperature and two-supply temperature collaborative prediction method and model training method based on a double-tower-pointer network, and relates to the field of intelligent heat supply, which comprises the following steps: acquiring room temperature feature data and two-supply temperature feature data and inputting the double-tower-pointer network prediction model, wherein the double-tower-pointer network prediction model comprises a double-tower coupled interactive prediction network and a dynamic optimal step pointer network; the double-tower coupled interactive prediction network comprises a room temperature tower, a two-supply temperature tower and a feature interaction module, the feature interaction module is used for realizing inter-tower cyclic coupled interaction, the room temperature tower outputs a plurality of step room temperature prediction sequences, and the two-supply temperature tower outputs a plurality of step two-supply temperature setting sequences; and the dynamic optimal step pointer network adaptively outputs an optimal prediction step K, a future K-step two-supply temperature setting sequence and a corresponding room temperature prediction sequence based on the plurality of room temperature prediction sequences and the two-supply temperature setting sequence. The application solves the technical problem of room temperature and two-supply temperature double-variable coupled prediction, and improves the prediction accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of intelligent heating, in particular to a room temperature and secondary water supply temperature collaborative prediction method and model training method based on a double-tower-pointer network. BACKGROUND

[0002] In the traditional centralized heating system, the adjustment of the secondary water supply temperature (referred to as "secondary temperature") has long relied on the manual experience setting of the operation and maintenance personnel, and lacks a precise response mechanism for complex dynamic variables. On the one hand, the random fluctuations of weather conditions such as daytime temperature difference, sudden cold wave, and alternating sunshine and rain are difficult to adjust in time through artificial prediction; on the other hand, the building thermal inertia presents significant individualized characteristics due to differences in building envelope characteristics (such as thermal insulation performance, wall material), layout of house type, and individual differences in user heating habits, and the fixed secondary temperature set by artificial cannot adapt to these differentiated needs. SUMMARY

[0003] In order to cope with the indoor temperature fluctuations caused by weather changes, and adjust the secondary temperature according to the differences in building thermal inertia and user heating habits, solve the technical problem of double-variable coupling prediction of room temperature and secondary temperature, and improve the accuracy of room temperature and secondary temperature prediction, the present application provides a room temperature and secondary temperature collaborative prediction method and model training method based on a double-tower-pointer network.

[0004] In a first aspect, the present application provides a room temperature and secondary temperature collaborative prediction method based on a double-tower-pointer network, which adopts the following technical solution:

[0005] A room temperature and secondary temperature collaborative prediction method based on a double-tower-pointer network, comprising the following steps:

[0006] Obtaining room temperature feature data and secondary temperature feature data;

[0007] Inputting the room temperature feature data and the secondary temperature feature data into a double-tower-pointer network prediction model, and through the collaborative work of a double-tower coupling interaction prediction network and a dynamic optimal step pointer network of the double-tower-pointer network prediction model, outputting an adaptive optimal prediction step K, a future K-step secondary temperature setting sequence, and a corresponding room temperature prediction sequence;

[0008] The double-tower coupling interaction prediction network comprises a room temperature tower, a secondary temperature tower, and at least one feature interaction module, the feature interaction module is used to realize the inter-tower cyclic coupling interaction of the room temperature tower and the secondary temperature tower, the room temperature tower outputs a room temperature prediction sequence of multiple different prediction steps and tends to a target temperature, and the secondary temperature tower outputs a secondary temperature setting sequence of multiple corresponding prediction steps;

[0009] The dynamic optimal step pointer network adaptively outputs an optimal prediction step K based on multiple room temperature prediction sequences and corresponding two-temperature supply setting sequences.

[0010] By adopting the above technical solution, the room temperature tower can predict indoor temperature, the two-temperature supply tower can predict two-temperature supply, and the feature interaction module arranged between the room temperature tower and the two-temperature supply tower can realize dynamic coupling interaction between the two towers, realize collaborative prediction of future period room temperature and two-temperature supply based on target room temperature, solve the problems of disconnection between room temperature and two-temperature supply prediction and high collaborative error in the traditional mode, and effectively improve the accuracy of room temperature and two-temperature supply prediction; the dynamic optimal step pointer network can adaptively select a prediction step according to weather changes, building thermal inertia differences and user heating habits, quickly converge under simple working conditions, prolong planning under complex working conditions, realize dynamic adjustment of the prediction range and on-demand allocation of heating capacity, improve unit two-temperature supply control precision and heating efficiency, and greatly improve user heating quality.

[0011] In a specific implementable embodiment, the room temperature feature data includes a historical room temperature sequence, historical weather data, future weather data, current room temperature data and target room temperature data, and the room temperature feature data is input into the room temperature tower.

[0012] The two-temperature supply feature data includes a historical two-temperature supply sequence, historical weather data, future weather data, current room temperature data and target room temperature data, and the two-temperature supply feature data is input into the two-temperature supply tower.

[0013] In a specific implementable embodiment, the weather data includes one or more of ambient temperature data, humidity data, wind speed data, wind direction data and weather phenomenon data.

[0014] In a specific implementable embodiment, the dynamic optimal step pointer network includes a temperature encoder, a feature encoder, a generation branch, a pointer branch and a hybrid mechanism; the hybrid mechanism fuses probability distributions of the generation branch and the pointer branch through a generation probability p_gen, and adaptively outputs an optimal prediction step K.

[0015] By adopting the above technical solution, the dynamic optimal step pointer network adopts a hybrid mechanism of the generation branch and the pointer branch, combines a context-based generative method and a pointer method based on historical information, and improves the accuracy of step selection.

[0016] In a specific implementable embodiment, the dynamic optimal step pointer network further includes a temperature difference feature extraction module, the temperature difference feature extraction module extracts a temperature difference feature set through feature engineering, and the temperature difference feature set includes one or more of a basic feature, a trigonometric function feature, a logarithmic feature, a normalized feature, a trend feature and a supply- return water temperature difference feature.

[0017] By adopting the technical scheme, the single-dimensional temperature sequence is converted into a multi-dimensional and multi-scale temperature difference feature containing space-time information by increasing the basic feature, the trigonometric function feature, the logarithmic feature, the normalized feature, and embedding the physical principle in the trend feature and the water supply-return water temperature difference feature, and the adaptability and the prediction performance of the model in different working conditions such as the severe cold period, the transition season and the extreme high temperature are significantly improved.

[0018] In a specific implementable scheme, the calculation manner of the generation probability p_gen in the mixing mechanism is: p_gen = σ (W_p·[h_t, s_t, x_t] + b_p), wherein σ is a sigmoid activation function, W_p is a weight matrix, b_p is a bias term, h_t is a current time hidden state, s_t is a feature encoder output, and x_t is a temperature difference feature extraction module output.

[0019] In a specific implementable scheme, the loss function TotalLoss of the double-tower-pointer network prediction model includes a weighted sum of a room temperature reconstruction loss L_rec_r, a secondary supply temperature reconstruction loss L_rec_u, a pointer network loss L_ptr, a room temperature smoothing loss L_smooth_r, a room temperature boundary constraint loss L_bounds, a first-step secondary supply temperature loss L_first_supply, and a ranking loss L_ranking.

[0020] TotalLoss = α·L_rec_r + β·L_rec_u + γ·L_ptr + δ·L_smooth_r + η·L_bounds + θ·L_first_supply + ι·L_ranking

[0021] Wherein, L_rec_r is the room temperature reconstruction loss, L_rec_u is the secondary supply temperature reconstruction loss, L_ptr is the pointer network loss, L_smooth_r is the room temperature smoothing loss, L_bounds is the room temperature boundary constraint loss, L_first_supply is the first-step secondary supply temperature loss, L_ranking is the ranking loss, and α, β, γ, δ, η, θ, ι are positive weight coefficients.

[0022] By adopting the technical scheme, the joint optimization of multiple loss terms is adopted, and it is ensured that the prediction result meets the physical constraint and the control logic, and the reliability of the model prediction is improved.

[0023] In a specific implementable scheme, the room temperature reconstruction loss L_rec_r is:

[0024] L_rec_r = E_k~p[L_rec,r(k)] = Σ_k[p_k·L_rec,r(k)]

[0025] where E_k~p[L_rec,r(k)] is the probability expectation of L_rec,r(k), i.e., the weighted average of L_rec,r(k) corresponding to different step numbers k, p_k is the prediction probability of the kth step output by the pointer network, L_rec,r(k) = (1 / k)∑[T_room(t) - T_room,true(t)]² is the room temperature mean square error loss of the kth candidate sequence, T_room(t) is the predicted room temperature at the tth step, and T_room,true(t) is the true room temperature at the tth step;

[0026] The two-supply temperature reconstruction loss L_rec_u is:

[0027] L_rec_u = E_k~p[L_rec,u(k)] =∑_k[p_k·L_rec,u(k)]

[0028] where E_k~p[L_rec,u(k)] is the probability expectation of L_rec,u(k), i.e., the weighted average of L_rec,u(k) corresponding to different step numbers k, p_k is the prediction probability of the kth step output by the pointer network, L_rec,u(k) = (1 / k)∑[T_supply(t) - T_supply,true(t)]² is the room temperature mean square error loss of the kth candidate sequence, T_supply(t) is the predicted two-supply temperature at the tth step, and T_supply,true(t) is the true two-supply temperature at the tth step;

[0029] The pointer network loss L_ptr is:

[0030] L_ptr = -∑y_k·log(p_k+ε)

[0031] where y_k is the one-hot encoding of the true optimal step number K_true, i.e., y_k = 1 if K_true = k, and y_k = 0 otherwise, p_k is the prediction probability of the kth step output by the pointer network, and ε is a numerical stability constant;

[0032] The room temperature smoothing loss L_smooth_r is:

[0033] L_smooth_r = E_k~p[∑_t|T_room(t+1) - T_room(t)| / (k-1)]

[0034] E_k~p[∑_t|T_room(t+1)-T_room(t)| / (k-1)] is the probability expectation of ∑_t|T_room(t+1)-T_room(t)| / (k-1), i.e., the weighted average of ∑_t|T_room(t+1)-T_room(t)| / (k-1) corresponding to different step numbers k, and the weight is the k-th step prediction probability p_k output by the pointer network, T_room(t) is the t-th step predicted room temperature, and k is the candidate sequence length;

[0035] The room temperature boundary constraint loss L_bounds is:

[0036] L_bounds=E_k~p[∑_t(max(0,T_lower-T_room(t))+max(0,T_room(t)-T_upper)) / k]

[0037] E_k~p[∑_t(max(0,T_lower-T_room(t))+max(0,T_room(t)-T_upper)) / k] is the probability expectation of ∑_t(max(0,T_lower-T_room(t))+max(0,T_room(t)-T_upper)) / k, i.e., the weighted average of ∑_t(max(0,T_lower-T_room(t))+max(0,T_room(t)-T_upper)) / k corresponding to different step numbers k, and the weight is the k-th step prediction probability p_k output by the pointer network, T_lower=min(T_current,T_target), T_current is the current measured room temperature, T_target is the target room temperature, and T_upper=max(T_current,T_target);

[0038] The first step two-supply temperature loss L_first_supply is:

[0039] L_first_supply=E_k~p[max(0,-sign(ΔT_target)·ΔT_supply_first)+max(0,|ΔT_supply_first|-1.0)]

[0040] E_k~p[max(0,-sign(ΔT_target)·ΔT_supply_first)+max(0,|ΔT_supply_first|-1.0)] is the probability expectation of max(0,-sign(ΔT_target)·ΔT_supply_first)+max(0,|ΔT_supply_first|-1.0), that is, the weighted average of max(0,-sign(ΔT_target)·ΔT_supply_first)+max(0,|ΔT_supply_first|-1.0) corresponding to different step numbers k, and the weight is the kth step prediction probability p_k output by the pointer network, ΔT_target is the target temperature difference, and ΔT_supply_first is the first step two-supply temperature change;

[0041] The ranking loss L_ranking is:

[0042] L_ranking=||E_k~p[k]-K_true||²

[0043] E_k~p[k]=Σp_k·k is the predicted expected step number, and p_k is the kth step prediction probability output by the pointer network.

[0044] In a specific implementation, the room temperature column and the two-supply temperature column input end in the double-column coupled interactive prediction network are both provided with an overlapping Patch embedding layer, and the Patch embedding layer is configured with a sine-cosine position encoding unit and a learnable global token.

[0045] By using the above technical solution, the Patch embedding layer converts the time sequence into patch representation, enhances the model's ability to capture time sequence information, and the overlapping design ensures the integrity of the boundary information, significantly improving the model's perception ability of temperature mutation and trend change.

[0046] In a specific implementation, the overlapping rate of the Patch embedding layer is 40%-60%, and the dimension of the learnable global token is consistent with the Patch embedding feature dimension.

[0047] In a specific implementation, the feature interaction module is a CrossTransformerBlock interaction module, and the room temperature column and the two-supply temperature column realize inter-column cyclic coupled interaction through the self-attention unit and the cross-attention unit of the CrossTransformerBlock interaction module.

[0048] In a specific implementable scheme, the number of CrossTransformerBlock interaction modules is 2-6, the adjacent CrossTransformerBlock is connected through layer normalization, the self-attention unit of the CrossTransformerBlock interaction module is used to realize the feature interaction of the patch sequence in each tower, and the cross-attention unit of the CrossTransformerBlock interaction module is used to realize the global label and feature interaction between the ambient temperature tower and the two-temperature supply tower.

[0049] In a specific implementable scheme, the CrossTransformerBlock interaction module includes a self-attention unit, a cross-attention unit and a feedforward network unit, the self-attention unit performs self-attention calculation within the patch sequence, the cross-attention unit performs cross-attention calculation with the global label as the query and the feature sequence as the key value, and the feedforward network unit performs nonlinear transformation on each position, and the CrossTransformerBlock realizes information fusion through residual connection and layer normalization.

[0050] In a second aspect, the application provides a room temperature and two-temperature supply collaborative prediction model training method based on a double-tower-pointer network, which adopts the following technical scheme:

[0051] A room temperature and two-temperature supply collaborative prediction model training method based on a double-tower-pointer network includes the following steps:

[0052] Model architecture building: building the double-tower-pointer network prediction model in the above, including a double-tower coupled interaction prediction network and a dynamic optimal step pointer network;

[0053] Training in stages, including:

[0054] Dynamic optimal step pointer network training: freeze all parameters of the double-tower coupled interaction prediction network, only train the dynamic optimal step pointer network, and learn the step selection strategy;

[0055] Double-tower coupled interaction prediction network training: freeze all parameters of the dynamic optimal step pointer network, train the double-tower coupled interaction prediction network based on the fixed step output by the dynamic optimal step pointer network, and learn the temperature prediction capability;

[0056] Joint training: unfreeze all parameters, train the dynamic optimal step pointer network and the double-tower coupled interaction prediction network at the same time, and output the optimal prediction model.

[0057] By adopting the technical solution, the double-tower-pointer network prediction model is trained in stages, the dynamic optimal step pointer network and the double-tower coupled interaction prediction network are trained separately in sequence first, and then the double-tower-pointer network prediction model is trained as a whole, so that the problems of mutual interference of gradients and model convergence in the training process of the double-tower model are solved, and the loss fluctuation range in the model training process is much lower than that in the traditional joint training mode.

[0058] In a third aspect, the application provides a room temperature and two-supply temperature collaborative prediction system based on a double-tower-pointer network, which adopts the following technical solution:

[0059] A room temperature and two-supply temperature collaborative prediction system based on a double-tower-pointer network comprises:

[0060] A data acquisition and preprocessing module is configured to acquire initial data of room temperature feature data and two-supply temperature feature data and perform preprocessing.

[0061] A model deployment and prediction output module is configured to load the double-tower-pointer network prediction model in the above and output an optimal prediction step K, a future K-step two-supply temperature setting sequence, and a corresponding room temperature prediction sequence.

[0062] In a fourth aspect, the application provides a computer readable storage medium, which adopts the following technical solution:

[0063] A computer readable storage medium stores a computer program capable of being loaded by a processor and executing the above-mentioned room temperature and two-supply temperature collaborative prediction method based on a double-tower-pointer network.

[0064] In summary, the application has at least one of the following beneficial technical effects:

[0065] In the double-tower coupled interaction prediction network, the room temperature tower and the two-supply temperature tower respectively perform accurate prediction on the room temperature and the two-supply temperature, the CrossTransformerBlock interaction module realizes dynamic coupling interaction between the room temperature and the two-supply temperature, and the accuracy of room temperature and two-supply temperature prediction is effectively improved;

[0066] The dynamic optimal step pointer network can adaptively select a prediction step according to weather changes, building thermal inertia differences, and user heating habits, realize dynamic adjustment of a prediction range, and distribute heating according to demand.

[0067] The dynamic optimal step pointer network adopts a hybrid mechanism of a generation branch and a pointer branch, combines a context-based generative method and a pointer method based on historical information, and improves the accuracy of step selection.

[0068] By extending the basic features, trigonometric function features, logarithmic features, normalized features, trend features and supply- return temperature difference features, the adaptability and prediction performance of the model in different working conditions such as cold period, transition season and extreme high temperature are significantly improved.

[0069] The two-tower-pointer network prediction model is trained in stages, which avoids the common problems of gradient interference and convergence imbalance in the training of the two-tower model, and realizes efficient learning and stable convergence of the model. BRIEF DESCRIPTION OF DRAWINGS

[0070] Figure 1 is a flowchart of a room temperature and two-supply temperature collaborative prediction method based on a two-tower-pointer network according to an embodiment of the present application;

[0071] Figure 2 is a flowchart of a room temperature and two-supply temperature collaborative prediction model training method based on a two-tower-pointer network according to an embodiment of the present application. DETAILED DESCRIPTION

[0072] The following will be described in detail with reference to the accompanying Figures 1-2 The present application will be further described in detail.

[0073] The embodiment of the present application discloses a room temperature and two-supply temperature collaborative prediction method based on a two-tower-pointer network.

[0074] Reference Figure 1 The room temperature and two-supply temperature collaborative prediction method based on a two-tower-pointer network comprises the following steps:

[0075] Obtain room temperature feature data and two-supply temperature feature data and pre-process them.

[0076] Specifically, the room temperature feature data includes a historical room temperature sequence, historical weather data, future weather data, current room temperature data and target room temperature data. The room temperature feature data is used to input a room temperature tower, and then the indoor temperature is predicted. The weather data includes one or more of environmental temperature data, humidity data, wind speed data, wind direction data and weather phenomenon data.

[0077] Further, the historical room temperature sequence includes a historical 24h room temperature sequence, the historical weather data includes historical 24h environmental temperature data, humidity data, wind speed data, wind direction data and weather phenomenon data, and the future weather data includes future 6h environmental temperature data, humidity data, wind speed data, wind direction data and weather phenomenon data.

[0078] Specifically, the two-supply temperature feature data includes a historical two-supply temperature sequence, historical weather data, future weather data, current room temperature data and target room temperature data. The two-supply temperature feature data is used to input a two-supply temperature tower, and then the two-supply temperature is predicted.

[0079] Further, the historical two-supply temperature sequence includes a historical 24h two-supply temperature sequence, the historical weather data includes historical 24h ambient temperature data, humidity data, wind speed data, wind direction data, and weather phenomenon data, and the future weather data includes future 6h ambient temperature data, humidity data, wind speed data, wind direction data, and weather phenomenon data.

[0080] The obtained raw room temperature feature data and raw two-supply temperature feature data are preprocessed by denoising, completion, desensitization, etc., to generate standardized input data.

[0081] The preprocessed room temperature feature data and two-supply temperature feature data are input into the double-tower-pointer network prediction model, and the double-tower coupled interactive prediction network and the dynamic optimal step pointer network of the double-tower-pointer network prediction model work cooperatively to output an adaptive optimal prediction step K, a future K-step two-supply temperature setting sequence, and a corresponding room temperature prediction sequence.

[0082] The double-tower coupled interactive prediction network includes a room temperature tower, a two-supply temperature tower, and at least one feature interaction module. The feature interaction module is used to realize the inter-tower cyclic coupled interaction of the room temperature tower and the two-supply temperature tower. The room temperature tower outputs a plurality of room temperature prediction sequences of different prediction steps and tending towards a target temperature, and the two-supply temperature tower outputs a plurality of two-supply temperature setting sequences corresponding to the prediction steps. In this embodiment, the room temperature tower outputs six room temperature prediction sequences tending towards the target temperature with steps of 1-6, and the two-supply temperature tower outputs six corresponding two-supply temperature setting sequences with steps of 1-6.

[0083] Specifically, the feature interaction module is a CrossTransformerBlock interaction module, and the room temperature tower and the two-supply temperature tower realize the inter-tower cyclic coupled interaction through the self-attention unit and the cross-attention unit of the CrossTransformerBlock interaction module. The input ends of the room temperature tower and the two-supply temperature tower in the double-tower coupled interactive prediction network are both provided with a Patch embedding layer with an overlap rate of 40%-60%. The Patch embedding layer is configured with a sine-cosine position encoding unit and a learnable global marker. In this embodiment, the overlap rate of the Patch embedding layer is 50%, and the dimension of the learnable global marker is consistent with the dimension of the Patch embedding feature. The Patch embedding layer converts the time series into patch representation, enhancing the model's ability to capture time series information and thus improving the model's ability to perceive temperature mutations and trend changes.

[0084] Further, the room temperature tower and the two-supply temperature tower in the double-tower coupled interactive prediction network both adopt differential feature enhancement. First-order difference, second-order difference, and trend features are calculated for the historical room temperature sequence and the historical two-supply temperature sequence, respectively. The differential features and the corresponding historical room temperature sequence or historical two-supply temperature sequence are spliced and input into the Patch embedding layer of the room temperature tower or the two-supply temperature tower, respectively, to enhance the time series modeling capability.

[0085] The room temperature tower comprises a prior generation module, a basic prediction module and a gated fusion module, the prior generation module generates a monotonic change prior sequence based on a current room temperature, a target room temperature and a temperature difference direction; the basic prediction module fuses historical room temperature time sequence features, historical and future weather time sequence features to generate a basic prediction sequence accurately reflecting actual room temperature changes; and the gated fusion module dynamically adjusts the fusion weights of the room temperatures of the prior sequence and the basic prediction sequence based on a current working condition, and outputs a fused room temperature prediction sequence.

[0086] Specifically, the number of CrossTransformerBlock interaction modules is 2-6, and the adjacent CrossTransformerBlock modules are connected through layer normalization. In this embodiment, the number of CrossTransformerBlock interaction modules is 6.

[0087] The CrossTransformerBlock interaction module comprises a self-attention unit, a cross-attention unit and a feedforward network unit, the room temperature tower and the two-temperature supply tower are cyclically coupled and interacted through the self-attention unit and the cross-attention unit of the CrossTransformerBlock interaction module, the self-attention unit is used to realize the feature interaction of the patch sequence in each tower, and the cross-attention unit is used to realize the global label and feature interaction between the room temperature tower and the two-temperature supply tower.

[0088] Further, the self-attention unit performs self-attention calculation on the patch sequence, the cross-attention unit performs cross-attention calculation with the global label as the query and the feature sequence as the key value, and the feedforward network unit performs nonlinear transformation on each position, and the CrossTransformerBlock realizes information fusion through residual connection and layer normalization.

[0089] The dynamic optimal step pointer network adaptively outputs an optimal prediction step K based on a plurality of room temperature prediction sequences and corresponding two-temperature supply setting sequences.

[0090] Specifically, the dynamic optimal step pointer network comprises a temperature encoder, a feature encoder, a temperature difference feature extraction module, a generation branch, a pointer branch and a hybrid mechanism, the hybrid mechanism fuses the probability distribution of the generation branch and the pointer branch through a generation probability p_gen to adaptively output an optimal prediction step K. The calculation method of the generation probability p_gen in the hybrid mechanism is as follows:

[0091] p_gen = σ (W_p·[h_t, s_t, x_t] + b_p)

[0092] wherein, sigma is a sigmoid activation function, W_p is a weight matrix, b_p is a bias term, h_t is a current time hidden state, s_t is a feature encoder output, and x_t is a temperature difference feature extraction module output.

[0093] The temperature difference feature extraction module extracts a temperature difference feature set through feature engineering, and the temperature difference feature set includes basic features, trigonometric function features, logarithmic features, normalized features, trend features, and supply-return water temperature difference features.

[0094] Further, the basic features include a temperature difference, an absolute value of the temperature difference, a square of the temperature difference, and a sign of the temperature difference; the trigonometric function features include cosine and sine features of the temperature difference, which are calculated after the temperature difference is mapped to an angle range [-pi / 2, pi / 2]; the logarithmic features are logarithms of the absolute value of the temperature difference, which are used to process temperature differences of different magnitudes; the normalized features are normalized to the range [-1, 1] through a tanh function; the trend features are a change trend of the historical temperature at the last four time steps, including a combination of a room temperature trend and a secondary supply temperature trend; and the supply-return water temperature difference features are a difference between a supply water temperature and a room temperature at the last time step.

[0095] The temperature encoder encodes the historical room temperature sequence and the historical secondary supply temperature sequence based on a Patch embedding layer to extract a global time sequence context; the feature encoder projects and calculates cross-attention of the historical features and the future features; the temperature difference feature extraction module significantly improves the adaptability and prediction performance of the model under extreme working conditions by adding the basic features, the trigonometric function features, the logarithmic features, the normalized features, the trend features, and the supply-return water temperature difference features; the generation branch generates a step probability distribution based on the global context and the temperature difference feature set; the pointer branch generates a step probability distribution by selecting relevant information from the historical patches through a pointer attention mechanism; and the hybrid mechanism fuses the probability distributions of the generation branch and the pointer branch through a generation probability p_gen to adaptively output an optimal prediction step K. The hybrid mechanism combines the context-based generative method and the pointer method based on historical information, thereby improving the accuracy of step selection.

[0096] Specifically, the loss function TotalLoss of the double-tower-pointer network prediction model is obtained by weighted summation of the room temperature reconstruction loss L_rec_r, the secondary supply temperature reconstruction loss L_rec_u, the pointer network loss L_ptr, the room temperature smoothing loss L_smooth_r, the room temperature boundary constraint loss L_bounds, the first-step secondary supply temperature loss L_first_supply, and the ranking loss L_ranking. The double-tower-pointer network prediction model adopts joint optimization of multiple loss terms to ensure that the prediction result meets the physical constraints and control logic, thereby improving the reliability of the model prediction.

[0097] That is, the loss function of the double-tower-pointer network prediction model is:

[0098] TotalLoss = a · L_rec_r + b · L_rec_u + g · L_ptr + d · L_smooth_r + h · L_bounds + 0 · L_first_supply + i · L_ranking

[0099] wherein a, b, g, d, h, 0, i are positive weight coefficients.

[0100] Specifically, the room temperature reconstruction loss L_rec_r is:

[0101] L_rec_r = E_k~p[L_rec,r(k)] =∑_k[p_k·L_rec,r(k)]

[0102] wherein E_k~p[L_rec,r(k)] is the probability expectation of L_rec,r(k), i.e., the weighted average of L_rec,r(k) corresponding to different step numbers k, p_k is the prediction probability of the kth step output by the pointer network, and L_rec,r(k) = (1 / k)∑[T_room(t)-T_room,true(t)]² is the room temperature mean square error loss of the kth candidate sequence, T_room(t) is the predicted room temperature at the tth step, and T_room,true(t) is the true room temperature at the tth step.

[0103] The two-supply temperature reconstruction loss L_rec_u is:

[0104] L_rec_u = E_k~p[L_rec,u(k)] =∑_k[p_k·L_rec,u(k)]

[0105] wherein E_k~p[L_rec,u(k)] is the probability expectation of L_rec,u(k), i.e., the weighted average of L_rec,u(k) corresponding to different step numbers k, p_k is the prediction probability of the kth step output by the pointer network, and L_rec,u(k) = (1 / k)∑[T_supply(t)-T_supply,true(t)]² is the room temperature mean square error loss of the kth candidate sequence, T_supply(t) is the predicted two-supply temperature at the tth step, and T_supply,true(t) is the true two-supply temperature at the tth step.

[0106] The pointer network loss L_ptr is:

[0107] L_ptr = -∑y_k·log(p_k+ε)

[0108] where y_k is the one-hot encoding of the true optimal step number K_true, y_k = 1 if K_true = k, otherwise y_k = 0, p_k is the k-th step prediction probability output by the pointer network, and ε is a numerical stability constant, ε = 10 −7 .

[0109] The room temperature smoothness loss L_smooth_r is:

[0110] L_smooth_r = E_k~p[∑_t |T_room(t+1)-T_room(t)| / (k-1)]

[0111] where E_k~p[∑_t |T_room(t+1)-T_room(t)| / (k-1)] is the probability expectation of ∑_t |T_room(t+1)-T_room(t)| / (k-1), i.e., the weighted average of ∑_t |T_room(t+1)-T_room(t)| / (k-1) corresponding to different step numbers k, with the weights being the k-th step prediction probability p_k output by the pointer network, T_room(t) is the t-th step predicted room temperature, and k is the candidate sequence length. When k = 1, L_smooth_r = 0.

[0112] The room temperature boundary constraint loss L_bounds ensures that the room temperature prediction is within the range of [min(T_current, T_target), max(T_current, T_target)], and is specifically:

[0113] L_bounds = E_k~p[∑_t (max(0, T_lower-T_room(t))+max(0, T_room(t)-T_upper)) / k]

[0114] where E_k~p[∑_t (max(0, T_lower-T_room(t))+max(0, T_room(t)-T_upper)) / k] is the probability expectation of ∑_t (max(0, T_lower-T_room(t))+max(0, T_room(t)-T_upper)) / k, i.e., the weighted average of ∑_t (max(0, T_lower-T_room(t))+max(0, T_room(t)-T_upper)) / k corresponding to different step numbers k, with the weights being the k-th step prediction probability p_k output by the pointer network, T_lower = min(T_current, T_target), T_current is the current measured room temperature, T_target is the target room temperature, and T_upper = max(T_current, T_target).

[0115] The first supply temperature loss L_first_supply is:

[0116] L_first_supply = E_k~p[max(0,-sign(ΔT_target)·ΔT_supply_first)+max(0,|ΔT_supply_first|-1.0)]

[0117] wherein E_k~p[max(0,-sign(ΔT_target)·ΔT_supply_first)+max(0,|ΔT_supply_first|-1.0)] is the probability expectation of max(0,-sign(ΔT_target)·ΔT_supply_first)+max(0,|ΔT_supply_first|-1.0), i.e. the weighted average of max(0,-sign(ΔT_target)·ΔT_supply_first)+max(0,|ΔT_supply_first|-1.0) corresponding to different step numbers k, with the weight being the k-th step prediction probability p_k output by the pointer network, ΔT_target is the target temperature difference, and ΔT_supply_first is the first step two-supply temperature change.

[0118] The ranking loss L_ranking is:

[0119] L_ranking = ||E_k~p[k]-K_true||²

[0120] wherein E_k~p[k] = Σ p_k·k is the predicted expected step number, and p_k is the k-th step prediction probability output by the pointer network.

[0121] In another embodiment, the loss function TotalLoss further includes a weighted sum of the two-supply temperature trend loss L_trend, the room temperature monotonicity loss L_mono, the alignment loss L_align, and the physical consistency loss L_consistency.

[0122] That is, the loss function is:

[0123] TotalLoss = α·L_rec_r + β·L_rec_u + γ·L_ptr + δ·L_smooth_r + ε·L_trend + ζ·L_mono + η·L_bounds + θ·L_first_supply + ι·L_ranking + κ·L_align + λ·L_consistency

[0124] L rec_r + L rec_u + L ptr + L smooth_r + L trend + L mono + L bounds + L first supply + L ranking + L align + L consistency, where L rec_r is the room temperature reconstruction loss, L rec_u is the two-supply temperature reconstruction loss, L ptr is the pointer network loss, L smooth_r is the room temperature smoothing loss, L trend is the two-supply temperature trend loss, L mono is the room temperature monotonicity loss, L bounds is the room temperature boundary constraint loss, L first supply is the first two-supply temperature loss, L ranking is the ranking loss, L align is the alignment loss, L consistency is the physical consistency loss, and a, b, g, d, e, z, h, q, i, k, l are positive weight coefficients.

[0125] The two-supply temperature trend loss L trend is:

[0126] L trend = E k ~ p [∑ t (ΔT supply_pred (t) - ΔT supply_true (t)) 2 / k]

[0127] where E k ~ p [∑ t (ΔT supply_pred (t) - ΔT supply_true (t)) 2 / k] is the probability expectation of ∑ t (ΔT supply_pred (t) - ΔT supply_true (t)) 2 / k, i.e., the weighted average of ∑ t (ΔT supply_pred (t) - ΔT supply_true (t)) 2 / k corresponding to different step numbers k, with the weight being the k-th step prediction probability p k output by the pointer network, ΔT supply_pred (t) is the predicted two-supply temperature change, ΔT supply_true (t) is the true two-supply temperature change, and k is the candidate sequence length.

[0128] The room temperature monotonicity loss L mono ensures that the room temperature prediction changes monotonically, specifically:

[0129] when T current < T target,

[0130] L mono = E k ~ p {∑ max [0, T room (t) - T room (t+1)]}

[0131] when T current > T target,

[0132] L mono = E k ~ p {∑ max [0, T room (t+1) - T room (t)]}

[0133] E_k~p{Σmax[0,T_room(t)-T_room(t+1)]} is the probability expectation of Σmax[0,T_room(t)-T_room(t+1)], that is, the weighted average of Σmax[0,T_room(t)-T_room(t+1)] corresponding to different step numbers k, and the weight is the prediction probability p_k output by the pointer network at the kth step. Similarly, E_k~p{Σmax[0,T_room(t+1)-T_room(t)]} is the probability expectation of Σmax[0,T_room(t+1)-T_room(t)], T_current is the current measured room temperature, T_target is the target room temperature, and T_room(t) is the predicted room temperature at the tth step.

[0134] The alignment loss L_align ensures that the total change of the two heating temperatures is aligned with the target temperature difference, and is specifically:

[0135] L_align=1-E_k~p[align(k)]

[0136] E_k~p[align(k)] is the probability expectation of align(k), that is, the weighted average of align(k) corresponding to different step numbers k, and the weight is the prediction probability p_k output by the pointer network at the kth step. align(k) is the alignment degree of the kth candidate sequence, including the direction alignment degree and the amplitude alignment degree.

[0137] The physical consistency loss L_consistency ensures that the direction of the change of the two heating temperatures is consistent with the direction of the target temperature difference, and is specifically:

[0138] L_consistency=1-E_k~p[direction_match(k)]

[0139] E_k~p[direction_match(k)] is the probability expectation of direction_match(k), that is, the weighted average of direction_match(k) corresponding to different step numbers k, and the weight is the prediction probability p_k output by the pointer network at the kth step. direction_match(k) is the direction matching degree of the kth candidate sequence.

[0140] Further, the value ranges of α, β, γ, δ, ε, ζ, η, θ, ι, κ, and λ are respectively: α=2.0-3.0, β=1.5-2.5, γ=1.0-2.0, δ=0.5-1.0, ε=0.5-1.0, ζ=0.3-0.8, η=0.3-0.8, θ=0.2-0.6, ι=0.2-0.6, κ=0.1-0.4, and λ=0.1-0.4.

[0141] In this embodiment, the machine group 1802 is currently at a median room temperature of 22.42℃ at 7:00 on November 30, and the target room temperature is 22.54℃;

[0142] The predicted optimal step size is 6;

[0143] The predicted room temperature sequence is [22.45, 22.47, 22.48, 22.50, 22.51, 22.53];

[0144] The predicted two-supply temperature sequence is [48.90, 47.91, 47.19, 46.90, 47.29, 47.07].

[0145] The actual room temperature sequence is [22.43, 22.45, 22.47, 22.49, 22.52, 22.54];

[0146] The actual two-supply temperature sequence is [48.64, 48.09, 47.55, 47.06, 46.64, 46.31].

[0147] The embodiment of the application also discloses a room temperature and two-supply temperature collaborative prediction model training method based on a double-tower-pointer network.

[0148] With reference to Figure 2 , the room temperature and two-supply temperature collaborative prediction model training method based on the double-tower-pointer network comprises the following steps:

[0149] S1 data set preprocessing and division:

[0150] Obtain the original data of the room temperature feature data and the two-supply temperature feature data, wherein the room temperature feature data comprises a historical room temperature sequence, historical weather data, future weather data, current room temperature data and target room temperature data; the two-supply temperature feature data comprises a historical two-supply temperature sequence, historical weather data, future weather data, current room temperature data and target room temperature data; and the weather data comprises one or more of environmental temperature data, humidity data, wind speed data, wind direction data and weather phenomenon data.

[0151] Specifically, the historical room temperature sequence comprises a historical 24h room temperature sequence, the historical weather data comprises historical 24h environmental temperature data, humidity data, wind speed data, wind direction data and weather phenomenon data, the future weather data comprises future 6h environmental temperature data, humidity data, wind speed data, wind direction data and weather phenomenon data, and the historical two-supply temperature sequence comprises a historical 24h two-supply temperature sequence.

[0152] The original data is sequentially preprocessed by denoising, completing and desensitizing.

[0153] The preprocessed data is divided into a training set, a validation set and a test set in a ratio of 7:2:1.

[0154] S2 model architecture building:

[0155] The double-tower-pointer network prediction model in the above-mentioned room temperature and two supply temperature collaborative prediction model training method based on a double-tower-pointer network comprises a double-tower coupled interactive prediction network and a dynamic optimal step pointer network.

[0156] The double-tower coupled interactive prediction network comprises a room temperature tower, a two supply temperature tower, and at least one feature interaction module. The feature interaction module is used to realize the inter-tower cyclic coupled interaction of the room temperature tower and the two supply temperature tower. The room temperature tower outputs a plurality of room temperature prediction sequences of different prediction steps and tending towards a target temperature. The two supply temperature tower outputs a plurality of two supply temperature setting sequences corresponding to the prediction steps. In this embodiment, the room temperature tower outputs six room temperature prediction sequences tending towards the target temperature with steps of 1-6. The two supply temperature tower outputs six corresponding two supply temperature setting sequences with steps of 1-6.

[0157] Specifically, the feature interaction module is a CrossTransformerBlock interaction module. The room temperature tower and the two supply temperature tower realize the inter-tower cyclic coupled interaction through the self-attention unit and the cross-attention unit of the CrossTransformerBlock interaction module. The input ends of the room temperature tower and the two supply temperature tower in the double-tower coupled interactive prediction network are both provided with a Patch embedding layer with an overlap rate of 40%-60%. The Patch embedding layer is configured with a sine-cosine position encoding unit and a learnable global marker. In this embodiment, the overlap rate of the Patch embedding layer is 50%, and the dimension of the learnable global marker is consistent with the dimension of the Patch embedding feature. The Patch embedding layer converts the time series into patch representation, thereby enhancing the model's ability to capture time series information and improving the model's ability to perceive temperature mutations and trend changes.

[0158] Further, the room temperature tower and the two supply temperature tower in the double-tower coupled interactive prediction network both adopt differential feature enhancement. First-order differential, second-order differential, and trend features are calculated for the historical room temperature sequence and the historical two supply temperature sequence, respectively. The differential features and the corresponding historical room temperature sequence or historical two supply temperature sequence are spliced and input into the Patch embedding layer of the room temperature tower or the two supply temperature tower, respectively, thereby enhancing the time series modeling capability.

[0159] The room temperature tower comprises a prior generation module, a basic prediction module, and a gating fusion module. The prior generation module generates a monotonically changing prior sequence based on the current room temperature, the target room temperature, and the temperature difference direction. The basic prediction module fuses the historical room temperature time series features, the historical and future weather time series features to generate a basic prediction sequence that accurately reflects the actual room temperature change. The gating fusion module dynamically adjusts the fusion weight of the room temperature of the prior sequence and the basic prediction sequence based on the current working condition, and outputs the fused room temperature prediction sequence.

[0160] Specifically, the number of CrossTransformerBlock interaction modules is 2-6, and the adjacent CrossTransformerBlock is connected through layer normalization. In this embodiment, the number of CrossTransformerBlock interaction modules is 6.

[0161] The CrossTransformerBlock interaction module includes a self-attention unit, a cross-attention unit and a feedforward network unit. The room temperature tower and the two-temperature supply tower realize inter-tower cyclic coupling interaction through the self-attention unit and the cross-attention unit of the CrossTransformerBlock interaction module. The self-attention unit is used to realize the feature interaction of the Patch sequence in each tower, and the cross-attention unit is used to realize the global label and feature interaction between the room temperature tower and the two-temperature supply tower.

[0162] Further, the self-attention unit performs self-attention calculation on the patch sequence, the cross-attention unit performs cross-attention calculation with the global label as the query and the feature sequence as the key value, and the feedforward network unit performs nonlinear transformation on each position. CrossTransformerBlock realizes information fusion through residual connection and layer normalization.

[0163] The dynamic optimal step pointer network adaptively outputs the optimal prediction step K based on multiple room temperature prediction sequences and corresponding two-temperature supply setting sequences.

[0164] Specifically, the dynamic optimal step pointer network includes a temperature encoder, a feature encoder, a temperature difference feature extraction module, a generation branch, a pointer branch and a hybrid mechanism. The hybrid mechanism fuses the probability distribution of the generation branch and the pointer branch through the generation probability p_gen, and adaptively outputs the optimal prediction step K. The calculation method of the generation probability p_gen in the hybrid mechanism is:

[0165] p_gen=σ(W_p·[h_t,s_t,x_t]+b_p)

[0166] Wherein, σ is a sigmoid activation function, W_p is a weight matrix, b_p is a bias term, h_t is the current time hidden state, s_t is the feature encoder output, and x_t is the temperature difference feature extraction module output.

[0167] The temperature difference feature extraction module extracts a temperature difference feature set through feature engineering. The temperature difference feature set includes basic features, trigonometric function features, logarithmic features, normalized features, trend features and water supply-backwater temperature difference features.

[0168] Further, the basic features include temperature difference, absolute value of temperature difference, square of temperature difference, and sign of temperature difference; the trigonometric function features include cosine feature and sine feature of temperature difference, which are calculated by mapping the temperature difference to the angle range [-π / 2, π / 2]; the logarithmic feature is the logarithm of the absolute value of temperature difference, which is used to process temperature differences of different orders of magnitude; the normalized feature is normalized to the range [-1, 1] by the tanh function; the trend feature is the change trend of the historical temperature in the last 4 time steps, which includes the combination of room temperature trend and two-supply temperature trend; the supply-return water temperature difference feature is the difference between the supply water temperature and the room temperature at the last time step.

[0169] The temperature encoder encodes the historical room temperature sequence and the historical two-supply temperature sequence based on the Patch embedding layer to extract the global temporal context; the feature encoder projects and calculates the cross-attention of the historical features and the future features; the temperature difference feature extraction module significantly improves the adaptability and prediction performance of the model under extreme conditions by adding the basic features, the trigonometric function features, the logarithmic features, the normalized features, the trend features, and the supply-return water temperature difference features; the generation branch generates the step probability distribution based on the global context and the temperature difference feature set; the pointer branch generates the step probability distribution by selecting relevant information from the historical patches through the pointer attention mechanism; the hybrid mechanism fuses the probability distributions of the generation branch and the pointer branch through the generation probability p_gen to adaptively output the optimal prediction step K. The hybrid mechanism combines the context-based generative method and the pointer method based on historical information, improving the accuracy of step selection.

[0170] Specifically, the loss function TotalLoss of the double-tower-pointer network prediction model is obtained by weighted summation of the room temperature reconstruction loss L_rec_r, the two-supply temperature reconstruction loss L_rec_u, the pointer network loss L_ptr, the room temperature smoothing loss L_smooth_r, the room temperature boundary constraint loss L_bounds, the first-step two-supply temperature loss L_first_supply, and the ranking loss L_ranking. The double-tower-pointer network prediction model adopts joint optimization of multiple loss terms to ensure that the prediction results meet the physical constraints and control logic, improving the reliability of model prediction.

[0171] That is, the loss function of the double-tower-pointer network prediction model is:

[0172] TotalLoss = α·L_rec_r + β·L_rec_u + γ·L_ptr + δ·L_smooth_r + η·L_bounds + θ·L_first_supply + ι·L_ranking

[0173] Wherein, α, β, γ, δ, η, θ, ι are positive weight coefficients.

[0174] Specifically, the room temperature reconstruction loss L_rec_r is:

[0175] L_rec_r = E_k~p[L_rec,r(k)] =∑_k[p_k·L_rec,r(k)]

[0176] wherein E_k~p[L_rec,r(k)] is the probability expectation of L_rec,r(k), i.e., the weighted average of L_rec,r(k) corresponding to different step numbers k, p_k is the prediction probability of the kth step output by the pointer network, and L_rec,r(k) = (1 / k)∑[T_room(t) - T_room,true(t)]² is the room temperature mean square error loss of the kth candidate sequence, T_room(t) is the predicted room temperature at the tth step, and T_room,true(t) is the true room temperature at the tth step.

[0177] The two-supply temperature reconstruction loss L_rec_u is:

[0178] L_rec_u = E_k~p[L_rec,u(k)] =∑_k[p_k·L_rec,u(k)]

[0179] wherein E_k~p[L_rec,u(k)] is the probability expectation of L_rec,u(k), i.e., the weighted average of L_rec,u(k) corresponding to different step numbers k, p_k is the prediction probability of the kth step output by the pointer network, and L_rec,u(k) = (1 / k)∑[T_supply(t) - T_supply,true(t)]² is the two-supply temperature mean square error loss of the kth candidate sequence, T_supply(t) is the predicted two-supply temperature at the tth step, and T_supply,true(t) is the true two-supply temperature at the tth step.

[0180] The pointer network loss L_ptr is:

[0181] L_ptr = -∑y_k·log(p_k+ε)

[0182] wherein y_k is the one-hot encoding of the true optimal step number K_true, i.e., y_k = 1 if K_true = k, and y_k = 0 otherwise, p_k is the prediction probability of the kth step output by the pointer network, and ε is a numerical stability constant, i.e., ε = 10 −7 .

[0183] The room temperature smoothing loss L_smooth_r is:

[0184] L_smooth_r = E_k~p[∑_t|T_room(t+1) - T_room(t)| / (k-1)]

[0185] wherein E_k~p[∑_t|T_room(t+1)-T_room(t)| / (k-1)] is the probability expectation of ∑_t|T_room(t+1)-T_room(t)| / (k-1), i.e., the weighted average of ∑_t|T_room(t+1)-T_room(t)| / (k-1) corresponding to different step numbers k, and the weight is the k-th step prediction probability p_k output by the pointer network, T_room(t) is the t-th step predicted room temperature, and k is the candidate sequence length. When k = 1, L_smooth_r = 0.

[0186] The room temperature boundary constraint loss L_bounds ensures that the room temperature prediction is within the range of [min(T_current, T_target), max(T_current, T_target)], and specifically:

[0187] L_bounds = E_k~p[∑_t(max(0, T_lower-T_room(t))+max(0, T_room(t)-T_upper)) / k]

[0188] wherein E_k~p[∑_t(max(0, T_lower-T_room(t))+max(0, T_room(t)-T_upper)) / k] is the probability expectation of ∑_t(max(0, T_lower-T_room(t))+max(0, T_room(t)-T_upper)) / k, i.e., the weighted average of ∑_t(max(0, T_lower-T_room(t))+max(0, T_room(t)-T_upper)) / k corresponding to different step numbers k, and the weight is the k-th step prediction probability p_k output by the pointer network, T_lower = min(T_current, T_target), T_current is the current measured room temperature, T_target is the target room temperature, and T_upper = max(T_current, T_target).

[0189] The first two-step supply loss L_first_supply is:

[0190] L_first_supply = E_k~p[max(0, -sign(ΔT_target)·ΔT_supply_first)+max(0, |ΔT_supply_first|-1.0)]

[0191] E_k~p[max(0,-sign(ΔT_target)·ΔT_supply_first)+max(0,|ΔT_supply_first|-1.0)] is the expectation of max(0,-sign(ΔT_target)·ΔT_supply_first)+max(0,|ΔT_supply_first|-1.0) with respect to the probability, i.e., the weighted average of max(0,-sign(ΔT_target)·ΔT_supply_first)+max(0,|ΔT_supply_first|-1.0) with respect to different step numbers k, and the weight is the k-th step prediction probability p_k output by the pointer network, ΔT_target is the target temperature difference, and ΔT_supply_first is the first step two-supply temperature change.

[0192] The ranking loss L_ranking is:

[0193] L_ranking=||E_k~p[k]-K_true||²

[0194] E_k~p[k]=Σp_k·k is the predicted expected step number, and p_k is the k-th step prediction probability output by the pointer network.

[0195] In another embodiment, the loss function TotalLoss further includes a weighted sum of the two-supply temperature trend loss L_trend, the room temperature monotonicity loss L_mono, the alignment loss L_align, and the physical consistency loss L_consistency.

[0196] That is, the loss function is:

[0197] TotalLoss=α·L_rec_r+β·L_rec_u+γ·L_ptr+δ·L_smooth_r+ε·L_trend+ζ·L_mono+η·L_bounds+θ·L_first_supply+ι·L_ranking+κ·L_align+λ·L_consistency

[0198] L rec_r + L rec_u + L ptr + L smooth_r + L trend + L mono + L bounds + L first supply + L ranking + L align + L consistency, wherein L rec_r is a room temperature reconstruction loss, L rec_u is a two-supply temperature reconstruction loss, L ptr is a pointer network loss, L smooth_r is a room temperature smoothing loss, L trend is a two-supply temperature trend loss, L mono is a room temperature monotonicity loss, L bounds is a room temperature boundary constraint loss, L first supply is a first two-supply temperature loss, L ranking is a ranking loss, L align is an alignment loss, L consistency is a physical consistency loss, and a, b, g, d, e, z, h, q, i, k, and l are positive weight coefficients.

[0199] The two-supply temperature trend loss L trend is:

[0200] L trend = E k ~ p [∑ t (ΔT supply_pred (t) - ΔT supply_true (t)) 2 / k]

[0201] wherein E k ~ p [∑ t (ΔT supply_pred (t) - ΔT supply_true (t)) 2 / k] is the probability expectation of ∑ t (ΔT supply_pred (t) - ΔT supply_true (t)) 2 / k, that is, the weighted average of ∑ t (ΔT supply_pred (t) - ΔT supply_true (t)) 2 / k corresponding to different step numbers k, and the weight is the k-th prediction probability p k output by the pointer network, ΔT supply_pred (t) is the predicted two-supply temperature change, ΔT supply_true (t) is the true two-supply temperature change, and k is the candidate sequence length.

[0202] The room temperature monotonicity loss L mono ensures that the room temperature prediction changes monotonically, and is specifically:

[0203] when T current < T target,

[0204] L mono = E k ~ p {∑ max [0, T room (t) - T room (t+1)]}

[0205] when T current > T target,

[0206] L mono = E k ~ p {∑ max [0, T room (t+1) - T room (t)]}

[0207] E_k~p{Σmax[0,T_room(t)-T_room(t+1)]} is the probability expectation of Σmax[0,T_room(t)-T_room(t+1)], that is, the weighted average of Σmax[0,T_room(t)-T_room(t+1)] corresponding to different step numbers k, and the weight is the prediction probability p_k output by the pointer network at the kth step. Similarly, E_k~p{Σmax[0,T_room(t+1)-T_room(t)]} is the probability expectation of Σmax[0,T_room(t+1)-T_room(t)], T_current is the current measured room temperature, T_target is the target room temperature, and T_room(t) is the predicted room temperature at the tth step.

[0208] The alignment loss L_align ensures that the total change of the two heating temperatures is aligned with the target temperature difference, and is specifically:

[0209] L_align=1-E_k~p[align(k)]

[0210] E_k~p[align(k)] is the probability expectation of align(k), that is, the weighted average of align(k) corresponding to different step numbers k, and the weight is the prediction probability p_k output by the pointer network at the kth step. align(k) is the alignment degree of the kth candidate sequence, including the direction alignment degree and the amplitude alignment degree.

[0211] The physical consistency loss L_consistency ensures that the direction of the change of the two heating temperatures is consistent with the direction of the target temperature difference, and is specifically:

[0212] L_consistency=1-E_k~p[direction_match(k)]

[0213] E_k~p[direction_match(k)] is the probability expectation of direction_match(k), that is, the weighted average of direction_match(k) corresponding to different step numbers k, and the weight is the prediction probability p_k output by the pointer network at the kth step. direction_match(k) is the direction matching degree of the kth candidate sequence.

[0214] Further, the value ranges of α, β, γ, δ, ε, ζ, η, θ, ι, κ, λ, μ, and ν are respectively: α=2.0-3.0, β=1.5-2.5, γ=1.0-2.0, δ=0.5-1.0, ε=0.5-1.0, ζ=0.3-0.8, η=0.3-0.8, θ=0.2-0.6, ι=0.2-0.6, κ=0.1-0.4, and λ=0.1-0.4.

[0215] S3 sub-stage training, specifically comprising:

[0216] S31 dynamic optimal step pointer network training: freeze the parameters of the double-tower coupled interactive prediction network, only unfreeze the parameters of the dynamic optimal step pointer network, input the training set data into the dynamic optimal step pointer network, train the dynamic optimal step pointer network alone, use L_ptr as the pointer network loss, learn the step selection strategy, and train for a total of 40 rounds.

[0217] S32 double-tower coupled interactive prediction network training: freeze the parameters of the dynamic optimal step pointer network, unfreeze the parameters of the room temperature tower and the two-supply temperature tower, input the room temperature feature data in the training set into the room temperature tower, input the two-supply temperature feature data in the training set into the two-supply temperature tower, train the double-tower coupled interactive prediction network based on the fixed step output by the dynamic optimal step pointer network, learn the temperature prediction ability, and do not enable the CrossTransformerBlock interaction module, and train for a total of 40 rounds. In this training step, L_rec_r is used as the room temperature reconstruction loss, L_rec_u is used as the two-supply temperature reconstruction loss, L_smooth_r is used as the room temperature smoothing loss, L_trend is used as the two-supply temperature trend loss, L_mono is used as the room temperature monotonicity loss, L_bounds is used as the room temperature boundary constraint loss, and L_first_supply is used as the first two-supply temperature loss.

[0218] S33 joint training: unfreeze all parameters and enable the CrossTransformerBlock interaction module, input the training set data into the model to train the dynamic optimal step pointer network and the double-tower coupled interactive prediction network at the same time, use the loss function TotalLoss of the double-tower-pointer network prediction model to optimize the model in combination with the gradient clipping and StepLR learning rate scheduling strategy, the max_norm of the gradient clipping is 1.0, the step of the StepLR learning rate scheduling is 10 rounds, and the decay coefficient is 0.5; calculate the validation set loss after each round of training, if the validation set loss does not decrease for 5-10 consecutive rounds, stop training and save the current optimal model parameters, and output the optimal prediction model.

[0219] In a third aspect, the present application provides a room temperature and two-supply temperature collaborative prediction system based on a double-tower-pointer network, which adopts the following technical scheme:

[0220] A room temperature and two-supply temperature collaborative prediction system based on a double-tower-pointer network, comprising:

[0221] A data acquisition and preprocessing module for acquiring and preprocessing initial data of room temperature feature data and two-supply temperature feature data.

[0222] Specifically, the room temperature feature data includes a historical room temperature sequence, historical weather data, future weather data, current room temperature data, and target room temperature data. The room temperature feature data is used to input the room temperature tower, and then the indoor temperature is predicted. The weather data includes one or more of ambient temperature data, humidity data, wind speed data, wind direction data, and weather phenomenon data.

[0223] Further, the historical room temperature sequence includes a historical 24h room temperature sequence, the historical weather data includes historical 24h ambient temperature data, humidity data, wind speed data, wind direction data, and weather phenomenon data, and the future weather data includes future 6h ambient temperature data, humidity data, wind speed data, wind direction data, and weather phenomenon data.

[0224] Specifically, the two-temperature feature data includes a historical two-temperature sequence, historical weather data, future weather data, current room temperature data, and target room temperature data. The two-temperature feature data is used to input the two-temperature tower, and then the two-temperature is predicted.

[0225] Further, the historical two-temperature sequence includes a historical 24h two-temperature sequence, the historical weather data includes historical 24h ambient temperature data, humidity data, wind speed data, wind direction data, and weather phenomenon data, and the future weather data includes future 6h ambient temperature data, humidity data, wind speed data, wind direction data, and weather phenomenon data.

[0226] The obtained original room temperature feature data and original two-temperature feature data are preprocessed by denoising, completion, desensitization, etc. to generate standardized input data.

[0227] The model deployment and prediction output module is used to load the double-tower-pointer network prediction model in the above and output the optimal prediction step K, the future K-step two-temperature setting sequence, and the corresponding room temperature prediction sequence.

[0228] The double-tower-pointer network prediction model includes a double-tower coupled interactive prediction network and a dynamic optimal step pointer network. The double-tower coupled interactive prediction network includes a room temperature tower, a two-temperature tower, and at least one feature interaction module. The feature interaction module is used to realize the inter-tower cyclic coupling interaction of the room temperature tower and the two-temperature tower. The room temperature tower outputs a plurality of room temperature prediction sequences of different prediction steps and tending towards a target temperature. The two-temperature tower outputs a plurality of two-temperature setting sequences corresponding to the prediction steps. In this embodiment, the room temperature tower outputs six room temperature prediction sequences tending towards a target temperature with steps of 1-6, and the two-temperature tower outputs six two-temperature setting sequences corresponding to the steps of 1-6.

[0229] Specifically, the feature interaction module is a CrossTransformerBlock interaction module, and the room temperature tower and the secondary temperature supply tower are cyclically and coupled to interact through the self-attention unit and the cross-attention unit of the CrossTransformerBlock interaction module. The input ends of the room temperature tower and the secondary temperature supply tower in the double-tower coupled interaction prediction network are both provided with a Patch embedding layer with an overlap rate of 40%-60%, and the Patch embedding layer is configured with a sine-cosine position encoding unit and a learnable global token. In this embodiment, the overlap rate of the Patch embedding layer is 50%, and the dimension of the learnable global token is consistent with the dimension of the Patch embedding feature. The Patch embedding layer converts the time series into patch representation, thereby enhancing the model's ability to capture time series information and improving the model's ability to perceive temperature mutations and trend changes.

[0230] Further, the room temperature tower and the secondary temperature supply tower in the double-tower coupled interaction prediction network both use differential feature enhancement, and the first-order difference, the second-order difference and the trend feature are calculated for the historical room temperature sequence and the historical secondary temperature supply sequence, respectively. The differential features and the corresponding historical room temperature sequence or historical secondary temperature supply sequence are spliced and input into the Patch embedding layer of the room temperature tower or the secondary temperature supply tower, respectively, to enhance the time series modeling capability.

[0231] The room temperature tower includes a prior generation module, a basic prediction module and a gated fusion module. The prior generation module generates a monotonically changing prior sequence based on the current room temperature, the target room temperature and the temperature difference direction. The basic prediction module fuses the historical room temperature time series feature and the historical and future weather time series feature to generate a basic prediction sequence that accurately reflects the actual room temperature change. The gated fusion module dynamically adjusts the fusion weight of the room temperature of the prior sequence and the basic prediction sequence based on the current working condition, and outputs the fused room temperature prediction sequence.

[0232] Specifically, the number of CrossTransformerBlock interaction modules is 2-6, and the adjacent CrossTransformerBlock modules are connected through layer normalization. In this embodiment, the number of CrossTransformerBlock interaction modules is 6.

[0233] The CrossTransformerBlock interaction module includes a self-attention unit, a cross-attention unit and a feedforward network unit. The room temperature tower and the secondary temperature supply tower are cyclically and coupled to interact through the self-attention unit and the cross-attention unit of the CrossTransformerBlock interaction module. The self-attention unit is used to realize the feature interaction of the Patch sequence in each tower, and the cross-attention unit is used to realize the global token and feature interaction between the room temperature tower and the secondary temperature supply tower.

[0234] Further, the self-attention unit performs self-attention calculation within the patch sequence, the cross-attention unit performs cross-attention calculation with the global token as the query and the feature sequence as the key value, and the feedforward network unit performs nonlinear transformation on each position. The CrossTransformerBlock realizes information fusion through a residual connection and layer normalization.

[0235] The dynamic optimal step pointer network adaptively outputs an optimal prediction step K based on multiple room temperature prediction sequences and corresponding two temperature supply setting sequences.

[0236] Specifically, the dynamic optimal step pointer network includes a temperature encoder, a feature encoder, a temperature difference feature extraction module, a generation branch, a pointer branch, and a hybrid mechanism. The hybrid mechanism fuses the probability distribution of the generation branch and the pointer branch through a generation probability p_gen and adaptively outputs an optimal prediction step K. The calculation method of the generation probability p_gen in the hybrid mechanism is as follows:

[0237] p_gen = σ(W_p·[h_t,s_t,x_t]+b_p)

[0238] Wherein, σ is a sigmoid activation function, W_p is a weight matrix, b_p is a bias term, h_t is a current time hidden state, s_t is a feature encoder output, and x_t is a temperature difference feature extraction module output.

[0239] The temperature difference feature extraction module extracts a temperature difference feature set through feature engineering. The temperature difference feature set includes basic features, trigonometric function features, logarithmic features, normalized features, trend features, and water supply-backwater temperature difference features.

[0240] Further, the basic features include temperature difference, temperature difference absolute value, temperature difference square, and temperature difference sign. The trigonometric function features include cosine and sine features of the temperature difference, which are calculated by mapping the temperature difference to an angle range [-π / 2, π / 2]. The logarithmic feature is the logarithm of the temperature difference absolute value, which is used to handle temperature differences of different magnitudes. The normalized feature normalizes the temperature difference to the range [-1, 1] through a tanh function. The trend feature is the change trend of the historical temperature at the last 4 time steps, including the combination of room temperature trend and two temperature supply trend. The water supply-backwater temperature difference feature is the difference between the water supply temperature and the room temperature at the last time step.

[0241] The temperature encoder encodes the historical room temperature sequence and the historical two-supply temperature sequence based on a Patch embedding layer to extract the global temporal context; the feature encoder projects and calculates cross-attention of the historical features and the future features; the temperature difference feature extraction module significantly improves the adaptability and prediction performance of the model under extreme working conditions by adding basic features, trigonometric function features, logarithmic features, normalized features, trend features and supply-return water temperature difference features; the generation branch generates a step probability distribution based on the global context and the temperature difference feature set; the pointer branch generates a step probability distribution by selecting relevant information from the historical patches through the pointer attention mechanism; the hybrid mechanism fuses the probability distributions of the generation branch and the pointer branch through the generation probability p_gen to adaptively output the optimal prediction step K. The hybrid mechanism combines the context-based generative method and the pointer method based on historical information, improving the accuracy of step selection.

[0242] Specifically, the loss function TotalLoss of the double-tower-pointer network prediction model is obtained by weighted summation of the room temperature reconstruction loss L_rec_r, the two-supply temperature reconstruction loss L_rec_u, the pointer network loss L_ptr, the room temperature smoothing loss L_smooth_r, the room temperature boundary constraint loss L_bounds, the first-step two-supply temperature loss L_first_supply and the ranking loss L_ranking. The double-tower-pointer network prediction model adopts joint optimization of multiple loss terms to ensure that the prediction results meet the physical constraints and control logic, improving the reliability of model prediction.

[0243] That is, the loss function of the double-tower-pointer network prediction model is:

[0244] TotalLoss=α·L_rec_r+β·L_rec_u+γ·L_ptr+δ·L_smooth_r+η·L_bounds+θ·L_first_supply+ι·L_ranking

[0245] Wherein, α, β, γ, δ, η, θ, ι are positive weight coefficients.

[0246] Specifically, the room temperature reconstruction loss L_rec_r is:

[0247] L_rec_r=E_k~p[L_rec,r(k)]=Σ_k[p_k·L_rec,r(k)]

[0248] where E k ~ p [L rec, r (k) ] is the probability expectation of L rec, r (k), i.e. the weighted average of L rec, r (k) corresponding to different step numbers k, p k is the k th step prediction probability output by the pointer network, L rec, r (k) = (1 / k) Σ [T room (t) - T room,true (t) ] 2 is the room temperature mean square error loss of the k th candidate sequence, and T room (t) is the predicted room temperature at the t th step, and T room,true (t) is the true room temperature at the t th step.

[0249] The two-supply temperature reconstruction loss L rec_u is:

[0250] L rec_u = E k ~ p [L rec, u (k) ] = Σ k [p k · L rec, u (k) ]

[0251] where E k ~ p [L rec, u (k) ] is the probability expectation of L rec, u (k), i.e. the weighted average of L rec, u (k) corresponding to different step numbers k, p k is the k th step prediction probability output by the pointer network, L rec, u (k) = (1 / k) Σ [T supply (t) - T supply,true (t) ] 2 is the room temperature mean square error loss of the k th candidate sequence, and T supply (t) is the predicted two-supply temperature at the t th step, and T supply,true (t) is the true two-supply temperature at the t th step.

[0252] The pointer network loss L_ptr is:

[0253] L_ptr = - Σ y k · log (p k + ε)

[0254] where y k is the one-hot encoding of the true optimal step number K_true, i.e. y k = 1 if K_true = k, and y k = 0 otherwise, p k is the k th step prediction probability output by the pointer network, and ε is a numerical stability constant, i.e. ε = 10 −7 .

[0255] The room temperature smoothing loss L_smooth_r is:

[0256] L_smooth_r = E k ~ p [Σ t |T room (t + 1) - T room (t) | / (k - 1) ]

[0257] wherein E_k~p[∑_t|T_room(t+1)-T_room(t)| / (k-1)] is the probability expectation of ∑_t|T_room(t+1)-T_room(t)| / (k-1), i.e., the weighted average of ∑_t|T_room(t+1)-T_room(t)| / (k-1) corresponding to different step numbers k, and the weight is the k-th step prediction probability p_k output by the pointer network, T_room(t) is the t-th step predicted room temperature, and k is the candidate sequence length. When k = 1, L_smooth_r = 0.

[0258] The room temperature boundary constraint loss L_bounds ensures that the room temperature prediction is within the range of [min(T_current, T_target), max(T_current, T_target)], and specifically:

[0259] L_bounds = E_k~p[∑_t(max(0, T_lower-T_room(t))+max(0, T_room(t)-T_upper)) / k]

[0260] wherein E_k~p[∑_t(max(0, T_lower-T_room(t))+max(0, T_room(t)-T_upper)) / k] is the probability expectation of ∑_t(max(0, T_lower-T_room(t))+max(0, T_room(t)-T_upper)) / k, i.e., the weighted average of ∑_t(max(0, T_lower-T_room(t))+max(0, T_room(t)-T_upper)) / k corresponding to different step numbers k, and the weight is the k-th step prediction probability p_k output by the pointer network, T_lower = min(T_current, T_target), T_current is the current measured room temperature, T_target is the target room temperature, and T_upper = max(T_current, T_target).

[0261] The first two-step supply loss L_first_supply is:

[0262] L_first_supply = E_k~p[max(0, -sign(ΔT_target)·ΔT_supply_first)+max(0, |ΔT_supply_first|-1.0)]

[0263] E_k~p[max(0,-sign(ΔT_target)·ΔT_supply_first)+max(0,|ΔT_supply_first|-1.0)] is the expectation of max(0,-sign(ΔT_target)·ΔT_supply_first)+max(0,|ΔT_supply_first|-1.0) with respect to different step numbers k, i.e., the weighted average of max(0,-sign(ΔT_target)·ΔT_supply_first)+max(0,|ΔT_supply_first|-1.0) with respect to different step numbers k, and the weight is the k-th step prediction probability p_k output by the pointer network, ΔT_target is the target temperature difference, and ΔT_supply_first is the first step two-supply temperature change.

[0264] The ranking loss L_ranking is:

[0265] L_ranking=||E_k~p[k]-K_true||²

[0266] E_k~p[k]=Σp_k·k is the expected step number, and p_k is the k-th step prediction probability output by the pointer network.

[0267] In another embodiment, the loss function TotalLoss further includes a weighted sum of the two-supply temperature trend loss L_trend, the room temperature monotonicity loss L_mono, the alignment loss L_align, and the physical consistency loss L_consistency.

[0268] That is, the loss function is:

[0269] TotalLoss=α·L_rec_r+β·L_rec_u+γ·L_ptr+δ·L_smooth_r+ε·L_trend+ζ·L_mono+η·L_bounds+θ·L_first_supply+ι·L_ranking+κ·L_align+λ·L_consistency

[0270] L rec_r + L rec_u + L ptr + L smooth_r + L trend + L mono + L bounds + L first supply + L ranking + L align + L consistency, wherein L rec_r is a room temperature reconstruction loss, L rec_u is a two-supply temperature reconstruction loss, L ptr is a pointer network loss, L smooth_r is a room temperature smoothing loss, L trend is a two-supply temperature trend loss, L mono is a room temperature monotonicity loss, L bounds is a room temperature boundary constraint loss, L first supply is a first two-supply temperature loss, L ranking is a ranking loss, L align is an alignment loss, L consistency is a physical consistency loss, and a, b, g, d, e, z, h, q, i, k, and l are positive weight coefficients.

[0271] The two-supply temperature trend loss L trend is:

[0272] L trend = E k ~ p [∑ t (ΔT supply_pred (t) - ΔT supply_true (t)) 2 / k]

[0273] wherein E k ~ p [∑ t (ΔT supply_pred (t) - ΔT supply_true (t)) 2 / k] is the probability expectation of ∑ t (ΔT supply_pred (t) - ΔT supply_true (t)) 2 / k, i.e., the weighted average of ∑ t (ΔT supply_pred (t) - ΔT supply_true (t)) 2 / k corresponding to different step numbers k, and the weight is the k-th step prediction probability p k output by the pointer network, ΔT supply_pred (t) is the predicted two-supply temperature change, ΔT supply_true (t) is the true two-supply temperature change, and k is the candidate sequence length.

[0274] The room temperature monotonicity loss L mono ensures that the room temperature prediction changes monotonically, and is specifically:

[0275] when T current < T target,

[0276] L mono = E k ~ p {∑ max [0, T room (t) - T room (t+1)]}

[0277] when T current > T target,

[0278] L mono = E k ~ p {∑ max [0, T room (t+1) - T room (t)]}

[0279] E_k~p{Σmax[0,T_room(t)-T_room(t+1)]} is the probability expectation of Σmax[0,T_room(t)-T_room(t+1)], that is, the weighted average of Σmax[0,T_room(t)-T_room(t+1)] corresponding to different step numbers k, and the weight is the prediction probability p_k output by the pointer network at the kth step. Similarly, E_k~p{Σmax[0,T_room(t+1)-T_room(t)]} is the probability expectation of Σmax[0,T_room(t+1)-T_room(t)], T_current is the current measured room temperature, T_target is the target room temperature, and T_room(t) is the predicted room temperature at the tth step.

[0280] The alignment loss L_align ensures that the total change of the two heating temperatures is aligned with the target temperature difference, and is specifically:

[0281] L_align=1-E_k~p[align(k)]

[0282] E_k~p[align(k)] is the probability expectation of align(k), that is, the weighted average of align(k) corresponding to different step numbers k, and the weight is the prediction probability p_k output by the pointer network at the kth step. align(k) is the alignment degree of the kth candidate sequence, including the direction alignment degree and the amplitude alignment degree.

[0283] The physical consistency loss L_consistency ensures that the direction of the change of the two heating temperatures is consistent with the direction of the target temperature difference, and is specifically:

[0284] L_consistency=1-E_k~p[direction_match(k)]

[0285] E_k~p[direction_match(k)] is the probability expectation of direction_match(k), that is, the weighted average of direction_match(k) corresponding to different step numbers k, and the weight is the prediction probability p_k output by the pointer network at the kth step. direction_match(k) is the direction matching degree of the kth candidate sequence.

[0286] Further, the value ranges of α, β, γ, δ, ε, ζ, η, θ, ι, κ, λ, μ, and ν are respectively: α=2.0-3.0, β=1.5-2.5, γ=1.0-2.0, δ=0.5-1.0, ε=0.5-1.0, ζ=0.3-0.8, η=0.3-0.8, θ=0.2-0.6, ι=0.2-0.6, κ=0.1-0.4, and λ=0.1-0.4.

[0287] a closed-loop feedback module for sending the two-supply temperature setting sequence to the heat supply unit controller while outputting the room temperature prediction sequence for monitoring; collecting real-time room temperature data, updating the input data of the data collection and preprocessing module, and re-predicting through the model deployment and prediction output module to realize rolling optimization of collaborative prediction.

[0288] Figure 1 and Figure 2 are flowcharts. It should be understood that although each step in the flowchart is shown in sequence according to the arrow, these steps are not necessarily executed in sequence according to the arrow; unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other sequences; and Figure 1 at least part of the steps in Figure 1 and Figure 2 may include multiple sub-steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these sub-steps or stages is not necessarily sequential, but can be executed in rotation or alternation with other steps or sub-steps or stages of other steps.

[0289] The embodiments of the present application also disclose a computer readable storage medium.

[0290] Specifically, the computer readable storage medium stores a computer program capable of being loaded and executed by the processor to implement the above-mentioned room temperature and two-supply temperature collaborative prediction method based on the dual-tower-pointer network, and the computer readable storage medium includes various program code storage media such as a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0291] The specific embodiments are only an explanation of the present application, and are not a limitation of the present application. Those skilled in the art can make modifications to the embodiments without creative contribution after reading the present specification, and the modifications are protected by the patent law as long as they are within the scope of the claims of the present application.

Claims

1. A method for coordinated prediction of room temperature and dual-supply temperature based on a dual-tower-pointer network, characterized in that, Includes the following steps: Acquire room temperature characteristic data and secondary heating characteristic data; The room temperature characteristic data and the dual heating characteristic data are input into the dual-tower-pointer network prediction model. The dual-tower coupled interactive prediction network and the dynamic optimal step size pointer network of the dual-tower-pointer network prediction model work together to output the adaptive optimal prediction step size K, the future K-step dual heating setting sequence and the corresponding room temperature prediction sequence. The dual-tower coupled interactive prediction network includes a room temperature tower, a secondary heating tower, and at least one feature interaction module. The feature interaction module is used to realize the inter-tower cyclic coupling interaction between the room temperature tower and the secondary heating tower. The room temperature tower outputs multiple room temperature prediction sequences with different prediction step lengths and tending towards the target temperature. The secondary heating tower outputs multiple secondary heating setting sequences with corresponding prediction step lengths. The dynamic optimal step size pointer network adaptively outputs the optimal prediction step size K based on multiple room temperature prediction sequences and corresponding dual-supply temperature setting sequences. The dynamic optimal step size pointer network includes a temperature encoder, a feature encoder, a generation branch, a pointer branch, and a hybrid mechanism; the hybrid mechanism integrates the probability distributions of the generation branch and the pointer branch through the generation probability p_gen, and adaptively outputs the optimal prediction step size K.

2. The method for coordinated prediction of room temperature and dual-supply temperature based on a dual-tower-pointer network according to claim 1, characterized in that, The room temperature characteristic data includes historical room temperature sequences, historical weather data, future weather data, current room temperature data, and target room temperature data, and the room temperature characteristic data is input into the room temperature tower; The secondary heating characteristic data includes historical secondary heating sequences, historical weather data, future weather data, current room temperature data, and target room temperature data. The secondary heating characteristic data is input into the secondary heating tower.

3. The method for coordinated prediction of room temperature and dual-supply temperature based on a dual-tower-pointer network according to claim 1, characterized in that, The dynamic optimal step size pointer network also includes a temperature difference feature extraction module. The temperature difference feature extraction module extracts a temperature difference feature set through feature engineering. The temperature difference feature set includes one or more of the following: basic features, trigonometric function features, logarithmic features, normalized features, trend features, and supply-return water temperature difference features.

4. The method for coordinated prediction of room temperature and dual-supply temperature based on a dual-tower-pointer network according to claim 1, characterized in that, The loss function TotalLoss of the dual-tower-pointer network prediction model includes a weighted sum of the room temperature reconstruction loss L_rec_r, the dual-supply reconstruction loss L_rec_u, the pointer network loss L_ptr, the room temperature smoothing loss L_smooth_r, the room temperature boundary constraint loss L_bounds, the first-step dual-supply loss L_first_supply, and the ranking loss L_ranking.

5. The method for coordinated prediction of room temperature and dual-supply temperature based on a dual-tower-pointer network according to claim 1, characterized in that, In the dual-tower coupled interactive prediction network, both the room temperature tower and the second heating tower have overlapping patch embedding layers at their input ends. The patch embedding layers are configured with sine and cosine position coding units and learnable global tags.

6. The method for coordinated prediction of room temperature and dual-supply temperature based on a dual-tower-pointer network according to claim 1, characterized in that, The feature interaction module is the CrossTransformerBlock interaction module. The room temperature tower and the secondary heating tower achieve inter-tower cyclic coupling interaction through the self-attention unit and cross-attention unit of the CrossTransformerBlock interaction module.

7. A training method for a room temperature and dual-supply temperature collaborative prediction model based on a dual-tower-pointer network, characterized in that, Includes the following steps: Model architecture construction: Construct the dual-tower-pointer network prediction model as described in any one of claims 1-6, including a dual-tower coupled interactive prediction network and a dynamic optimal step-size pointer network; Phased training includes: Dynamic Optimal Step Size Pointer Network Training: Freeze all parameters of the dual-tower coupled interactive prediction network and train only the dynamic optimal step size pointer network to learn the step size selection strategy. Training of the dual-tower coupled interactive prediction network: Freeze all parameters of the dynamic optimal step size pointer network, and train the dual-tower coupled interactive prediction network based on the fixed step size output of the dynamic optimal step size pointer network to learn temperature prediction capabilities; Joint training: Unfreeze all parameters and train the dynamic optimal step-size pointer network and the dual-tower coupled interactive prediction network simultaneously to output the optimal prediction model.

8. A system for coordinated prediction of room temperature and dual-supply temperature based on a dual-tower-pointer network, characterized in that, include: The data acquisition and preprocessing module is used to acquire initial data of room temperature characteristic data and secondary heating characteristic data and perform preprocessing. The model deployment and prediction output module is used to load the dual-tower-pointer network prediction model as described in any one of claims 1-6, and output the optimal prediction step size K, the future K-step two-stage heating setting sequence, and the corresponding room temperature prediction sequence.

9. A computer-readable storage medium, characterized in that, The computer program is stored that can be loaded by a processor and executed as described in any one of claims 1 to 6, for the method of predicting room temperature and dual-supply temperature based on a dual-tower-pointer network.

Citation Information

Patent Citations

  • Ultra-short-term secondary network water supply temperature hourly prediction method based on long short-term memory network

    CN117875148A

  • Heat supply whole network collaborative dynamic optimization regulation and control method, system and equipment and storage medium

    CN119644728A