Public building air conditioner day division method and system based on improved K-Medoids

By using an improved K-Medoids clustering algorithm and Manhattan distance, combined with alienation coefficient correction, the model accurately distinguishes between air conditioning days and baseline days in public buildings, solving the problem of inaccurate decomposition of air conditioning load data and improving the robustness and accuracy of the model.

CN121903221APending Publication Date: 2026-04-21NARI TECH CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NARI TECH CO LTD
Filing Date
2025-12-02
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

In existing technologies, the decomposition of air conditioning load data in public buildings is inaccurate, making it difficult for power grid companies to formulate effective demand response strategies, especially when only the total load data of the gate is available, the error in decomposing the air conditioning load is relatively large.

Method used

An improved K-Medoids clustering algorithm, combined with Manhattan distance and alienation coefficient, is used to cluster the total load curves of public buildings, accurately classifying air-conditioning days and baseline days, and correcting the classification results of abnormal days during seasonal transitions.

Benefits of technology

It improves the accuracy of distinguishing between air-conditioning days and baseline days, reduces the interference of outliers on clustering results, enhances the robustness of the model, and solves the classification error problem caused by air conditioning operation during seasonal transitions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121903221A_ABST
    Figure CN121903221A_ABST
Patent Text Reader

Abstract

The invention discloses a public building air conditioner day division method and system based on improved K-Medoids. The method comprises the steps that the total load curve of each day of public building users is extracted from the total load curve of the public building users according to the date; inputting the total load curve of each day into an improved K-Medoids model for clustering; a quality evaluation method of a K-Medoids clustering model is improved through a Manhattan distance, and dates corresponding to an air conditioner date and a reference date are obtained through division; setting a separation coefficient to correct a division result of the abnormal days of the season alternation period, and obtaining a corrected air conditioner day and a corrected reference date; the intermittent starting state of the air conditioner in the season alternation period can be recognized, and the dividing effect of the air conditioner in the season alternation period under the temporary and regional starting condition is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of electrical technology, and in particular relates to a method and system for dividing the air conditioning day in public buildings based on improved K-Medoids. Background Technology

[0002] Air conditioning load accounts for 30% to 60% of the total load in public buildings, making it a significant contributor to peak summer loads. Meanwhile, air conditioning equipment in public buildings is flexible and adjustable, especially centralized air conditioning systems which offer fast response, high adjustment potential, and simple operation. Furthermore, within a certain power range, they do not affect production, operations, or user comfort, making them an important demand-side adjustable load resource.

[0003] Accurate air conditioning load data is crucial for the formulation and implementation of demand response strategies. However, current advanced metering systems (AMIs) of power grid companies only collect total load data at the gateways of public buildings, lacking data on individual air conditioning loads. Except for some users who have installed air conditioning branch monitoring units, the air conditioning load of most public buildings can only be roughly estimated, resulting in significant errors compared to the actual situation. Therefore, how to accurately decompose and identify air conditioning loads using only total gateway load measurement data has become an urgent research problem to be solved.

[0004] Given that air conditioning load accounts for a high proportion of the total load of public buildings, and that the turning on and off of air conditioning causes significant changes in the horizontal and morphological aspects of the total load curve, the first step in decomposing the air conditioning load based on the total load data at the gateway is to accurately divide the air conditioning day and the baseline day. Summary of the Invention

[0005] Purpose of the invention: The purpose of this invention is to provide a method and system for dividing air conditioning days in public buildings based on improved K-Medoids, which can improve the accuracy of dividing air conditioning days and reference days in buildings.

[0006] Technical solution: The present invention provides a method for dividing the day of air conditioning in public buildings based on improved K-Medoids, comprising:

[0007] Extract the daily total load curves of public building users by date;

[0008] The total daily load curves are input into the improved K-Medoids model for clustering.

[0009] The quality assessment method of the K-Medoids clustering model is improved by Manhattan distance, and the corresponding dates of the air conditioning day and the baseline day are obtained.

[0010] By setting a separation coefficient to correct the division of abnormal days during seasonal transitions, the corrected air conditioning days and base dates are obtained.

