Multi-energy-load coupled rural energy consumption scene curve extraction method, system and device and storage medium
By collecting and analyzing multi-energy and multi-load data, and combining dynamic time warping and K-medoids clustering, the problem of difficulty in characterizing multi-energy coupling relationships in existing technologies has been solved. It provides a similarity metric for time misalignment robustness and a method for extracting typical curves, thereby improving the scientific nature of rural energy system planning and equipment configuration.
Patent Information
- Application Number
- CN202511386897.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-26
- Publication Date
- 2026-02-03
AI Technical Summary
Existing methods are difficult to accurately characterize the coupling relationship between multiple energy sources and multiple loads, lack robustness due to time misalignment, and fail to adequately consider differences in meteorological and agricultural scenarios, leading to increased complexity in rural energy system planning.
By collecting data on distributed energy and rural industrial loads, and combining meteorological and agricultural information, a similarity measurement model is constructed. Dynamic time warping and K-medoids clustering are used, and the optimal number of clusters is determined by combining the silhouette coefficient. Typical scene curves are extracted and their occurrence probabilities are calculated.
It achieves the preservation of coupling characteristics in a multi-energy-load joint space, possesses time-displacement robustness, outputs conditional typical curve probabilities, supports energy planning and equipment selection, and improves the scientific nature and efficiency of rural energy systems.
Smart Images

