Air conditioner load intelligent clustering method based on large language model
By using an intelligent clustering method for air conditioning loads based on a large language model, the problems of insufficient semantic understanding and dynamic adaptability of traditional clustering methods in air conditioning load data are solved. This method achieves accurate and interpretable air conditioning load grouping, adapts to complex environments and user changes, and provides an efficient energy management solution.
Patent Information
- Application Number
- CN202511889227.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-15
- Publication Date
- 2026-02-03
AI Technical Summary
Traditional clustering methods struggle to capture dynamic semantic information in time-series air conditioning load data and cannot effectively handle non-convex data distributions, resulting in limited interpretability and practicality of clustering results, as well as insufficient dynamic adaptability.
A smart clustering method for air conditioning load based on a large language model is constructed. By collecting air conditioning load data and related information, time-series subsequences are generated after preprocessing. Deep semantic vectors are extracted using a large language model. Feature decoupling and enhancement are performed by combining autoencoders and attention mechanisms. The semantic KMeans algorithm based on Mahalanobis distance is used for clustering. The method adapts to the dynamic evolution of load behavior through semi-supervised fine-tuning and incremental learning.
It achieves accurate understanding and high-precision clustering of air conditioning load behavior, improves the interpretability and dynamic adaptability of clustering results, and can form clear clustering results in complex environments and diverse user groups, adapting to seasonal and user habit changes and providing efficient energy management solutions.
Smart Images