[0011] Furthermore, the step of inputting the total daily load curves into the improved K-Medoids model for clustering specifically includes:

[0012] (1) Randomly select from the total load curves of each day One curve is used as the initial center point;

[0013] (2) Assign the remaining daily total load curves to the clusters corresponding to the nearest center point to form the initial cluster division;

[0014] (3) Within each cluster, calculate the sum of squared distances from all objects in the cluster to other objects, and select the object that minimizes this sum as the new center point;

[0015] (4) Repeat steps (2) to (3) to continuously update the cluster division and center point until the center point no longer changes, and obtain the final clustering result.

[0016] Furthermore, the quality assessment method for the improved K-Medoids clustering model using Manhattan distance, which divides the corresponding dates for air conditioning days and baseline days, includes:

[0017] Manhattan distance is used instead of traditional Euclidean distance. Manhattan distance measures distance by calculating the sum of the absolute differences between the sample point and the center point in each dimension, as shown in the following formula:

[0018] ;

[0019] In the formula, p is a sample, representing a given object; For clusters The center point; This is the sum of the absolute values ​​of the distances between all objects in the dataset and the center point. The number of curves randomly selected from the total load curves for each day;

[0020] The target number of clusters in the improved K-Medoids model is set to 2, and the output two cluster curve sets are defined as the air conditioning day dataset and the baseline day dataset, respectively. Based on the classification results of the cluster to which the curve belongs, the specific dates of the air conditioning day and the baseline day for each user are obtained.

[0021] Furthermore, the method of setting a separation coefficient to correct the division of abnormal days during seasonal transitions yields the corrected air conditioning days and base dates, specifically as follows:

[0022] The sparsity coefficient is defined as a correction index for clustering results. It characterizes the density of samples within their own clusters and their separation from other clusters after clustering, thereby identifying and correcting potential erroneous date classifications in the clustering results. The calculation method is as follows:

[0023] ;

[0024] In the formula, This is the average distance from sample X to other samples within the same cluster, used to measure intra-class tightness; This is the average distance from sample X to all samples in the nearest neighbor cluster, used to measure inter-class separation. and These represent the weights of intra-class distance and inter-class distance, respectively. This is a non-linear adjustment parameter for distance; To prevent positive numbers with a denominator of zero, the range of values ​​is 10. -8 Up to 10 -4 between;

[0025] Based on the total load curves for each day, an evacuation coefficient threshold is set, and the following judgments are made:

[0026] When the alienation coefficient of a sample is greater than or equal to the alienation coefficient threshold, the clustering result of the sample is deemed reliable and its original classification is maintained.

[0027] When the alienation coefficient of a sample is less than the alienation coefficient threshold, the sample is determined to be an air-conditioning day sample that has been incorrectly classified into the baseline day category; the sample is then included in the air-conditioning day dataset, and its corresponding date label is corrected to air-conditioning day.

[0028] Based on the same inventive concept, this invention also provides a public building air conditioning day division system based on improved K-Medoids, comprising:

[0029] The extraction module is used to extract the total load curves of public building users for each day by date;

[0030] The clustering module is used to input the total load curves of each day into the improved K-Medoids model for clustering;

[0031] The partitioning module is used to improve the quality assessment method of the K-Medoids clustering model through Manhattan distance, and to partition the corresponding dates of the air conditioning day and the baseline day.

[0032] The correction module is used to set the alienation coefficient to correct the division of abnormal days during the seasonal transition period, and obtain the corrected air conditioning day and base day dates.

[0033] Furthermore, the step of inputting the total daily load curves into the improved K-Medoids model for clustering specifically includes:

[0034] (1) Randomly select from the total load curves of each day One curve is used as the initial center point;

[0035] (2) Assign the remaining daily total load curves to the clusters corresponding to the nearest center point to form the initial cluster division;

[0036] (3) Within each cluster, calculate the sum of squared distances from all objects in the cluster to other objects, and select the object that minimizes this sum as the new center point;

[0037] (4) Repeat steps (2) to (3) to continuously update the cluster division and center point until the center point no longer changes, and obtain the final clustering result.

