Load feature extraction method suitable for cross-industry and related equipment
Patent Information
- Application Number
- CN202610907179.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-23
- Publication Date
- 2026-09-11
AI Technical Summary
然而,新能源发电出力易受气象条件制约,具有强波动特性;与此同时,各行业用电负荷需求存在显著分化,由此催生了跨行业负荷协同调控、源网荷储一体化联合运行的现实业务需求
[0055]从上述的技术方案可以看出,本申请提供的适用于跨行业的负荷特征提取方法,该适用于跨行业的负荷特征提取方法可以通过一阶差分运算及局部特征提取,构建多维输入张量;可对负荷功率时序数据做相邻时刻差值计算,挖掘单段时序内均值、方差、峰值、波动幅度等统计特征,消除负荷基线偏移、趋势分量,放大短时功率波动;多维张量融合时序时域信息与人工局部统计特征,丰富输入特征维度,避免单一时序特征信息;通过非重叠补丁分段降低长时序运算开销,结合LSEAttention层挖掘跨补丁全局时序依赖,同时兼顾短时局部规律与长周期负荷联动关系,令时序特征表征完整性更强;利用边界评分前馈网络自适应分配时序补丁边界权重,有效抑制序列分段操作造成的边界信息割裂、突变特征失真缺陷,提升分段时序融合精度;依托重构损失约束特征还原原始负荷细节,保障时序表征真实性;借助对比损失强化同行业负荷表征聚合、异行业负荷表征分离特性;双损失协同优化全部网络层参数,令最终输出的表征向量矩阵既完整保留负荷时序变化规律,又具备特定行业的变化规律,便于区分不同行业的表征向量矩阵,提升工业负荷辨识、分类、聚类任务精度。可见,本申请可以通过差分预处理与卷积提取负荷局部波动特征,结合注意力机制建模全局时序依赖,并自适应修正时序分段边界偏差;依托重构损失保证时序信息完整还原、对比损失强化行业负荷区分度,输出兼具时序变化细节与行业区分特性的高质量负荷表征向量。
Smart Images

