Periodic power consumption mode optimization method and system based on encryption technology and K-Medoids algorithm

Through the cyclical power consumption mode optimization method of encryption technology and the K-Medoids algorithm, the problems of insufficient identification of periodic and seasonal differences in power consumption mode optimization, data security and solution execution are solved, and electricity consumption cost savings and energy efficiency improvements are achieved.

CN120278423APending Publication Date: 2025-07-08YUNNAN POWER GRID CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411873556.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-07-08

AI Technical Summary

Technical Problem

The existing power consumption mode optimization methods are difficult to capture the periodic changes and seasonal differences in consumer electricity consumption behavior. They do not consider peak electricity prices and seasonal electricity prices, have limited optimization effects, lack data security protection, and are difficult to implement.

Method used

The periodic power consumption mode optimization method based on encryption technology and K-Medoids algorithm is adopted. By obtaining historical load data and expected cost saving rate values, the K-Medoids algorithm is used for cluster analysis, combining peak-to-valley time-sharing electricity prices and peak electricity prices, an adjustment difficulty evaluation model is built to ensure the executability of the recommended solution, and asymmetric encryption technology is used to ensure data security.

Benefits of technology

It realizes accurate identification and optimization of the optimal cycle power consumption mode, reduces electricity consumption costs, improves energy utilization efficiency, ensures data security, and supports consumers to flexibly adjust their power consumption plans.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120278423A_ABST
    Figure CN120278423A_ABST
Patent Text Reader

Abstract

The invention discloses a periodic power consumption mode optimization method based on an encryption technology and a K-Medoids algorithm, and relates to the technical field of intelligent power grids, and the method comprises the steps: obtaining the historical load data of periodic power consumption of a consumer and a cost saving rate expected value; selecting and updating each evaluation factor based on the historical load data of different periods, and iteratively distributing the historical load data of each period of non-evaluation factors to the evaluation factor class with the highest similarity level, so as to determine each optimal evaluation factor and obtain the corresponding power consumption mode of each optimal period; and obtaining each power consumption cost saving rate of each optimal period power consumption mode compared with the recent period power consumption, determining the power consumption cost saving rate closest to the cost saving rate expected value, and determining the corresponding optimal period power consumption mode as the expected periodic power consumption mode. According to the invention, it is ensured that the power consumption cost saving rate reaches the expectation, the periodic power consumption mode with the minimum total power consumption cost is found, and the encryption technology is used to guarantee the communication security.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of smart grids, and particularly to a method for optimizing periodic electricity consumption patterns based on encryption technology and the K-Medoids algorithm. Background Art

[0002] Currently, the social electricity consumption is continuously rising, and the power supply pressure during peak hours is huge. Therefore, peak-valley-time-of-use electricity prices have been implemented everywhere to guide consumers to use electricity during off-peak hours.

[0003] However, many consumers lack an understanding of their own electricity consumption situations and cost-saving strategies, and need more precise support from power grid companies. Although the metering automation system can collect 15-minute load data of special transformer consumers, analyze electricity consumption patterns annually, quarterly, and monthly, calculate costs under different electricity consumption patterns in combination with time-of-use electricity prices, and recommend suitable solutions for consumers, there are still some deficiencies in the existing methods:

[0004] Firstly, the analysis is mainly based on monthly electricity consumption, making it difficult to capture the periodic changes and seasonal differences in consumers' electricity consumption behaviors, resulting in inaccurate analysis results.

[0005] Secondly, cost optimization only considers peak-valley electricity prices and does not consider factors such as peak electricity prices and seasonal electricity prices, so the optimization effect is limited.

[0006] In addition, the lack of consideration of the expected value of the electricity cost savings rate of consumers makes it difficult to meet diverse needs, and the solution lacks flexibility and cannot adapt to dynamic changes.

[0007] Most importantly, the existing methods lack an effective security protection mechanism during data transmission, posing risks of data leakage and privacy security.

[0008] At the same time, the difficulty of adjusting consumers' electricity consumption patterns is not considered when recommending solutions, which may lead to difficulties in actual implementation of the solutions and affect the optimization effect. Summary of the Invention

[0009] In view of the above problems existing in the above or prior art, the present invention is proposed.

[0010] Therefore, the purpose of the present invention is to provide a method for optimizing periodic electricity consumption patterns based on encryption technology and the K-Medoids algorithm. By accurately obtaining and analyzing consumers' historical load data, it realizes the intelligent identification and optimization of the optimal periodic electricity consumption pattern. This method can not only ensure that the electricity cost savings rate reaches the expectation, but also find the periodic electricity consumption pattern with the minimum total electricity cost. At the same time, encryption technology is used to ensure communication security; by constructing an adjustment difficulty assessment model, the actual executability of the recommended electricity consumption pattern is ensured, thereby effectively improving the use efficiency of electric power resources, reducing consumers' electricity costs, and achieving the goal of energy conservation and emission reduction.

[0011] To solve the above technical problems, the present invention provides the following technical solution: A periodic electricity consumption pattern optimization method based on encryption technology and the K-Medoids algorithm, which includes obtaining historical load data of consumers' periodic electricity consumption and an expected value of the cost savings rate;

[0012] Select and update each evaluation factor based on historical load data of different cycles. By iteratively allocating the historical load data of each cycle of non-evaluation factors to the evaluation factor class with the highest similarity level, to determine each optimal evaluation factor and obtain the corresponding optimal periodic electricity consumption patterns for each cycle;

[0013] Obtain the electricity cost savings rates of each optimal periodic electricity consumption pattern compared to the electricity consumption of the nearest cycle, determine the electricity cost savings rate closest to the expected value of the cost savings rate, and determine the corresponding optimal periodic electricity consumption pattern as the expected periodic electricity consumption pattern.

[0014] As a preferred scheme of the periodic electricity consumption pattern optimization method based on encryption technology and the K-Medoids algorithm of the present invention, wherein: Obtain the total electricity cost of each optimal periodic electricity consumption pattern, and determine an optimal periodic electricity consumption pattern with the minimum total electricity cost as the minimum cost periodic electricity consumption pattern.