[0038] Furthermore, the quality assessment method for the improved K-Medoids clustering model using Manhattan distance, which divides the corresponding dates for air conditioning days and baseline days, includes:

[0039] Manhattan distance is used instead of traditional Euclidean distance. Manhattan distance measures distance by calculating the sum of the absolute differences between the sample point and the center point in each dimension, as shown in the following formula:

[0040] ;

[0041] In the formula, p is a sample, representing a given object; For clusters The center point; This is the sum of the absolute values ​​of the distances between all objects in the dataset and the center point. The number of curves randomly selected from the total load curves for each day;

[0042] The target number of clusters in the improved K-Medoids model is set to 2, and the output two cluster curve sets are defined as the air conditioning day dataset and the baseline day dataset, respectively. Based on the classification results of the cluster to which the curve belongs, the specific dates of the air conditioning day and the baseline day for each user are obtained.

[0043] Furthermore, the method of setting a separation coefficient to correct the division of abnormal days during seasonal transitions yields the corrected air conditioning days and base dates, specifically as follows:

[0044] The sparsity coefficient is defined as a correction index for clustering results. It characterizes the density of samples within their own clusters and their separation from other clusters after clustering, thereby identifying and correcting potential erroneous date classifications in the clustering results. The calculation method is as follows:

[0045] ;

[0046] In the formula, This is the average distance from sample X to other samples within the same cluster, used to measure intra-class tightness; This is the average distance from sample X to all samples in the nearest neighbor cluster, used to measure inter-class separation. and These represent the weights of intra-class distance and inter-class distance, respectively. This is a non-linear adjustment parameter for distance; To prevent positive numbers with a denominator of zero, the range of values ​​is 10. -8 Up to 10 -4 between;

[0047] Based on the total load curves for each day, an evacuation coefficient threshold is set, and the following judgments are made:

[0048] When the alienation coefficient of a sample is greater than or equal to the alienation coefficient threshold, the clustering result of the sample is deemed reliable and its original classification is maintained.

[0049] When the alienation coefficient of a sample is less than the alienation coefficient threshold, the sample is determined to be an air-conditioning day sample that has been incorrectly classified into the baseline day category; the sample is then included in the air-conditioning day dataset, and its corresponding date label is corrected to air-conditioning day.

[0050] Based on the same inventive concept, the present invention also provides a computing device comprising: one or more processors, one or more memories, and one or more programs, the programs being stored in the memory and configured to be executed by the processor, the programs being loaded onto the processor to implement the steps of the public building air conditioning day division method based on improved K-Medoids as described in any of the preceding claims.

[0051] Based on the same inventive concept, the present invention also provides a storage medium storing a computer program, the computer program including program instructions, which, when executed by a processor, cause the processor to perform the steps of the public building air conditioning day division method based on the improved K-Medoids as described in any of the preceding claims.

[0052] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages: (1) It proposes to divide the air-conditioning days and reference days of public buildings based on the K-Medoids algorithm. Compared with the traditional division method based on season and month, this method can take into account the characteristics of intermittent air conditioning during the seasonal transition period, thereby improving the accuracy of the division; (2) It adopts the Manhattan distance to improve the distance measurement method from the sample to the center point, effectively reducing the interference of outliers on the overall clustering results and enhancing the robustness of the model; (3) It proposes to correct the division results with the alienation coefficient, which effectively solves the problem of some samples being classified incorrectly due to the temporary or regional opening of air conditioning during the seasonal transition period. Attached Figure Description

[0053] Figure 1 This is a flowchart of a method according to an embodiment of the present invention;

[0054] Figure 2This is a schematic diagram of the air conditioning day division based on improved K-Medoids according to an embodiment of the present invention;

[0055] Figure 3 This is a diagram showing the total daily and baseline air conditioning load curves for an office building, according to an embodiment of the present invention.

[0056] Figure 4 This is a graph showing the total daily and baseline load curves of air conditioning in a commercial building, as described in an embodiment of the present invention. Detailed Implementation

[0057] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. The following embodiments are only used to more clearly illustrate the technical solutions of this application, and are therefore only examples, and should not be used to limit the scope of protection of this application.