Figure CN121456529A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the intersection of smart grids and artificial intelligence, and more specifically, to a method for intelligent clustering of air conditioning loads based on a large language model. Background Technology
[0002] With the rapid development of smart grids, air conditioning loads, due to their high volatility, strong coupling and significant demand response potential, have become a key object for power system optimization scheduling and demand-side management [1]. Accurate modeling and efficient aggregation of air conditioning loads are of great significance for improving grid stability, promoting renewable energy consumption and achieving peak shaving and valley filling. However, air conditioning loads have significant spatiotemporal heterogeneity, and their operation mode is affected by multiple factors such as user behavior, climate conditions, and equipment parameters, exhibiting complex nonlinear characteristics. Although traditional clustering methods (such as K-means) have advantages in computational efficiency and scalability, their similarity measurement based on Euclidean distance is difficult to capture dynamic semantic information in load time series data, such as the contextual dependency of load changes, user behavior patterns and potential control strategies. In addition, traditional methods are sensitive to the initial cluster center and cannot effectively handle non-convex data distribution, resulting in limited interpretability and practicality of clustering results. Therefore, how to deeply integrate semantic understanding capabilities in load clustering to achieve high-precision and highly interpretable load behavior modeling has become a core problem that needs to be solved in the field of smart grids.
[0003] Scholars both domestically and internationally have explored air conditioning load clustering methods from multiple dimensions. While these methods have improved clustering results to varying degrees, they still share the following common bottlenecks: Insufficient semantic modeling capability: Traditional methods rely on manually defined features (such as temperature variation parameters and electrical characteristics), making it difficult to capture the implicit user behavior patterns and contextual semantics within the load sequence. Limited dynamic adaptability: Existing clustering algorithms are mostly based on static data assumptions, failing to effectively address the dynamic evolution of load behavior with seasonal changes, policy shifts, or user habits. Lack of interpretability: Clustering results are mostly represented by numerical labels, lacking direct semantic association with specific control strategies (such as demand response and temperature peak shaving). Summary of the Invention
[0004] The technical problem to be solved by this invention is to provide an intelligent clustering method for air conditioning load based on a large-scale language model, which realizes dynamic control of the multi-energy system in the park, effectively solves the challenges brought about by multiple uncertainties such as fluctuations in new energy output, changes in load demand and carbon emissions from the power grid, and provides a new, intelligent and efficient energy management solution for the construction of zero-carbon parks.
[0005] The technical solution adopted by this invention to solve its technical problem is: constructing an intelligent clustering method for air conditioning load based on a large-scale language model, including the following steps: S1. Constructing an input sequence oriented towards air conditioning behavior semantics: Collect air conditioning load data and related information, preprocess them, and then generate time-series sub-sequences by sliding window segmentation. Integrate contextual metadata to form a joint input vector containing behavioral semantics. S2. Contextual semantic encoding of load data based on large language model LLM: Input the joint input vector into the large language model LLM that has been customized for air conditioning load characteristics, and extract deep semantic vectors through the embedding layer and Transformer encoder to capture user behavior patterns and environmental associations in the load time series. S3. Construct a cluster-oriented air conditioning behavior feature space: Reduce the dimensionality of deep semantic vectors and decouple features through an autoencoder to generate low-dimensional clustering feature vectors while retaining key behavioral semantic information; S4. Key Load Behavior Recognition and Enhancement Based on Attention Mechanism: The weights of key behavior segments in the load time series are learned by using a multi-head attention mechanism, and weighted fusion is used to generate enhanced semantic features to improve clustering discriminativeness. S5. Semantic KMeans Clustering Based on Mahalanobis Distance: An improved KMeans algorithm is adopted, using Mahalanobis distance as the metric and combined with semantic center guidance to achieve load clustering and eliminate the influence of feature correlation. S6. Semi-supervised fine-tuning and incremental learning for dynamic load characteristics: pseudo-labels are generated from the clustering results, the model is fine-tuned through the joint loss function, and the clustering parameters are updated using an incremental learning strategy to adapt to the dynamic evolution of load behavior.
[0006] According to the above scheme, in S1, the collected air conditioning load data includes 15-minute active power (kW), hourly start / stop count, and set temperature (°C); the associated information includes indoor environmental parameters, equipment parameters, and user behavior information; the preprocessing is Z-score standardization, with the formula:
[0007] In the formula, For user i's raw load data at time t, , , respectively, represent the historical load mean and standard deviation for user i.
[0008] According to the above scheme, in step S1, the length T of the sliding window is 24 hours, the step size S is 1 hour, and time series samples are generated: , in, This represents the data at the t-th time point within the window. Contextual metadata includes outdoor temperature, time period identifier, weekday / weekend flag (0 / 1), and holiday flag (0 / 1); The joint input vector is a concatenation of temporal subsequences and metadata. ,in, This represents a splicing operation. This is contextual metadata. According to the above scheme, the customization process of the large language model LLM in S2 includes: Prior embedding of equipment parameters: Rated cooling capacity and energy efficiency rating are mapped to an 8-dimensional vector through a linear layer and concatenated with the load embedding vector; Periodic-aware positional encoding: A dual-period encoding method is used to capture daily and weekly periodic features. The formula is as follows:
[0009] The deep semantic vector is the concatenation of the first character of the last layer of the Transformer encoder and the hidden state at the peak load time: This is to fully depict the semantics of the entire lifecycle of "start-run-shutdown".
[0010] According to the above scheme, in S3, the autoencoder includes a three-layer encoder and a symmetric decoder, and the loss function is:
[0011] in, The deep semantic vector is N, which is the total number of samples; the low-dimensional clustering feature vector is the encoder output, with a dimension of 64.
[0012] According to the above scheme, in S4, the key load behavior segments include power surge points corresponding to air conditioner startup, power drop points corresponding to air conditioner shutdown, set temperature change points, and load peak points; the attention weight learning formula is:
[0013] in, K is the query matrix, and K is the key matrix. =32; Enhanced semantic features are:
[0014] It is the output of the Lth layer of the Transformer, which strengthens the semantic weights of decisive moments such as "afternoon peak" and "nighttime insulation".
[0015] According to the above scheme, in step S5, the initial centers of the semantic KMeans cluster are selected by maximizing the semantic cosine distance, and the distance metric used is Mahalanobis distance.
[0016] in, These are low-dimensional clustering feature vectors. For the k-th class center, The sample covariance matrix; Cluster centers are updated to the within-cluster mean, and the iteration terminates when: .
[0017] According to the above scheme, in step S6, the pseudo-labels are generated from the top 10% of high-confidence samples with the highest intra-class distance; the joint loss function is:
[0018] in, Let i be the cluster label of sample i. It is a 2-layer fully connected classifier. The balancing coefficient is used; during incremental learning, the parameters of the large language model LLM and autoencoder are frozen, and only the cluster centers and classifiers are updated to adapt to seasonal changes and changes in user habits.
[0019] This invention also provides an intelligent clustering device for air conditioning loads based on a large-scale language model, comprising: An input sequence module oriented towards air conditioning behavior semantics is constructed to collect air conditioning load data and related information. After preprocessing, it is divided into time-series sub-sequences by sliding window and fused with contextual metadata to form a joint input vector containing behavioral semantics. The context semantic encoding module for load data based on the large language model LLM is used to input the joint input vector into the large language model LLM that has been customized for air conditioning load characteristics. The deep semantic vector is extracted through the embedding layer and the Transformer encoder to capture the user behavior patterns and environmental associations in the load time series. A cluster-oriented air conditioning behavior feature space module is constructed to reduce the dimensionality and decouple the features of deep semantic vectors through an autoencoder, generating low-dimensional clustering feature vectors while retaining key behavioral semantic information. The key load behavior recognition and enhancement module based on attention mechanism is used to learn the weights of key behavior segments in the load time series using multi-head attention mechanism, and generate enhanced semantic features by weighted fusion to improve cluster discriminativeness; The semantic KMeans clustering module based on Mahalanobis distance is used to implement load clustering by adopting the improved KMeans algorithm, using Mahalanobis distance as the metric, and combining semantic center guidance to eliminate the influence of feature correlation. A semi-supervised fine-tuning and incremental learning module for dynamic load characteristics is used to generate pseudo-labels from clustering results, fine-tune the model through a joint loss function, and update the clustering parameters using an incremental learning strategy to adapt to the dynamic evolution of load behavior.
[0020] The present invention also provides an electronic device, comprising: The processor, communication interface, memory, and communication bus are connected, with the processor, communication interface, and memory communicating with each other via the communication bus. The memory stores a computer program that, when executed by the processor, causes the processor to perform the steps of the intelligent clustering method for air conditioning load based on a large language model.
[0021] The intelligent clustering method for air conditioning load based on a large language model, as described in this invention, has the following beneficial effects: 1. This invention proposes an accurate, interpretable, and adaptive intelligent clustering method for air conditioning loads based on the semantic understanding and deep feature learning capabilities of Large Language Model (LLM). It exhibits significant advantages in load behavior semantic recognition, clustering accuracy, dynamic adaptability, and interpretability of clustering results. By using LLM for deep modeling of the semantic association between "load-environment-user," it achieves accurate understanding of complex load behavior patterns, overcoming the limitations of traditional clustering methods that rely on manual features and cannot capture deep semantic meanings of behavior. It can effectively distinguish superficially similar but fundamentally different load patterns, such as "forced operation during high summer temperatures" and "continuous operation actively adjusted by the user." The context encoding mechanism of LLM, combined with domain-customized modifications, enhances the ability to identify the characteristics, cyclical patterns, and key behavioral segments of air conditioning equipment, enabling it to form clustering results with clear physical meaning under diverse user groups and complex environmental conditions, thereby improving the accuracy and consistency of load clustering. 2. This invention achieves a balance between the interpretability and long-term stability of clustering results through attention enhancement and dynamic learning mechanisms. It comprehensively considers key characteristics of user behavior, differences in equipment types, and the evolution of load patterns. While ensuring that the clustering results are highly consistent with actual power consumption scenarios, it effectively adapts to dynamic changes such as seasonal changes and changes in user habits, improving the timeliness and reliability of clustering results. It adopts semi-supervised fine-tuning and incremental learning strategies, enabling the clustering model to continuously optimize with changes in load characteristics. Combining the feature purification capabilities of autoencoders and the semantic measurement advantages of Mahalanobis distance, it achieves the co-evolution of feature space and clustering strategy, enabling the system to continuously learn new load patterns and maintain the accuracy and robustness of long-term operation. 3. This invention combines large-scale language model technology to achieve deep semantic understanding of load behavior, precise clustering, interpretable results, and dynamic adaptation. It breaks through the limitations of traditional methods and provides a brand-new technical solution for smart grid demand response, air conditioning energy efficiency optimization, and personalized energy services. It has broad application prospects and significant socio-economic value. Attached Figure Description
[0022] The present invention will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings: Figure 1 This is a flowchart of the intelligent clustering method for air conditioning load based on a large-scale language model, as described in this invention. Detailed Implementation
[0023] To provide a clearer understanding of the technical features, objectives, and effects of the present invention, specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0024] Example 1 like Figure 1 As shown, the intelligent clustering method for air conditioning load based on a large language model of the present invention, in order to more clearly illustrate the implementation details of this method, selects a typical user in an office park (denoted as user). A detailed calculation demonstration of air conditioning load data for a summer weekday (Monday) is provided, including the following steps: S1. Constructing an input sequence oriented towards air conditioning behavioral semantics: Collect air conditioning load data and related information, preprocess them, and then generate time-series sub-sequences by sliding window segmentation. Integrate contextual metadata to form a joint input vector containing behavioral semantics.
[0025] (1) Data Acquisition and Preprocessing: After collecting air conditioning load data and related information, the collected data is Z-score standardized to eliminate dimensional differences. A time-series subsequence is generated by segmenting the data using a sliding window. The window length is set to 24 hours to cover the complete daily cycle, and the step size is 1 hour to balance information integrity and redundancy. Simultaneously, contextual metadata, including time period identifiers, weekday / weekend markers, seasonal codes, outdoor temperature, and rated cooling capacity, is concatenated with the time-series subsequence to form a joint input vector integrating the semantics of "load fluctuation + environment + time." The Z-score standardization formula is used. Through individual mean with standard deviation Eliminating the power level differences between different devices makes the "relative load level" a comparable semantic, and significantly improves the consistency of load semantics across devices.
[0026] Configure User The data at t = 14:00 (afternoon peak) is shown in Table 1 below: Table 1 Users Load data preprocessing example
[0027] The calculation result 3.0 indicates that the load at this moment was significantly higher than the mean (3 standard deviations), preserving the "peak" semantics.
[0028] (2) Sequence generation and fusion: Temporal subsequences generated by sliding window (T=24 hours) Strictly match the daily behavior cycle of the air conditioner to ensure that the complete behavior pattern is captured, and jointly input vector By combining environmental and temporal metadata with load data through splicing operations, the problem of traditional features containing only power values and lacking scene semantics is solved.
[0029] The air conditioning load data includes 15-minute active power (kW), equipment start-stop frequency per hour, and user-set temperature (°C); related information includes environmental parameters, equipment parameters, and user behavior information. Environmental parameters include outdoor temperature and humidity, equipment parameters include rated cooling capacity and energy efficiency ratio, and user behavior information includes timestamps and weekday / holiday markers; the preprocessing is done using the Z-score standardization formula:
[0030] In the formula, For user i's raw load data at time t, , , respectively, represent the historical load mean and standard deviation for user i.
[0031] The sliding window length T is 24 hours to adapt to the daily air conditioning load cycle, and the step size S is 1 hour, generating time series samples: , in, This represents the data at time point t within the window. Contextual metadata includes the standardized outdoor temperature, time period identifiers (early morning / afternoon / night), weekday / weekend flags (0 / 1), and holiday flags (0 / 1). The joint input vector is a concatenation of the time-series subsequence and metadata. .in, This represents a splicing operation. This is contextual metadata.
[0032] Generated users Temporal subsequence It contains 24 normalized data points from 00:00 to 23:00 (e.g., 08:00 is 0.2, 14:00 is 3.0). Contextual metadata. Set as (Representing normalized outdoor temperature of 35 degrees Celsius, weekday, and non-holiday, respectively). Final joint input vector It involves splicing 24-dimensional time-series data with 3-dimensional metadata.
[0033] S2. Contextual semantic encoding of load data based on the LLM model: The joint input vector is input into a large-scale language model (LLM) customized for air conditioning load characteristics. A deep semantic vector is extracted through an embedding layer and a Transformer encoder to capture user behavior patterns and environmental associations in the load time series. This model maps rated cooling capacity and energy efficiency rating to specific-dimensional vectors through prior embedding of equipment parameters and concatenates them with the load embedding vector. Dual-cycle positional encoding is used to capture daily and weekly cycle features. After extracting contextual features using a multi-layer Transformer encoder, the hidden state of the first character in the last layer is concatenated with the hidden state at the load peak time to generate a deep semantic vector that can characterize the "user behavior fingerprint," fully reflecting the behavioral semantics of the air conditioner throughout its "start-run-shutdown" cycle.
[0034] By superimposing sine functions of daily and weekly cycles, the model can distinguish behavioral differences in different time scenarios. Compared with single-cycle encoding, the recognition ability of time-related features is significantly enhanced. The deep semantic vector is obtained by concatenating the first character of the last layer of the Transformer with the hidden state at the peak moment. By focusing on the "behavioral starting point" and "active vertex", feature dimension compression is achieved while preserving the core semantics, which improves the efficiency of subsequent clustering and solves the problem of excessive computational cost caused by full-window feature redundancy.
[0035] Customized modifications to the large-scale language model LLM include prior embedding of equipment parameters and period-aware location encoding. Prior embedding of equipment parameters: Rated cooling capacity and energy efficiency rating are mapped to an 8-dimensional vector through a linear layer and concatenated with the load embedding vector; Period-aware location encoding: Dual-period encoding is used to capture daily and weekly periodic features, as shown in the formula:
[0036] With users For example, for t = 14 (Monday, which is the 24th + 14th = 38th hour of the week), substituting into the formula, we can calculate: Daily cycle components: Corresponding to the characteristics of the afternoon period.
[0037] Periodic components: This corresponds to the high load characteristics at the beginning of the week. Based on this, the model identified this as a high load scenario "Monday afternoon".
[0038] The deep semantic vector is the concatenation of the first character of the last layer of the Transformer encoder and the hidden state at the peak load time: If the model's hidden layer dimension ,but This is to fully depict the semantics of the entire lifecycle of "start-run-shutdown".
[0039] S3. Construct a cluster-oriented air conditioning behavior feature space: Reduce the dimensionality of the deep semantic vector and decouple the features through an autoencoder to generate a low-dimensional clustering feature vector while retaining key behavioral semantic information.
[0040] This autoencoder consists of a 3-layer encoder and a symmetric decoder. The encoder progressively compresses the deep semantic vector to a low dimension, while the decoder attempts to reconstruct the original vector. The reconstruction error is controlled by a loss function, so that the output low-dimensional clustering feature vector can decouple and purify core behavioral features such as "peak electricity consumption tendency" and "temperature setting preference", forming a feature space with a clear structure suitable for clustering, laying the foundation for subsequent accurate clustering.
[0041] The autoencoder consists of a 3-layer encoder and a symmetric decoder, with the loss function being:
[0042] in, The deep semantic vector is N, which is the total number of samples; the low-dimensional clustering feature vector is the encoder output, with a dimension of 64.
[0043] This achieves the decoupling and refinement of core behavioral characteristics such as "peak electricity consumption tendency" and "temperature setting preference." Low-dimensional output characteristics are ensured by minimizing reconstruction error. By preserving the core semantics, the semantic preservation is significantly improved compared to unsupervised dimensionality reduction methods. The hierarchical structure of the encoder (512, 128, 64) corresponds to the progressive process of "noise removal - feature decoupling - core purification", which enables the key behavioral dimensions to be structurally separated in the feature space, laying the foundation for subsequent accurate clustering and solving the problem of cluster ambiguity caused by the "curse of dimensionality" when directly clustering high-dimensional semantic vectors.
[0044] S4. Key Load Behavior Recognition and Enhancement Based on Attention Mechanism: The weights of key behavior segments in the load time series are learned by using a multi-head attention mechanism, and weighted fusion is used to generate enhanced semantic features to improve clustering discriminativeness.
[0045] These key segments are crucial moments in defining user behavior patterns. By calculating attention weights and weighted fusion of features from high-weight segments, enhanced semantic features are generated, significantly improving the discriminative power of different behavior patterns, such as "frequent start-stop" versus "continuous operation," while also enhancing the interpretability of clustering results. Attention weights are calculated using an attention weight learning formula, giving higher weights to key segments such as power spikes, drops, and temperature adjustments, thus enhancing semantic features. Weighted fusion highlights the "decisive moments" of user behavior, addressing the problem of insufficient attention to key events in traditional time-series features, and effectively improving the discriminative power of different behavior patterns.
[0046] Key load behavior segments include the power surge point corresponding to air conditioner startup, the power drop point corresponding to air conditioner shutdown, the set temperature change point, and the load peak point; the attention weight learning formula is:
[0047] in, K is the query matrix, and K is the key matrix. =32; Enhanced semantic features are:
[0048] It is the output of the Lth layer of the Transformer, which strengthens the semantic weights of decisive moments such as "afternoon peak" and "nighttime insulation".
[0049] The calculation process is as follows, considering both critical moments (such as the peak at t = 14) and non-critical moments (such as the early morning at t = 4): Dot product scaling: Let = 32, for t = 14, the dot product score of the query and the key is 15.0, which is scaled to .
[0050] Softmax normalization: The calculated value at the peak time is 0.35. The result (at dawn) is 0.01.
[0051] Weighted fusion: final feature vector The focus on the afternoon peak segment with a weight of 0.35 reinforces the decisive semantic meaning of "afternoon peak".
[0052] S5. Semantic KMeans Clustering Based on Mahalanobis Distance: An improved KMeans algorithm is adopted, using Mahalanobis distance as the metric and combined with semantic center guidance to achieve load clustering and eliminate the influence of feature correlation. The improved KMeans algorithm is used to implement load clustering. The initial centers are selected by maximizing the semantic cosine distance to avoid random initialization bias. Mahalanobis distance is used as the distance metric, and the influence of feature correlation is eliminated by introducing a covariance matrix, which more realistically measures the similarity between the "behavioral fingerprints" of different users. The cluster centers are iteratively updated until convergence, and finally, interpretable user grouping results are output.
[0053] Mahalanobis distance is used instead of Euclidean distance, through the covariance matrix. The inverse matrix eliminates feature correlation, making the distance metric more closely reflect the real differences in behavioral patterns. Compared with Euclidean distance, the cluster purity is significantly improved. It ensures that the center converges to a stable state, avoids clustering bias caused by premature stopping, and effectively improves intra-class consistency.
[0054] The initial centers for semantic KMeans clustering are selected by maximizing the semantic cosine distance to avoid random initialization bias; the distance metric used is Mahalanobis distance.
[0055] in, These are low-dimensional clustering feature vectors. For the k-th class center, The sample covariance matrix is used to eliminate the correlation between "peak load" and "energy-saving preference"; the cluster centers are updated to the within-cluster sample mean, and the iteration terminates under the following condition:
[0056] Assuming the sample to be classified It is necessary to determine whether it belongs to "office mode" or "shopping mall mode". As shown in Table 2 below, Mahalanobis distance effectively corrects the misjudgment of Euclidean distance.
[0057] Table 2 Comparison of Distance Measurement Results
[0058] Note: Although the Euclidean distance is displayed as equal to the center distance of the two classes (both 1.5), due to... Considering the correlation between "peak duration" and "start-stop frequency", Mahalanobis distance determines that it is more consistent with the characteristics of office mode.
[0059] S6. Semi-supervised fine-tuning and incremental learning for dynamic load characteristics: pseudo-labels are generated from the clustering results, the model is fine-tuned through the joint loss function, and the clustering parameters are updated using an incremental learning strategy to adapt to the dynamic evolution of load behavior.
[0060] Pseudo-labels are generated by selecting the top 10% of high-confidence samples with the highest intra-cluster distance from the clustering results. The model is fine-tuned by using a joint loss function to balance the clustering loss and classification loss to optimize the cluster boundaries. At the same time, an incremental learning strategy is adopted to freeze the LLM and autoencoder parameters when new data is added, and only the cluster centers and classifiers are updated to adapt to dynamic load characteristics such as seasonal changes and changes in user habits, so as to ensure the long-term effectiveness of the clustering results.
[0061] The joint loss function enhances the clarity of cluster boundaries by fusing clustering and classification losses, significantly improving the classification accuracy of boundary samples compared to a single clustering loss. During incremental learning, the LLM and autoencoder parameters are frozen, and only the cluster centers and classifiers are updated. This avoids "catastrophic forgetting" while quickly adapting to seasonal changes, improving the long-term stability of clustering results and solving the problem that static models cannot keep up with changes in user habits.
[0062] Pseudo-labels are generated from the top 10% of high-confidence samples with the highest intra-class distance; the joint loss function is:
[0063] in, Let i be the cluster label of sample i. It is a 2-layer fully connected classifier. The balancing coefficients are used; during incremental learning, the LLM and autoencoder parameters are frozen, and only the cluster centers and classifiers are updated to adapt to seasonal changes such as summer cooling or winter heating and changes in user habits.
[0064] With users For example, this sample is 1.2 meters from the center, which is among the top 10% of high-confidence samples in terms of in-class distance, and a pseudo-label is automatically generated. Let the clustering loss term be 0.2, the classification loss term be calculated as 0.1, and the balance coefficient be... The total loss is... The model fine-tunes its parameters based on this loss value, making subsequent identifications of similar "high-intensity summer office work patterns" more accurate.
[0065] Example 2 This invention also provides an intelligent clustering device for air conditioning loads based on a large-scale language model, comprising: An input sequence module oriented towards air conditioning behavior semantics is constructed to collect air conditioning load data and related information. After preprocessing, it is divided into time-series sub-sequences by sliding window and fused with contextual metadata to form a joint input vector containing behavioral semantics. The context semantic encoding module for load data based on the large language model LLM is used to input the joint input vector into the large language model LLM that has been customized for air conditioning load characteristics. The deep semantic vector is extracted through the embedding layer and the Transformer encoder to capture the user behavior patterns and environmental associations in the load time series. A cluster-oriented air conditioning behavior feature space module is constructed to reduce the dimensionality and decouple the features of deep semantic vectors through an autoencoder, generating low-dimensional clustering feature vectors while retaining key behavioral semantic information. The key load behavior recognition and enhancement module based on attention mechanism is used to learn the weights of key behavior segments in the load time series using multi-head attention mechanism, and generate enhanced semantic features by weighted fusion to improve cluster discriminativeness; The semantic KMeans clustering module based on Mahalanobis distance is used to implement load clustering by adopting the improved KMeans algorithm, using Mahalanobis distance as the metric, and combining semantic center guidance to eliminate the influence of feature correlation. A semi-supervised fine-tuning and incremental learning module for dynamic load characteristics is used to generate pseudo-labels from clustering results, fine-tune the model through a joint loss function, and update the clustering parameters using an incremental learning strategy to adapt to the dynamic evolution of load behavior.
[0066] Example 3 The present invention also provides an electronic device, comprising: The processor, communication interface, memory, and communication bus are connected, with the processor, communication interface, and memory communicating with each other via the communication bus. The memory stores a computer program that, when executed by the processor, causes the processor to perform the steps of the intelligent clustering method for air conditioning load based on a large language model.
[0067] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0068] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0069] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0070] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0071] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.
Claims
1. A smart clustering method for air conditioning load based on a large-scale language model, characterized in that, Includes the following steps: S1. Construct an input sequence oriented towards air conditioning behavior semantics, collect air conditioning load data and related information, and after preprocessing, generate time-series sub-sequences by sliding window segmentation, and fuse contextual metadata to form a joint input vector containing behavior semantics; S2. Contextual semantic encoding of load data is performed based on a large language model LLM. The joint input vector is input into a large language model LLM that has been customized and modified according to the characteristics of air conditioning load. Deep semantic vectors are extracted through the embedding layer and the Transformer encoder to capture user behavior patterns and environmental associations in the load time series. S3. Construct a cluster-oriented air conditioning behavior feature space, and use an autoencoder to reduce the dimensionality of deep semantic vectors and decouple features to generate low-dimensional clustering feature vectors while retaining key behavioral semantic information. S4. Key load behavior identification and enhancement based on attention mechanism: The weights of key behavior segments in the load time series are learned by multi-head attention mechanism, and weighted fusion is used to generate enhanced semantic features to improve cluster discriminativeness. S5. Semantic KMeans clustering based on Mahalanobis distance: An improved KMeans algorithm is adopted, using Mahalanobis distance as the metric and combined with semantic center guidance to achieve load clustering and eliminate the influence of feature correlation. S6. Semi-supervised fine-tuning and incremental learning for dynamic load characteristics: pseudo-labels are generated from clustering results, the model is fine-tuned through a joint loss function, and the clustering parameters are updated using an incremental learning strategy to adapt to the dynamic evolution of load behavior.
2. The intelligent clustering method for air conditioning load based on a large-scale language model according to claim 1, characterized in that, In step S1, the collected air conditioning load data includes 15-minute active power (kW), hourly start / stop count, and set temperature (°C); associated information includes indoor environmental parameters, equipment parameters, and user behavior information; preprocessing is Z-score standardization, with the formula: In the formula, For user i, the raw load data at time t. , , respectively, represent the historical load mean and standard deviation for user i.
3. The intelligent clustering method for air conditioning load based on a large-scale language model according to claim 2, characterized in that, In step S1, the sliding window length T is 24 hours, the step size S is 1 hour, and time series samples are generated: , in, This represents the data at the t-th time point within the window. Contextual metadata includes outdoor temperature, time period identifier, weekday / weekend flag (0 / 1), and holiday flag (0 / 1); The joint input vector is a concatenation of temporal subsequences and metadata. ,in, This represents a splicing operation. This is contextual metadata.
4. The intelligent clustering method for air conditioning load based on a large-scale language model according to claim 1, characterized in that, In S2, the customization process of the large-scale language model LLM includes: Prior embedding of equipment parameters: Rated cooling capacity and energy efficiency rating are mapped to an 8-dimensional vector through a linear layer and concatenated with the load embedding vector; Periodic-aware positional encoding: A dual-period encoding method is used to capture daily and weekly periodic features. The formula is as follows: The deep semantic vector is the concatenation of the first character of the last layer of the Transformer encoder and the hidden state at the peak load time: This is to fully characterize the semantics of the entire lifecycle of "start-run-shutdown".
5. The intelligent clustering method for air conditioning load based on a large-scale language model according to claim 1, characterized in that, In S3, the autoencoder includes a three-layer encoder and a symmetric decoder, and the loss function is: in, The deep semantic vector is N, which is the total number of samples; the low-dimensional clustering feature vector is the encoder output, with a dimension of 64.
6. The intelligent clustering method for air conditioning load based on a large-scale language model according to claim 1, characterized in that, In S4, key load behavior segments include power surge points corresponding to air conditioner startup, power drop points corresponding to air conditioner shutdown, set temperature change points, and load peak points; the attention weight learning formula is: in, K is the query matrix, and K is the key matrix. =32; Enhanced semantic features are: It is the output of the Lth layer of the Transformer, which strengthens the semantic weights of decisive moments such as "afternoon peak" and "nighttime insulation".
7. The intelligent clustering method for air conditioning load based on a large-scale language model according to claim 1, characterized in that, In step S5, the initial centers of the semantic KMeans cluster are selected by maximizing the semantic cosine distance, and the distance metric used is Mahalanobis distance. in, These are low-dimensional clustering feature vectors. For the k-th class center, The sample covariance matrix; Cluster centers are updated to the within-cluster mean, and the iteration terminates when: 。 8. The intelligent clustering method for air conditioning load based on a large-scale language model according to claim 1, characterized in that, In step S6, pseudo-labels are generated from the top 10% of high-confidence samples with the highest intra-class distance; the joint loss function is: in, Let i be the cluster label of sample i. It is a 2-layer fully connected classifier. The balancing coefficient is used; during incremental learning, the parameters of the large language model LLM and autoencoder are frozen, and only the cluster centers and classifiers are updated to adapt to seasonal changes and changes in user habits.
9. A smart clustering device for air conditioning load based on a large-scale language model, characterized in that, include: An input sequence module oriented towards air conditioning behavior semantics is constructed to collect air conditioning load data and related information. After preprocessing, it is divided into time-series sub-sequences by sliding window and fused with contextual metadata to form a joint input vector containing behavioral semantics. The context semantic encoding module for load data based on the large language model LLM is used to input the joint input vector into the large language model LLM that has been customized for air conditioning load characteristics. The deep semantic vector is extracted through the embedding layer and the Transformer encoder to capture the user behavior patterns and environmental associations in the load time series. A cluster-oriented air conditioning behavior feature space module is constructed to reduce the dimensionality and decouple the features of deep semantic vectors through an autoencoder, generating low-dimensional clustering feature vectors while retaining key behavioral semantic information. The key load behavior recognition and enhancement module based on attention mechanism is used to learn the weights of key behavior segments in the load time series using multi-head attention mechanism, and generate enhanced semantic features by weighted fusion to improve cluster discriminativeness; The semantic KMeans clustering module based on Mahalanobis distance is used to implement load clustering by adopting the improved KMeans algorithm, using Mahalanobis distance as the metric, and combining semantic center guidance to eliminate the influence of feature correlation. A semi-supervised fine-tuning and incremental learning module for dynamic load characteristics is used to generate pseudo-labels from clustering results, fine-tune the model through a joint loss function, and update the clustering parameters using an incremental learning strategy to adapt to the dynamic evolution of load behavior.
10. An electronic device, characterized in that, include: The processor, communication interface, memory, and communication bus are connected, with the processor, communication interface, and memory communicating with each other via the communication bus. The memory stores a computer program that, when executed by the processor, causes the processor to perform the steps of the method according to any one of claims 1 to 8.