Classification method and device for bus load in power system, and electronic equipment
By using the classification model of deep learning and self-attention mechanism in the power system, the bus load data is dimensionality reduction and feature extraction is solved, and the bus load data clustering algorithm is high in the power system, and more accurate loads are achieved Features and classification results.
Patent Information
- Application Number
- CN202411258661.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2024-12-10
AI Technical Summary
In existing power systems, the bus load data clustering algorithm has high computational complexity, making it difficult to ensure the effectiveness of clustering features, resulting in insufficient classification accuracy.
Using a classification model based on deep learning strategies, timing convolution networks and self-attention mechanisms, the bus load data is subject to dimensionality reduction, feature extraction and weight allocation, and the data dependencies are captured through timing relationships to realize clustering processing to obtain accurate Load feature matrix and classification cluster.
The calculation complexity of the clustering algorithm is reduced, the validity and distinction of features are improved, and the clustering results are more accurate and representative, solving the problems of high computational complexity of the data clustering algorithm and difficult to guarantee feature effectiveness.
Smart Images

Figure CN119106311A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power system analysis and management, and in particular to a method and device for classifying bus loads in a power system, and electronic equipment. Background Art
[0002] Bus loads reflect the concentration and diversity of power system loads, their close connection to the power supply region, the significant impact of renewable energy integration, data processing challenges, and irregular load fluctuations. These characteristics are crucial for stable power system operation and optimal dispatch. However, with the development of China's new power system and the increasing proportion of distributed photovoltaic and wind power grid integration, bus load characteristics have become increasingly complex. Therefore, accurately identifying and revealing typical bus load fluctuation characteristics is crucial for power system operation and planning.
[0003] At present, bus load curve clustering methods are mainly divided into two categories: direct clustering algorithms and indirect clustering algorithms. Among them, direct clustering algorithms such as K-means and K-medoids directly use the original load data for clustering. Due to the high-dimensional characteristics of the load data set, the computational complexity is high and the processing time is long. Indirect clustering algorithms, such as time series-based methods, first perform dimensionality reduction and feature extraction before clustering. However, the dimensionality reduction and feature extraction process is relatively complex, and it is difficult to ensure the validity of the features.
[0004] To address the above-mentioned problems, no effective solutions have been proposed so far. Summary of the Invention
[0005] The embodiments of the present invention provide a method and device for classifying bus loads in an electric power system, and an electronic device, so as to at least solve the technical problem in related technologies that the computational complexity of data clustering algorithms is high, it is difficult to ensure the validity of clustering features, and thus it is difficult to ensure classification accuracy.
[0006] According to one aspect of an embodiment of the present invention, a method for classifying bus loads in an electric power system is provided, comprising: obtaining N bus load data of a target electric power system within a specified time period, wherein the N bus load data are arranged in a time series relationship, and N is a positive integer; inputting the bus load data into a target classification model according to the time series relationship, and outputting a classification result, wherein the classification result records the N bus load data belonging to K classification clusters, each of the classification clusters represents a load category, and K is a positive integer less than N, and the target classification model is used to perform dimensionality reduction processing, feature extraction, weight allocation, and clustering processing on the N input data with the time series relationship based on a deep learning strategy, a time series convolutional network, and a self-attention mechanism to obtain the classification result.
[0007] Furthermore, the target classification model is used to perform the following steps: based on the deep learning strategy, the bus load data is subjected to dimensionality reduction processing to obtain an embedding vector corresponding to the bus load data, wherein all vector dimensions of the embedding vector are key feature dimensions that affect the load fluctuation of the target power system identified by the target classification model; for each of the embedding vectors, the temporal dependency between the embedding vector and other embedding vectors is captured based on the temporal convolutional network to obtain a dependency vector; based on the self-attention mechanism and all the dependency vectors, weights are assigned to all the embedding vectors arranged according to the temporal relationship, and the load feature vector corresponding to the embedding vector is calculated based on the assigned weight vector.
[0008] Furthermore, the target classification model is also used to perform the following steps: splicing the load feature vectors corresponding to all the embedded vectors according to the time series relationship to obtain the load feature matrix of the target power system within the specified time period; mapping the load feature matrix to the clustering space based on a specified clustering algorithm, and clustering all the load feature vectors in the load feature matrix in the clustering space to obtain K classification clusters.
[0009] Furthermore, the step of performing dimensionality reduction processing on the bus load data based on the deep learning strategy to obtain the embedding vector corresponding to the bus load data includes: performing data cleaning and data preprocessing on each bus load data, and performing feature identification on the preprocessed bus load data to obtain R load features, where R is a positive integer; determining S key features among the identified R load features, and establishing an S-dimensional space based on the S key features, where S is a positive integer less than R; using the S-dimensional space as the embedding space, and mapping the bus load data one by one to the embedding space based on the nonlinear mapping capability of the deep learning strategy to obtain the embedding vector.
[0010] Furthermore, for each of the embedding vectors, the temporal dependency between the embedding vector and other embedding vectors is captured based on the temporal convolutional network, and the step of obtaining the dependency vector includes: obtaining a set of encoding vectors corresponding to each of the embedding vectors through linear transformation calculation, wherein the encoding vector set includes at least: a query vector, a key vector and a value vector; for each of the embedding vectors, calculating the dot product result between the query vector corresponding to the embedding vector and the key vectors corresponding to other embedding vectors, to obtain all the dependency vectors corresponding to the embedding vector, wherein the dot product result is used to characterize the temporal dependency.
[0011] Furthermore, the steps of assigning weights to all the embedding vectors arranged according to the temporal relationship based on the self-attention mechanism and all the dependency vectors, and calculating the load characteristic vector corresponding to the embedding vector based on the assigned weight vector, include: normalizing all the dependency vectors corresponding to each of the embedding vectors to obtain the weight vector; and performing weighted calculation on the value vectors corresponding to all the embedding vectors based on the temporal relationship and all the weight vectors to obtain the load characteristic vector corresponding to each of the embedding vectors.
[0012] Furthermore, all the load characteristic vectors in the load characteristic matrix are clustered in the clustering space to obtain K classification clusters, including the following steps: obtaining K initial classification clusters in the clustering space, and determining the initial cluster centroid of each initial classification cluster; obtaining the load characteristic vectors in the load characteristic matrix one by one according to the time series relationship, and calculating the spatial distance between the load characteristic vector and all the initial cluster centroids; determining the initial cluster centroid closest to the load characteristic vector in space, assigning the load characteristic vector to the initial classification cluster to which the initial cluster centroid belongs, and updating the cluster centroid of the initial classification cluster; until all the load characteristic vectors in the load characteristic matrix are assigned, K classification clusters are obtained.
[0013] According to another aspect of an embodiment of the present invention, a classification device for bus loads in an electric power system is provided, including: an acquisition unit for acquiring N bus load data of a target electric power system within a specified time period, wherein the N bus load data are arranged in a time series relationship, and N is a positive integer; an output unit for inputting the bus load data into a target classification model according to the time series relationship, and outputting a classification result, wherein the classification result records the N bus load data belonging to K classification clusters, each of the classification clusters represents a load category, and K is a positive integer less than N. The target classification model is used to perform dimensionality reduction processing, feature extraction, weight allocation, and clustering processing on the N input data with the time series relationship based on a deep learning strategy, a time series convolutional network, and a self-attention mechanism to obtain the classification result.
[0014] Furthermore, the output unit includes: a dimensionality reduction module, which is used to perform dimensionality reduction processing on the bus load data based on the deep learning strategy to obtain an embedding vector corresponding to the bus load data, wherein all vector dimensions of the embedding vector are key feature dimensions that affect the load fluctuation of the target power system identified by the target classification model; a capture module, which is used to capture the temporal dependency between the embedding vector and other embedding vectors for each embedding vector based on the temporal convolutional network to obtain a dependency vector; and a calculation module, which is used to assign weights to all the embedding vectors arranged according to the temporal relationship based on the self-attention mechanism and all the dependency vectors, and calculate the load feature vector corresponding to the embedding vector based on the assigned weight vector.
[0015] Furthermore, the output unit also includes: a splicing module, which is used to splice the load characteristic vectors corresponding to all the embedded vectors according to the time series relationship to obtain the load characteristic matrix of the target power system within the specified time period; a clustering module, which is used to map the load characteristic matrix to a clustering space based on a specified clustering algorithm, and cluster all the load characteristic vectors in the load characteristic matrix in the clustering space to obtain K classification clusters.
[0016] Furthermore, the dimensionality reduction module includes: a feature recognition submodule, which is used to perform data cleaning and data preprocessing on each bus load data, and perform feature recognition on the preprocessed bus load data to obtain R load features, where R is a positive integer; an establishment submodule, which is used to determine S key features among the R identified load features, and establish an S-dimensional space based on the S key features, where S is a positive integer less than R; a mapping submodule, which is used to use the S-dimensional space as an embedding space, and map the bus load data one by one to the embedding space based on the nonlinear mapping capability of the deep learning strategy to obtain the embedding vector.
[0017] Furthermore, the capture module includes: a first calculation submodule, which is used to obtain a set of encoding vectors corresponding to each of the embedding vectors through linear transformation calculation, wherein the encoding vector set includes at least: a query vector, a key vector and a value vector; a second calculation submodule, which is used to calculate the dot product result between the query vector corresponding to the embedding vector and the key vectors corresponding to other embedding vectors for each of the embedding vectors, to obtain all the dependency vectors corresponding to the embedding vector, wherein the dot product result is used to characterize the temporal dependency relationship.
[0018] Furthermore, the calculation module includes: a normalization processing submodule, which is used to normalize all the dependency vectors corresponding to each of the embedded vectors to obtain the weight vector; and a weighted calculation submodule, which is used to perform weighted calculation on the value vectors corresponding to all of the embedded vectors based on the timing relationship and all the weight vectors to obtain the load characteristic vector corresponding to each of the embedded vectors.
[0019] Furthermore, the clustering module includes: an acquisition submodule, used to obtain K initial classification clusters in the clustering space and determine the initial cluster centroid of each initial classification cluster; a third calculation submodule, used to obtain the load characteristic vectors in the load characteristic matrix one by one according to the time series relationship, and calculate the spatial distance between the load characteristic vector and all the initial cluster centroids; an update submodule, used to determine the initial cluster centroid closest to the load characteristic vector space, assign the load characteristic vector to the initial classification cluster to which the initial cluster centroid belongs, and update the cluster centroid of the initial classification cluster; a determination submodule, used to obtain K classification clusters until all the load characteristic vectors in the load characteristic matrix are assigned.
[0020] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is also provided, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned methods for classifying bus loads in the power system.
[0021] According to another aspect of an embodiment of the present invention, an electronic device is also provided, comprising one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement any one of the above-mentioned methods for classifying bus loads in a power system.
[0022] In the present invention, a classification method for bus loads in an electric power system is proposed. First, N bus load data of a target electric power system within a specified time period are obtained, wherein the N bus load data are arranged in a time series relationship, and N is a positive integer. Then, the bus load data are input into a target classification model according to the time series relationship, and a classification result is output. The classification result records the N bus load data belonging to K classification clusters, each classification cluster represents a load category, and K is a positive integer less than N. The target classification model is used to perform dimensionality reduction processing, feature extraction, weight allocation and clustering processing on the N input data with a time series relationship based on a deep learning strategy, a time series convolutional network and a self-attention mechanism to obtain a classification result.
[0023] In the present invention, a deep learning strategy is used to process time series data, automatically capture the intrinsic characteristics of bus load fluctuations from time series data and achieve dimensionality reduction effect. By introducing a time series convolutional network, local features and long-term dependencies in time series data are captured, time series features are extracted, and the extracted features are weighted through a self-attention mechanism to further improve the effectiveness and discrimination of the features. After dimensionality reduction and feature extraction, the data dimension and noise of the features have been greatly reduced. When the processed features are clustered, the computational complexity of the clustering algorithm will also be greatly reduced, making the clustering results more accurate and representative, thereby solving the technical problem in the related technology that the computational complexity of the data clustering algorithm is high, it is difficult to ensure the effectiveness of the clustering features, and thus it is difficult to ensure the accuracy of classification. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0025] Figure 1 is a flow chart of an optional method for classifying bus loads in a power system according to an embodiment of the present invention;
[0026] Figure 2 is a schematic diagram of an optional bus load classification device in a power system according to an embodiment of the present invention;
[0027] Figure 3 This is a hardware structure block diagram of an electronic device (or mobile device) for a method for classifying bus loads in a power system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0029] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0030] The following embodiments of the present invention can be applied to various systems / applications / devices that require grid bus load classification and time series data dimensionality reduction and clustering, and can implement a classification method for feature clustering of grid bus time series load data based on a time series convolutional attention mechanism and deep embedding clustering. The present invention uses a deep learning strategy to reduce the dimensionality and learn time series data, and then uses a time series convolutional network to extract local features and long-term dependencies. It can weight the extracted features through a self-attention mechanism, further improving the effectiveness and discrimination of the features, while greatly reducing the computational complexity of the clustering algorithm, making the clustering results more accurate and representative.
[0031] The present invention will be described in detail below with reference to various embodiments.
[0032] Example 1
[0033] According to an embodiment of the present invention, an embodiment of a method for classifying bus loads in an electric power system is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0034] Figure 1 FIG. 1 is a flow chart of an optional method for classifying busbar loads in a power system according to an embodiment of the present invention. Figure 1 As shown, the method includes the following steps:
[0035] Step S101 : obtaining N bus load data of a target power system within a specified time period, wherein the N bus load data are arranged in a time series relationship, and N is a positive integer.
[0036] In step S102, the bus load data is input into the target classification model according to the time series relationship, and the classification results are output, wherein the classification results record N bus load data belonging to K classification clusters, each classification cluster represents a load category, and K is a positive integer less than N.
[0037] Through the above steps, N bus load data of the target power system within a specified time period can be obtained first, wherein the N bus load data are arranged in a time series relationship, N is a positive integer, and then the bus load data are input into the target classification model according to the time series relationship, and the classification result is output, wherein the classification result records the N bus load data belonging to K classification clusters, each classification cluster represents a load category, K is a positive integer less than N, and the target classification model is used to perform dimensionality reduction processing, feature extraction, weight allocation and clustering processing on the N input data with a time series relationship based on a deep learning strategy, a time series convolutional network and a self-attention mechanism to obtain a classification result.
[0038] In an embodiment of the present invention, a deep learning strategy is used to process time series data, automatically capture the intrinsic characteristics of bus load fluctuations from the time series data and achieve a dimensionality reduction effect. By introducing a time series convolutional network, local features and long-term dependencies in the time series data are captured, time series features are extracted, and the extracted features are weighted through a self-attention mechanism to further improve the effectiveness and discrimination of the features. After dimensionality reduction and feature extraction, the data dimension and noise of the features have been greatly reduced. When the processed features are clustered, the computational complexity of the clustering algorithm will also be greatly reduced, making the clustering results more accurate and representative, thereby solving the technical problem in related technologies that the computational complexity of the data clustering algorithm is high, it is difficult to ensure the effectiveness of the clustering features, and thus it is difficult to ensure the accuracy of classification.
[0039] The embodiment of the present invention is described in detail below in conjunction with the above steps.
[0040] The implementing subject of the embodiment of the present invention can be a power system. A classification model is obtained by combining deep learning strategies, time series convolutional networks, self-attention mechanisms and feature encoding reconstruction model training to perform feature classification on bus load data with time series characteristics, so as to accurately identify and reveal typical bus load fluctuation characteristics, thereby ensuring the operation quality and planning quality of the power system.
[0041] Step S101 : obtaining N bus load data of a target power system within a specified time period, wherein the N bus load data are arranged in a time series relationship, and N is a positive integer.
[0042] Specifically, the specified time end is specified to include at least a start time point and an end time point. The embodiment of the present invention can use a corresponding data query tool or API interface to initiate a request to the power system database to obtain bus load data within the specified time period returned by the power system database.
[0043] In step S102, the bus load data is input into the target classification model according to the time series relationship, and the classification results are output, wherein the classification results record N bus load data belonging to K classification clusters, each classification cluster represents a load category, and K is a positive integer less than N.
[0044] The target classification model in the embodiment of the present invention is used to perform dimensionality reduction, feature extraction, weight assignment and clustering processing on N input data with time series relationships based on deep learning strategies, time series convolutional networks and self-attention mechanisms to obtain classification results. It should be noted that through the combination of deep learning strategies and time series convolutional networks, the features of time series data can be better extracted, thereby improving classification accuracy. The self-attention mechanism can help the model learn the long-range dependencies in time series data, enhance the generalization ability of the model, and make the model more stable when processing different time series data. Through clustering processing, the bus load data is divided into K categories, which helps to effectively classify and analyze the load data and provide support for load management of the power system.
[0045] In order to effectively identify and classify the load fluctuation characteristics of the target power system, the target classification model is optionally used to perform the following steps: based on the deep learning strategy, the bus load data is reduced in dimensionality to obtain the embedding vector corresponding to the bus load data, wherein all vector dimensions of the embedding vector are key feature dimensions that affect the load fluctuation of the target power system identified by the target classification model; for each embedding vector, the temporal dependency between the embedding vector and other embedding vectors is captured based on the temporal convolutional network to obtain a dependency vector; based on the self-attention mechanism and all dependency vectors, weights are assigned to all embedding vectors arranged in temporal relationship, and the load feature vector corresponding to the embedding vector is calculated based on the assigned weight vector.
[0046] It should be noted that the bus load data is reduced in dimension through deep learning strategy to obtain an embedding vector, which contains the key characteristic dimensions of the target power system load fluctuation, so as to retain the key characteristic dimensions while avoiding information loss, which facilitates the accuracy of subsequent feature extraction and weight allocation.
[0047] In addition, the temporal dependency relationship between embedded vectors is modeled using a temporal convolutional network structure to improve the model's ability to process temporal data. The capture of temporal dependencies requires attention to the design of the network structure and the selection of hyperparameters to ensure that the model can accurately capture the temporal relationship between the data.
[0048] The self-attention mechanism assigns weights to the embedding vectors to generate a load feature vector for final classification. The weight assignment within the self-attention mechanism requires proper design to ensure the model effectively focuses on important information and improves classification accuracy. Throughout this entire process, model training and parameter tuning must be fully optimized to improve performance and generalization.
[0049] In order to achieve clustering processing of the load characteristics of the target power system within a specified time period, the load feature vectors can be spliced and mapped to the clustering algorithm. Optionally, the target classification model is also used to perform the following steps: splicing the load feature vectors corresponding to all embedded vectors according to the time series relationship to obtain the load feature matrix of the target power system within the specified time period; mapping the load feature matrix to the clustering space based on the specified clustering algorithm, and clustering all the load feature vectors in the load feature matrix in the clustering space to obtain K classification clusters.
[0050] It should be noted that by splicing the load feature vectors corresponding to all embedded vectors according to the time series relationship, the load feature matrix of the target power system in the specified time period is obtained, which includes the load characteristics at different time points. When splicing the load feature vectors, it is necessary to pay attention to maintaining the time series relationship to ensure that the characteristics of each time point can be fully considered.
[0051] After the vector concatenation step, the embodiment of the present invention maps the load characteristic matrix to a clustering space based on a specified clustering algorithm and clusters all load characteristic vectors therein to obtain K classification clusters. The load data is then classified according to similarity. An appropriate clustering algorithm is selected to map and cluster the load characteristic matrix to ensure that the load data can be effectively divided into K categories. During the clustering process, it is also necessary to adjust the parameters of the clustering algorithm to achieve better clustering results, while also considering the characteristics of the load data and actual needs.
[0052] In order to obtain a more compact representation with key features, the bus load data can be reduced in dimension by a deep learning strategy to obtain a corresponding embedding vector, and then the bus load data is mapped to the embedding space. Optionally, the bus load data is reduced in dimension based on the deep learning strategy to obtain the embedding vector corresponding to the bus load data, including: performing data cleaning and data preprocessing on each bus load data, and performing feature recognition on the preprocessed bus load data to obtain R load features, where R is a positive integer; determining S key features among the identified R load features, and establishing an S-dimensional space based on the S key features, where S is a positive integer less than R; using the S-dimensional space as the embedding space, and mapping the bus load data one by one to the embedding space based on the nonlinear mapping capability of the deep learning strategy to obtain the embedding vector.
[0053] Specifically, the bus load data is cleaned and preprocessed, including missing value processing, outlier processing, and standardization, to ensure data quality and consistency.
[0054] It should be noted that by extracting and identifying features of the preprocessed data, R load features are obtained for subsequent dimensionality reduction processing. In the feature identification process, it is necessary to select appropriate feature extraction methods and algorithms to ensure that the important features of the data can be accurately captured.
[0055] In addition, in the process of determining key features and establishing embedding space, S key features are determined from R load features, and an S-dimensional space is established as the embedding space. The bus load data is mapped to this space to obtain an embedding vector. When determining key features and establishing the embedding space, it is necessary to consider the correlation and importance between features, and select appropriate dimensions to retain the most important information. When performing nonlinear mapping of deep learning strategies, it is necessary to reasonably select the model structure and parameters to ensure that the data can be effectively mapped to the embedding space and the key features can be retained.
[0056] In order to characterize the temporal dependencies between different embedding vectors and help the model better understand and represent the correlation between data, the temporal dependencies between each embedding vector and other embedding vectors can be captured through a temporal convolutional network, and the dot product results between the query vector and the key vector in the encoding vector set are calculated. Optionally, for each embedding vector, the temporal dependencies between the embedding vector and other embedding vectors are captured based on the temporal convolutional network to obtain the dependency vector, including: obtaining the encoding vector set corresponding to each embedding vector through linear transformation calculation, wherein the encoding vector set contains at least: a query vector, a key vector and a value vector; for each embedding vector, the dot product results between the query vector corresponding to the embedding vector and the key vectors corresponding to the other embedding vectors are calculated to obtain all dependency vectors corresponding to the embedding vector, wherein the dot product results are used to characterize the temporal dependencies.
[0057] It should be noted that the query vector, key vector and value vector obtained by the above-mentioned linear transformation step of calculating the encoding vector set are used for the subsequent calculation of temporal dependencies, where the selection and parameter setting of the linear transformation need to ensure that the encoding vector set can accurately capture the important features of the data.
[0058] In addition, when calculating the dot product result to obtain the dependency vector, the dot product calculation needs to consider the dimensional consistency between the vectors to ensure that the temporal dependency can be calculated correctly. When calculating the dependency vector, attention needs to be paid to the weight distribution and normalization processing to ensure that the dot product result can correctly represent the relationship between different vectors. The structure and parameter settings of the temporal convolutional network also need to be reasonably selected and adjusted to achieve better temporal dependency capture effect.
[0059] In order to effectively perform weighted calculation on the embedding vector according to the importance of the dependency vector and obtain a more accurate and efficient load feature vector representation, optionally, weights are assigned to all embedding vectors arranged in a temporal relationship based on the self-attention mechanism and all dependency vectors, and the load feature vector corresponding to the embedding vector is calculated based on the assigned weight vector, including: normalizing all dependency vectors corresponding to each embedding vector to obtain a weight vector; and performing weighted calculation on the value vectors corresponding to all embedding vectors based on the temporal relationship and all weight vectors to obtain a load feature vector corresponding to each embedding vector.
[0060] In the dependency vector normalization step, the embodiment of the present invention normalizes all dependency vectors corresponding to each embedded vector to obtain a weight vector for weight distribution. The normalization process needs to maintain the relative importance of the vectors to ensure the accuracy and consistency of the weight distribution.
[0061] Another thing that needs to be explained is that in the weighted calculation of the load characteristic vector, the contribution of the weight vector needs to be considered when performing weighted calculation to ensure that important information can be effectively captured; the weight allocation process in the self-attention mechanism needs to ensure that the model can pay attention to the key dependency vectors and perform effective weighted calculations on the embedding vectors; for the calculation of weight vectors and load characteristic vectors, numerical stability and computational efficiency need to be considered, and appropriate methods and algorithms need to be selected for calculation.
[0062] Optionally, clustering all load characteristic vectors in the load characteristic matrix in the clustering space to obtain K classification clusters includes: obtaining K initial classification clusters in the clustering space, and determining the initial cluster centroid of each initial classification cluster; obtaining the load characteristic vectors in the load characteristic matrix one by one according to the time series relationship, and calculating the spatial distance between the load characteristic vector and all initial cluster centroids; determining the initial cluster centroid closest to the load characteristic vector space, assigning the load characteristic vector to the initial classification cluster to which the initial cluster centroid belongs, and updating the cluster centroid of the initial classification cluster; until all the load characteristic vectors in the load characteristic matrix are assigned, K classification clusters are obtained.
[0063] It should be noted that the steps of obtaining the initial classification clusters and the initial cluster centroids need to take into account the distribution of the data and the sensitivity of the clustering algorithm; in the process of calculating the spatial distance and assigning the feature vectors, it is necessary to select a suitable distance measurement method, such as Euclidean distance or cosine similarity, to ensure that the similarity between features is accurately captured.
[0064] In addition, when updating the cluster centroid, the position of the cluster centroid needs to be recalculated according to the assigned eigenvectors to ensure that the cluster centroid can better represent the characteristics within the cluster. In subsequent iterations, until all eigenvectors are assigned, it is necessary to select an appropriate stopping criterion, such as the cluster centroid no longer changes or the maximum number of iterations is reached, to end the iterative process and ensure the convergence and efficiency of the algorithm.
[0065] In an embodiment of the present invention, K classification clusters are obtained by clustering the load characteristic vector in the cluster space. The above process calculates the spatial distance between the load characteristic vector and the initial cluster centroid, and assigns the characteristic vector to the corresponding initial classification cluster according to the shortest distance, continuously updates the cluster centroid, and finally realizes the classification of the load characteristic vector into K different categories.
[0066] The present invention is described below in conjunction with another optional embodiment.
[0067] Example 2
[0068] The bus load classification device provided in this embodiment includes multiple implementation units, each implementation unit corresponding to each implementation step in the above-mentioned embodiment 1.
[0069] Figure 2 is a schematic diagram of an optional bus load classification device in a power system according to an embodiment of the present invention, such as Figure 2 As shown, the device may include: an acquisition unit 21 and an output unit 22.
[0070] The acquisition unit 21 is configured to acquire N bus load data of the target power system within a specified time period, wherein the N bus load data are arranged in a time series relationship, and N is a positive integer.
[0071] The output unit 22 is used to input the bus load data into the target classification model according to the time series relationship and output the classification results, wherein the classification results record N bus load data belonging to K classification clusters, each classification cluster represents a load category, K is a positive integer less than N, and the target classification model is used to perform dimensionality reduction processing, feature extraction, weight allocation and clustering processing on N input data with a time series relationship based on deep learning strategy, time series convolutional network and self-attention mechanism to obtain classification results.
[0072] The bus load classification device in the above-mentioned power system can first obtain N bus load data of the target power system within a specified time period through the acquisition unit 21, wherein the N bus load data are arranged in a time series relationship, N is a positive integer, and then the bus load data are input into the target classification model according to the time series relationship through the output unit 22, and the classification result is output, wherein the classification result records the N bus load data belonging to K classification clusters, each classification cluster represents a load category, K is a positive integer less than N, and the target classification model is used to perform dimensionality reduction processing, feature extraction, weight allocation and clustering processing on N input data with a time series relationship based on deep learning strategies, temporal convolutional networks and self-attention mechanisms to obtain classification results.
[0073] In an embodiment of the present invention, a deep learning strategy is used to process time series data, automatically capture the intrinsic characteristics of bus load fluctuations from the time series data and achieve a dimensionality reduction effect. By introducing a time series convolutional network, local features and long-term dependencies in the time series data are captured, time series features are extracted, and the extracted features are weighted through a self-attention mechanism to further improve the effectiveness and discrimination of the features. After dimensionality reduction and feature extraction, the data dimension and noise of the features have been greatly reduced. When the processed features are clustered, the computational complexity of the clustering algorithm will also be greatly reduced, making the clustering results more accurate and representative, thereby solving the technical problem in related technologies that the computational complexity of the data clustering algorithm is high, it is difficult to ensure the effectiveness of the clustering features, and thus it is difficult to ensure the accuracy of classification.
[0074] Optionally, the output unit includes: a dimensionality reduction module, which is used to perform dimensionality reduction processing on the bus load data based on a deep learning strategy to obtain an embedding vector corresponding to the bus load data, wherein all vector dimensions of the embedding vector are key feature dimensions that affect the load fluctuation of the target power system identified by the target classification model; a capture module, which is used to capture the temporal dependency between each embedding vector and other embedding vectors based on a temporal convolutional network to obtain a dependency vector; and a calculation module, which is used to assign weights to all embedding vectors arranged in a temporal relationship based on a self-attention mechanism and all dependency vectors, and calculate the load feature vector corresponding to the embedding vector based on the assigned weight vector.
[0075] Optionally, the output unit also includes: a splicing module, which is used to splice the load feature vectors corresponding to all embedded vectors according to the time series relationship to obtain the load feature matrix of the target power system within a specified time period; a clustering module, which is used to map the load feature matrix to a clustering space based on a specified clustering algorithm, and cluster all load feature vectors in the load feature matrix in the clustering space to obtain K classification clusters.
[0076] Optionally, the dimensionality reduction module includes: a feature recognition submodule, which is used to perform data cleaning and data preprocessing on each bus load data, and perform feature recognition on the preprocessed bus load data to obtain R load features, where R is a positive integer; an establishment submodule, which is used to determine S key features among the identified R load features, and establish an S-dimensional space based on the S key features, where S is a positive integer less than R; a mapping submodule, which is used to use the S-dimensional space as an embedding space, and map the bus load data one by one to the embedding space based on the nonlinear mapping capability of the deep learning strategy to obtain an embedding vector.
[0077] Optionally, the capture module includes: a first calculation submodule, used to obtain a set of encoding vectors corresponding to each embedding vector through linear transformation calculation, wherein the encoding vector set includes at least: a query vector, a key vector and a value vector; a second calculation submodule, used to calculate the dot product result between the query vector corresponding to the embedding vector and the key vectors corresponding to other embedding vectors for each embedding vector, to obtain all dependency vectors corresponding to the embedding vector, wherein the dot product result is used to characterize the temporal dependency relationship.
[0078] Optionally, the calculation module includes: a normalization processing submodule, which is used to normalize all dependency vectors corresponding to each embedded vector to obtain a weight vector; and a weighted calculation submodule, which is used to perform weighted calculation on the value vectors corresponding to all embedded vectors based on the time series relationship and all weight vectors to obtain a load feature vector corresponding to each embedded vector.
[0079] Optionally, the clustering module includes: an acquisition submodule, used to obtain K initial classification clusters in the clustering space and determine the initial cluster centroid of each initial classification cluster; a third calculation submodule, used to obtain the load characteristic vectors in the load characteristic matrix one by one according to the time series relationship, and calculate the spatial distance between the load characteristic vector and all initial cluster centroids; an update submodule, used to determine the initial cluster centroid closest to the load characteristic vector space, assign the load characteristic vector to the initial classification cluster to which the initial cluster centroid belongs, and update the cluster centroid of the initial classification cluster; a determination submodule, used to obtain K classification clusters until all the load characteristic vectors in the load characteristic matrix are assigned.
[0080] The above-mentioned bus load classification device in the power system may also include a processor and a memory. The above-mentioned acquisition unit 21, output unit 22, etc. are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.
[0081] The processor includes a kernel that retrieves the corresponding program unit from memory. One or more kernels can be configured, and kernel parameters are adjusted to obtain bus load data for the target power system within a specified time period. The bus load data is then input into the target classification model in a time-series relationship, and the classification results are output.
[0082] The above-mentioned memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0083] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program initialized with the following method steps: obtaining N bus load data of a target power system within a specified time period, wherein the N bus load data are arranged in a time series relationship, and N is a positive integer; inputting the bus load data into a target classification model according to the time series relationship, and outputting a classification result, wherein the classification result records the N bus load data belonging to K classification clusters, each classification cluster represents a load category, and K is a positive integer less than N. The target classification model is used to perform dimensionality reduction processing, feature extraction, weight allocation and clustering processing on N input data with a time series relationship based on a deep learning strategy, a time series convolutional network and a self-attention mechanism to obtain a classification result.
[0084] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is also provided, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the bus load classification method in the power system of any one of the above-mentioned embodiments.
[0085] According to another aspect of an embodiment of the present invention, an electronic device is also provided, including one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by one or more processors, the one or more processors implement the bus load classification method in the power system of any one of the above-mentioned embodiments.
[0086] Figure 3 FIG. 1 is a hardware structure block diagram of an electronic device (or mobile device) for a method for classifying busbar loads in a power system according to an embodiment of the present invention. Figure 3 As shown, the electronic device may include one or more ( Figure 3 (As shown in the figure, 302a, 302b, ..., 302n are used) processor 302 (processor 302 may include but is not limited to a microprocessor MCU or a programmable logic device FPGA and other processing devices), memory 304 for storing data. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a keyboard, a power supply and / or a camera. It will be understood by those skilled in the art that Figure 3 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 3 More or fewer components than shown, or with Figure 3 Different configurations shown.
[0087] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.
[0088] In the above embodiments of the present invention, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0089] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of the units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0090] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0091] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0092] If the integrated unit 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, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk, etc. Various media that can store program codes.
[0093] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.
Claims
1. A method for classifying busbar loads in a power system, characterized in that: include: Acquire N bus load data of the target power system within a specified time period, wherein the N bus load data are arranged in a time series relationship, and N is a positive integer; The bus load data is input into the target classification model according to the time series relationship, and a classification result is output, wherein the classification result records the N bus load data belonging to K classification clusters, each of the classification clusters represents a load category, K is a positive integer less than N, and the target classification model is used to perform dimensionality reduction, feature extraction, weight allocation and clustering processing on the N input data with the time series relationship based on a deep learning strategy, a time series convolutional network and a self-attention mechanism to obtain the classification result.
2. The classification method according to claim 1, characterized in that: The target classification model is used to perform the following steps: Performing dimensionality reduction processing on the bus load data based on the deep learning strategy to obtain an embedding vector corresponding to the bus load data, wherein all vector dimensions of the embedding vector are key feature dimensions that affect load fluctuations of the target power system identified by the target classification model; For each of the embedding vectors, capturing the temporal dependency between the embedding vector and other embedding vectors based on the temporal convolutional network to obtain a dependency vector; Based on the self-attention mechanism and all the dependency vectors, weights are assigned to all the embedding vectors arranged according to the temporal relationship, and based on the assigned weight vectors, a load feature vector corresponding to the embedding vector is calculated.
3. The classification method according to claim 2, characterized in that: The target classification model is also used to perform the following steps: Concatenate the load characteristic vectors corresponding to all the embedded vectors according to the time sequence relationship to obtain a load characteristic matrix of the target power system within the specified time period; The load characteristic matrix is mapped to a clustering space based on a specified clustering algorithm, and all the load characteristic vectors in the load characteristic matrix are clustered in the clustering space to obtain K classification clusters.
4. The classification method according to claim 2, characterized in that: The step of performing dimensionality reduction processing on the bus load data based on the deep learning strategy to obtain an embedding vector corresponding to the bus load data includes: Performing data cleaning and data preprocessing on each of the bus load data, and performing feature recognition on the preprocessed bus load data to obtain R load features, where R is a positive integer; Determine S key features from the identified R load features, and establish an S-dimensional space based on the S key features, where S is a positive integer less than R; The S-dimensional space is used as an embedding space, and based on the nonlinear mapping capability of the deep learning strategy, the bus load data are mapped to the embedding space one by one to obtain the embedding vector.
5. The classification method according to claim 2, characterized in that: For each of the embedding vectors, the step of capturing the temporal dependency between the embedding vector and other embedding vectors based on the temporal convolutional network to obtain a dependency vector includes: Obtaining a set of encoding vectors corresponding to each of the embedding vectors by linear transformation calculation, wherein the set of encoding vectors at least includes: a query vector, a key vector, and a value vector; For each of the embedding vectors, a dot product result is calculated between the query vector corresponding to the embedding vector and the key vectors corresponding to other embedding vectors to obtain all the dependency vectors corresponding to the embedding vector, wherein the dot product result is used to characterize the temporal dependency relationship.
6. The classification method according to claim 5, characterized in that: The step of weighting all the embedding vectors arranged according to the temporal relationship based on the self-attention mechanism and all the dependency vectors, and calculating the load feature vector corresponding to the embedding vector based on the weight vectors assigned, comprises: Normalizing all the dependency vectors corresponding to each of the embedding vectors to obtain the weight vector; Based on the time series relationship and all the weight vectors, weighted calculation is performed on the value vectors corresponding to all the embedded vectors to obtain the load characteristic vector corresponding to each embedded vector.
7. The classification method according to claim 3, characterized in that: The step of clustering all the load characteristic vectors in the load characteristic matrix in the clustering space to obtain K classification clusters includes: Obtain K initial classification clusters in the clustering space, and determine the initial cluster centroid of each of the initial classification clusters; Acquire the load characteristic vectors in the load characteristic matrix one by one according to the time sequence relationship, and calculate the spatial distances between the load characteristic vectors and all the initial cluster centroids; Determine the initial cluster centroid that is closest to the load characteristic vector space, assign the load characteristic vector to the initial classification cluster to which the initial cluster centroid belongs, and update the cluster centroid of the initial classification cluster; When all the load characteristic vectors in the load characteristic matrix are allocated, K classification clusters are obtained.
8. A bus load classification device in a power system, characterized in that: include: An acquisition unit, used for acquiring N bus load data of a target power system within a specified time period, wherein the N bus load data are arranged in a time series relationship, and N is a positive integer; An output unit is used to input the bus load data into a target classification model according to the time series relationship, and output a classification result, wherein the classification result records the N bus load data belonging to K classification clusters, each of the classification clusters represents a load category, K is a positive integer less than N, and the target classification model is used to perform dimensionality reduction, feature extraction, weight allocation and clustering processing on the N input data with the time series relationship based on a deep learning strategy, a time series convolutional network and a self-attention mechanism to obtain the classification result.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the method for classifying bus loads in a power system according to any one of claims 1 to 7.
10. An electronic device, characterized in that: It includes one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method for classifying bus loads in an electric power system as described in any one of claims 1 to 7.
Citation Information
Cited By
Image data processing method for neomycin spectrogram based on deep learning model
CN120451687A