[0058] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application; the term "comprising" and any variations thereof in the specification, claims and foregoing description of the drawings are intended to cover non-exclusive inclusion.

[0059] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more (including two), unless otherwise explicitly defined.

[0060] Example 1: As Figure 1 As shown in this embodiment, the method for dividing the air conditioning day in public buildings based on improved K-Medoids includes:

[0061] Extract the daily total load curves of public building users by date;

[0062] The total daily load curves are input into the improved K-Medoids model for clustering.

[0063] The quality assessment method of the K-Medoids clustering model is improved by Manhattan distance, and the corresponding dates of the air conditioning day and the baseline day are obtained.

[0064] By setting a separation coefficient to correct the division of abnormal days during seasonal transitions, the corrected air conditioning days and base dates are obtained.

[0065] Example 2: Figure 2As shown in this embodiment, the method for establishing the K-Medoids clustering model in the improved K-Medoids-based method for dividing public building air conditioning days is as follows:

[0066] K-Medoids clustering is a sample-point-based partitioning algorithm. Its core idea is to select actual sample points as cluster centers (medoids) and minimize the total distance from each sample point to the center. Unlike K-Means, K-Medoids avoids using the mean point as cluster centers, thus exhibiting better robustness and stability in the presence of outliers or irregularities, and more realistically reflecting the typical patterns of load curves. In the clustering problem of load curves in public buildings, where the original data may contain fluctuations caused by holidays, temporary shutdowns, and abnormal energy consumption, K-Medoids is more suitable for dividing air-conditioning days into baseline days.

[0067] The specific steps are as follows:

[0068] (1) Initialization phase: randomly select k curves from the total load curves of each day as the initial center point.

[0069] (2) Cluster partitioning stage: Allocate each remaining daily load curve to the cluster corresponding to the nearest center point to form the initial cluster partitioning.

[0070] (3) Centroid update stage: Within each cluster, calculate the sum of squared distances from all objects in the cluster to other objects, and select the object that minimizes this sum as the new centroid. This step ensures that the newly selected centroid can better represent the typical curves within the cluster, reducing the overall clustering error.

[0071] (4) Iterative convergence phase: Repeat steps (2) and (3) to continuously update the cluster division and center point until the center point no longer changes, and obtain the final clustering result.

[0072] Example 3: As Figure 2 As shown in this embodiment, the method for dividing air-conditioning days in public buildings based on improved K-Medoids, using the Manhattan distance improved K-Medoids clustering model for quality assessment, divides the corresponding dates of air-conditioning days and baseline days as follows:

[0073] The improved K-Medoids model uses Manhattan distance (also known as L1 distance) instead of traditional Euclidean distance during clustering to enhance robustness against outliers. Manhattan distance measures distance by calculating the sum of the absolute differences between sample points and the center point across all dimensions, effectively reducing the impact of outliers on the overall clustering results. This makes it more suitable for handling time-series data with volatility and uncertainty, such as public building load curves. The calculation formula is shown below:

[0074] ;

[0075] In the formula, p is the sample, i.e., the given object; For clusters The center point; E is the sum of the absolute values ​​of the distances between all objects in the dataset and the center point.

[0076] The target number of clusters in the improved K-Medoids model is set to 2, and the two output cluster curve sets are defined as the air conditioning day dataset and the baseline day dataset, respectively. Furthermore, based on the classification results of the clusters to which the curves belong, the specific dates of the air conditioning day and the baseline day for each user can be accurately obtained.

[0077] Example 4: Figure 2 As shown in this embodiment, the method for dividing public building air conditioning days based on improved K-Medoids, and the method for setting an alienation coefficient to correct the division results of abnormal days during seasonal transitions, is as follows:

[0078] This embodiment defines the alienation coefficient as a correction index for clustering results. It characterizes the density of samples within their own clusters and their separation from other clusters after clustering, thereby identifying and correcting potential erroneous date classifications in the clustering results. The calculation method for the alienation coefficient is as follows:

[0079] ;