Figure CN121456525A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of energy data analysis and typical load modeling, and particularly relates to a multi-energy-load coupled rural energy consumption scene curve extraction method, system, device and storage medium. BACKGROUND
[0002] In recent years, with the rapid development of distributed renewable energy in rural areas and the improvement of the electrification level of agricultural energy consumption, rural energy systems gradually exhibit the characteristics of multi-energy parallel supply and multi-type load coupling. On the one hand, distributed energy such as photovoltaic, wind power, small hydropower and biomass energy has significant volatility and uncertainty, and is strongly affected by weather conditions. On the other hand, industrial loads such as agricultural irrigation, facility light supplement, agricultural product processing and drying are driven by season, farming activities and weather changes, and exhibit obvious time-varying and periodic characteristics. For example, during the rainy and snowy season, the light supplement load rises, while during the autumn harvest stage, the processing and drying load demand significantly increases. This dynamic coupling relationship between energy supply and load demand greatly increases the complexity of rural energy system operation and planning.
[0003] In energy planning and operation research, it is often necessary to construct a number of "energy consumption scene typical curves" to represent the load and supply characteristics under different scenarios. The existing methods are mostly based on statistical mean, quantile extraction, or use the Euclidean distance as the similarity measure of k-means clustering. However, these methods have obvious limitations: first, they are often only for single load or single energy, and it is difficult to represent the coupling relationship of multi-energy and multi-load at the same time; second, the Euclidean distance is not robust to the nonlinear displacement of the time axis, and the advance or lag of the load peak value may lead to the misjudgment of the day curve with substantial similarity as a large difference; third, there is insufficient consideration of the differences in weather and farming scenarios, and the output of conditional typical curve probability is limited, which restricts the application value in actual planning, scheduling and equipment selection. SUMMARY
[0004] In view of the above problems, the present application is proposed.
[0005] Therefore, the technical problem solved by the present application is: how to provide a method that can retain the coupling characteristics in the multi-energy-load joint space, has a time displacement robust similarity measure, and can flexibly cluster and output typical curve probability combined with different farming and weather scenarios, to more accurately reflect the real operation characteristics of rural energy systems and support practical production engineering applications.
[0006] To solve the above technical problems, the present application provides the following technical solutions:
[0007] In a first aspect, the present application provides a multi-energy-load coupled rural energy consumption scene curve extraction method, comprising:
[0008] Collect data on distributed energy output and rural industrial load, and combine meteorological and agricultural information to label scenarios;
[0009] A dataset is constructed based on the acquired data on the output of various distributed energy sources and the load of various rural industries in different scenarios.
[0010] Based on the dataset, a similarity measurement model for rural energy consumption scenarios was built.
[0011] Using a rural energy consumption scenario curve similarity measurement model, a complete similarity distance matrix is calculated. The optimal number of clusters is determined by the silhouette coefficient. Clustering analysis is performed using a clustering method to divide all days and identify typical scenario curves under each rural energy consumption scenario.
[0012] After completing the cluster analysis, representative daily curves are extracted from each cluster;
[0013] Based on the clustering results and the extracted daily curves, the probability of occurrence of the typical curve for each cluster is calculated, and the clustering results are output.
[0014] As a preferred method for extracting curves in rural energy consumption scenarios involving multi-energy-load coupling, the following is provided:
[0015] The model for measuring the similarity of rural energy consumption scenario curves based on the dataset includes:
[0016] Represent the time series of a single resource dimension in the form of a corresponding sequence; calculate the DTW distance of a single resource dimension; in a multi-resource scenario, integrate the DTW distances of each dimension to obtain the overall similarity between two dates, and use a simple average when all resource weights are equal; calculate the comprehensive DTW distance for all day pairs to obtain a symmetric distance matrix, wherein the matrix satisfies that the distance between the same day is zero and symmetry.
[0017] As a preferred method for extracting curves in rural energy consumption scenarios involving multi-energy-load coupling, the following is provided:
[0018] The method utilizes a rural energy consumption scenario curve similarity measurement model to calculate a complete similarity distance matrix, determines the optimal number of clusters through silhouette coefficients, and performs cluster analysis using clustering methods to divide all days and identify typical scenario curves for each rural energy consumption scenario, including:
[0019] Clustering is performed on the set of days to be clustered, with the goal of minimizing the sum of the distances from all samples to the cluster center, where the cluster center is a sample representing a specific number of days.
[0020] As a preferred method for extracting curves in rural energy consumption scenarios involving multi-energy-load coupling, the following is provided:
[0021] The clustering of the set of days to be clustered includes:
[0022] Initialize the center point by randomly selecting a number of days as the initial cluster center; in the allocation phase, assign each day to the cluster containing the nearest cluster center; in the update phase, select a new cluster center within each cluster, i.e., the point with the smallest sum of distances within the cluster; continuously iterate the allocation and update steps until the cluster center no longer changes or the maximum number of iterations is reached.
[0023] As a preferred method for extracting curves in rural energy consumption scenarios involving multi-energy-load coupling, the following is provided:
[0024] The method of using a rural energy consumption scenario curve similarity measurement model to calculate a complete similarity distance matrix, determining the optimal number of clusters through silhouette coefficients, and performing cluster analysis using clustering methods to divide all days and identify typical scenario curves for each rural energy consumption scenario also includes:
[0025] To determine the optimal number of clusters, a profile coefficient is introduced as an evaluation index. The clusters are calculated iteratively within a preset range and the cluster with the largest average profile coefficient is selected as the optimal number of clusters. If the optimal number of clusters is 1, a unique cluster center or mean curve is used as the typical curve for the entire energy consumption scenario.
[0026] The beneficial effects of this preferred technical solution are as follows: Introducing the silhouette coefficient as an evaluation index to determine the optimal number of clusters, the silhouette coefficient comprehensively considers the closeness of a sample within its own cluster and the degree of separation from samples in other clusters, thus measuring the quality of clustering from a global perspective. Iterative calculation within a preset cluster number range, selecting the cluster with the largest average silhouette coefficient as the optimal cluster number, avoids the blindness of subjectively determining the cluster number, making the clustering results more consistent with the inherent structure of the data. If the optimal cluster number is 1, using a unique cluster center or mean curve as a typical curve for the entire energy consumption scenario, it can concisely and effectively represent the overall energy consumption scenario when the data features are relatively simple and highly similar.
[0027] As a preferred method for extracting curves in rural energy consumption scenarios involving multi-energy-load coupling, the following is provided:
[0028] After completing the cluster analysis, extracting representative daily curves from each cluster includes:
[0029] A typical day extraction method based on a combination of typical days and mean curves is adopted. In each cluster, the sample similarity within the cluster is represented by a distance matrix. For each date within the cluster, the sum of distances with all other dates within the cluster is calculated, and the date with the smallest sum of distances is selected as the typical representative day of the cluster.
[0030] The beneficial effects of this preferred technical solution are as follows: It employs a typical day extraction method that combines typical days with mean curves, integrating the representativeness of typical days with the overall characteristics of mean curves. By representing the similarity of samples within a cluster using a distance matrix, the similarity between dates within the cluster can be accurately quantified. The sum of the distances between each date within the cluster and all other dates is calculated, and the date with the smallest sum of distances is selected as the typical representative day of that cluster. This date has the highest overall similarity with other dates within the cluster, maximizing its representation of the rural energy consumption scenario characteristics of the cluster, thus making the extracted typical days more representative and reliable.
[0031] As a preferred method for extracting curves in rural energy consumption scenarios involving multi-energy-load coupling, the following is provided:
[0032] After completing the cluster analysis, extracting representative daily curves from each cluster also includes:
[0033] Calculate the point-by-point mean of all date curves within the cluster to obtain the mean curve.
[0034] The beneficial effects of this preferred technical solution are as follows: It calculates the point-by-point average of all date curves within a cluster to obtain an average curve. This average curve smooths out the influence of individual outliers, reflecting the overall trend and average level of energy consumption within the cluster. It integrates information from all dates within the cluster, providing a stable and reliable reference curve for further analysis of the cluster's energy consumption characteristics. Complementing the curves of typical representative days, it helps to more comprehensively and accurately grasp the energy consumption characteristics of various rural energy consumption scenarios.
[0035] Secondly, the present invention provides a system for extracting curves of rural energy consumption scenarios involving multi-energy-load coupling, comprising:
[0036] The data acquisition and scene labeling module is used to collect data on distributed energy output and rural industrial load, and to label scenes in conjunction with meteorological and agricultural information.
[0037] The dataset construction module is used to construct datasets based on the acquired data on the output of various distributed energy sources and the load of various rural industries in different scenarios.
[0038] The similarity measurement model building module is used to build a similarity measurement model for rural energy consumption scenarios based on a dataset.
[0039] The clustering analysis and typical curve identification module is used to calculate the complete similarity distance matrix using a rural energy consumption scenario curve similarity measurement model, determine the optimal number of clusters through the silhouette coefficient, and use clustering methods to perform clustering analysis, dividing all days and identifying typical scenario curves under each rural energy consumption scenario.
[0040] The representative daily curve extraction module is used to extract representative daily curves from each cluster after completing cluster analysis.
[0041] The results calculation and output module is used to calculate the probability of occurrence of the typical curve for each cluster based on the clustering results and the extracted daily curves, and output the clustering results.
[0042] Thirdly, the present invention provides a computer device, comprising:
[0043] Memory and processor;
[0044] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the method for extracting curves of rural energy consumption scenarios with multi-energy-load coupling are implemented.
[0045] Fourthly, the present invention provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of a method for extracting curves of rural energy consumption scenarios involving multi-energy-load coupling.
[0046] The beneficial effects of this invention are as follows: The method for extracting rural energy consumption scenario curves based on multi-energy-load coupling has significant practical application value. This method solves the problems of existing methods, such as difficulty in characterizing the coupling relationship between multiple energy sources and multiple loads, lack of robustness to time misalignment, and insufficient consideration of differences in meteorological and agricultural scenarios. By collecting and processing multi-source data, using dynamic time warping to calculate similarity, and combining K-medoids clustering and other methods to extract typical curves and calculate their occurrence probabilities, this method can more accurately reflect the dynamic coupling relationship between energy supply and load demand in rural energy systems, providing a scientific basis for energy planning and making the planning more aligned with actual operational characteristics. In terms of scheduling, energy can be flexibly scheduled according to the probability of typical curves under different scenarios, improving energy utilization efficiency. In terms of equipment selection, equipment can be rationally configured based on typical curves, avoiding resource waste, improving the scientificity and practicality of rural energy system planning, scheduling, and equipment configuration, and promoting the efficient and stable operation of rural energy systems. Attached Figure Description
[0047] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0048] Figure 1 This is an overall flowchart of the method for extracting curves of rural energy consumption scenarios involving multi-energy-load coupling provided by the present invention.
[0049] Figure 2 This is a schematic diagram of 30 days of wind power data under rain and snow in a rural area, in a simulation example of the rural energy consumption scenario curve extraction method for multi-energy-load coupling provided by the present invention.
[0050] Figure 3 This is a simulation example of the rural energy consumption scenario curve extraction method for multi-energy-load coupling provided by the present invention, showing the first cluster of typical curves and mean curves after wind power aggregation in a rural rain and snow scenario.
[0051] Figure 4 This is a simulation example of the rural energy consumption scenario curve extraction method for multi-energy-load coupling provided by the present invention, showing the second cluster of typical curves and mean curves after wind power aggregation in a rural rain and snow scenario.
[0052] Figure 5 This is a schematic diagram of 30 days of photovoltaic data under rain and snow in a rural area, from a simulation example of the rural energy consumption scenario curve extraction method for multi-energy-load coupling provided by the present invention.
[0053] Figure 6 This is a simulation example of the rural energy consumption scenario curve extraction method for multi-energy-load coupling provided by the present invention, showing the first cluster of typical curves and mean curves after photovoltaic aggregation in a rural rain and snow scenario.
[0054] Figure 7 This is a simulation example of the rural energy consumption scenario curve extraction method for multi-energy-load coupling provided by the present invention, showing the second cluster of typical curves and mean curves after photovoltaic aggregation in a rural rain and snow scenario. Detailed Implementation
[0055] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.
[0056] Example 1, referring to Figure 1 This is the first embodiment of the present invention, which provides a method for extracting curves of rural energy consumption scenarios involving multi-energy-load coupling, including:
[0057] S1: Collect distributed energy output and rural industrial load data, and combine meteorological and agricultural information to label the scenarios;
[0058] S2: Based on the acquired data on the output of various distributed energy sources and the load of various rural industries in different scenarios, construct a dataset;
[0059] S3: Based on the dataset, build a similarity measurement model for rural energy consumption scenarios curves;
[0060] S4: Using the rural energy consumption scenario curve similarity measurement model, calculate the complete similarity distance matrix, determine the optimal number of clusters through the silhouette coefficient, use clustering methods to perform cluster analysis, divide all days, and identify the typical scenario curves under each rural energy consumption scenario;
[0061] S5: After completing the cluster analysis, extract representative daily curves from each cluster;
[0062] S6: Based on the clustering results and the extracted daily curves, calculate the probability of occurrence of the typical curve for each cluster and output the clustering results.
[0063] It should be noted that through steps S1-S6, joint characteristic analysis of multiple types of distributed energy and industrial load is realized, which improves the robustness of energy consumption scenario curves to time misalignment, thereby enhancing the scientificity and practicality of rural energy system planning, scheduling and equipment configuration.
[0064] Example 2, refer to Figure 1 As an embodiment of the present invention, based on the previous embodiment, a method for extracting rural energy consumption scenario curves involving multi-energy-load coupling is provided, comprising:
[0065] In this embodiment, the data collected in step S1 above, including distributed energy output and rural industrial load, combined with meteorological and agricultural information annotation scenarios, include:
[0066] Collect data on distributed energy output (photovoltaic, wind power, small hydropower, biomass energy) and rural industrial load (irrigation, supplemental lighting, processing, etc.), and combine meteorological and agricultural information to label scenarios (rain, snow, freezing, summer busy season, autumn harvest).
[0067] In this embodiment, the dataset constructed in step S2 above based on the acquired distributed energy output and rural industrial load data for various scenarios includes:
[0068] Based on the acquired data on the output of various distributed energy sources and the load of various rural industries in different scenarios, time alignment, missing value imputation, outlier handling and normalization are performed to construct a high-quality dataset.
[0069] Specifically, the input is the raw data, which includes: date field, hour field, and several resource fields (photovoltaic, wind power, small hydropower, biomass energy, agricultural irrigation load, agricultural supplemental lighting load, and agricultural product processing load).
[0070] If no date column is detected, a date index will be automatically generated based on the number of data rows; if no hour column is detected, the user will be prompted to specify one; then the input data will be sorted by "date + hour".
[0071] Identify and filter resource fields to ensure that the selected resource fields are numeric;
[0072] For each day's data, interpolation and alignment are performed based on the 0-23 hour series to generate daily curves for various resources and loads;
[0073] Construct a three-dimensional data cube with the following dimensions: hour, number of resource dimensions, and number of days;
[0074] The cube data is normalized to limit the numerical range to [0,1].
[0075] In this embodiment, step S3 above, which involves building a similarity measurement model for rural energy consumption scenario curves based on the dataset, includes:
[0076] To measure the similarity between curves of any two days, the Dynamic Time Warping (DTW) method is used to calculate the similarity between samples of different days. By allowing flexible matching of the time axis, it effectively characterizes the similarity in shape between curves of different days.
[0077] Specifically, a single-resource-dimension time series representation: Let the time series of day i on the r-th resource dimension be:
[0078]
[0079] Wherein, H represents the number of hours (in this embodiment, H = 24 is preferred).
[0080] Similarly, the corresponding sequence for day j is:
[0081]
[0082] DTW distance calculation for a single resource dimension: The DTW distance between two sequences is defined as follows:
[0083]
[0084] Where π represents an alignment path; P w This represents the set of all legal paths that satisfy the Sakoe–Chiba time window constraint (maximum offset not exceeding w hours) (preferably w = 3 in this embodiment). This ensures that the time series matching does not become excessively distorted, improving computational efficiency.
[0085] Comprehensive DTW distance calculation in multi-resource scenarios: In multi-resource scenarios, each day has R resource dimensions. To obtain the overall similarity between two dates, this embodiment preferably uses a weighted average method to integrate the DTW distances of each dimension, as shown in the following formula:
[0086]
[0087] Where D(i,j) represents the DTW combined distance between day i and day j; w r ≥0 represents the weight of the r-th resource, satisfying... When all resource weights are equal, the formula degenerates into a simple average, i.e.:
[0088]
[0089] The distance is calculated using the comprehensive DTW distance formula for all day pairs (i,j), resulting in an N×N symmetric distance matrix, represented as follows:
[0090] D = [D(i,j)] N×N
[0091] Where N is the total number of days, and the matrix satisfies: D(i,i)=0, that is, the distance between people on the same day is zero;
[0092] D(i,j) = D(j,i), meaning it possesses symmetry. The symmetric distance matrix serves as the input for subsequent clustering, used to determine the similarity of the curves for each day and to form a typical curve cluster for rural energy consumption scenarios.
[0093] In another possible implementation, integrating the DTW distances across various dimensions to obtain the overall similarity between two dates can be achieved through principal component analysis (PCA). First, treat the DTW distance for each resource dimension as a feature, constructing a matrix containing all days and resource dimension features. Next, perform PCA on this matrix to identify the most significant trends in the data. This requires calculating the matrix's covariance and finding the corresponding eigenvalues and eigenvectors. Based on the magnitude of the eigenvalues, select the most important principal components, which represent most of the data information. Then, examine the contribution of the DTW distance for each resource dimension to these principal components; a larger contribution indicates a greater impact of that resource dimension on the overall similarity, and this contribution is used as a weight. Finally, use these weights to perform a weighted sum of the DTW distances for each resource dimension to obtain the overall similarity between the two dates.
[0094] In another possible implementation, integrating the DTW distances across various dimensions to obtain the overall similarity between two dates can be achieved through fuzzy comprehensive evaluation. First, determine the factors to be considered, namely the DTW distances of each resource dimension, and then set several levels to describe similarity, such as very similar, fairly similar, etc. Next, for each resource dimension's DTW distance, determine the degree to which it belongs to each similarity level; this can be calculated using specific functions. Then, determine the importance weight of each resource dimension using methods such as expert scoring or hierarchical analysis. Combine the degree to which each resource dimension belongs to each similarity level with its weight, and perform a special calculation to obtain a comprehensive evaluation result. Finally, convert this comprehensive evaluation result into a specific similarity value, thus obtaining the overall similarity between the two dates.
[0095] In another possible implementation, the similarity measurement model for rural energy consumption scenarios can also be built based on graph neural networks (GNNs). First, the various elements in the rural energy consumption scenario, such as different distributed energy devices and rural industrial load nodes, are abstracted as nodes in a graph, and the relationships between them (such as energy transmission relationships and load impact relationships) are represented as edges in the graph. Each node and edge is assigned corresponding attributes; node attributes can include energy output values and load magnitude, while edge attributes can include transmission efficiency and impact coefficients. Then, a graph neural network is used to learn this graph structure. Taking a graph convolutional network (GCN) as an example, through multiple layers of convolution operations, nodes aggregate information from their neighboring nodes, thereby learning the global features of the entire energy consumption scenario. When calculating curve similarity, the graph structures under different scenarios are input into the trained GNN model to obtain feature vectors for each scenario. Then, methods such as cosine similarity and Euclidean distance are used to calculate the similarity between these feature vectors, thereby measuring the similarity of the rural energy consumption scenario curves.
[0096] In another possible implementation, the similarity measurement model for rural energy consumption scenario curves can be built using ensemble learning. Multiple similarity measurement algorithms, such as Dynamic Time Warping (DTW) and Pearson correlation coefficient, are selected to calculate the similarity between rural energy consumption scenario curves. Then, an ensemble model is constructed, using the similarity results from these different algorithms as input features. This ensemble model can be trained using machine learning algorithms such as decision trees and random forests. During training, the model parameters are adjusted using methods such as cross-validation, allowing the ensemble model to assign appropriate weights to each algorithm based on its performance, ultimately outputting a comprehensive similarity measurement result. This approach fully leverages the advantages of different algorithms, improving the model's accuracy and robustness.
[0097] In this embodiment, step S4 above utilizes a rural energy consumption scenario curve similarity measurement model to calculate a complete similarity distance matrix, determines the optimal number of clusters using the silhouette coefficient, and performs cluster analysis using a clustering method to divide all days and identify typical scenario curves for each rural energy consumption scenario, including:
[0098] This embodiment preferably uses K-medoids clustering. Let the set of days to be clustered be {1,2,...,N}, and let the number of clusters be K, which is the preset number of clusters. The goal is to minimize the sum of the distances from all samples to their cluster centers, expressed as:
[0099]
[0100] Among them, M c The center of the c-th cluster (i.e., a sample of real days, called the Medoid); C c D(i,M) is the set of all day indices assigned to cluster c; c ) represents the DTW distance between the i-th day and the cluster center.
[0101] Furthermore, the specific process of the clustering algorithm used is as follows:
[0102] Initialize the center point: randomly select K days as the initial Medoid.
[0103] Allocation phase: Each day is assigned to the cluster containing the nearest Medoid.
[0104]
[0105] Where idx(i) represents the cluster where the nearest Medoid to day i is located.
[0106] Update phase: in each cluster C c Within the cluster, select a new Medoid, which is the point with the smallest sum of intra-cluster distances:
[0107]
[0108] Iteration: Repeat the assignment and update steps until the Medoid stops changing or the maximum number of iterations is reached.
[0109] To determine the optimal number of clusters K opt The silhouette coefficient is introduced as an evaluation index to adaptively select the optimal number of clusters.
[0110] Specifically, for each sample i, a(i) is the average distance between the point and other points in the same cluster, and b(i) is the average distance between the point and all points in the nearest neighboring cluster. Then the silhouette coefficient s(i) of sample i is:
[0111]
[0112] The silhouette coefficient ranges from [-1, 1]. A value close to 1 indicates that sample i is clustered reasonably, a value close to 0 indicates that sample i is located at the cluster boundary, and a value close to -1 indicates that sample i is clustered incorrectly.
[0113] The average silhouette coefficient S of the entire clustering result is:
[0114]
[0115] The calculation is performed iteratively within a preset range of K values (e.g., K = 1 to 3), and the K value with the largest S value is selected as the final optimal number of clusters K. opt .
[0116] When the optimal number of clusters K opt When the value is 1, it indicates that the differences between all date curves are small, and the unique Medoid (or mean curve) can be directly used as the typical curve for the entire energy consumption scenario.
[0117] In another possible implementation, clustering the set of days to be clustered can be achieved through density-based clustering: based on a calculated similarity distance matrix, a distance threshold and a minimum sample size are determined. For each day sample to be clustered, the number of other samples within the distance threshold is counted, centered on that sample. If this number reaches or exceeds the minimum sample size, the sample is marked as a core point. Samples within the distance threshold around the core point are considered to belong to the same cluster. Samples not within the distance threshold of any core point are marked as noise points and are not temporarily assigned to any cluster. The clusters are gradually expanded by connecting other samples from the core point through the distance threshold. When no more samples can be expanded from the core point, a cluster is formed. This process continues until all samples have been processed, and clustering is complete. To determine a suitable distance threshold and minimum sample size, multiple trials can be conducted. Each trial uses a different combination of parameters, and an evaluation metric (such as the adjusted RAND index) is used to measure the quality of the clustering results. The parameter combination with the highest evaluation metric value is selected as the optimal parameter. Finally, within each cluster, the sample curve that best represents the characteristics of that cluster is selected as the typical scenario curve, for example, the curve with the highest average similarity to other sample curves within the cluster is chosen.
[0118] In another possible implementation, clustering the set of days to be clustered can also be achieved through spectral clustering: First, a similarity matrix is constructed based on the similarity distance matrix, where each element represents the similarity between any two samples (i.e., two days). This similarity matrix is then processed to construct a Laplace matrix. The Laplace matrix reflects the global connectivity between samples. Next, eigenvalues and eigenvectors are obtained from the Laplace matrix through eigenvalue decomposition. The eigenvectors corresponding to the K smallest eigenvalues (where K is a value within a preset range for the number of clusters to be tried) are selected, and these eigenvectors are combined into a new matrix. Each row in this new matrix is treated as a new sample point, and these new sample points are clustered using the traditional K-means clustering algorithm. To determine the optimal number of clusters K, the Calinski-Harabasz exponent can be used. The larger the exponent, the better the clustering result. Within a preset range of K values (e.g., 1 to 10), spectral clustering is performed for each K value, and the Calinski-Harabasz exponent is calculated. The K value corresponding to the largest exponent is selected as the optimal number of clusters. Finally, within each cluster, the typical scenario curve for that cluster is determined by comparing the similarity between sample curves, for example, by selecting the curve with the smallest sum of distances to other sample curves within the cluster.
[0119] In this embodiment, after completing the cluster analysis in step S5 above, extracting representative daily curves from each cluster includes:
[0120] It should be noted that after completing the cluster analysis, a representative daily curve needs to be extracted from each cluster as the typical curve for that class. The typical curve can be used for subsequent power system simulation, dispatch optimization, and scenario analysis; therefore, it must possess good representativeness and interpretability.
[0121] A typical day extraction method based on combining typical days and mean curves is adopted, as follows:
[0122] The c-th cluster contains a set of dates called C. c The elements are the corresponding day indices. The similarity between samples within a cluster is represented by the distance matrix D.
[0123] For cluster C c For each date j in the cluster, calculate the sum of its distances L(j) to all other dates in the cluster, expressed as:
[0124]
[0125] Then cluster C c A typical example is Japan M c Defined as:
[0126]
[0127] That is, select the day with the smallest sum of distances to all other days within the cluster as the typical representative day of the cluster.
[0128] To more comprehensively reflect the overall characteristics within the cluster, the point-by-point mean of all date curves within the cluster is calculated. Let X be the hourly curve X on the resource r dimension for day i. (i,r) for:
[0129]
[0130] The mean curve of the c-th cluster is:
[0131]
[0132] in, |C represents the mean value of the r-th resource within cluster c at hour h. c | represents the number of days within cluster c.
[0133] In this embodiment, step S6 above, based on the clustering results and the extracted daily curves, calculates the probability of occurrence of the typical curve for each cluster and outputs the clustering results, including:
[0134] It should be noted that after obtaining the clustering results and typical curves, it is necessary to further quantify the representativeness of each type of typical curve in the overall context and specific scenarios. Occurrence probability is introduced as an evaluation metric to measure the frequency of occurrence of a particular type of typical curve. Probability calculations not only reflect the coverage of different typical days but also provide a weighted basis for subsequent simulations and decision-making. Finally, the clustering results are output in the form of an Excel spreadsheet and images.
[0135] Specifically, let N be the total number of days in a certain rural energy consumption scenario, and C be the set of days contained in the c-th cluster. c Its size is |C c The probability of the occurrence of the c-th typical curve in this rural energy consumption scenario is defined as:
[0136]
[0137] Among them, P c Let represent the probability that the typical curve of cluster c appears over all days in this rural energy consumption scenario. When the sum of the probabilities of all clusters satisfies... This indicates that the probability characterizes the distribution characteristics of the entire sample space.
[0138] After completing the probability calculation, the final output results are presented in the form of an Excel spreadsheet and an image.
[0139] Specifically, the Excel spreadsheet file includes the following:
[0140] The clustering results summary table includes cluster number, cluster size, date corresponding to the typical day of the cluster, probability of occurrence, all dates included in the cluster; data on typical day curves of various resources and industry loads within each cluster; data on mean curves of various resources and industry loads within each cluster; optimal number of clusters K and silhouette coefficient; and the mapping relationship between dates and clusters.
[0141] The image files include typical daily and mean curves of various resource and industry loads for all clusters.
[0142] In another possible implementation, the probability of occurrence of the typical curve for each cluster can also consider seasonal and periodic factors. First, the year is divided into different time periods according to seasons or agricultural cycles, such as spring plowing, summer planting, autumn harvest, and winter storage. For each time period, the number of days included in each cluster is counted. Different weights are assigned to different time periods when calculating the probability of occurrence. The weights can be determined based on the historical data on the impact of that time period on rural energy consumption. For example, during busy agricultural seasons, rural industrial load and energy demand may change significantly, and the weight of that time period can be relatively high. Then, for each cluster, the number of days in different time periods is weighted and summed, then divided by the total number of days (the equivalent total number of days after considering the weights) to obtain the probability of occurrence of the typical curve for that cluster after considering seasonal and periodic factors. This can more accurately reflect the frequency of occurrence of different typical curves in different time periods, providing a more targeted reference for subsequent power system planning and dispatching.
[0143] In another possible implementation, calculating the probability of occurrence of the typical curve for each cluster can be combined with Monte Carlo simulation. First, based on historical data and prior knowledge, a probability distribution model is established for various factors influencing rural energy consumption scenarios (such as weather conditions and industrial activities). For example, weather factors can be described using a normal distribution to represent changes in variables such as temperature and humidity. Then, a large number of random samples are taken using the Monte Carlo method to simulate different rural energy consumption scenarios. For each simulated scenario, the previous clustering method is used for classification, and the frequency of each cluster's occurrence in the simulated scenario is counted. After a large number of simulations, the frequency of each cluster's occurrence divided by the total number of simulations approximates the probability of occurrence of the typical curve for that cluster. This method can take into account the influence of various uncertainties, yielding more random and reliable probability results, which helps to cope with complex and ever-changing rural energy consumption situations.
[0144] Example 3 illustrates the schematic scheme of the multi-energy-load coupled rural energy consumption scenario curve extraction method of this embodiment. It should be noted that the technical solution of the multi-energy-load coupled rural energy consumption scenario curve extraction system belongs to the same concept as the technical solution of the multi-energy-load coupled rural energy consumption scenario curve extraction method described above. Details not described in detail in the technical solution of the multi-energy-load coupled rural energy consumption scenario curve extraction system in this embodiment can be found in the description of the technical solution of the multi-energy-load coupled rural energy consumption scenario curve extraction method described above.
[0145] This embodiment also provides a system for extracting curves of rural energy consumption scenarios involving multi-energy-load coupling, including:
[0146] The data acquisition and scene labeling module is used to collect data on distributed energy output and rural industrial load, and to label scenes in conjunction with meteorological and agricultural information.
[0147] The dataset construction module is used to construct datasets based on the acquired data on the output of various distributed energy sources and the load of various rural industries in different scenarios.
[0148] The similarity measurement model building module is used to build a similarity measurement model for rural energy consumption scenarios based on a dataset.
[0149] The clustering analysis and typical curve identification module is used to calculate the complete similarity distance matrix using a rural energy consumption scenario curve similarity measurement model, determine the optimal number of clusters through the silhouette coefficient, and use clustering methods to perform clustering analysis, dividing all days and identifying typical scenario curves under each rural energy consumption scenario.
[0150] The representative daily curve extraction module is used to extract representative daily curves from each cluster after completing cluster analysis.
[0151] The results calculation and output module is used to calculate the probability of occurrence of the typical curve for each cluster based on the clustering results and the extracted daily curves, and output the clustering results.
[0152] This embodiment also provides an electronic device applicable to the curve extraction method for rural energy consumption scenarios involving multi-energy-load coupling, including:
[0153] The system includes a memory and a processor. The memory stores computer-executable instructions, and the processor executes these instructions to implement the method for extracting rural energy consumption scenario curves involving multi-energy-load coupling, as proposed in the above embodiments.
[0154] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements the method for extracting rural energy consumption scenario curves involving multi-energy-load coupling as proposed in the above embodiments.
[0155] The storage medium proposed in this embodiment belongs to the same inventive concept as the method for extracting rural energy consumption scenario curves with multi-energy-load coupling proposed in the above embodiments. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.
[0156] Example 4, refer to Figures 2-7 As an embodiment of the present invention, a method for extracting curves of rural energy consumption scenarios with multi-energy-load coupling is provided. To verify the beneficial effects of the present invention, a simulation experiment is conducted for scientific demonstration.
[0157] Figure 2 , Figure 3 , Figure 4 This image shows the clustering results of 30 days of wind power data from a rural area under rain and snow conditions. As can be seen from the figure, the wind power curves are divided into two clusters, with a typical daily curve and a mean curve extracted from each cluster. The results indicate that this method can effectively identify the differences in wind power output under different meteorological conditions, providing typical reference curves for subsequent wind power output prediction and scheduling.
[0158] Figure 5 , Figure 6 , Figure 7 This section presents the clustering results of 30 days of photovoltaic (PV) data for the same village under rain and snow scenarios. It shows that the PV output curves are clustered into two groups, with each group yielding a typical daily curve and a mean curve. This method not only extracts the representative shape of the PV curves but also quantifies the probability of different typical curves appearing in this scenario, thus providing a scientific basis for energy system planning and equipment selection.
[0159] Therefore, this invention can simultaneously consider the coupling characteristics of multiple types of distributed energy sources and various types of rural loads, overcoming the shortcomings of existing methods that can only model single energy sources or loads, and is more in line with the actual operation of rural energy systems. By adopting a dynamic time warping method for similarity measurement, it has robustness against time misalignment, effectively avoiding the problem of traditional methods being sensitive to curve advance or lag, and ensuring the accuracy of typical curve extraction. Based on K-medoids clustering and combined with silhouette coefficients to determine the optimal number of clusters, the extracted typical curves have strong representativeness and good interpretability, and can better support energy planning and scheduling. The final results are output in intuitive tabular and graphical form, which is convenient for users to understand and apply, and provides strong support for the planning, design and operation of rural energy systems.
[0160] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method for extracting curves of rural energy consumption scenarios involving multi-energy-load coupling, characterized in that, include: Collect data on distributed energy output and rural industrial load, and combine meteorological and agricultural information to label scenarios; A dataset is constructed based on the acquired data on the output of various distributed energy sources and the load of various rural industries in different scenarios. Based on the dataset, a similarity measurement model for rural energy consumption scenarios was built. Using a rural energy consumption scenario curve similarity measurement model, a complete similarity distance matrix is calculated. The optimal number of clusters is determined by the silhouette coefficient. Clustering analysis is performed using a clustering method to divide all days and identify typical scenario curves under each rural energy consumption scenario. After completing the cluster analysis, representative daily curves are extracted from each cluster; Based on the clustering results and the extracted daily curves, the probability of occurrence of the typical curve for each cluster is calculated, and the clustering results are output.
2. The method for extracting rural energy consumption scenario curves based on multi-energy-load coupling as described in claim 1, characterized in that, The model for measuring the similarity of rural energy consumption scenario curves based on the dataset includes: Represent the time series of a single resource dimension in the form of a corresponding sequence; calculate the DTW distance of a single resource dimension; in a multi-resource scenario, integrate the DTW distances of each dimension to obtain the overall similarity between two dates, and use a simple average when all resource weights are equal; calculate the comprehensive DTW distance for all day pairs to obtain a symmetric distance matrix, wherein the matrix satisfies that the distance between the same day is zero and symmetry.
3. The method for extracting rural energy consumption scenario curves based on multi-energy-load coupling as described in claim 2, characterized in that, The method utilizes a rural energy consumption scenario curve similarity measurement model to calculate a complete similarity distance matrix, determines the optimal number of clusters through silhouette coefficients, and performs cluster analysis using clustering methods to divide all days and identify typical scenario curves for each rural energy consumption scenario, including: Clustering is performed on the set of days to be clustered, with the goal of minimizing the sum of the distances from all samples to the cluster center, where the cluster center is a sample representing a specific number of days.
4. The method for extracting rural energy consumption scenario curves based on multi-energy-load coupling as described in claim 3, characterized in that, The clustering of the set of days to be clustered includes: Initialize the center point by randomly selecting a number of days as the initial cluster center; in the allocation phase, assign each day to the cluster containing the nearest cluster center; in the update phase, select a new cluster center within each cluster, i.e., the point with the smallest sum of distances within the cluster; continuously iterate the allocation and update steps until the cluster center no longer changes or the maximum number of iterations is reached.
5. The method for extracting rural energy consumption scenario curves based on multi-energy-load coupling as described in claim 4, characterized in that, The method of using a rural energy consumption scenario curve similarity measurement model to calculate a complete similarity distance matrix, determining the optimal number of clusters through silhouette coefficients, and performing cluster analysis using clustering methods to divide all days and identify typical scenario curves for each rural energy consumption scenario also includes: To determine the optimal number of clusters, a profile coefficient is introduced as an evaluation index. The clusters are calculated iteratively within a preset range and the cluster with the largest average profile coefficient is selected as the optimal number of clusters. If the optimal number of clusters is 1, a unique cluster center or mean curve is used as the typical curve for the entire energy consumption scenario.
6. The method for extracting rural energy consumption scenario curves based on multi-energy-load coupling as described in claim 5, characterized in that, After completing the cluster analysis, extracting representative daily curves from each cluster includes: A typical day extraction method based on a combination of typical days and mean curves is adopted. In each cluster, the sample similarity within the cluster is represented by a distance matrix. For each date within the cluster, the sum of distances with all other dates within the cluster is calculated, and the date with the smallest sum of distances is selected as the typical representative day of the cluster.
7. The method for extracting rural energy consumption scenario curves based on multi-energy-load coupling as described in claim 6, characterized in that, After completing the cluster analysis, extracting representative daily curves from each cluster also includes: Calculate the point-by-point mean of all date curves within the cluster to obtain the mean curve.
8. A multi-energy-load coupled rural energy consumption scenario curve extraction system, using the method described in any one of claims 1 to 7, characterized in that, include: The data acquisition and scene labeling module is used to collect data on distributed energy output and rural industrial load, and to label scenes in conjunction with meteorological and agricultural information. The dataset construction module is used to construct datasets based on the acquired data on the output of various distributed energy sources and the load of various rural industries in different scenarios. The similarity measurement model building module is used to build a similarity measurement model for rural energy consumption scenarios based on a dataset. The clustering analysis and typical curve identification module is used to calculate the complete similarity distance matrix using a rural energy consumption scenario curve similarity measurement model, determine the optimal number of clusters through the silhouette coefficient, and use clustering methods to perform clustering analysis, dividing all days and identifying typical scenario curves under each rural energy consumption scenario. The representative daily curve extraction module is used to extract representative daily curves from each cluster after completing cluster analysis. The results calculation and output module is used to calculate the probability of occurrence of the typical curve for each cluster based on the clustering results and the extracted daily curves, and output the clustering results.
9. An electronic device, characterized in that, include: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions, which, when executed by the processor, implement the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, It stores computer-executable instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 7.