Figure CN122734480A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of power grid technology, and more specifically, to a method and related equipment for extracting load characteristics across industries. Background Technology
[0002] In recent years, the installed capacity of new energy sources has continued to expand and has achieved large-scale grid connection and consumption. However, the power output of new energy generation is easily constrained by meteorological conditions and has strong fluctuation characteristics. At the same time, there is a significant differentiation in the electricity load demand of various industries, which has given rise to the practical business demand for cross-industry load coordination and control, and integrated operation of power generation, grid, load and storage.
[0003] The core prerequisite for conducting cross-industry load coordination and regulation is to clarify the differentiated electricity demands of various industries. The electricity loads of diverse entities, including the power supply side, steel, chemical, commercial, and residential sectors, exhibit strong heterogeneity, with significant differences in power scale, short-term fluctuation rhythms, and long-term operating patterns. Against this backdrop, effectively extracting the load characteristics of different industries has become a key focus in this field. Summary of the Invention
[0004] In view of this, this application provides a method and related equipment for extracting load characteristics across industries, which can be used to extract load characteristics of different industries.
[0005] To achieve the above objectives, the following solution is proposed:
[0006] A method for extracting load characteristics applicable across industries includes:
[0007] Obtain load power time-series data;
[0008] The load power time series data are subjected to first-order difference operation and local feature extraction to construct a multidimensional input tensor;
[0009] The multidimensional input tensor is divided into multiple non-overlapping temporal patches;
[0010] The local fluctuation features of each temporal patch are extracted by convolutional layers to obtain the patch feature matrix;
[0011] By combining the global temporal attention LSEattention layer, the patch feature matrix is processed to identify the global temporal dependencies between each temporal patch and generate the hidden layer features corresponding to each temporal patch.
[0012] Each hidden layer feature is input into the boundary scoring feedforward network, the boundary weight corresponding to each time series patch is calculated, and each boundary weight is fused with the corresponding hidden layer feature to generate the representation vector matrix of the load power time series data.
[0013] The parameters of the convolutional layer, the LSE Attention layer, and the boundary scoring feedforward network are obtained by co-training the contrast loss and reconstruction loss of different training samples. Each contrast loss is used to quantify the difference between the corresponding training sample and the load representation of the same industry and the load representation of other industries, and each reconstruction loss is used to quantify the difference between the corresponding training sample and its original load features.
[0014] Optionally, after fusing each boundary weight with the corresponding hidden layer feature to generate the representation vector matrix of the load power time series data, the method further includes:
[0015] Determine the industry identifier, period identifier, time period identifier, and region identifier of the load power time series data;
[0016] The representation vector matrix is stored in the load feature database along with the corresponding industry identifier, period identifier, time period identifier, and region identifier.
[0017] Optionally, the step of performing first-order difference operations and local feature extraction on the load power time-series data to construct a multidimensional input tensor includes:
[0018] Perform a first-order difference operation on the load power time-series data to generate a difference sequence;
[0019] A sliding window is set on the difference sequence, and the mean and standard deviation of the power change rate within each window are calculated to generate a local fluctuation feature matrix.
[0020] The load power time series data, the difference sequence, and the local fluctuation feature matrix are concatenated to form a multidimensional input tensor.
[0021] Optionally, the step of extracting local fluctuation features of each temporal patch through convolutional layers to obtain a patch feature matrix includes:
[0022] Using the convolutional layer, the fluctuation features, periodic features, and peak-valley features of each time-series patch are extracted to generate a feature vector corresponding to each time-series patch. The feature vectors are combined to form a patch feature matrix.
[0023] Optionally, the step of combining the global temporal attention LSEattention layer to process the patch feature matrix, identifying the global temporal dependencies between each temporal patch, and generating hidden layer features corresponding to each temporal patch includes:
[0024] The patch feature matrix is linearized to generate a query matrix, a key matrix, and a value matrix. The query matrix is used to characterize the retrieval features of each time series patch, the key matrix is used to provide a similarity matching index between each time series patch, and the value matrix is used to store the feature information corresponding to each time series patch.
[0025] The query matrix, key matrix, and value matrix are input into the LSE Attention layer to obtain the hidden layer feature matrix output by the LSE Attention layer. Each vector in the hidden layer feature matrix is the hidden layer feature of the corresponding temporal patch.
[0026] The core calculation formula for the LSE Attention layer is:
[0027] ;
[0028] In the formula, Q is the query matrix; K is the key matrix; V is the value matrix; M is the number of time-series patches; and d is the feature dimension. To query the inner product of the key matrix and the query matrix; It is an exponential function; To prevent a zero coefficient; Logarithmic operations; For smoothness coefficient; This is the normalization function.
[0029] Optionally, the training process for the convolutional layers, LSE Attention layers, and boundary scoring feedforward network includes:
[0030] The hidden layer features are extracted for each training load sequence in the training set using the initial convolutional layer and the initial LSE Attention layer, generating the hidden layer training matrix corresponding to each training load sequence.
[0031] Using the initial boundary score feedforward network, boundary weights are calculated and features are fused on each hidden layer training matrix to generate training samples corresponding to each load training sequence.
[0032] Identify all target industries corresponding to each training sample;
[0033] Obtain a representation vector example for each target industry;
[0034] For all training samples under each target industry, calculate the first similarity between each training sample and the target industry representation vector sample, and calculate the second similarity between each training sample and each of the remaining target industry representation vector samples;
[0035] Based on the first similarity and the second similarity of the same training sample, the contrast loss of the corresponding training sample is calculated.
[0036] Each hidden layer training matrix is decomposed to generate the preceding hidden layer features and the following hidden layer features.
[0037] A temporal predictive decoder is used to perform temporal prediction based on each preceding hidden layer feature to generate reconstructed features;
[0038] Based on the reconstructed features of each training sample and its corresponding subsequent hidden layer features, the reconstruction loss of the corresponding training sample is calculated.
[0039] The total loss is calculated based on the contrastive loss and reconstruction loss for each training sample.
[0040] Based on the total loss, the parameters of the initial convolutional layer, the initial LSE Attention layer, the initial boundary scoring feedforward network, and the temporal prediction decoder are updated using the backpropagation algorithm. The process then returns to the previous step of using the initial convolutional layer and the initial LSE Attention layer to extract hidden layer features for each training sequence in the training set and generate the hidden layer training matrix corresponding to each training sequence, until the total loss converges.
[0041] Optionally, calculating the contrastive loss of the corresponding training sample based on the first similarity and the second similarity of the same training sample includes:
[0042] Substitute the first similarity and the second similarity of the same training sample into the preset contrast loss calculation function to generate the contrast loss of the corresponding training sample;
[0043] The contrastive loss calculation function is shown below:
[0044] ;
[0045] In the formula, N is the number of training sequences in the training set; sim(H, H + ) represents the first similarity; sim(H, H) j The second similarity between the corresponding training sample and the j-th other target industry representation vector example is represented by ( ). To compare the losses.
[0046] A load characteristic extraction device applicable across industries, comprising:
[0047] The acquisition module is used to acquire load power time-series data;
[0048] The construction module is used to perform first-order difference operations and local feature extraction on the load power time series data to construct a multidimensional input tensor;
[0049] The segmentation module is used to segment the multidimensional input tensor into multiple non-overlapping temporal patches;
[0050] An extraction module is used to extract local fluctuation features of each time-series patch through convolutional layers to obtain a patch feature matrix. Combined with a global temporal attention layer (LSEAttention), the patch feature matrix is processed to identify global temporal dependencies between each time-series patch, generating hidden layer features corresponding to each time-series patch. Each hidden layer feature is input into a boundary scoring feedforward network to calculate the boundary weights corresponding to each time-series patch, and each boundary weight is fused with its corresponding hidden layer feature to generate a representation vector matrix of the load power time-series data. The parameters of the convolutional layers, the LSEattention layer, and the boundary scoring feedforward network are obtained through collaborative training using contrastive and reconstruction losses on different training samples. Each contrastive loss quantifies the difference between the corresponding training sample and the load representations of the same industry and other industries, while each reconstruction loss quantifies the difference between the corresponding training sample and its original load features.
[0051] A load feature extraction device applicable across industries, comprising a memory and a processor;
[0052] The memory is used to store programs;
[0053] The processor is used to execute the program to implement the various steps of the above-described load feature extraction method applicable to cross-industry applications.
[0054] A readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the various steps of the above-described load feature extraction method applicable across industries.
[0055] As can be seen from the above technical solutions, the load feature extraction method applicable to cross-industry applications provided in this application can construct a multi-dimensional input tensor through first-order difference operations and local feature extraction; it can calculate the difference between adjacent time periods of load power time series data, mine statistical features such as mean, variance, peak value, and fluctuation amplitude within a single time series, eliminate load baseline offset and trend components, and amplify short-term power fluctuations; the multi-dimensional tensor integrates time series temporal domain information with manually generated local statistical features, enriching the dimensions of input features and avoiding single time series feature information; it reduces the computational overhead of long time series by segmenting through non-overlapping patches, and combines the LSE Attention layer to mine global time series dependencies across patches, while also taking into account short-term... The application identifies the correlation between local load patterns and long-term load cycles, resulting in a more complete temporal feature representation. It utilizes a boundary scoring feedforward network to adaptively allocate boundary weights for temporal patches, effectively suppressing the defects of boundary information fragmentation and abrupt feature distortion caused by sequence segmentation operations, thus improving the accuracy of segmented temporal fusion. Reconstruction loss constrains features to restore original load details, ensuring the authenticity of the temporal representation. Contrast loss enhances the aggregation of load representations within the same industry and the separation of load representations across different industries. Dual losses collaboratively optimize all network layer parameters, ensuring that the final output representation vector matrix not only fully preserves the temporal variation patterns of load but also possesses the variation patterns specific to each industry, facilitating the differentiation of representation vector matrices across different industries and improving the accuracy of industrial load identification, classification, and clustering tasks. Therefore, this application can extract local load fluctuation features through differential preprocessing and convolution, model global temporal dependencies using an attention mechanism, and adaptively correct temporal segmentation boundary deviations. Reconstruction loss ensures complete restoration of temporal information, while contrast loss enhances industry load differentiation, outputting a high-quality load representation vector that combines temporal variation details with industry-specific distinguishing characteristics. Attached Figure Description
[0056] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0057] Figure 1 This is a flowchart of a load feature extraction method applicable to cross-industry applications disclosed in an embodiment of this application;
[0058] Figure 2 This is a structural block diagram of a load feature extraction device applicable to cross-industry applications disclosed in an embodiment of this application;
[0059] Figure 3 This is a hardware structure block diagram of a load feature extraction device applicable to cross-industry applications, as disclosed in an embodiment of this application. Detailed Implementation
[0060] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0061] This application provides a load feature extraction method applicable to cross-industry applications. This method can be applied to various new energy grid-connected systems or power grid dispatching systems, as well as to various computer terminals or smart terminals. The executing entity can be the processor or server of the computer terminal or smart terminal.
[0062] Next, combine Figure 1 This application provides a detailed description of the load feature extraction method applicable to cross-industry applications, including the following steps:
[0063] Step S1: Obtain load power timing data.
[0064] Specifically, it can be connected to the load monitoring terminal of any industry to extract the raw active power time-series data of that industry.
[0065] This industry can include electricity-consuming sectors such as steel, chemicals, commerce, and residential sectors.
[0066] The original active power time-series data is recorded as follows:
[0067] ;
[0068] in, Let be the active power value at time step t. The total length of the time-series data ensures that the data covers typical energy consumption scenarios in various industries.
[0069] The raw data is prone to missing points and outliers, which can affect the accuracy of subsequent processing. Therefore, the missing points of the raw active power time series data are filled first, then the outliers are removed, and finally the normalization process is performed to obtain the load power time series data.
[0070] The KNN interpolation algorithm can be used to fill in missing points in a sequence.
[0071] The specific steps are as follows: First, determine the k nearest neighbor valid data points around the missing point. Calculate the Euclidean distance between the missing point and the k nearest neighbors, assign inverse distance weights to the k neighbors, and use a weighted average method to calculate the imputation value for the missing point. Then, construct a KNN interpolation imputation model to accurately calculate the imputation value for the missing point. The specific formula is as follows:
[0072] ;
[0073] in, Fill in the missing values. Let be the power value of the i-th nearest neighbor valid data point. Let Euclidean distance be the distance between the missing point and its i-th nearest neighbor. This represents the number of nearest neighbors, which can be adaptively adjusted based on data density.
[0074] Simultaneously, the interquartile range method is applied to remove outliers exceeding 1.5 times the IQR. To address the outlier removal requirement, an interquartile range-based outlier removal model is constructed, with the core calculation formula as follows:
[0075] ;
[0076] Based on the above interquartile range calculation results, the outlier judgment condition is determined as follows: when or At that time, the judgment Outliers were identified and removed; among them The first quartile of the data. This represents the third quartile of the data.
[0077] Because the dimensions of load data differ across industries, it can interfere with the comparison and representation of cross-industry loads. Therefore, a Z-Score normalization model can be constructed to uniformly transform industry data to zero mean and unit variance, eliminating the dimensional differences between different industries. The core calculation formula of this model is as follows:
[0078] ;
[0079] in, This is the normalized active power value. The mean of the original active power time series data. is the standard deviation of the original active power time series data, and This ensures that the normalization operation is effective and feasible.
[0080] Step S2: Perform first-order difference operation and local feature extraction on the load power time series data to construct a multidimensional input tensor.
[0081] Specifically, a first-order difference operation can be performed on the load power time series data to eliminate the overall load change trend and baseline offset, and amplify the short-term power fluctuation differences in different time periods. Then, six types of manually statistical features are extracted within a single window, including power mean, variance, peak value, valley value, fluctuation amplitude, and fluctuation frequency. A multi-dimensional input tensor with the dimension of time series length × number of features is constructed, which integrates the original time domain information and manually mined local statistical features to enrich the dimensions of the input feature information.
[0082] Step S3: Divide the multidimensional input tensor into multiple non-overlapping temporal patches.
[0083] Specifically, the multidimensional input tensor can be segmented along the time dimension according to a preset fixed length. No overlapping regions are set during the segmentation process, resulting in multiple non-overlapping time series patches of consistent length. This reduces the space overhead and time complexity of the overall long time series computation, improving model computation efficiency. The preset fixed length can be adaptively adjusted according to the total length of the load power time series data, ensuring that all time series patches can completely cover the original time series interval.
[0084] Step S4: Extract the local fluctuation features of each time-series patch through convolutional layers to obtain the patch feature matrix.
[0085] Specifically, a sliding convolution operation can be performed on each time-series patch using a one-dimensional convolution kernel of a preset size to extract the local fluctuation correlation features of adjacent time steps within the patch. Each time-series patch is then converted into a local feature vector of a preset channel dimension. The local feature vectors of all time-series patches are concatenated to obtain a patch feature matrix with a dimension of patch number × channel dimension.
[0086] It can perform visual analysis of convolution kernels, adapting to convolution kernels for long stationary sequences, with extremely high activation values for smooth long-period waveforms and weak response to short-term spikes; it adapts to convolution kernels for peaks and valleys, with significant activation for waveforms with abrupt changes in the morning and evening; the activation preference of convolution kernels directly corresponds to the inherent variation law of industry load, and the waveform shape corresponding to the activation peak is the industry-specific pattern captured by convolution.
[0087] Convolution has a built-in sliding window temporal capture capability, which can extract daily, weekly, and start-stop pulse features; the cycle scales of different industries vary greatly, and the cycle length, fluctuation amplitude, and start-stop time can provide secondary evidence for the pattern attribution.
[0088] Step S5: Combine the global temporal attention LSEattention layer to process the patch feature matrix, identify the global temporal dependencies between each temporal patch, and generate the hidden layer features corresponding to each temporal patch.
[0089] Specifically, the patch feature matrices can be mapped to obtain the query matrix Q, key matrix K, and value matrix V, respectively. Similarity scores between Q and K are calculated based on scaled dot products, and then normalized using the Softmax function to obtain the attention weight matrix. The attention weight matrix is multiplied by the value matrix V to obtain the global attention output. Finally, the hidden layer features corresponding to each temporal patch are obtained through residual connections and layer normalization. The LSE Attention layer used in this application can precisely optimize the exponent calculation in logarithmic space, reducing memory usage for long sequences while ensuring attention calculation accuracy, thus adapting to the processing requirements of long temporal load data.
[0090] Step S6: Input each hidden layer feature into the boundary scoring feedforward network, calculate the boundary weight corresponding to each time series patch, and fuse each boundary weight with the corresponding hidden layer feature to generate the representation vector matrix of the load power time series data.
[0091] Specifically, the parameters of the convolutional layer, the LSE Attention layer, and the boundary scoring feedforward network are obtained through collaborative training of contrast loss and reconstruction loss for different training samples. Each contrast loss is used to quantify the difference between the corresponding training sample and the load representation of the same industry and the load representation of other industries, and each reconstruction loss is used to quantify the difference between the corresponding training sample and its original load features.
[0092] The representation vector matrix can be directly used for subsequent tasks such as cross-industry load identification, classification, and clustering, helping relevant business systems quickly distinguish the electricity consumption characteristics of different industries and providing reliable feature support for cross-industry load collaborative regulation and integrated operation of power generation, grid, load, and storage. During model training, the contrastive loss guides the continuous aggregation of representation vectors of loads within the same industry while simultaneously promoting the separation of representation vectors of loads from different industries, resulting in a final representation that naturally possesses industry-specific distinguishability. Meanwhile, the reconstruction loss constrains the representation vectors to retain key temporal details of the original load, preventing the loss of important fluctuation information during feature extraction. The two losses work together to ensure the quality of the output representation vectors.
[0093] The core formula for calculating the boundary weights of the boundary scoring feedforward network output is as follows:
[0094] ;
[0095] Where F is, This is the network weight matrix. For bias terms, Use the Sgmoid activation function to ensure boundary weights .
[0096] The feedforward network FFN-Bound independently outputs boundary score weights, adding independent gain coefficients to boundary position patches. This achieves the fusion of global attention weights and boundary-specific correction weights, forcibly amplifying the feature contribution of boundary inflection points and offsetting the suppression effect of intermediate stationary sequences. The fused boundary weights are the result of element-wise multiplication of the original attention weights of the LSEAttention layer and the boundary score output by the feedforward network.
[0097] Normalization can ensure that the vector magnitudes of the representation vector matrix are uniform, and output a standardized vector with fixed dimensions.
[0098] As can be seen from the above technical solutions, the load feature extraction method applicable to cross-industry applications provided in this application can construct a multi-dimensional input tensor through first-order difference operations and local feature extraction; it can calculate the difference between adjacent time periods of load power time series data, mine statistical features such as mean, variance, peak value, and fluctuation amplitude within a single time series, eliminate load baseline offset and trend components, and amplify short-term power fluctuations; the multi-dimensional tensor integrates time series temporal domain information with manually generated local statistical features, enriching the dimensions of input features and avoiding single time series feature information; it reduces the computational overhead of long time series by segmenting through non-overlapping patches, and combines the LSE Attention layer to mine global time series dependencies across patches, while also taking into account short-term... The application identifies the correlation between local load patterns and long-term load cycles, resulting in a more complete temporal feature representation. It utilizes a boundary scoring feedforward network to adaptively allocate boundary weights for temporal patches, effectively suppressing the defects of boundary information fragmentation and abrupt feature distortion caused by sequence segmentation operations, thus improving the accuracy of segmented temporal fusion. Reconstruction loss constrains features to restore original load details, ensuring the authenticity of the temporal representation. Contrast loss enhances the aggregation of load representations within the same industry and the separation of load representations across different industries. Dual losses collaboratively optimize all network layer parameters, ensuring that the final output representation vector matrix not only fully preserves the temporal variation patterns of load but also possesses the variation patterns specific to each industry, facilitating the differentiation of representation vector matrices across different industries and improving the accuracy of industrial load identification, classification, and clustering tasks. Therefore, this application can extract local load fluctuation features through differential preprocessing and convolution, model global temporal dependencies using an attention mechanism, and adaptively correct temporal segmentation boundary deviations. Reconstruction loss ensures complete restoration of temporal information, while contrast loss enhances industry load differentiation, outputting a high-quality load representation vector that combines temporal variation details with industry-specific distinguishing characteristics.
[0099] In some embodiments of this application, in order to enable subsequent power dispatching scenarios to directly perform power dispatching based on the representation vector matrices of different industries, without the need for real-time calculation of the representation vector matrices and subsequent generation of dispatching strategies, thereby improving dispatching effectiveness and efficiency, this application attempts to store and summarize the generated representation vector matrices. Therefore, after generating the representation vector matrix in step S6, a storage procedure can be added. The storage procedure will be described in detail below, with the following steps:
[0100] S7. Determine the industry identifier, period identifier, time period identifier, and region identifier of the load power time sequence data.
[0101] Specifically, four types of identification information can be collected: the industry type to which the load power time series data corresponding to the characterization vector matrix belongs, the period type covered by the data such as spring and autumn, the statistical period such as one to two points, and the collection area. These four types of identification are used as metadata index items of the characterization vector matrix to facilitate quick retrieval and retrieval in the future.
[0102] S8. Store the representation vector matrix and the corresponding industry identifier, period identifier, time period identifier and region identifier into the load feature database.
[0103] Specifically, the representation vector matrix and the corresponding four types of identifiers can be stored in a preset load feature database according to the mapping relationship, and an index directory can be established. When subsequent business needs to call the load features of a specific industry, a specific period, a specific time period, or a specific region, the matching can be quickly retrieved directly through the index without repeating the feature extraction process, thereby reducing task response latency and improving business processing efficiency.
[0104] As can be seen from the above technical solution, this embodiment adds a new optional process for storing the representation vector matrix. Through the above process, load characteristic representations under different scenarios can be classified and archived, facilitating rapid retrieval and retrieval by subsequent business operations, avoiding resource waste caused by repeated calculations, and providing comprehensive data support for load characteristic analysis in different regions and periods, further improving the execution efficiency of related load analysis and control tasks.
[0105] In some embodiments of this application, the process of performing first-order difference operations and local feature extraction on the load power time series data to construct a multidimensional input tensor is described in detail, and the steps are as follows:
[0106] S20. Perform a first-order difference operation on the load power time-series data to generate a difference sequence.
[0107] Specifically, to capture dynamic changes, a first-order difference operation can be performed on the load power time-series data to calculate the change between adjacent time steps, thereby reflecting the dynamic trend of load changes. The core calculation formula of this model is as follows:
[0108] .
[0109] S21. Set a sliding window on the difference sequence, calculate the mean and standard deviation of the power change rate in each window, and generate a local fluctuation feature matrix.
[0110] Specifically, the first-order difference alone cannot reflect the local patterns of load dynamic changes. Therefore, a sliding window is superimposed on the difference sequence, with the window size set to k. The mean and standard deviation of the power change rate within a single window are statistically analyzed as local fluctuation features. This compensates for the deficiency of traditional static features in reflecting the dynamic patterns of load changes and further enriches the feature dimensions.
[0111] To accurately calculate the central tendency of load changes within a window, a local feature statistical model of a sliding window is constructed. This model is used to calculate the mean rate of change within the window, as shown in the following formula:
[0112] ;
[0113] To simultaneously reflect the dispersion of load changes within the window, this sliding window local characteristic statistical model calculates the standard deviation of the rate of change within the window concurrently, as shown in the following formula:
[0114] ;
[0115] S22. The load power time series data, the differential sequence, and the local fluctuation feature matrix are concatenated to form a multidimensional input tensor.
[0116] Specifically, in order to achieve the fusion of static and dynamic features and improve the comprehensiveness of feature representation, the load power time series data, the difference sequence, and the local fluctuation feature matrix can be spliced together to form a multidimensional input tensor.
[0117] This tensor contains both static load amplitude and dynamic fluctuation information, effectively solving the problem of insufficient representation capability of traditional single static features, and providing high-quality input for subsequent boundary attention representation models.
[0118] As can be seen from the above technical solution, this embodiment provides an optional method for constructing a multidimensional input tensor by performing first-order difference operations and local feature extraction on the load power time-series data. Through this method, the dynamic fluctuation characteristics of the load can be fully explored, supplementing the original static amplitude information with differential changes and local fluctuation features within a window, achieving multi-dimensional feature information fusion, effectively improving the representational capability of the input features, providing more sufficient information support for subsequent global time-series dependency mining and feature representation generation, and ensuring the information richness and industry-specific distinguishability of the final output representation vector.
[0119] In some embodiments of this application, the process of step S4, extracting the local fluctuation features of each temporal patch through a convolutional layer to obtain the patch feature matrix, is described in detail below:
[0120] S40. Using the convolutional layer, extract the fluctuation features, periodic features, and peak-valley features of each time-series patch, generate the feature vector corresponding to each time-series patch, and combine the feature vectors to form a patch feature matrix.
[0121] Specifically, one-dimensional convolutional kernels of different sizes can be used to extract the fluctuation features, periodic features, and peak-valley features of each time-series patch, thereby obtaining the feature vector corresponding to each time-series patch;
[0122] By concatenating different feature vectors in the order of their corresponding time-series patches, a patch feature matrix can be formed.
[0123] One-dimensional convolutional kernels of different sizes can be adapted to feature extraction at different scales: small-sized convolutional kernels are better at capturing fine-grained local features such as short-term sharp fluctuations and abrupt changes in peaks and valleys, while large-sized convolutional kernels are better at capturing long-term patterns at the daily and weekly levels. The combined output of multi-scale convolutional kernels can cover the variation patterns of different industry loads at different scales, avoid feature omissions caused by single-scale convolution, and fully explore the multi-dimensional local load characteristics within each time-series patch.
[0124] As can be seen from the above technical solution, this embodiment provides an optional method to extract the local fluctuation features of each temporal patch through convolutional layers to obtain the patch feature matrix. The above method can cover the feature extraction needs of different scales by combining multi-scale convolutional kernels, fully explore the local load change patterns of different granularities within the patch, avoid feature omissions caused by single-scale convolution, further improve the completeness of local feature extraction, and enable subsequent global temporal dependency modeling to obtain more sufficient local information support, thus ensuring the quality of the final load feature representation.
[0125] In some embodiments of this application, the process of step S5, which involves processing the patch feature matrix in conjunction with the global temporal attention LSEattention layer to identify the global temporal dependencies between each temporal patch and generating the hidden layer features corresponding to each temporal patch, is described in detail below:
[0126] S50. Perform a linear transformation on the patch feature matrix to generate a query matrix, a key matrix, and a value matrix.
[0127] Specifically, matrix multiplication can be performed using the learnable linear transformation parameters corresponding to the three preset paths (query, key, and value) and the patch feature matrix, mapping the patch feature matrix into three different linear subspaces. After this linear transformation, the input matrix is decomposed into a query matrix, a key matrix, and a value matrix of the same dimension. These are used for subsequent calculation of attention weights and for weighted aggregation of the value matrix based on the weights, respectively. The entire process preserves the linear relationship implied by the relative position information between patches, while providing a distinguishable feature representation for the attention mechanism.
[0128] The query matrix can be used to characterize the retrieval features of each time series patch, the key matrix can be used to provide a similarity matching index between each time series patch, and the value matrix can be used to store the feature information corresponding to each time series patch.
[0129] S51. Input the query matrix, key matrix and value matrix into the LSE Attention layer to obtain the hidden layer feature matrix output by the LSE Attention layer. Each vector in the hidden layer feature matrix is the hidden layer feature of the corresponding time patch.
[0130] Specifically, the core calculation formula for the LSE Attention layer is:
[0131] ;
[0132] In the formula, Q is the query matrix; K is the key matrix; V is the value matrix; M is the number of time-series patches; and d is the feature dimension. To query the inner product of the key matrix and the query matrix; It is an exponential function; The sum of the exponents of all key vectors; To prevent zero coefficients, used to prevent logarithmic operations from becoming meaningless; This is a logarithmic operation used to adjust the smoothness of attention distribution; For smoothness coefficient; The normalization function maps the attention weights to the [0,1] interval.
[0133] As can be seen from the above technical solution, this embodiment provides an optional method to combine a global temporal attention LSEattention layer to process the patch feature matrix, identify the global temporal dependencies between each temporal patch, and generate the hidden layer features corresponding to each temporal patch. Through this method, by optimizing the attention calculation logic, the stability of feature representation of long temporal load sequences is effectively improved, and the entropy collapse problem that easily occurs when traditional standard dot product attention processes long temporal sequences can be solved.
[0134] In some embodiments of this application, in order to improve the effectiveness of load feature extraction, the convolutional layer, LSE Attention layer, and boundary scoring feedforward network can be fine-tuned and trained periodically. The training process of the convolutional layer, LSE Attention layer, and boundary scoring feedforward network will be described in detail below:
[0135] S100. Using the initial convolutional layer and the initial LSE Attention layer, hidden layer features are extracted for each training sequence in the training set to generate the hidden layer training matrix corresponding to each training sequence.
[0136] Specifically, for each training load sequence, first-order difference operations and local feature extraction can be performed on the training load sequence to construct a training multidimensional input tensor; the training multidimensional input tensor is divided into multiple non-overlapping training temporal patches; the local fluctuation features of each training temporal patch are extracted through the initial convolutional layer to obtain the patch training matrix; combined with the initial global temporal attention LSEattention layer, the patch training matrix is processed to identify the global temporal dependencies between each training temporal patch, and a hidden layer training matrix containing the hidden layer features corresponding to each patch training matrix is generated.
[0137] S101. Using the initial boundary score feedforward network, perform boundary weight calculation and feature fusion on each hidden layer training matrix to generate training samples corresponding to each load training sequence.
[0138] Specifically, the hidden layer training matrices of the same training load sequence can be input into the initial boundary score feedforward network to obtain the training samples corresponding to the training load sequence.
[0139] S102. Determine all target industries corresponding to each training sample.
[0140] Specifically, in order to enable the trained convolutional layers, LSE Attention layers, and boundary scoring feedforward network to be applied to load feature extraction in various industries, the target industry here can be any industry that needs to participate in power dispatch.
[0141] To improve the targeting of load feature extraction in the trained convolutional layers, LSE Attention layers, and boundary scoring feedforward network, the target industry can be the same as the industry in the load power time series data, and the training samples correspond to only one industry.
[0142] S103. Obtain the representation vector sample for each target industry.
[0143] Specifically, multiple historical load time series data of the same target industry can be used to construct a representation vector sample for the corresponding target industry.
[0144] S104. For all training samples under each target industry, calculate the first similarity between each training sample and the target industry representation vector sample, and calculate the second similarity between each training sample and each of the remaining target industry representation vector samples.
[0145] Specifically, the cosine similarity between each training sample and the representation vector example of the target industry can be calculated as the first similarity of the training sample.
[0146] The cosine similarity between each training sample and every other target industry representation vector example outside its own target industry can be calculated as one of the second similarities of that training sample.
[0147] S105. Based on the first similarity and the second similarity of the same training sample, calculate the contrast loss of the corresponding training sample.
[0148] Specifically, the contrastive loss corresponding to each training sample can be calculated based on the first similarity and each second similarity.
[0149] S106. Decompose each hidden layer training matrix to generate the preceding hidden layer features and the following hidden layer features.
[0150] Specifically, the hidden layer feature matrix can be decomposed according to the order of the temporal patches, starting from the splicing position of any one or more adjacent patches. Each decomposition position corresponds to a set of preceding hidden layer features and subsequent hidden layer features. The preceding hidden layer features are the combination of the hidden layer features of all temporal patches before that position, and the subsequent hidden layer features are the combination of the hidden layer features of all temporal patches after that position.
[0151] S107. Utilize the temporal prediction decoder to perform temporal prediction based on each preceding hidden layer feature to generate reconstructed features.
[0152] Specifically, a temporal predictive decoder can be used to analyze the temporal dependencies of each preceding hidden layer based on the features of each preceding hidden layer, and predict the feature distribution of subsequent temporal patches to generate reconstructed features at the corresponding positions.
[0153] S108. Based on the reconstruction features of each training sample and its corresponding subsequent hidden layer features, calculate the reconstruction loss of the corresponding training sample.
[0154] Specifically, the reconstruction loss can be calculated using the following reconstruction loss calculation function:
[0155] ;
[0156] In the formula, To reconstruct the features, F represents the corresponding subsequent hidden layer features. is the L2 norm, used to quantify the difference between the reconstructed features and the corresponding subsequent hidden layer features, and M is the number of reconstructed features corresponding to the training samples.
[0157] S109. Calculate the total loss based on the contrastive loss and reconstruction loss for each training sample.
[0158] Specifically, the contrastive loss and reconstruction loss of the same training sample can be weighted and fused to obtain a preliminary loss value;
[0159] The sum of the initial loss values for the same target industry can be calculated to obtain the total loss.
[0160] S110. Based on the total loss, update the parameters of the initial convolutional layer, the initial LSE Attention layer, the initial boundary scoring feedforward network, and the temporal prediction decoder using the backpropagation algorithm, and return to step S100 until the total loss converges.
[0161] Specifically, based on the total loss for each target industry, the parameters of the initial convolutional layer, the initial LSE Attention layer, the initial boundary scoring feedforward network, and the temporal prediction decoder can be updated using the backpropagation algorithm. Then, the process of extracting hidden features from each load training sequence in the training set using the initial convolutional layer and the initial LSE Attention layer to generate the hidden training matrix corresponding to each load training sequence can be performed until the total loss for each target industry converges.
[0162] As can be seen from the above technical solution, this embodiment provides a training process for a convolutional layer, an LSE Attention layer, and a boundary scoring feedforward network. Through the above process, the contrastive supervision signal and the self-supervised signal of temporal reconstruction can be combined to train the model for multiple tasks. This allows the model to learn the distinguishing boundaries of load features in different industries, improving the industry discrimination of extracted features, and also allows the model to fully learn the inherent temporal dependency rules of the load sequence, enhancing the model's ability to represent the temporal features of the load. Ultimately, a stable load feature extraction model with stronger representation ability and higher discrimination is obtained.
[0163] In some embodiments of this application, the process of calculating the contrastive loss of the corresponding training sample based on the first similarity and the second similarity of the same training sample is described in detail, and the steps are as follows:
[0164] S1050. Substitute the first similarity and the second similarity of the same training sample into the preset contrast loss calculation function to generate the contrast loss of the corresponding training sample.
[0165] Specifically, the comparison loss calculation function can be as follows:
[0166]
[0167] In the formula, N is the number of training sequences in the training set; sim(H, H + H represents the first similarity score. + Here, H represents the representation vector examples of the target industry corresponding to the training samples; sim(H, H j The second similarity between the corresponding training sample and the j-th other target industry representation vector example is represented by ( ). To compare the losses.
[0168] As can be seen from the above technical solution, this embodiment provides an optional method for calculating the contrastive loss of corresponding training samples based on the first similarity and the second similarity of the same training sample. Through this method, the contrastive loss can widen the distance between load characteristics of different industries, compress the differences in load characteristics within the same industry, allow the model to learn clearer industry feature distinction boundaries, effectively improve the industry distinguishability of the extracted load features, and facilitate subsequent downstream tasks such as industry classification and load forecasting based on features.
[0169] Next, we will combine Figure 2 This application provides a detailed description of the load feature extraction device applicable to cross-industry applications. The load feature extraction device applicable to cross-industry applications described below can be compared with the load feature extraction method applicable to cross-industry applications described above.
[0170] See Figure 2 It can be observed that load feature extraction devices applicable across industries may include:
[0171] Module 10 is used to acquire load power time-series data;
[0172] Construction module 20 is used to perform first-order difference operations and local feature extraction on the load power time series data to construct a multidimensional input tensor;
[0173] The segmentation module 30 is used to segment the multidimensional input tensor into multiple non-overlapping temporal patches;
[0174] Extraction module 40 is used to extract local fluctuation features of each time-series patch through convolutional layers to obtain a patch feature matrix; combined with the global temporal attention LSEattention layer, the patch feature matrix is processed to identify the global temporal dependencies between each time-series patch and generate hidden layer features corresponding to each time-series patch; each hidden layer feature is input into the boundary scoring feedforward network to calculate the boundary weights corresponding to each time-series patch, and each boundary weight is fused with the corresponding hidden layer feature to generate the representation vector matrix of the load power time-series data; wherein, the parameters of the convolutional layer, the LSEattention layer and the boundary scoring feedforward network are obtained by co-training based on the contrast loss and reconstruction loss of different training samples, each contrast loss is used to quantify the difference between the corresponding training sample and the load representation of the same industry and other industries, and each reconstruction loss is used to quantify the difference between the corresponding training sample and its original load features.
[0175] Furthermore, a load characteristic extraction device applicable across industries may also include:
[0176] The identifier determination unit is used to determine the industry identifier, period identifier, time period identifier, and region identifier of the load power time sequence data.
[0177] The representation vector matrix storage unit is used to store the representation vector matrix and the corresponding industry identifier, period identifier, time period identifier and region identifier into the load feature database.
[0178] Furthermore, building module 20 may include:
[0179] The first construction unit is used to perform a first-order difference operation on the load power time series data to generate a difference sequence;
[0180] The second construction unit is used to set a sliding window on the difference sequence, calculate the mean and standard deviation of the power change rate in each window, and generate a local fluctuation feature matrix.
[0181] The third construction unit is used to concatenate the load power time series data, the differential sequence, and the local fluctuation feature matrix to form a multidimensional input tensor.
[0182] Furthermore, the extraction module 40 may include:
[0183] The patch feature matrix extraction unit is used to extract the fluctuation features, periodic features and peak-valley features of each time-series patch using the convolutional layer, generate the feature vector corresponding to each time-series patch, and combine the feature vectors to form the patch feature matrix.
[0184] Furthermore, the extraction module 40 may include:
[0185] The patch feature matrix transformation unit is used to linearize the patch feature matrix to generate a query matrix, a key matrix, and a value matrix. The query matrix is used to characterize the retrieval features of each time-series patch, the key matrix is used to provide a similarity matching index between each time-series patch, and the value matrix is used to store the feature information corresponding to each time-series patch.
[0186] The hidden layer feature extraction unit is used to input the query matrix, key matrix and value matrix into the LSE Attention layer to obtain the hidden layer feature matrix output by the LSE Attention layer. Each vector in the hidden layer feature matrix is the hidden layer feature of the corresponding temporal patch.
[0187] The core calculation formula for the LSE Attention layer is:
[0188] ;
[0189] In the formula, Q is the query matrix; K is the key matrix; V is the value matrix; M is the number of time-series patches; and d is the feature dimension. To query the inner product of the key matrix and the query matrix; It is an exponential function; To prevent a zero coefficient; Logarithmic operations; For smoothness coefficient; This is the normalization function.
[0190] Furthermore, the extraction module 40 may include:
[0191] The hidden layer training matrix generation unit is used to extract hidden layer features from each training load sequence in the training set using the initial convolutional layer and the initial LSE Attention layer, and generate the hidden layer training matrix corresponding to each training load sequence.
[0192] The training sample generation unit is used to calculate the boundary weights and fuse features of each hidden layer training matrix using the initial boundary score feedforward network, and generate training samples corresponding to each load training sequence.
[0193] The target industry determination unit is used to determine all target industries corresponding to each training sample;
[0194] The representation vector sample acquisition unit is used to acquire representation vector samples for each target industry.
[0195] The similarity calculation unit is used to calculate the first similarity between each training sample and the target industry representation vector example for all training samples under each target industry, and to calculate the second similarity between each training sample and each of the remaining target industry representation vector examples.
[0196] The contrast loss calculation unit is used to calculate the contrast loss of the corresponding training sample based on the first similarity and the second similarity of the same training sample.
[0197] The hidden layer training matrix decomposition unit is used to decompose each hidden layer training matrix to generate the preceding hidden layer features and the following hidden layer features.
[0198] The reconstructed feature generation unit is used to perform temporal prediction based on each preceding hidden layer feature using the temporal prediction decoder to generate reconstructed features.
[0199] The reconstruction loss calculation unit is used to calculate the reconstruction loss of the corresponding training sample based on the reconstruction features of each training sample and its corresponding subsequent hidden layer features.
[0200] The total loss calculation unit is used to calculate the total loss based on the contrastive loss and reconstruction loss of each training sample;
[0201] The parameter update unit is used to update the parameters of the initial convolutional layer, the initial LSE Attention layer, the initial boundary scoring feedforward network, and the temporal prediction decoder based on the total loss using the backpropagation algorithm, and then call the hidden layer training matrix generation unit until the total loss converges.
[0202] Furthermore, the comparison loss calculation unit may include:
[0203] The similarity utilization subunit is used to substitute the first similarity and the second similarity of the same training sample into the preset contrast loss calculation function to generate the contrast loss of the corresponding training sample.
[0204] The contrastive loss calculation function is shown below:
[0205] ;
[0206] In the formula, N is the number of training sequences in the training set; sim(H, H + ) represents the first similarity; sim(H, H) j The second similarity between the corresponding training sample and the j-th other target industry representation vector example is represented by ( ). To compare the losses.
[0207] The load feature extraction device applicable to cross-industry applications provided in this application embodiment can be applied to load feature extraction devices applicable to cross-industry applications, such as PC terminals, cloud platforms, servers, and server clusters. Optionally, Figure 3 A hardware block diagram of a load feature extraction device applicable across industries is shown, with reference to... Figure 3The hardware structure of a load feature extraction device suitable for cross-industry applications may include: at least one processor 1, at least one communication interface 2, at least one memory 3, and at least one communication bus 4.
[0208] In this embodiment of the application, the number of processor 1, communication interface 2, memory 3, and communication bus 4 is at least one, and processor 1, communication interface 2, and memory 3 communicate with each other through communication bus 4;
[0209] Processor 1 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention.
[0210] Memory 3 may include high-speed RAM, and may also include non-volatile memory, such as at least one disk storage device;
[0211] The memory stores a program, which the processor can call. The program is used for:
[0212] Obtain load power time-series data;
[0213] The load power time series data are subjected to first-order difference operation and local feature extraction to construct a multidimensional input tensor;
[0214] The multidimensional input tensor is divided into multiple non-overlapping temporal patches;
[0215] The local fluctuation features of each temporal patch are extracted by convolutional layers to obtain the patch feature matrix;
[0216] By combining the global temporal attention LSEattention layer, the patch feature matrix is processed to identify the global temporal dependencies between each temporal patch and generate the hidden layer features corresponding to each temporal patch.
[0217] Each hidden layer feature is input into the boundary scoring feedforward network, the boundary weight corresponding to each time series patch is calculated, and each boundary weight is fused with the corresponding hidden layer feature to generate the representation vector matrix of the load power time series data.
[0218] The parameters of the convolutional layer, the LSE Attention layer, and the boundary scoring feedforward network are obtained by co-training the contrast loss and reconstruction loss of different training samples. Each contrast loss is used to quantify the difference between the corresponding training sample and the load representation of the same industry and the load representation of other industries, and each reconstruction loss is used to quantify the difference between the corresponding training sample and its original load features.
[0219] Optionally, the refined and extended functions of the program can be referred to the above description.
[0220] This application embodiment also provides a readable storage medium that can store a program suitable for execution by a processor, the program being used for:
[0221] Obtain load power time-series data;
[0222] The load power time series data are subjected to first-order difference operation and local feature extraction to construct a multidimensional input tensor;
[0223] The multidimensional input tensor is divided into multiple non-overlapping temporal patches;
[0224] The local fluctuation features of each temporal patch are extracted by convolutional layers to obtain the patch feature matrix;
[0225] By combining the global temporal attention LSEattention layer, the patch feature matrix is processed to identify the global temporal dependencies between each temporal patch and generate the hidden layer features corresponding to each temporal patch.
[0226] Each hidden layer feature is input into the boundary scoring feedforward network, the boundary weight corresponding to each time series patch is calculated, and each boundary weight is fused with the corresponding hidden layer feature to generate the representation vector matrix of the load power time series data.
[0227] The parameters of the convolutional layer, the LSE Attention layer, and the boundary scoring feedforward network are obtained by co-training the contrast loss and reconstruction loss of different training samples. Each contrast loss is used to quantify the difference between the corresponding training sample and the load representation of the same industry and the load representation of other industries, and each reconstruction loss is used to quantify the difference between the corresponding training sample and its original load features.
[0228] Optionally, the refined and extended functions of the program can be referred to the above description.
[0229] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0230] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0231] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. The various embodiments of this application can be combined with each other. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A load feature extraction method suitable for cross-industry, characterized by, include: Obtain load power time-series data; The load power time series data are subjected to first-order difference operation and local feature extraction to construct a multidimensional input tensor; The multidimensional input tensor is divided into multiple non-overlapping temporal patches; The local fluctuation features of each temporal patch are extracted by convolutional layers to obtain the patch feature matrix; By combining the global temporal attention LSEattention layer, the patch feature matrix is processed to identify the global temporal dependencies between each temporal patch and generate the hidden layer features corresponding to each temporal patch. Each hidden layer feature is input into the boundary scoring feedforward network, the boundary weight corresponding to each time series patch is calculated, and each boundary weight is fused with the corresponding hidden layer feature to generate the representation vector matrix of the load power time series data. The parameters of the convolutional layer, the LSE Attention layer, and the boundary scoring feedforward network are obtained by co-training the contrast loss and reconstruction loss of different training samples. Each contrast loss is used to quantify the difference between the corresponding training sample and the load representation of the same industry and the load representation of other industries, and each reconstruction loss is used to quantify the difference between the corresponding training sample and its original load features.
2. The load signature extraction method suitable for cross-industry according to claim 1, characterized in that, After fusing each boundary weight with the corresponding hidden layer feature to generate the representation vector matrix of the load power time series data, the method further includes: Determine the industry identifier, period identifier, time period identifier, and region identifier of the load power time series data; The representation vector matrix is stored in the load feature database along with the corresponding industry identifier, period identifier, time period identifier, and region identifier. 3.The load feature extraction method suitable for cross-industry according to claim 1, wherein, The process of performing first-order difference operations and local feature extraction on the load power time-series data to construct a multidimensional input tensor includes: Perform a first-order difference operation on the load power time-series data to generate a difference sequence; A sliding window is set on the difference sequence, and the mean and standard deviation of the power change rate within each window are calculated to generate a local fluctuation feature matrix. The load power time series data, the difference sequence, and the local fluctuation feature matrix are concatenated to form a multidimensional input tensor. 4.The load feature extraction method suitable for cross-industry according to claim 1, wherein, The step of extracting local fluctuation features for each temporal patch through convolutional layers to obtain a patch feature matrix includes: Using the convolutional layer, the fluctuation features, periodic features, and peak-valley features of each time-series patch are extracted to generate a feature vector corresponding to each time-series patch. The feature vectors are combined to form a patch feature matrix.
5. The load signature extraction method suitable for cross-industry according to claim 1, characterized in that, The process, which combines the global temporal attention layer LSEattention, to process the patch feature matrix, identifies the global temporal dependencies between each temporal patch and generates hidden layer features corresponding to each temporal patch, including: The patch feature matrix is linearized to generate a query matrix, a key matrix, and a value matrix. The query matrix is used to characterize the retrieval features of each time series patch, the key matrix is used to provide a similarity matching index between each time series patch, and the value matrix is used to store the feature information corresponding to each time series patch. The query matrix, key matrix, and value matrix are input into the LSE Attention layer to obtain the hidden layer feature matrix output by the LSE Attention layer. Each vector in the hidden layer feature matrix is the hidden layer feature of the corresponding temporal patch. The core calculation formula for the LSE Attention layer is: ; where Q is a query matrix; K is a key matrix; V is a value matrix; M is the number of time-series patches; d is the feature dimension; is the inner product of the query matrix and the key matrix; is the exponential function; is the zero coefficient prevention; is the logarithmic operation; is the smoothness coefficient; is the normalization function.
6. The method for extracting load characteristics across industries according to claim 1, characterized in that, The training process of the convolutional layers, LSE Attention layers, and boundary scoring feedforward network includes: The hidden layer features are extracted for each training load sequence in the training set using the initial convolutional layer and the initial LSE Attention layer, generating the hidden layer training matrix corresponding to each training load sequence. Using the initial boundary score feedforward network, boundary weights are calculated and features are fused on each hidden layer training matrix to generate training samples corresponding to each load training sequence. Identify all target industries corresponding to each training sample; Obtain a representation vector example for each target industry; For all training samples under each target industry, calculate the first similarity between each training sample and the target industry representation vector example, and calculate the second similarity between each training sample and each of the remaining target industry representation vector examples; Based on the first similarity and the second similarity of the same training sample, the contrast loss of the corresponding training sample is calculated. Each hidden layer training matrix is decomposed to generate the preceding hidden layer features and the following hidden layer features. A temporal predictive decoder is used to perform temporal prediction based on each preceding hidden layer feature to generate reconstructed features; Based on the reconstructed features of each training sample and its corresponding subsequent hidden layer features, the reconstruction loss of the corresponding training sample is calculated. The total loss is calculated based on the contrastive loss and reconstruction loss for each training sample. Based on the total loss, the parameters of the initial convolutional layer, the initial LSE Attention layer, the initial boundary scoring feedforward network, and the temporal prediction decoder are updated using the backpropagation algorithm. The process then returns to the previous step of using the initial convolutional layer and the initial LSE Attention layer to extract hidden layer features for each training sequence in the training set and generate the hidden layer training matrix corresponding to each training sequence, until the total loss converges.
7. The method for extracting load characteristics across industries according to claim 6, characterized in that, The step of calculating the contrast loss for the corresponding training sample based on the first similarity and the second similarity of the same training sample includes: Substitute the first similarity and the second similarity of the same training sample into the preset contrast loss calculation function to generate the contrast loss of the corresponding training sample; The contrastive loss calculation function is shown below: ; In the formula, N is the number of training sequences in the training set; sim(H, H + ) represents the first similarity; sim(H, H) j The second similarity between the corresponding training sample and the j-th other target industry representation vector example is represented by ( ). To compare the losses.
8. A load characteristic extraction device applicable across industries, characterized in that, include: The acquisition module is used to acquire load power time-series data; The construction module is used to perform first-order difference operations and local feature extraction on the load power time series data to construct a multidimensional input tensor; The segmentation module is used to segment the multidimensional input tensor into multiple non-overlapping temporal patches; The extraction module is used to extract the local fluctuation features of each temporal patch through convolutional layers to obtain the patch feature matrix; The patch feature matrix is processed by combining the global temporal attention LSEattention layer to identify the global temporal dependencies between each temporal patch and generate hidden layer features corresponding to each temporal patch. Each hidden layer feature is input into the boundary scoring feedforward network to calculate the boundary weights corresponding to each temporal patch, and each boundary weight is fused with the corresponding hidden layer feature to generate the representation vector matrix of the load power time series data. The parameters of the convolutional layer, the LSEattention layer and the boundary scoring feedforward network are obtained by co-training the contrast loss and reconstruction loss of different training samples. Each contrast loss is used to quantify the difference between the corresponding training sample and the load representation of the same industry and the load representation of other industries, and each reconstruction loss is used to quantify the difference between the corresponding training sample and its original load features.
9. A load characteristic extraction device applicable across industries, characterized in that, Including memory and processor; The memory is used to store programs; The processor is configured to execute the program to implement the various steps of the load feature extraction method applicable to cross-industry applications as described in any one of claims 1-7.
10. A readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the various steps of the load feature extraction method applicable to cross-industry applications as described in any one of claims 1-7.