[0080] In the formula, The average distance from sample X to other samples within the same cluster is used to measure intra-class tightness. The average distance from sample X to all samples in the nearest neighbor cluster is used to measure the inter-class separation. and These represent the weights of intra-class distance and inter-class distance, respectively. This is a non-linear adjustment parameter for distance; To prevent small positive numbers with a denominator of zero.

[0081] To more effectively filter out misclassified air-conditioning day samples from the baseline day cluster, this embodiment places greater emphasis on measuring inter-class separation in its parameter settings. Therefore, the parameter values ​​are set as follows: , , , .

[0082] When the alienation coefficient K is large on a certain day, it indicates that the sample is closely distributed within its own class and is clearly separated from other classes, and the clustering is relatively accurate; conversely, when the alienation coefficient K is small, it indicates that the sample may be at risk of being misclassified.

[0083] Since this embodiment discusses the incorrect classification caused by abnormal air conditioning operation during seasonal transitions, it is only necessary to calculate the alienation coefficient of each sample in the baseline day class to identify the air conditioning day samples that are incorrectly classified into the baseline day class.

[0084] Based on the total load data distribution of typical users in public buildings, the isolation coefficient threshold is set at 0.15. The specific determination rules are as follows:

[0085] When the alienation coefficient of a sample is ≥0.15, the clustering result of the sample is considered reliable, and its original classification is maintained.

[0086] When the alienation coefficient of a sample is less than 0.15, the sample is determined to be an air-conditioning day sample that has been incorrectly classified into the baseline day category. The sample is then returned to the air-conditioning day dataset, and its corresponding date label is corrected to "air-conditioning day".

[0087] Example 5: In this example, a method for dividing the air conditioning day in public buildings based on improved K-Medoids is proposed, specifically for a typical office building.

[0088] Table 1 shows the alienation coefficients of each base date obtained by clustering the office building using the improved K-medoids clustering algorithm; Table 2 shows the air-conditioning days and base dates of the office building after correction of the alienation coefficients. Figure 3 This is a graph showing the total load curves of air conditioning days and baseline days for office buildings, as defined by this invention. The horizontal axis represents time, the vertical axis represents the total load value, and the two colors represent air conditioning days and baseline days, respectively.

[0089]

[0090]

[0091] The office building selected in this embodiment has total load data for 63 days from June to August 2022, with a sampling interval of 15 minutes. Figure 3It can be seen that there is a significant difference between the two clusters of total load curves, and the total load increases significantly after the air conditioning is turned on, which fully indicates that the air conditioning load accounts for a large proportion of the total load of the building. As shown in Table 1, the separation coefficient calculation results for all reference days are greater than 0.15, and there are no cases where air conditioning day samples are mistakenly clustered to the reference day. Combined with the survey results of the user's actual air conditioning operation, the accuracy rate of reference day classification reaches 100%. Furthermore, as shown in Table 2, July 13th is classified as an air conditioning day, and the previous dates are the reference days. This user did not have intermittent air conditioning operation during the study period.

[0092] Example 6: The proposed method for dividing the air conditioning day in public buildings based on improved K-Medoids is specifically applied to a typical commercial building.

[0093] Table 3 shows the alienation coefficients of each base date obtained by clustering the commercial building using the improved K-medoids clustering algorithm; Table 4 shows the air-conditioning days and base dates of the commercial building after correction of the alienation coefficients. Figure 4 This is a graph showing the total load curves for air conditioning days and baseline days in commercial buildings, as defined in this invention. The horizontal axis represents time, the vertical axis represents the total load value, and the two colors represent air conditioning days and baseline days, respectively.

[0094]

[0095]