[0015] As a preferred scheme of the periodic electricity consumption pattern optimization method based on encryption technology and the K-Medoids algorithm of the present invention, wherein: The step of selecting and updating each evaluation factor based on historical load data of different cycles, and by iteratively allocating the historical load data of each cycle of non-evaluation factors to the evaluation factor class with the highest similarity level, to determine each optimal evaluation factor and obtain the corresponding optimal periodic electricity consumption patterns for each cycle, specifically includes the following steps:

[0016] Based on the historical load data, randomly select historical load data of different cycles as each initial evaluation factor;

[0017] According to the similarity level with each initial evaluation factor, allocate the historical load data of non-initial evaluation factors to the class of the initial evaluation factor with the highest similarity respectively, so as to obtain each initial periodic electricity consumption pattern represented by the class of each initial evaluation factor;

[0018] Take the historical load data of each cycle under each initial periodic electricity consumption pattern as the new evaluation factor corresponding to the initial periodic electricity consumption pattern in turn, obtain the similarity level between the historical load data of non-new evaluation factors and each new evaluation factor, and determine a group of cycle historical load data with the highest similarity level as the final new evaluation factor corresponding to the initial periodic electricity consumption pattern;

[0019] According to each new evaluation factor under each initial periodic power consumption pattern, the historical load data of all non-new evaluation factors are respectively redistributed to the class belonging to the new evaluation factor with the highest similarity, so as to obtain each new periodic power consumption pattern represented by the class belonging to each new evaluation factor.

[0020] Repeat the above operation process. When there is no better change option or it tends to be stable for each new evaluation factor, then determine each new evaluation factor as each optimal evaluation factor, and each periodic power consumption pattern corresponding to each optimal evaluation factor is each optimal periodic power consumption pattern.

[0021] As a preferred solution of the periodic power consumption pattern optimization method based on encryption technology and K-Medoids algorithm described in the present invention, wherein: selecting and updating each evaluation factor based on the historical load data of different periods, and by iteratively allocating the historical load data of each period of non-evaluation factors to the class of the evaluation factor with the highest similarity level, to determine each optimal evaluation factor and obtain each corresponding optimal periodic power consumption pattern. Specifically, it further includes

[0022] Set each evaluation factor as a group of evaluation factors, and the number of each group of evaluation factors is a different value;

[0023] Obtain the total difference degree between each evaluation factor in each group of evaluation factors and the historical load data of each period under the corresponding category, and draw each change curve of the total difference degree corresponding to the increase of the specific number of each group of evaluation factors;

[0024] Based on the change trend of each change curve of the total difference degree, find the total difference degree with a significantly slower change trend and determine the corresponding number of evaluation factors as the optimal number.

[0025] As a preferred solution of the periodic power consumption pattern optimization method based on encryption technology and K-Medoids algorithm described in the present invention, wherein: based on the historical load data of each periodic power consumption and the preset periodic power consumption data, construct an adjustment difficulty evaluation model for adjusting from other periodic power consumption patterns to a specific periodic power consumption pattern;

[0026] Obtain the recent periodic power consumption data, the expected periodic power consumption data, and the minimum-cost periodic power consumption data, and evaluate the adjustment difficulty of adjusting from the recent periodic power consumption pattern to the expected periodic power consumption pattern and the minimum-cost periodic power consumption pattern respectively through the adjustment difficulty evaluation model, so as to ensure that the minimum-cost periodic power consumption pattern and the expected periodic power consumption pattern finally sent to consumers are actually executable.

[0027] As a preferred embodiment of the periodic power consumption pattern optimization method based on encryption technology and K-Medoids algorithm of the present invention, the following steps are included: Obtain a pair of keys for the power supplier and the consumer respectively, and enable the power supplier and the consumer to share the public key with each other;

[0028] The consumer encrypts the expected value of the periodic power consumption cost savings rate with the public key of the power supplier and sends it to the power supplier;

[0029] The power supplier encrypts the minimum-cost periodic power consumption pattern and the expected periodic power consumption pattern with the public key of the consumer and sends them to the consumer.

[0030] As a preferred embodiment of the periodic power consumption pattern optimization method based on encryption technology and K-Medoids algorithm of the present invention, the following is included: The periodic power consumption includes annual power consumption, quarterly power consumption, and monthly power consumption.

[0031] To further solve the above technical problems, the present invention provides the following technical solution: A system for the periodic power consumption pattern optimization method based on encryption technology and K-Medoids algorithm, including an evaluation factor optimization unit, which includes a data preprocessing module for cleaning and preprocessing historical load data to prepare data for evaluating factor selection, an evaluation factor selection module for selecting initial evaluation factors based on the preprocessed data, an iterative optimization module for optimizing the evaluation factors by allocating the historical load data of non-evaluation factors to the evaluation factor class with the highest similarity through an iterative process, and an optimal periodic power consumption pattern determination module for determining the optimal periodic power consumption pattern corresponding to each optimal evaluation factor;

[0032] A cost savings rate matching unit, which includes a power consumption cost calculation module for calculating the power consumption cost savings rate of each optimal periodic power consumption pattern, an expected value matching module for matching the calculated cost savings rate with the expected value of the consumer, and an expected periodic power consumption pattern determination module for determining the optimal periodic power consumption pattern closest to the expected value as the expected periodic power consumption pattern; and,

[0033] A minimum-cost periodic power consumption pattern determination unit, which includes a total power consumption cost calculation module for calculating the total power consumption cost of each optimal periodic power consumption pattern, a cost comparison module for comparing the total power consumption costs of each and finding the minimum total power consumption cost, and a minimum-cost pattern determination module for determining the optimal periodic power consumption pattern with the minimum total power consumption cost as the minimum-cost periodic power consumption pattern.

[0034] A computer device, including a memory and a processor, the memory stores a computer program, and is characterized in that when the processor executes the computer program, the steps of the above periodic power consumption pattern optimization method based on encryption technology and K-Medoids algorithm are implemented.

[0035] A computer-readable storage medium stores a computer program thereon, characterized in that when the computer program is executed by a processor, the steps of the above periodic power consumption pattern optimization method based on encryption technology and the K-Medoids algorithm are implemented.