[0096] The commercial buildings selected in this embodiment have total load data for 21 days from September to October 2023, with a sampling interval of 15 minutes. Figure 4 It is evident that the total load curves of the two clusters show significant amplitude differences between 9:00 and 20:00, while the start-up and shutdown times of the air conditioning day and the baseline day are similar, exhibiting a close correlation with user operating hours. Table 3 shows that September 15th was classified as the baseline day in the clustering results of this example. However, the alienation coefficient for September 15th, calculated to be 0.0697, is less than 0.15, indicating it was incorrectly clustered as an air conditioning day sample into the baseline day. The alienation coefficients for all other dates are greater than 0.15. Figure 4 As can be seen, the air conditioning was only turned on after 3 PM on September 15th, which is considered a temporary and short-term use, thus it was mistakenly clustered into the baseline date cluster. After correction with the distancing factor, this day was correctly identified as an air conditioning day, improving the accuracy of baseline date classification for commercial buildings from 95.23% to 100%. Table 4 shows that after the distancing factor correction, all dates in October are baseline dates, while in September, there were multiple instances where air conditioning days and baseline dates alternated, with air conditioning being used intermittently on different dates. This is because September is the transition period between summer and autumn, and users flexibly adjust their air conditioning usage according to daily weather conditions.

[0097] Example 7: Based on the same inventive concept, this example also provides a public building air conditioning day division system based on improved K-Medoids, including:

[0098] The extraction module is used to extract the total load curves of public building users for each day by date;

[0099] The clustering module is used to input the total load curves of each day into the improved K-Medoids model for clustering;

[0100] The partitioning module is used to improve the quality assessment method of the K-Medoids clustering model through Manhattan distance, and to partition the corresponding dates of the air conditioning day and the baseline day.

[0101] The correction module is used to set the alienation coefficient to correct the division of abnormal days during the seasonal transition period, and obtain the corrected air conditioning day and base day dates.

[0102] Furthermore, the step of inputting the total daily load curves into the improved K-Medoids model for clustering specifically includes:

[0103] (1) Randomly select from the total load curves of each day One curve is used as the initial center point;

[0104] (2) Assign the remaining daily total load curves to the clusters corresponding to the nearest center point to form the initial cluster division;

[0105] (3) Within each cluster, calculate the sum of squared distances from all objects in the cluster to other objects, and select the object that minimizes this sum as the new center point;

[0106] (4) Repeat steps (2) to (3) to continuously update the cluster division and center point until the center point no longer changes, and obtain the final clustering result.

[0107] Furthermore, the quality assessment method for the improved K-Medoids clustering model using Manhattan distance, which divides the corresponding dates for air conditioning days and baseline days, includes:

[0108] Manhattan distance is used instead of traditional Euclidean distance. Manhattan distance measures distance by calculating the sum of the absolute differences between the sample point and the center point in each dimension, as shown in the following formula:

[0109] ;

[0110] In the formula, p is a sample, representing a given object; For clusters The center point; This is the sum of the absolute values ​​of the distances between all objects in the dataset and the center point. The number of curves randomly selected from the total load curves for each day;

[0111] The target number of clusters in the improved K-Medoids model is set to 2, and the output two cluster curve sets are defined as the air conditioning day dataset and the baseline day dataset, respectively. Based on the classification results of the cluster to which the curve belongs, the specific dates of the air conditioning day and the baseline day for each user are obtained.

[0112] Furthermore, the method of setting a separation coefficient to correct the division of abnormal days during seasonal transitions yields the corrected air conditioning days and base dates, specifically as follows:

[0113] The sparsity coefficient is defined as a correction index for clustering results. It characterizes the density of samples within their own clusters and their separation from other clusters after clustering, thereby identifying and correcting potential erroneous date classifications in the clustering results. The calculation method is as follows:

[0114] ;

[0115] In the formula, This is the average distance from sample X to other samples within the same cluster, used to measure intra-class tightness; This is the average distance from sample X to all samples in the nearest neighbor cluster, used to measure inter-class separation. and These represent the weights of intra-class distance and inter-class distance, respectively. This is a non-linear adjustment parameter for distance; To prevent positive numbers with a denominator of zero, the range of values ​​is 10. -8 Up to 10 -4 between;

[0116] Based on the total load curves for each day, a threshold for the evacuation coefficient is set, and the following judgment is made:

[0117] When the alienation coefficient of a sample is greater than or equal to the alienation coefficient threshold, the clustering result of the sample is deemed reliable and its original classification is maintained.

[0118] When the alienation coefficient of a sample is less than the alienation coefficient threshold, the sample is determined to be an air-conditioning day sample that has been incorrectly classified into the baseline day category; the sample is then included in the air-conditioning day dataset, and its corresponding date label is corrected to air-conditioning day.

[0119] Example 8: Based on the same inventive concept, this embodiment also provides a computing device, including: one or more processors, one or more memories, and one or more programs, the programs being stored in the memory and configured to be executed by the processor, the programs being loaded onto the processor to implement the steps of the public building air conditioning day division method based on improved K-Medoids according to any of the preceding claims.

[0120] Example 9: Based on the same inventive concept, this embodiment also provides a storage medium storing a computer program. The computer program includes program instructions, which, when executed by a processor, cause the processor to perform the steps of the public building air conditioning day division method based on the improved K-Medoids as described in any of the preceding embodiments.

[0121] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and not to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. These modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application, and they should all be covered within the scope of the claims and specification of this application. In particular, as long as there is no structural conflict, the various technical features mentioned in the embodiments can be combined in any way. This application is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.

Claims

1. A method for dividing the day of air conditioning in public buildings based on improved K-Medoids, characterized in that, include: Extract the daily total load curves of public building users by date; The total daily load curves are input into the improved K-Medoids model for clustering. The quality assessment method of the K-Medoids clustering model is improved by Manhattan distance, and the corresponding dates of the air conditioning day and the baseline day are obtained. By setting a separation coefficient to correct the division of abnormal days during seasonal transitions, the corrected air conditioning days and base dates are obtained.

2. The method for dividing the air conditioning day in public buildings based on improved K-Medoids according to claim 1, characterized in that, The step of inputting the total load curves for each day into the improved K-Medoids model for clustering specifically includes: (1) Randomly select from the total load curves of each day One curve is used as the initial center point; (2) Assign the remaining daily total load curves to the clusters corresponding to the nearest center point to form the initial cluster division; (3) Within each cluster, calculate the sum of squared distances from all objects in the cluster to other objects, and select the object that minimizes this sum as the new center point; (4) Repeat steps (2) to (3) to continuously update the cluster division and center point until the center point no longer changes, and obtain the final clustering result.

3. The method for dividing the air conditioning day in public buildings based on improved K-Medoids according to claim 1, characterized in that, The quality assessment method for the improved K-Medoids clustering model using Manhattan distance divides the dates corresponding to air conditioning days and baseline days, including: Manhattan distance is used instead of traditional Euclidean distance. Manhattan distance measures distance by calculating the sum of the absolute differences between the sample point and the center point in each dimension, as shown in the following formula: ; In the formula, p is a sample, representing a given object; For clusters The center point; This is the sum of the absolute values ​​of the distances between all objects in the dataset and the center point. The number of curves randomly selected from the total load curves for each day; The target number of clusters in the improved K-Medoids model is set to 2, and the output two cluster curve sets are defined as the air conditioning day dataset and the baseline day dataset, respectively. Based on the classification results of the cluster to which the curve belongs, the specific dates of the air conditioning day and the baseline day for each user are obtained.

4. The method for dividing the air conditioning day in public buildings based on improved K-Medoids according to claim 1, characterized in that, The method of setting a separation coefficient to correct the division of abnormal days during seasonal transitions yields the corrected air conditioning days and base dates, specifically: The sparsity coefficient is defined as a correction index for clustering results. It characterizes the density of samples within their own clusters and their separation from other clusters after clustering, thereby identifying and correcting potential erroneous date classifications in the clustering results. The calculation method is as follows: ; In the formula, This is the average distance from sample X to other samples within the same cluster, used to measure intra-class tightness; This is the average distance from sample X to all samples in the nearest neighbor cluster, used to measure inter-class separation. and These represent the weights of intra-class distance and inter-class distance, respectively. This is a non-linear adjustment parameter for distance; To prevent positive numbers with a denominator of zero, the range of values ​​is [range missing]. to between; Based on the total load curves for each day, an evacuation coefficient threshold is set, and the following judgments are made: When the alienation coefficient of a sample is greater than or equal to the alienation coefficient threshold, the clustering result of the sample is deemed reliable and its original classification is maintained. When the alienation coefficient of a sample is less than the alienation coefficient threshold, the sample is determined to be an air-conditioning day sample that has been incorrectly classified into the baseline day category; the sample is then included in the air-conditioning day dataset, and its corresponding date label is corrected to air-conditioning day.