[0036] Advantages of the present invention: The present invention realizes the clustering of consumers' annual, quarterly, and monthly power consumption patterns through the K-Medoids algorithm and the elbow method, calculates the power consumption costs under different power consumption patterns in combination with peak-valley-time-of-use electricity prices, peak electricity prices, and seasonal electricity prices, and proposes a calculation method for the difficulty of adjusting power consumption patterns; at the same time, considering the expected value of the consumers' power consumption cost savings rate, recommends suitable power consumption patterns for consumers, and uses asymmetric encryption technology to ensure the security of data transmission between the power grid and consumers; in addition, it can dynamically change in combination with the expected value of the consumers' power consumption costs, realize the rolling optimization and adjustment of quarterly and monthly power consumption patterns, support consumers to flexibly adjust power consumption plans, effectively reduce power consumption costs, and improve energy utilization efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0038] Figure 1 It is the overall flowchart of the periodic power consumption pattern optimization method based on encryption technology and the K-Medoids algorithm of the present invention.

[0039] Figure 2 It is the determination diagram of the optimal number of annual power consumption pattern clusters based on the elbow method of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0040] In order to make the above objects, features, and advantages of the present invention more obvious and understandable, the following will describe the specific embodiments of the present invention in detail with reference to the drawings of the specification.

[0041] Many specific details are set forth in the following description in order to provide a thorough understanding of the present invention, but the present invention can also be implemented in other ways different from those described herein. Those skilled in the art can make similar generalizations without departing from the connotation of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed below.

[0042] Second, the "one embodiment" or "embodiment" mentioned herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The appearances of "in one embodiment" in different places in this specification do not all refer to the same embodiment, nor are they separate or selectively exclusive embodiments from other embodiments.

[0043] Embodiment 1

[0044] Referring to Figures 1 to 2 , which is the first embodiment of the present invention. This embodiment provides an optimization method for periodic power consumption patterns based on encryption technology and the K-Medoids algorithm, which includes:

[0045] S1: Obtain the historical load data of the consumer's periodic power consumption and the expected value of the cost savings rate.

[0046] Furthermore, the periodic power consumption includes annual power consumption, quarterly power consumption, and monthly power consumption.

[0047] Furthermore, obtain a pair of keys for the power supplier and the consumer respectively, so that the power supplier and the consumer share the public key with each other; the consumer encrypts the expected value of the periodic power consumption cost savings rate with the public key of the power supplier and sends it to the power supplier; the power supplier encrypts the minimum-cost periodic power consumption pattern and the expected periodic power consumption pattern with the public key of the consumer and sends them to the consumer.

[0048] It should be noted that the power supplier, i.e., the power grid company, generates the public key and private key according to the asymmetric encryption algorithm RSA and sends the public key to the consumer, i.e., the consumer. The consumer generates the public key and private key according to the asymmetric encryption algorithm RSA and sends the public key to the power supplier; the power supplier decrypts the expected value of the periodic power consumption cost savings rate sent by the consumer with its private key, and the consumer decrypts the minimum-cost periodic power consumption pattern and the expected periodic power consumption pattern sent by the power supplier with its private key.

[0049] S2: Select and update each evaluation factor based on the historical load data of different periods. By iteratively allocating the historical load data of each period of the non-evaluation factors to the evaluation factor class with the highest similarity level, determine each optimal evaluation factor and obtain the corresponding optimal power consumption pattern for each period.

[0050] It should be noted that the idea adopted in step S2 conforms to the idea of clustering algorithms, that is, step S2 can be specifically implemented through various clustering algorithms, such as the K-Medoids clustering algorithm, the K-Means clustering algorithm, and the hierarchical clustering algorithm. However, power load data often contains noise and outliers, such as sudden electricity demand, equipment failures, etc. The K-Means clustering algorithm is sensitive to noise and outliers and is prone to falling into local optimal solutions. The hierarchical clustering algorithm has low computational efficiency and is not suitable for large datasets. Therefore, in this embodiment, the K-Medoids clustering algorithm is preferably used to execute step S2. The K-Medoids clustering algorithm is more robust to noise and outliers and can better reflect the real electricity consumption pattern. The clustering centers of the K-Medoids algorithm are actual data points, which makes the clustering results easier to interpret and can intuitively analyze the characteristics of each electricity consumption pattern, so as to understand the differences in electricity consumption behavior. Power load data usually contains a large number of data points. The K-Medoids algorithm has high computational efficiency, can quickly process large datasets, and obtain reliable clustering results.

[0051] It should also be noted that in step S2 of this embodiment, the evaluation factor is actually the clustering center of the K-Medoids algorithm, and the evaluation factor does correspond to actual data points, that is, historical load data of different periods. The number of evaluation factors is actually the number of clusters of the K-Medoids algorithm, which also represents the number of clustering centers. The similarity level is actually the sum of squared errors of the K-Medoids algorithm, which also represents the distance between the historical load data of each period of non-evaluation factors and the evaluation factor. The quality of the clustering effect can be evaluated according to the sum of squared errors.

[0052] Furthermore, step S2 specifically includes the following steps:

[0053] S201: Based on the historical load data, randomly select historical load data of different periods as each initial evaluation factor;

[0054] S202: According to the similarity level with each initial evaluation factor, assign the historical load data of non-initial evaluation factors to the class where the initial evaluation factor with the highest similarity belongs, so as to obtain each initial periodic electricity consumption pattern represented by the class where each initial evaluation factor belongs;

[0055] S203: Take the historical load data of each period under each initial periodic electricity consumption pattern as the new evaluation factor corresponding to the initial periodic electricity consumption pattern in turn, obtain the similarity level between the historical load data of non-new evaluation factors and each new evaluation factor, and determine the group of periodic historical load data with the highest similarity level as the final new evaluation factor corresponding to the initial periodic electricity consumption pattern;

[0056] S204: According to each new evaluation factor under each initial periodic power consumption pattern, redistribute the historical load data of all non-new evaluation factors to the class belonging to the new evaluation factor with the highest similarity respectively, so as to obtain each new periodic power consumption pattern represented by the class belonging to each new evaluation factor;

[0057] S205: Repeat the above operation process. When there is no better change option or it tends to be stable for each new evaluation factor, determine each new evaluation factor as each optimal evaluation factor, and each periodic power consumption pattern corresponding to each optimal evaluation factor is each optimal periodic power consumption pattern.