5. A daily air conditioning division system for public buildings based on improved K-Medoids, characterized in that, include: The extraction module is used to extract the total load curves of public building users for each day by date; The clustering module is used to input the total load curves of each day into the improved K-Medoids model for clustering; The partitioning module is used to improve the quality assessment method of the K-Medoids clustering model through Manhattan distance, and to partition the corresponding dates of the air conditioning day and the baseline day. The correction module is used to set the alienation coefficient to correct the division of abnormal days during the seasonal transition period, and obtain the corrected air conditioning day and base day dates.

6. The public building air conditioning day division system based on improved K-Medoids according to claim 5, characterized in that, The step of inputting the total load curves for each day into the improved K-Medoids model for clustering specifically includes: (1) Randomly select from the total load curves of each day One curve is used as the initial center point; (2) Assign the remaining daily total load curves to the clusters corresponding to the nearest center point to form the initial cluster division; (3) Within each cluster, calculate the sum of squared distances from all objects in the cluster to other objects, and select the object that minimizes this sum as the new center point; (4) Repeat steps (2) to (3) to continuously update the cluster division and center point until the center point no longer changes, and obtain the final clustering result.

7. The public building air conditioning day division system based on improved K-Medoids according to claim 5, characterized in that, The quality assessment method for the improved K-Medoids clustering model using Manhattan distance divides the dates corresponding to air conditioning days and baseline days, including: Manhattan distance is used instead of traditional Euclidean distance. Manhattan distance measures distance by calculating the sum of the absolute differences between the sample point and the center point in each dimension, as shown in the following formula: ; In the formula, p is a sample, representing a given object; For clusters The center point; This is the sum of the absolute values ​​of the distances between all objects in the dataset and the center point. The number of curves randomly selected from the total load curves for each day; The target number of clusters in the improved K-Medoids model is set to 2, and the output two cluster curve sets are defined as the air conditioning day dataset and the baseline day dataset, respectively. Based on the classification results of the cluster to which the curve belongs, the specific dates of the air conditioning day and the baseline day for each user are obtained.

8. The public building air conditioning day division system based on improved K-Medoids according to claim 5, characterized in that, The method of setting a separation coefficient to correct the division of abnormal days during seasonal transitions yields the corrected air conditioning days and base dates, specifically: The sparsity coefficient is defined as a correction index for clustering results. It characterizes the density of samples within their own clusters and their separation from other clusters after clustering, thereby identifying and correcting potential erroneous date classifications in the clustering results. The calculation method is as follows: ; In the formula, This is the average distance from sample X to other samples within the same cluster, used to measure intra-class tightness; This is the average distance from sample X to all samples in the nearest neighbor cluster, used to measure inter-class separation. and These represent the weights of intra-class distance and inter-class distance, respectively. This is a non-linear adjustment parameter for distance; To prevent positive numbers with a denominator of zero, the range of values ​​is 10. -8 Up to 10 -4 between; Based on the total load curves for each day, an evacuation coefficient threshold is set, and the following judgments are made: When the alienation coefficient of a sample is greater than or equal to the alienation coefficient threshold, the clustering result of the sample is deemed reliable and its original classification is maintained. When the alienation coefficient of a sample is less than the alienation coefficient threshold, the sample is determined to be an air-conditioning day sample that has been incorrectly classified into the baseline day category; the sample is then included in the air-conditioning day dataset, and its corresponding date label is corrected to air-conditioning day.

9. A computing device, characterized in that, include: One or more processors, one or more memories, and one or more programs, said programs being stored in the memory and configured to be executed by the processor, said programs being loaded onto the processor to implement the steps of the public building air conditioning day division method based on any one of claims 1 to 4.

10. A storage medium, characterized in that, The storage medium stores a computer program, which includes program instructions that, when executed by a processor, cause the processor to perform the steps of the public building air conditioning day division method based on any one of claims 1 to 4.