[0058] It should be noted that when the periodic power consumption is set as annual power consumption, when performing the above operation process through the K-Medoids clustering algorithm, the specific steps and corresponding contents are as follows:

[0059] Set the number of clustering centers as K, that is, set the number of clustering centers and evaluation factors as K. Randomly select K historical load data samples of different years in the annual historical load data sample as the initial clustering centers of the annual power consumption pattern, and denote the kth annual power consumption pattern clustering center as [Q k,1 , Q k,2 , …, Q k,i , Q k,96 ;

[0060] Use the sum of squared errors, that is, the similarity level, to measure the distance between the qth annual historical load data sample [X q,1 , X q,2 , …, X q,i , … X q,96 and the kth annual power consumption pattern clustering center, and use it as the annual power consumption pattern clustering criterion. The calculation formula is as follows:

[0061]

[0062] In the formula, Φ k,q is the sum of squared errors between the qth annual historical load data sample and the kth annual power consumption pattern clustering center;

[0063] After calculating the sum of squared errors between the qth annual historical load data sample and the kth annual power consumption pattern clustering center, if the sum of squared errors between this annual historical load data sample and a certain annual power consumption pattern clustering center is the smallest, that is, the distance between this annual historical load data sample and a certain annual power consumption pattern clustering center is the closest, and the similarity level between this annual historical load data sample and a certain annual power consumption pattern clustering center is the highest, then classify this annual historical load data sample into the clustering cluster of this annual power consumption pattern, and so on, to obtain K new clustering clusters;

[0064] Within the k-th cluster, successively using the annual historical load data samples within the k-th cluster as the cluster centers respectively, calculate the sum of squared errors of other annual historical load data samples within the k-th cluster from each annual electricity consumption pattern cluster center. The annual historical load data sample corresponding to the annual electricity consumption pattern cluster center with the minimum sum of squared errors is updated as the cluster center of the k-th cluster;

[0065] According to the updated cluster centers of the K clusters, repeat the process of classifying the annual historical load data samples with the minimum sum of squared errors from each new cluster center into each cluster. Through such iteration, continuously obtain the updated cluster centers and the annual historical load data samples within the corresponding clusters until the cluster centers of each annual electricity consumption pattern remain unchanged, and then the optimal annual electricity consumption pattern at the clustering number K can be obtained.

[0066] Furthermore, step S2 specifically further includes,

[0067] S206: Set each evaluation factor as a group of evaluation factors, and the number of each group of evaluation factors is a different value;

[0068] S207: Obtain the total difference degree between each evaluation factor in each group of evaluation factors and the historical load data of each cycle under the corresponding category, and draw the change curves of the total difference degrees corresponding to the increase in the specific number of each group of evaluation factors;

[0069] S208: Based on the change trends of the change curves of the total difference degrees, find the total difference degree with a significantly slower change trend and determine the corresponding number of evaluation factors as the optimal number.

[0070] It should be noted that the idea adopted in steps S206 - S208 is actually the algorithm for determining the optimal number of clusters in cluster analysis. The purpose is to ensure the uniqueness of the clustering results of the electricity consumption patterns. Such algorithms can specifically be the elbow method, the method based on the silhouette coefficient, the method based on the Calinski-Harabasz index, the method based on the Davies-Bouldin index, and the method based on information theory, etc.;

[0071] Among them, for the method based on the silhouette coefficient, calculating the silhouette coefficient requires calculating the distances between each data point and all other data points, so the computational complexity is relatively high, especially for large datasets. Moreover, the silhouette coefficient is easily affected by noise, which can easily lead to unstable clustering results. In the method based on the Calinski-Harabasz index, the Calinski-Harabasz index is sensitive to the size of clusters, which can easily lead to a bias towards clusters containing more data points, and the interpretability of the Calinski-Harabasz index is not as intuitive as that of the elbow method. In the method based on the Davies-Bouldin index, the Davies-Bouldin index is easily affected by outliers, which can easily lead to inaccurate clustering results. The Davies-Bouldin index is sensitive to the shape of clusters, which can easily lead to poor recognition of clusters with complex shapes. For the method based on information theory, calculating information entropy or mutual information requires calculating the similarity between data points, so the computational complexity is relatively high. The calculation of information entropy or mutual information requires setting parameters, and improper parameter setting can easily lead to inaccurate clustering results. The elbow method is simple to calculate, easy to understand and implement, does not require any parameter setting, and by plotting the curve of the sum of squared errors changing with the number of clusters, the inflection point can be intuitively identified, thereby determining the optimal number of clusters. It does not need to know in advance how many clusters are contained in the data and can automatically identify the cluster structure in the data. Therefore, when the periodic power consumption is set as the annual power consumption, this embodiment preferably selects the elbow method to perform the operation process of steps S206 to S208, specifically as follows:

[0072] Set the range of the number of clusters K. For each number of clusters K, run the K-Medoids algorithm to obtain the clustering result;

[0073] For each number of clusters K, calculate the sum of squared errors between all periodic historical load data samples and the clustering centers of their respective clusters;

[0074] Taking the elbow method as an example, refer to Figure 2 , with the number of clusters K as the abscissa and the sum of squared errors as the ordinate, plot the relationship curve between the sum of squared error values and the number of clusters K;

[0075] Connect the first and last points of the relationship curve between the sum of squared error values and the number of clusters K to obtain a straight line. When the number of clusters is K, the difference between the sum of squared error value and the corresponding value of the straight line is denoted as LK. The K value corresponding to the maximum LK is the optimal number of clusters. The respective annual power consumption patterns corresponding to the optimal number of clusters are optimal compared to the respective power consumption patterns corresponding to other numbers of clusters.

[0076] It should be noted that the total difference is actually the sum of squared errors. In the elbow method, as the number of clusters K increases, the sum of squared errors gradually decreases, LK gradually increases. When LK grows to the maximum value, LK then begins to gradually decline and will not continue to increase significantly, that is, the sum of squared errors will not shrink significantly anymore. Therefore, the value of the number of clusters K corresponding to the current sum of squared errors is the optimal number of clusters.

[0077] S3: Obtain the electricity cost savings rates of each optimal cycle electricity consumption pattern compared to the electricity consumption in the most recent cycle, determine the electricity cost savings rate closest to the expected value of the cost savings rate, and determine the corresponding optimal cycle electricity consumption pattern as the expected periodic electricity consumption pattern.

[0078] It should be noted that when the periodic electricity consumption is set to annual electricity consumption, the peak-valley time-of-use electricity price strategy (including peak electricity price and seasonal electricity price) is used. Multiply the electricity consumption in each period by the corresponding electricity price and then sum them to calculate the electricity cost of consumers under each annual electricity consumption pattern. Compare the electricity cost of each annual electricity consumption pattern with the electricity cost of consumers in the previous year, calculate the cost savings rate through the cost savings rate calculation formula, and compare the cost savings rates of each annual electricity consumption pattern with the expected cost savings rate of consumers.

[0079] S4: Obtain the total electricity cost of each optimal cycle electricity consumption pattern, and determine the optimal cycle electricity consumption pattern with the minimum total electricity cost as the minimum cost periodic electricity consumption pattern.

[0080] S5: Based on the historical load data of each periodic electricity consumption and the preset periodic electricity consumption data, construct an adjustment difficulty evaluation model for adjusting from other periodic electricity consumption patterns to a specific periodic electricity consumption pattern;

[0081] Obtain the most recent periodic electricity consumption data, the expected periodic electricity consumption data, and the minimum cost periodic electricity consumption data, and evaluate the adjustment difficulty of adjusting from the most recent periodic electricity consumption pattern to the expected periodic electricity consumption pattern and the minimum cost periodic electricity consumption pattern respectively through the adjustment difficulty evaluation model to ensure that the minimum cost periodic electricity consumption pattern and the expected periodic electricity consumption pattern finally sent to consumers are actually executable.

[0082] It should be noted that when the periodic electricity consumption is set to annual electricity consumption, the specific construction process of the adjustment difficulty evaluation model is as follows:

[0083] Define that when a consumer adjusts from other annual electricity consumption patterns b to a specific annual electricity consumption pattern a, the proportion of the average power that needs to be adjusted to the average power of the annual electricity consumption load is the adjustment difficulty of the specific annual electricity consumption pattern a, and the expression is:

[0084]

[0085] In the formula, ρa The difficulty of adjusting the electricity consumption pattern for a specific annual electricity consumption pattern a can reflect the difficulty for consumers to adjust from other annual electricity consumption patterns b to the specific annual electricity consumption pattern a; δ a,b is the standard deviation of the specific annual electricity consumption pattern a and other annual electricity consumption patterns b; Vn is the number of samples of the annual historical load data; V b is the number of cluster samples of other annual electricity consumption patterns b; P nm is the average power of the annual historical load;

[0086] Constraint conditions can be set according to the difficulty of adjusting the electricity consumption pattern. For example, when the difficulty of adjusting the electricity consumption pattern is less than or equal to the threshold, the annual electricity consumption pattern with the minimum cost and the expected annual electricity consumption pattern are determined;

[0087] When the electricity consumption pattern is greater than the threshold, other algorithms (such as the fuzzy clustering algorithm, which allows data points to belong to multiple clusters with different membership degrees and calculates the degree to which each consumer belongs to different electricity consumption patterns according to the membership degree, and one or more electricity consumption patterns that best match the consumer's electricity consumption pattern can be selected according to the consumer's cost savings expectation and the adjustment difficulty threshold) or genetic algorithms (regarding the consumer's electricity consumption pattern as a chromosome and defining a fitness function that considers the cost savings rate and the adjustment difficulty, and using the genetic algorithm to optimize the consumer's electricity consumption pattern to find the best balance between cost and adjustment difficulty) can be introduced; phased implementation can also be carried out, decomposing the adjustment target into multiple stages, setting clear goals and implementation steps for each stage, and designing incentive measures such as electricity price discounts and energy-saving subsidies to encourage consumers to participate in the adjustment.

[0088] S6: The power supplier encrypts the final minimum-cost periodic electricity consumption pattern and the expected periodic electricity consumption pattern with the consumer's public key and sends them to the consumer.

[0089] In summary, the present invention realizes the clustering of consumers' annual, quarterly, and monthly electricity consumption patterns through the K-Medoids algorithm and the elbow method, calculates the electricity consumption costs under different electricity consumption patterns in combination with the peak-valley time-of-use electricity price, the peak electricity price, and the seasonal electricity price, and proposes a calculation method for the difficulty of adjusting the electricity consumption pattern; at the same time, considering the expected value of the consumer's electricity consumption cost savings rate, it recommends suitable electricity consumption patterns for consumers and uses asymmetric encryption technology to ensure the security of data transmission between the power grid and consumers; in addition, it can realize the rolling optimization and adjustment of quarterly and monthly electricity consumption patterns in combination with the dynamic change of the expected value of the consumer's electricity consumption cost, support consumers to flexibly adjust their electricity consumption plans, effectively reduce the electricity consumption cost, and improve the energy utilization efficiency.

[0090] Embodiment 2

[0091] Refer to Figures 1 to 2, which is the second embodiment of the present invention. The difference from the first embodiment is that a periodic power consumption pattern optimization method based on encryption technology and K-Medoids algorithm can also be used for quarterly power consumption patterns and monthly power consumption patterns, including:

[0092] S201: Based on the historical load data, randomly select historical load data of different periods as each initial evaluation factor;

[0093] S202: According to the similarity level with each initial evaluation factor, allocate the historical load data of non-initial evaluation factors to the class belonging to the initial evaluation factor with the highest similarity respectively, so as to obtain each initial periodic power consumption pattern represented by the class belonging to each initial evaluation factor;

[0094] S203: Take the historical load data of each period under each initial periodic power consumption pattern as the new evaluation factor corresponding to the initial periodic power consumption pattern in turn, obtain the similarity level between the historical load data of non-new evaluation factors and each new evaluation factor, and determine the group of periodic historical load data with the highest similarity level as the final new evaluation factor corresponding to the initial periodic power consumption pattern;

[0095] S204: According to each new evaluation factor under each initial periodic power consumption pattern, re-allocate all the historical load data of non-new evaluation factors to the class belonging to the new evaluation factor with the highest similarity respectively, so as to obtain each new periodic power consumption pattern represented by the class belonging to each new evaluation factor;

[0096] S205: Repeat the above operation process. When there is no better change option or it tends to be stable for each new evaluation factor, then determine each new evaluation factor as each optimal evaluation factor, and each periodic power consumption pattern corresponding to each optimal evaluation factor is each optimal periodic power consumption pattern.

[0097] It should be noted that in steps S201 to S205 of this embodiment, when the periodic power consumption is set as quarterly power consumption, when performing the above operation process through the K-Medoids clustering algorithm, the specific steps and corresponding contents are as follows:

[0098] Set the number of clustering numbers as F, that is, set the number of clustering centers and evaluation factors as F. Randomly select K historical load data samples of different quarters in the quarterly historical load data sample as the initial clustering centers of the quarterly power consumption pattern, and denote the f-th quarterly power consumption pattern clustering center as [M f,1 , M f,2 , …, M f,j , M f,96 ;

[0099] Use the sum of squared errors, that is, the similarity level, to measure the h-th quarterly historical load data sample [Yh,1 ,Y h,2 ,…,Y h,j ,…Y h,96 The distance from the historical load data sample of the h-th quarter to the clustering center of the f-th quarter's electricity consumption pattern is used as the clustering criterion for the quarterly electricity consumption pattern, and the calculation formula is as follows:

[0100]

[0101] In the formula, is the sum of squared errors between the historical load data sample of the h-th quarter and the clustering center of the f-th quarter's electricity consumption pattern;

[0102] After calculating the sum of squared errors between the historical load data sample of the h-th quarter and the clustering center of the f-th quarter's electricity consumption pattern, if the sum of squared errors between the historical load data sample of this quarter and the clustering center of a certain quarter's electricity consumption pattern is the smallest, that is, the distance between the historical load data sample of this quarter and the clustering center of a certain quarter's electricity consumption pattern is the closest, and the similarity level between the historical load data sample of this quarter and the clustering center of a certain quarter's electricity consumption pattern is the highest, then the historical load data sample of this quarter is classified into the clustering cluster of the electricity consumption pattern of this quarter. And so on, F new clustering clusters are obtained;

[0103] Within the f-th clustering cluster, successively taking the historical load data samples within the f-th clustering cluster as clustering centers respectively, calculate the sum of squared errors between the other historical load data samples within the f-th clustering cluster and the clustering centers of each quarter's electricity consumption patterns. The historical load data sample corresponding to the electricity consumption pattern clustering center with the smallest sum of squared errors is updated as the clustering center of the f-th clustering cluster;

[0104] According to the updated clustering centers of the F clustering clusters, repeat the process of classifying the historical load data samples of each quarter with the smallest sum of squared errors from the respective new clustering centers into each clustering cluster. Through such iteration, continuously obtain the updated clustering centers and the historical load data samples within the corresponding clustering clusters until the clustering centers of each quarter's electricity consumption patterns remain unchanged, and then the optimal quarterly electricity consumption pattern at the clustering number F can be obtained.

[0105] It should also be noted that in steps S201 - 205 of this embodiment, when the periodic electricity consumption is set as monthly electricity consumption, when performing the above operation process through the K-Medoids clustering algorithm, the specific steps and corresponding contents are as follows:

[0106] Set the number of clustering numbers as G, that is, set the number of clustering centers and evaluation factors as G. Randomly select G historical load data samples of different months from the monthly historical load data samples as the initial clustering centers of the monthly electricity consumption pattern, and denote the g-th monthly electricity consumption pattern clustering center as [L g,1 ,L g,2 ,…,L g,d ,…Lg, 96];

[0107] The sum of squared errors, i.e., the similarity level, is used to measure the distance between the g-th monthly historical load data sample [Z r,1 , Z r,2 , …, Z r,d , …Z r,96 and the g-th monthly power consumption pattern clustering center, which is used as the monthly power consumption pattern clustering criterion. The calculation formula is as follows:

[0108]

[0109] In the formula, θ g,r is the sum of squared errors between the r-th monthly historical load data sample and the G-th monthly power consumption pattern clustering center;

[0110] After calculating the sum of squared errors between the r-th monthly historical load data sample and the f-th monthly power consumption pattern clustering center, if the sum of squared errors between this monthly historical load data sample and a certain monthly power consumption pattern clustering center is the smallest, that is, the distance between this monthly historical load data sample and a certain monthly power consumption pattern clustering center is the closest, and the similarity level between this monthly historical load data sample and a certain monthly power consumption pattern clustering center is the highest, then this monthly historical load data sample is classified into the clustering cluster of this monthly power consumption pattern, and so on, to obtain G new clustering clusters;

[0111] Within the g-th clustering cluster, the monthly historical load data samples within the g-th clustering cluster are successively used as clustering centers, and the sum of squared errors between other monthly historical load data samples within the g-th clustering cluster and each monthly power consumption pattern clustering center is calculated. The monthly historical load data sample corresponding to the monthly power consumption pattern clustering center with the smallest sum of squared errors is updated as the clustering center of the g-th clustering cluster;

[0112] According to the updated clustering centers of the G clustering clusters, the monthly historical load data samples with the smallest sum of squared errors from each new clustering center are repeatedly classified into each clustering cluster, and through such iteration, continuously updated clustering centers and the monthly historical load data samples within the corresponding clustering clusters are obtained until the clustering centers of each monthly power consumption pattern remain unchanged, and then the optimal monthly power consumption pattern at the clustering number G can be obtained.

[0113] S5: Based on the historical load data of each periodic power consumption and the preset periodic power consumption data, construct an adjustment difficulty evaluation model for adjusting from other periodic power consumption patterns to a specific periodic power consumption pattern;

[0114] Obtain the recent periodic electricity consumption data, the expected periodic electricity consumption data, and the minimum-cost periodic electricity consumption data. Evaluate the adjustment difficulty of adjusting from the recent periodic electricity consumption pattern to the expected periodic electricity consumption pattern and the minimum-cost periodic electricity consumption pattern respectively through an adjustment difficulty evaluation model, so as to ensure that the minimum-cost periodic electricity consumption pattern and the expected periodic electricity consumption pattern finally sent to consumers are actually executable.

[0115] It should be noted that when the periodic electricity consumption is set to quarterly electricity consumption, the specific construction process of the adjustment difficulty evaluation model is as follows:

[0116] Define a quarter as s. When a consumer adjusts from the electricity consumption pattern τ in other quarters to the electricity consumption pattern t in a specific quarter, the proportion of the average power that needs to be adjusted to the average power of the quarterly electricity consumption load is the electricity consumption pattern adjustment difficulty of the specific quarterly electricity consumption pattern t, and the expression is:

[0117]

[0118] In the formula, λ s,t is the electricity consumption pattern adjustment difficulty of the specific quarterly electricity consumption pattern t, which can reflect the difficulty for a consumer to adjust from the electricity consumption pattern τ in other quarters to the specific quarterly electricity consumption pattern t; is the standard deviation between the specific quarterly electricity consumption pattern t and the electricity consumption pattern τ in other quarters; is the number of samples of the quarterly historical load data; V s,τ is the number of cluster samples of the electricity consumption pattern τ in other quarters; is the average power of the historical load in quarter s;

[0119] The average adjustment difficulty of the electricity consumption pattern can be calculated according to the combination of the electricity consumption patterns in 4 quarters, such as the simple average method, the weighted average method, the cost savings rate of each quarter, and the seasonal electricity consumption preference of consumers.

[0120] It should also be noted that when the periodic electricity consumption is set to monthly electricity consumption, the specific construction process of the adjustment difficulty evaluation model is as follows:

[0121] Define a month as w. When a consumer adjusts from the electricity consumption pattern τ in other months to the electricity consumption pattern x in a specific month, the proportion of the average power that needs to be adjusted to the average power of the monthly electricity consumption load is the electricity consumption pattern adjustment difficulty of the specific monthly electricity consumption pattern t, and the expression is:

[0122]

[0123] In the formula, ζ w,x is the electricity consumption pattern adjustment difficulty of the specific monthly electricity consumption pattern x, which can reflect the difficulty for a consumer to adjust from the electricity consumption pattern υ in other months to the specific monthly electricity consumption pattern x; is the standard deviation of the specific monthly power consumption pattern x and other monthly power consumption patterns υ; is the number of samples of the monthly historical load data; V w,υ is the number of cluster samples of other monthly power consumption patterns υ; is the average power of the monthly historical load of month w;

[0124] The average adjustment difficulty of the power consumption pattern can be calculated according to the combination of the power consumption patterns of 12 months.

[0125] Embodiment 3

[0126] This is the third embodiment of the present invention. Different from the previous two embodiments, it provides a periodic power consumption pattern optimization system based on encryption technology and the K-Medoids algorithm, including an evaluation factor optimization unit, a cost savings rate matching unit, and a minimum cost periodic power consumption pattern determination unit.

[0127] Among them, the evaluation factor optimization unit 100 includes a data preprocessing module 101 for cleaning and preprocessing the historical load data to prepare data for evaluating factor selection, an evaluation factor selection module 102 for selecting initial evaluation factors based on the preprocessed data, an iterative optimization module 103 for allocating the historical load data of non-evaluation factors to the evaluation factor class with the highest similarity through an iterative process to optimize the evaluation factors, and an optimal periodic power consumption pattern determination module 103 for determining the optimal periodic power consumption pattern corresponding to each optimal evaluation factor;

[0128] The cost savings rate matching unit 200 includes a power consumption cost calculation module 201 for calculating the power consumption cost savings rate of each optimal periodic power consumption pattern, an expected value matching module 202 for matching the calculated cost savings rate with the expected value of the consumer, and an expected periodic power consumption pattern determination module 203 for determining the optimal periodic power consumption pattern closest to the expected value as the expected periodic power consumption pattern; and,

[0129] The minimum cost periodic power consumption pattern determination unit 300 includes a total power consumption cost calculation module 301 for calculating the total power consumption cost of each optimal periodic power consumption pattern, a cost comparison module 302 for comparing the total power consumption costs of each and finding the minimum total power consumption cost, and a minimum cost pattern determination module 303 for determining the optimal periodic power consumption pattern with the minimum total power consumption cost as the minimum cost periodic power consumption pattern.

[0130] If a function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs that can store program codes.

[0131] The logic and / or steps represented in the flowchart or described in other ways herein, for example, can be considered as a definite sequence list of executable instructions for implementing a logical function, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch instructions from the instruction execution system, apparatus, or device and execute the instructions), or in combination with these instruction execution systems, apparatus, or devices. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by or in combination with an instruction execution system, apparatus, or device.

[0132] More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection part with one or more wirings (electronic device), a portable computer disk cartridge (magnetic device), random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber device, and portable compact disc read-only memory (CDROM). Additionally, a computer-readable medium can even be paper or other suitable media on which a program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other media, then editing, interpreting, or otherwise processing it as appropriate, and then storing it in a computer memory.

[0133] It should be understood that various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits having logic gate circuits for implementing logic functions on data signals, application specific integrated circuits having appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc. It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered by the scope of the claims of the present invention.

[0134] Importantly, the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered by the scope of the claims of the present invention.

Claims

1. A periodic electricity consumption pattern optimization method based on encryption technology and the K-Medoids algorithm, characterized in that: Including, Obtaining historical load data of consumers' periodic electricity consumption and expected values of cost savings rates; Selecting and updating each evaluation factor based on historical load data of different cycles, and by iteratively allocating historical load data of each cycle of non-evaluation factors to the evaluation factor class with the highest similarity level, to determine each optimal evaluation factor and obtain corresponding optimal periodic electricity consumption patterns for each; Obtaining cost savings rates of electricity consumption for each optimal periodic electricity consumption pattern compared to the most recent cycle's electricity consumption, determining the electricity cost savings rate closest to the expected value of the cost savings rate, and determining the corresponding optimal periodic electricity consumption pattern as the expected periodic electricity consumption pattern.

2. The periodic electricity consumption pattern optimization method based on encryption technology and the K-Medoids algorithm according to claim 1, characterized in that: Also including, Obtaining the total electricity cost of each optimal periodic electricity consumption pattern, and determining an optimal periodic electricity consumption pattern with the minimum total electricity cost as the minimum-cost periodic electricity consumption pattern.

3. The periodic power consumption pattern optimization method based on encryption technology and K-Medoids algorithm as claimed in claim 1 or 2, characterized in that: The step of selecting and updating each evaluation factor based on historical load data of different cycles, and by iteratively allocating historical load data of each cycle of non-evaluation factors to the evaluation factor class with the highest similarity level, to determine each optimal evaluation factor and obtain corresponding optimal periodic electricity consumption patterns for each, specifically includes the following steps: Based on the historical load data, randomly selecting historical load data of different cycles as each initial evaluation factor; According to the similarity levels with each initial evaluation factor, allocating historical load data of non-initial evaluation factors to the class of the initial evaluation factor with the highest similarity respectively, so as to obtain each initial periodic electricity consumption pattern represented by the class of each initial evaluation factor; Taking historical load data of each cycle under each initial periodic electricity consumption pattern as a new evaluation factor corresponding to the initial periodic electricity consumption pattern, obtaining similarity levels between historical load data of non-new evaluation factors and each new evaluation factor, and determining a set of cycle historical load data with the highest similarity level as the final new evaluation factor corresponding to the initial periodic electricity consumption pattern; According to each new evaluation factor under each initial periodic electricity consumption pattern, reallocating historical load data of all non-new evaluation factors to the class of the new evaluation factor with the highest similarity respectively, so as to obtain each new periodic electricity consumption pattern represented by the class of each new evaluation factor; Repeating and iterating the above operation process, when there is no better change option or it tends to be stable for each new evaluation factor, then determining each new evaluation factor as each optimal evaluation factor, and each periodic electricity consumption pattern corresponding to each optimal evaluation factor as each optimal periodic electricity consumption pattern.

4. The periodic electricity consumption pattern optimization method based on encryption technology and K-Medoids algorithm according to claim 3, characterized in that: The step of selecting and updating each evaluation factor based on historical load data of different cycles, and by iteratively allocating historical load data of each cycle of non-evaluation factors to the evaluation factor class with the highest similarity level, to determine each optimal evaluation factor and obtain corresponding optimal periodic electricity consumption patterns for each, specifically further includes, Setting each evaluation factor as a group of evaluation factors, and the number of each group of evaluation factors is different values; Obtaining the total difference degree between each evaluation factor in each group of evaluation factors and historical load data of each cycle under the corresponding category, and plotting each change curve of the total difference degree corresponding to the increase in the specific number of each group of evaluation factors; Based on the changing trend of the total difference curve, find the total difference with a significantly slowed changing trend and determine the corresponding number of evaluation factors as the optimal number.

5. The periodic power consumption pattern optimization method based on encryption technology and K-Medoids algorithm according to any one of claims 1, 2, and 4, characterized in that: It also includes Based on the historical load data of each periodic power consumption and the preset periodic power consumption data, construct an adjustment difficulty evaluation model for adjusting from other periodic power consumption patterns to a specific periodic power consumption pattern; Obtain the recent periodic power consumption data, the expected periodic power consumption data, and the minimum-cost periodic power consumption data, and evaluate the adjustment difficulties of adjusting from the recent periodic power consumption pattern to the expected periodic power consumption pattern and the minimum-cost periodic power consumption pattern respectively through the adjustment difficulty evaluation model, so as to ensure that the minimum-cost periodic power consumption pattern and the expected periodic power consumption pattern finally sent to consumers are actually executable.

6. The periodic electricity consumption pattern optimization method based on encryption technology and K-Medoids algorithm according to claim 5, characterized in that: It also includes Respectively obtain a pair of keys for the power supplier and the consumer, and enable the power supplier and the consumer to share the public keys with each other; The consumer encrypts the expected value of the periodic power consumption cost savings rate with the public key of the power supplier and sends it to the power supplier; The power supplier encrypts the minimum-cost periodic power consumption pattern and the expected periodic power consumption pattern with the public key of the consumer and sends them to the consumer.

7. The periodic power consumption pattern optimization method based on encryption technology and K-Medoids algorithm according to any one of claims 1, 2, 4, and 6, characterized in that: The periodic power consumption includes annual power consumption, quarterly power consumption, and monthly power consumption.

8. A system adopting the periodic power consumption pattern optimization method based on encryption technology and K-Medoids algorithm according to any one of claims 1, 2, 4, and 6, characterized in that: The evaluation factor optimization unit (100) includes a data preprocessing module (101) for cleaning and preprocessing the historical load data and preparing data for evaluation factor selection, an evaluation factor selection module (102) for selecting initial evaluation factors based on the preprocessed data, an iterative optimization module (103) for, through an iterative process, allocating the historical load data of non-evaluation factors to the evaluation factor class with the highest similarity to optimize the evaluation factors, and an optimal cycle power consumption pattern determination module (103) for determining the optimal cycle power consumption pattern corresponding to each optimal evaluation factor; The cost savings rate matching unit (200) includes a power consumption cost calculation module (201) for calculating the power consumption cost savings rate of each optimal cycle power consumption pattern, an expected value matching module (202) for matching the calculated cost savings rate with the expected value of the consumer, and an expected periodic power consumption pattern determination module (203) for determining the optimal cycle power consumption pattern closest to the expected value as the expected periodic power consumption pattern; and The minimum-cost periodic power consumption pattern determination unit (300) includes a total power consumption cost calculation module (301) for calculating the total power consumption cost of each optimal cycle power consumption pattern, a cost comparison module (302) for comparing the total power consumption costs of each and finding the minimum total power consumption cost, and a minimum-cost pattern determination module (303) for determining the optimal cycle power consumption pattern with the minimum total power consumption cost as the minimum-cost periodic power consumption pattern.

9. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the periodic power consumption pattern optimization method based on encryption technology and the K-Medoids algorithm described in any one of claims 1, 2, 4, and 6.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the periodic power consumption pattern optimization method based on encryption technology and the K-Medoids algorithm described in any one of claims 1, 2, 4, and 6.