Intelligent power distribution box data acquisition method and system

By combining local temporal convolution and global sparse Fourier transform, a contextual representation is generated and the feature extraction path is reconfigured in real time. This solves the problem that the feature extraction strategy cannot be flexibly adjusted in the existing technology, and realizes efficient and accurate data acquisition and status analysis of distribution boxes.

CN123068686APending Publication Date: 2026-11-10NANYANG JINGUAN INTELLIGENT SWITCH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611246460.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-17
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

Existing methods cannot flexibly adjust feature extraction strategies according to the current network status, resulting in limited accuracy of data acquisition and status analysis under varying operating conditions, making it difficult to meet the requirements of modern new power systems for high energy efficiency, high precision, and real-time sensing of underlying equipment.

Method used

A method combining local temporal convolution and global sparse Fourier transform is adopted to extract spatiotemporal information through local temporal convolution path and global sparse Fourier transform path, generate key tensor and value tensor, and generate context representation through clustering partitioning and weighted fusion of gated signals, and reconfigure feature extraction path in real time.

Benefits of technology

It improves data processing efficiency and prediction accuracy, enhances the effectiveness and temporal continuity of contextual representation, and improves operational efficiency and condition generalization ability in the monitoring process of distribution boxes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123068686A_ABST
    Figure CN123068686A_ABST
Patent Text Reader

Abstract

The application provides a kind of intelligent distribution box data acquisition method and system, including collecting distribution box sensor node preset time window original time series data, generates initial space-time feature map;Through local time series convolution, global sparse fourier transform double path extracts space-time feature, first window uses initial convolution kernel, generates key tensor K, value tensor V by weighted fusion, linear transformation, and obtains query tensor Q from feature map;Key tensor is clustered and divided into feature cluster and cluster center is solved, according to distance screening target cluster range, calculate the attention score in cluster to obtain aggregated output;Rely on the distance between query vector and cluster center to construct gate signal, fuse output to obtain context representation, and update cluster center using exponential moving average;Use context representation to output distribution box state analysis or parameter prediction result, generate transformation kernel at the same time, real-time update reconfigurable convolution kernel in local time series convolution path, adjust the next window feature extraction mode.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of intelligent distribution boxes, and in particular relates to a data acquisition method and system for intelligent distribution boxes. Background Technology

[0002] With the continuous advancement of smart grid construction, distribution boxes, as crucial underlying terminal nodes in power distribution systems, directly impact the security, stability, and power supply reliability of the distribution network. To achieve real-time monitoring and operation management of distribution boxes, numerous sensor nodes are typically deployed inside and around them to continuously collect operational data such as voltage, current, ambient temperature, humidity, and partial discharge. The multi-dimensional time-series data generated by these sensor nodes contains rich spatiotemporal correlation features. By acquiring, fusing, and analyzing this data in real time, it is possible to achieve early warning of abnormal distribution box conditions, health assessment, and advanced prediction of key operating parameters. In recent years, deep learning technologies, represented by attention mechanisms, have been widely applied in the field of power Internet of Things (IoT) time-series data processing, improving the feature representation capabilities and state recognition accuracy of multi-source data.

[0003] Traditional standard attention mechanisms typically employ globally dense dot product operations when calculating feature associations. Their computational complexity and memory consumption increase quadratically with the length of the time series, making them unsuitable for the computational overhead in resource-constrained and power-demand-critical hardware environments at the distribution box edge. This fails to meet the real-time processing requirements of massive amounts of sensor data with low latency and high concurrency. Furthermore, most existing conventional data processing models use statically fixed network structures and feature extraction parameters. When faced with the complex and variable operating conditions of distribution boxes and non-stationary data fluctuations, they struggle to simultaneously identify both local transient abrupt changes and global long-term evolution patterns within the same processing flow, and lack the ability to adaptively adjust to changes in environment and operating conditions. Due to the lack of a reconstruction mechanism, traditional methods cannot flexibly adjust subsequent feature extraction strategies based on the current network state, resulting in limited accuracy in data acquisition, fusion analysis, and state prediction under varying operating conditions. This makes it difficult to meet the demands of modern power systems for high energy efficiency, high precision, and real-time sensing of underlying equipment. Summary of the Invention

[0004] According to a first aspect of the present invention, a data acquisition method for intelligent distribution boxes is proposed to solve the problem that existing methods cannot flexibly adjust subsequent feature extraction strategies according to the current network state, resulting in limited accuracy of data acquisition and state analysis under varying operating conditions. The method includes the following steps:

[0005] The original time-series data of the sensor nodes in the power distribution box within a preset time window are acquired and converted into an initial spatiotemporal feature map. The initial spatiotemporal feature map is input into a local temporal convolution path and a global sparse Fourier transform path to extract spatiotemporal information. The local temporal convolution path uses the initial convolution kernel in the first time window. After weighted fusion, a linear transformation is performed to generate a key tensor K and a value tensor V. A query tensor Q is generated from the initial spatiotemporal feature map. The key tensor K is divided into multiple key feature clusters according to clustering rules, and the center vector of each cluster is calculated. For each query vector in the query tensor Q, the nearest preset number of key feature clusters are identified as the target range. Within the target range, the attention score between the query vector and the corresponding key vector is calculated, and the corresponding value vectors in the value tensor V are weighted and summed to obtain the aggregated output of each cluster. A gating signal is generated based on the distance between the query vector and the corresponding center vector. The aggregated output of each cluster is weighted and fused to obtain the final context representation. The corresponding center vector is updated using the key vectors of each cluster within the current time window through an exponential moving average method. The final context representation is used to obtain the distribution box status analysis results or key parameter prediction values ​​for the current time window, and is reshaped into transformation kernel parameters for real-time reconfiguration of the convolution kernel of the local temporal convolution path to adjust the feature extraction mode for the next time window.

[0006] According to a second aspect of the present invention, an intelligent distribution box data acquisition system is provided, comprising the following modules: The generation module is used to acquire the original time-series data of the sensor nodes of the power distribution box within a preset time window and convert it into an initial spatiotemporal feature map; the initial spatiotemporal feature map is input into a local temporal convolution path and a global sparse Fourier transform path to extract spatiotemporal information. The local temporal convolution path uses the initial convolution kernel in the first time window, and after weighted fusion, it generates a key tensor K and a value tensor V through a linear transformation, and a query tensor Q is generated from the initial spatiotemporal feature map; The calculation module is used to divide the key tensor K into multiple key feature clusters according to clustering rules and calculate the center vector of each cluster. For each query vector in the query tensor Q, the module identifies the nearest preset number of key feature clusters as the target range. Within the target range, the module calculates the attention score between the query vector and the corresponding key vector, and performs a weighted summation on the corresponding value vectors in the value tensor V to obtain the aggregated output of each cluster. Based on the distance between the query vector and the corresponding center vector, a gating signal is generated. The aggregated output of each cluster is weighted and fused to obtain the final context representation. The module updates the corresponding center vector using the key vectors of each cluster within the current time window through an exponential moving average method. The adjustment module is used to reshape the final context representation used to obtain the distribution box status analysis results or key parameter prediction values ​​of the current time window into a transformation kernel parameter for real-time reconfiguration of the convolution kernel of the local temporal convolution path, and adjust the feature extraction mode of the next time window.

[0007] This invention, by fusing local temporal convolution and global sparse Fourier transform, can simultaneously extract local transient details and global spatiotemporal correlation information, reducing overall computational overhead while maintaining feature representation accuracy. In the feature processing stage, clustering of the key tensor and limiting the target cluster range for query vector matching reduces redundant dot product calculations in the attention mechanism, improving data processing efficiency. Simultaneously, weighted fusion of cluster aggregate outputs using gating signals and updating cluster center vectors using exponential moving average enhances the effectiveness and temporal continuity of the context representation. Furthermore, the generated context representation is used to output state analysis results or key parameter prediction results, and this context representation is converted into kernel parameters for real-time reconfiguration of the feature extraction path. This allows the local temporal convolution path to adapt to data changes in the next time window, thereby improving operational efficiency, prediction accuracy, and generalization ability during distribution box monitoring. Attached Figure Description

[0008] Figure 1 A flowchart of the first embodiment; Figure 2 This is a bar chart of the weighted signals for the target cluster gating. Detailed Implementation

[0009] 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.

[0010] In the first embodiment, the present invention proposes a data acquisition method for intelligent distribution boxes, such as... Figure 1 It includes the following steps: S1. Obtain the original time-series data of the distribution box sensor nodes within a preset time window and convert it into an initial spatiotemporal feature map; input the initial spatiotemporal feature map into a local temporal convolution path and a global sparse Fourier transform path to extract spatiotemporal information. The local temporal convolution path uses the initial convolution kernel in the first time window, and after weighted fusion, it generates a key tensor K and a value tensor V through a linear transformation. Generate a query tensor Q from the initial spatiotemporal feature map.

[0011] Time-series data of voltage, current, and temperature are acquired by intelligent sensors deployed on the distribution box. Raw time-series data with fixed time steps is extracted, and the feature parameters of each sensor node within the same sampling time are concatenated into a one-dimensional node sequence according to a preset node order. Multiple one-dimensional node sequences within a preset time window are then stacked along the time dimension to convert them into a two-dimensional feature matrix as the initial spatiotemporal feature map. The row dimension of the initial spatiotemporal feature map corresponds to the sampling time step, and the column dimension corresponds to each sensor node and its electrical and environmental features. During convolution calculation, batch and channel dimensions can be added outside this two-dimensional feature matrix to form a runtime tensor; however, these batch and channel dimensions are only for network calculation format and do not change the definition of the initial spatiotemporal feature map as a two-dimensional feature matrix.

[0012] The initial spatiotemporal feature map is input into a local temporal convolution path and a global sparse Fourier transform path, respectively. The local temporal convolution path is a two-dimensional convolution path that performs local convolutions along the time dimension and the node feature dimension. "Temporal" indicates that its convolutional object includes a temporal evolution dimension and is not limited to one-dimensional convolution. In the local temporal convolution path, the first time window uses an initialized two-dimensional depthwise separable convolution kernel to extract local time and node feature dependencies. Specifically, the single-channel initial spatiotemporal feature map is first mapped to intermediate features with a preset number of channels through a fixed-channel dimensionality-up mapping. Then, local spatiotemporal information is extracted through a reconfigurable two-dimensional depthwise separable convolution kernel. Finally, a fixed-channel compression mapping restores the local spatiotemporal information matrix to have the same row and column dimensions as the initial spatiotemporal feature map, ensuring that the subsequent dimensions are consistent with the global spatiotemporal information matrix and the preset parameter matrix.

[0013] In the global sparse Fourier transform path, the data is transformed to the frequency domain. Dominant frequency components with larger amplitudes are selected as the retained frequency component set based on their magnitude. Low-amplitude background components and random noise components are set to zero to achieve frequency domain sparsity. This process preserves dominant frequency components and reduces low-amplitude noise, avoiding the direct equation of "maximum amplitude" with "high frequency." Then, an inverse fast Fourier transform is used to restore the data to a global spatiotemporal information matrix with the same row and column dimensions as the initial spatiotemporal feature map. Subsequently, a weighting function is used to assign weights to the local and global spatiotemporal information. The local and global spatiotemporal information are multiplied by their respective weights and then summed element-wise to achieve weighted fusion. The fused feature matrix is ​​input into two parallel linear mapping layers to generate a key tensor K and a value tensor V. The initial spatiotemporal feature map is input into a third independent linear mapping layer to generate a query tensor Q.

[0014] In an optional embodiment, acquiring the raw time-series data of the distribution box sensor nodes within a preset time window and converting it into an initial spatiotemporal feature map includes: Extract the three-phase voltage data, three-phase current data, and temperature data collected by the sensor nodes in the distribution box as raw time-series data; The original time-series data is arranged into a one-dimensional node sequence according to each sensor node, and multiple frames of the one-dimensional node sequence within a preset time window are sequentially superimposed along the time series dimension to construct a two-dimensional feature matrix as the initial spatiotemporal feature map.

[0015] Ten sensor nodes are deployed within the distribution box. At each sampling moment, three-phase voltage, three-phase current, and temperature data collected by each node are extracted synchronously. The sensor data for each type are normalized or per-unit normalized to map the three-phase voltage, three-phase current, and temperature data to a unified dimensionless numerical range. These seven types of feature parameters are sequentially concatenated at a single time step to obtain a one-dimensional node vector sequence of length 70. The sampling rate is set to 800Hz, and 1024 consecutive sampling points are extracted within a preset time window of 1.28 seconds. These 1024 one-dimensional sequences of length 70 are stacked row-by-row according to their temporal evolution order, resulting in a two-dimensional feature matrix of size 1024×70. The row dimension represents the temporal evolution pattern, and the column dimension contains the global electrical and environmental state inside the distribution box. This matrix serves as the initial spatiotemporal feature map for subsequent model processing. In specific neural network operations, the 1024×70 two-dimensional feature matrix can be temporarily expanded into a 1×1×1024×70 running tensor, where the first "1" represents the batch dimension and the second "1" represents the input channel dimension. This expansion is only used to adapt to the two-dimensional convolution calculation interface.

[0016] In an optional embodiment, the step of inputting the initial spatiotemporal feature map into a local temporal convolution path and a global sparse Fourier transform path to extract spatiotemporal information, wherein the local temporal convolution path uses the initial convolution kernel in the first time window, and after weighted fusion, generates a key tensor K and a value tensor V through a linear transformation, and generates a query tensor Q from the initial spatiotemporal feature map, includes: Two-dimensional depthwise separable convolution kernels are used to perform convolution operations on the initial spatiotemporal feature map to output local spatiotemporal information; A two-dimensional fast Fourier transform is performed on the initial spatiotemporal feature map to extract the 10% of frequency components with the largest amplitude in the frequency domain as the set of retained frequency components and set the remaining components to zero. Then, the global spatiotemporal information is output by performing an inverse fast Fourier transform and extracting the real part. Assign fusion weights to local spatiotemporal information and global spatiotemporal information, add the weighted results of the two and fuse them, and multiply the fused feature matrix by the second preset parameter matrix and the third preset parameter matrix respectively to output the key tensor K and value tensor V; The initial spatiotemporal feature map is multiplied by the first preset parameter matrix to output the query tensor Q.

[0017] For an initial spatiotemporal feature map of size 1024×70, the local temporal convolutional path first expands it to a 1×1×1024×70 running tensor, and then transforms it into an intermediate feature tensor of size 1×32×1024×70 through fixed-channel upscaling mapping. Subsequently, the reconfigurable part is processed using a two-dimensional depthwise separable convolutional kernel with 32 input and 32 output channels, a kernel size of 3×3, a stride of 1, and padding of 1. Channel-wise convolution is used to extract local dependencies between features of adjacent time steps and adjacent nodes within each channel, while pointwise convolution is used to achieve information fusion between channels. The processed 1×32×1024×70 feature tensor is then compressed and mapped back to 1×1×1024×70 through fixed-channel compression mapping, and after removing the batch dimension and channel dimension, a local spatiotemporal information matrix of size 1024×70 is obtained.

[0018] Simultaneously, in the global sparse Fourier transform path, the initial spatiotemporal feature map is transformed to the complex frequency domain. In this model, the first dimension of the two-dimensional fast Fourier transform corresponds to the time sampling dimension, and the second dimension corresponds to the node feature index dimension formed according to the preset node topology order and feature arrangement order. The second-dimensional frequency domain component is used to characterize the global change pattern in the node feature sequence and is not limited to the actual physical space frequency. The squared amplitudes of 71680 frequency points are calculated and sorted in descending order. The top 10% of the frequency components (7168) are extracted as the retained frequency component set, and the remaining 90% of the frequency components are set to zero to filter out low-amplitude background components and random noise components while retaining the dominant frequency components. A 2D-IFFT inverse transform is applied to extract the real part data, generating a global spatiotemporal information matrix of the same dimension. In the feature fusion stage, a Sigmoid-type weighting function is used to generate local path weights w, and the global path weights are set to 1-w. For example, when w is 0.6, the local feature weight is 0.6 and the global feature weight is 0.4. Multiplying both by their respective weights and adding them element-wise yields a fused feature matrix of size 1024×70. Linear mapping is performed using a first, second, and third preset parameter matrix, each randomly initialized with a Gaussian distribution and having a size of 70×128. The initial spatiotemporal feature map is multiplied by the first preset parameter matrix to obtain a query tensor Q of size 1024×128; while the fused feature matrix is ​​multiplied by the second and third preset parameter matrices respectively, mapping out key tensors K and value tensors V, both of size 1024×128. Since the local spatiotemporal information matrix has been restored to 1024×70 before fusion with the global spatiotemporal information matrix, the fused feature matrix can perform valid matrix multiplication operations with the 70×128 preset parameter matrix.

[0019] S2, the key tensor K is divided into multiple key feature clusters according to clustering rules and the center vector of each cluster is calculated. For each query vector in the query tensor Q, the nearest preset number of key feature clusters are identified as the target range. Within the target range, the attention score between the query vector and the corresponding key vector is calculated, and the corresponding value vector in the value tensor V is weighted and summed to obtain the aggregated output of each cluster. A gating signal is generated based on the distance between the query vector and the corresponding center vector. The aggregated output of each cluster is weighted and fused to obtain the final context representation. The corresponding center vector of each cluster within the current time window is updated using the exponential moving average method.

[0020] Cluster all key vectors in the key tensor K to obtain the center vector of each key feature cluster. For each query vector in the query tensor Q, calculate the Euclidean distance between the query vector and all cluster center vectors, sort the distances in ascending order, and truncate the top few indices to identify the nearest preset number of key feature clusters as the target range. When a candidate key feature cluster is not assigned any key vector in the current time window, the cluster is marked as an empty cluster. When constructing the target range for the query vector, prioritize the nearest non-empty key feature clusters. If a candidate cluster ranked high is an empty cluster, skip it and select the next non-empty key feature cluster in the distance ranking. If the number of non-empty key feature clusters is still less than the preset number after traversing all clusters, use zero vector aggregation output and a gate value of 0 to fill in the gaps and keep the output dimension of the target range consistent.

[0021] The dot product of the query vector and all corresponding key vectors within the target cluster is calculated. After dividing by the square root of the key vector dimension as a scaling factor, the result is normalized to calculate the attention score. The attention score is then multiplied by the corresponding value vectors within the target cluster in the value tensor V to perform a weighted summation, yielding the aggregated output for each cluster. The squared Euclidean distance between the query vector and the center vectors of each cluster within the target range is calculated. This squared distance is multiplied by a negative scaling factor and then exponentially calculated to generate gating signal weights with values ​​between 0 and 1. Thus, the closer the query vector is to the cluster center, the larger the gating signal; the farther the distance, the smaller the gating signal. Each aggregated output is multiplied by its corresponding gating signal weight and summed element-wise to complete the weighted fusion and obtain the final context representation. After the calculation of the current time window is completed, the center vector maintenance is performed on all key feature clusters within the current time window: for non-empty clusters that have been assigned a key vector, the center vector is updated smoothly using the exponential moving average method; for empty clusters that have not been assigned a key vector, the center vector of the previous time window is retained unchanged, or the cluster center is reinitialized after the number of consecutive empty clusters reaches a preset number.

[0022] In an optional embodiment, the step of dividing the key tensor K into multiple key feature clusters according to clustering rules and calculating the center vector of each cluster, and identifying the nearest preset number of key feature clusters as the target range for each query vector in the query tensor Q, includes: In the first time window, all key vectors in the key tensor K are clustered into 256 independent key feature clusters, and the arithmetic mean vector of all key vectors contained in each key feature cluster is calculated to initialize the center vector of each cluster. In subsequent time windows, based on the Euclidean distance to the center vectors of each cluster, the key vectors in the key tensor K are assigned to the nearest key feature clusters; Calculate the Euclidean distance between the currently processed query vector in the query tensor Q and the above 256 center vectors. Sort the Euclidean distances in ascending order of value, and extract the key feature clusters to which the center vectors with the top 4 distance values ​​belong to form the target range.

[0023] In the first time window after system startup, a key tensor K containing 1024 key vectors of dimension 128 is obtained. The K-means++ clustering algorithm, with a maximum iteration count of 300 and a convergence tolerance of 1e-4, is invoked to assign these 1024 key vectors to 256 pre-defined independent key feature clusters. For all key vectors assigned to a specific cluster, the summation is performed along each of the 128 feature dimensions and divided by the total number of vectors in that cluster to obtain a 128-dimensional arithmetic mean vector. This vector is stored in memory as the initial center vector of that cluster. If an empty cluster with no assigned key vectors exists after the first time window clustering, the center of the empty cluster is initialized using the nearest non-empty cluster center with a pre-defined small perturbation. This avoids the problem of being unable to calculate the aggregate output due to unmembered clusters in subsequent distance sorting.

[0024] In subsequent rolling time windows, for each newly extracted key tensor K, the Euclidean distance between each key vector within the key tensor and the currently stored 256 cluster center vectors is calculated in parallel. Based on the distance minimization criterion, each key vector is hard-assigned to the nearest cluster, completing the online update of cluster members. Clusters that do not receive key vector assignments in this time window are recorded as empty clusters, and their historical center vectors are retained; these empty clusters do not participate in the intra-cluster attention score calculation for this time window. When constructing the target range of the attention mechanism, query vectors with the same dimension of 128 are extracted one by one from the query tensor Q. Using vectorization operations, the L2 norm distance between the current query vector and all 256 center vectors is calculated in parallel. The 256 calculated distance scalar values ​​are fed into a quicksort algorithm for ascending order. From the sorting results, non-empty key feature clusters with key vector members within the current time window are selected sequentially until four target clusters are obtained; if there are fewer than four non-empty clusters, placeholder clusters with a gating value of 0 are used to fill the gap. By combining these four target clusters together as the target range for attention calculation of the current query vector, this coarse-grained filtering strategy reduces the computational complexity of attention to the local cluster level and eliminates interference from irrelevant spatiotemporal information.

[0025] In an optional embodiment, the step of calculating the attention score between the query vector and the corresponding key vector within the target range, and weighted summing the corresponding value vectors in the value tensor V to obtain the cluster aggregation output includes: Calculate the inner product of the query vector and each key vector within the target range, divide the inner product by the square root of the key vector dimension, and input the division results corresponding to all key vectors within the target range into the Softmax function to output the attention score; The value vector at the same index position in the value tensor V for each key vector is multiplied by the corresponding calculated attention score and scaled proportionally. The scaled value vectors are then accumulated element-wise within the range of a single key feature cluster to generate the aggregated output of the corresponding key feature cluster.

[0026] For the currently processed 128-dimensional query vector, each key vector within the defined target range is traversed, and a vector dot product operation is performed to obtain an initial scalar result. To prevent the inner product value from being too large and causing gradient vanishing in subsequent calculations, each dot product result is uniformly divided by a constant factor of 11.31, i.e., the square root of the key vector dimension 128, for numerical scaling. The scaled inner product values ​​corresponding to all key vectors within the target range are formed into a set, and exponential normalization is performed to ensure that all attention scores assigned to the current query vector within the target range are in the range of 0 to 1 and their sum equals 1. After obtaining the attention scores, based on the original index position of each key vector in the time series, a 128-dimensional value vector is extracted from the value tensor V of the same size (1024×128). Each element of each extracted value vector is multiplied by the corresponding attention score value to achieve proportional scaling of feature importance. To maintain structural independence at the feature cluster level, in the four clusters of the target range, an element-wise accumulation operation is performed on all scaled value vectors belonging to the same cluster. For example, if a target cluster contains 5 selected key-value pairs, the corresponding positions of the 5 weighted 128-dimensional value vectors are added together to generate 4 independent aggregated output vectors of corresponding key feature clusters, each with a dimension of 128. If a placeholder cluster is used to complete the target range, its aggregated output is set as a 128-dimensional zero vector, which is not part of the effective key vector set that participates in Softmax normalization.

[0027] In an optional embodiment, the step of generating a gating signal based on the distance between the query vector and the corresponding center vector, weighting and fusing the aggregated outputs of each cluster to obtain the final context representation, and updating the corresponding center vector using the key vectors of each cluster within the current time window through an exponential moving average method includes: Calculate the squared Euclidean distance between the query vector and the cluster center vectors within the target range, multiply the squared Euclidean distance by a preset negative proportionality coefficient, and then perform an exponential operation to obtain the gating signal for the corresponding cluster. Each gate signal is multiplied by the aggregated output of the corresponding cluster, and a vector addition operation is performed on the aggregated output of the four clusters scaled by the gate signals within the target range to generate the context representation of the corresponding query vector. The final context representation is generated by combining the context representations of all query vectors within the current time window. Multiply the original center vector of the corresponding key feature cluster by the decay constant, and add the compensation value obtained by multiplying the complement of the decay constant by the arithmetic mean vector of the key vectors belonging to the cluster in the current time window. The sum of the two is then used to completely replace and update the center vector of the corresponding key feature cluster.

[0028] For the current 128-dimensional query vector, the sum of the squares of the differences between each corresponding element and the center vectors of the four key feature clusters within the target range is calculated to obtain the squared Euclidean distance. Multiplying this squared value by a preset negative constant factor, such as -0.5, generates a floating-point scalar value in the range greater than 0 and less than or equal to 1, which serves as the gating signal for the corresponding cluster. This gating signal is negatively correlated with the distance between the query vector and the cluster center; that is, the smaller the distance, the closer the gating signal is to 1; the larger the distance, the closer the gating signal is to 0. The gating signal weight distribution corresponding to different target feature clusters is shown below. Figure 2 As shown, the gate signal is used as a weight scalar and multiplied by each element of the corresponding 128-dimensional key feature cluster aggregation output vector. Then, dimension-wise vector addition is performed on the four cluster aggregation output vectors scaled by the gate signal within the target range, fusing them to obtain a 128-dimensional context representation vector containing global dependencies. After all 1024 query vectors within the current time window have been processed sequentially, all generated context representation vectors are concatenated in chronological order to obtain a final context representation tensor with a dimension of 1024×128.

[0029] In the state maintenance phase, to ensure the smooth evolution of cluster centers in the data stream, an exponential moving average mechanism is introduced: After the current time window ends, all 256 key feature clusters are traversed. For non-empty clusters with assigned key vectors within the current time window, each element of the 128-dimensional center vector of that cluster at the previous time step is multiplied by a fixed decay constant of 0.9. Simultaneously, all key vectors newly assigned to that cluster within the current time window are extracted, and a 128-dimensional arithmetic mean vector is calculated. All elements of this arithmetic mean vector are then multiplied by the complement of the decay constant 0.1 to obtain a compensation value vector. The scaled original center vector and the compensation value vector are added element-wise, and the result overwrites the original parameters in system memory, completing the online update of the key feature cluster center vector. For empty clusters without assigned key vectors within the current time window, the arithmetic mean vector is not calculated, and the center vector of the previous time window remains unchanged. When the number of consecutive empty clusters reaches a preset limit, they are re-initialized according to the distribution of the current non-empty cluster centers. Therefore, the cluster center update scope is consistent with the maintenance object of "each cluster within the current time window", rather than being limited to the four clusters within the target range of a certain query vector.

[0030] S3, the final context representation is used to obtain the distribution box status analysis results or key parameter prediction values ​​of the current time window, and reshaped into transformation kernel parameters for real-time reconfiguration of the convolution kernel of the local temporal convolution path, and the feature extraction mode of the next time window is adjusted.

[0031] The final context representation is pooled along the time dimension to obtain a window-level representation vector. This window-level representation vector is then input into a multilayer perceptron prediction network. During state analysis, the fully connected layer at the end of the multilayer perceptron outputs logical values ​​for various abnormal states and generates classification probability distributions representing normal, overload, or short-circuit states as analysis results. During key parameter prediction, continuous numerical values ​​are output from the end of the multilayer perceptron as the predicted three-phase load voltage values ​​for the distribution box at the next time node. The window-level representation vector is then input into a reshaping subnetwork composed of linear mappings and nonlinear activation functions. The transformation kernel parameters output by this reshaping subnetwork are used to cover the reconfigurable 2D depthwise separable convolution kernel weights in the local temporal convolution path, but not the fixed-channel upscaling and compression mappings used for dimension alignment. By assigning values ​​to the generated transformation kernel parameter tensor, the original reconfigurable convolution kernel weight matrix in the local temporal convolution path is replaced. This allows the convolution kernel of the local temporal convolution path to be reconfigured in real time, enabling the local temporal convolution path to use the updated convolution kernel to extract features when receiving and processing the original temporal data of the next time window, thus achieving the adjustment of the feature extraction mode.

[0032] In an optional embodiment, the step of using the final context representation to obtain the distribution box status analysis results or key parameter prediction values ​​for the current time window, reshaping it into transform kernel parameters for real-time reconfiguration of the convolution kernel of the local temporal convolution path, and adjusting the feature extraction mode for the next time window includes: The final context representation is pooled along the time dimension to obtain a window-level representation vector; The window-level representation vector is input into a numerical predictor, which includes at least two fully connected layers, and outputs the predicted values ​​of the load voltage key parameters at the next time node through linear mapping. The window-level representation vector is mapped to a one-dimensional kernel parameter vector through a parameter projection layer. The length of the one-dimensional kernel parameter vector is equal to the total number of weight parameters to be reconfigured in the two-dimensional depthwise separable convolution kernel. According to the original parameter arrangement order of the two-dimensional depth separable convolution kernel, the size of the one-dimensional kernel parameter vector is reconstructed to obtain the multi-dimensional kernel parameter tensor corresponding to the weight parameters to be reconfigured. The weight parameters of the reconfigurable two-dimensional depthwise separable convolution kernel in the local temporal convolution path are covered and replaced by the multidimensional kernel parameter tensor.

[0033] The final context representation tensor of size 1024×128 is subjected to average pooling or attention pooling along the time dimension to obtain a one-dimensional window-level representation vector of length 128. This window-level representation vector is input into a numerical predictor, which includes a hidden layer with 512 neurons, a ReLU activation layer, and an output layer with 3 neurons. The hidden layer is used for feature mapping of the window-level representation vector, the ReLU activation layer is used to generate nonlinear hidden layer features, and the output layer is used to output a one-dimensional prediction vector of length 3. The three elements of the one-dimensional prediction vector represent the load voltage magnitude scalars of phases A, B, and C of the distribution box at the next time step, thereby obtaining the predicted values ​​of the key parameters of the three-phase load voltage at the next time node.

[0034] In the weight reconstruction branch, the aforementioned window-level representation vector is fed into a parameter projection layer composed of a single-layer linear network, mapping the vector into a one-dimensional feature vector of length 1312. Here, 1312 corresponds to the total number of reconfigurable 32-channel two-dimensional depthwise separable convolutional kernel parameters in the local temporal convolution path, including 32×1×3×3 equals 288 channel-wise convolutional parameters and 32×32×1×1 equals 1024 pointwise convolutional parameters. The fixed-channel upscaling mapping, which involves increasing the initial spatiotemporal feature map from one input channel to 32 intermediate channels, and the fixed-channel compression mapping, which compresses the 32 intermediate channels back into a single-channel two-dimensional matrix, are not included in the 1312 reconfigurable parameters. Based on the preset underlying memory view, the one-dimensional feature vector is split and a Reshape matrix operation is performed to restore it into multi-dimensional parameter tensors of sizes 32×1×3×3 and 32×32×1×1, respectively. The reshaped multidimensional tensor overlays the original reconfigurable weight matrix in the local temporal convolution path, enabling the reconfiguration of feature extraction weights and ensuring adaptability to transient changes in the distribution box's operating status when processing data in the next time window. Since the output of the local temporal convolution path is compressed and mapped back to 1024×70 before fusion, this 32-channel reconfigurable convolution structure will not affect the multiplication dimension between the subsequent fused feature matrix and the 70×128 preset parameter matrix.

[0035] In a second embodiment, the present invention also proposes an intelligent distribution box data acquisition system, comprising the following modules: The generation module is used to acquire the original time-series data of the sensor nodes of the power distribution box within a preset time window and convert it into an initial spatiotemporal feature map; the initial spatiotemporal feature map is input into a local temporal convolution path and a global sparse Fourier transform path to extract spatiotemporal information. The local temporal convolution path uses the initial convolution kernel in the first time window, and after weighted fusion, it generates a key tensor K and a value tensor V through a linear transformation, and a query tensor Q is generated from the initial spatiotemporal feature map; The calculation module is used to divide the key tensor K into multiple key feature clusters according to clustering rules and calculate the center vector of each cluster. For each query vector in the query tensor Q, the module identifies the nearest preset number of key feature clusters as the target range. Within the target range, the module calculates the attention score between the query vector and the corresponding key vector, and performs a weighted summation on the corresponding value vectors in the value tensor V to obtain the aggregated output of each cluster. Based on the distance between the query vector and the corresponding center vector, a gating signal is generated. The aggregated output of each cluster is weighted and fused to obtain the final context representation. The module updates the corresponding center vector using the key vectors of each cluster within the current time window through an exponential moving average method. The adjustment module is used to reshape the final context representation used to obtain the distribution box status analysis results or key parameter prediction values ​​of the current time window into a transformation kernel parameter for real-time reconfiguration of the convolution kernel of the local temporal convolution path, and adjust the feature extraction mode of the next time window.

[0036] The above description represents the preferred embodiments of the present invention. It should be noted that, for those skilled in the art, various improvements and modifications can be made without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A data acquisition method for an intelligent distribution box, characterized in that, Includes the following steps: The original time-series data of the sensor nodes in the power distribution box within a preset time window are acquired and converted into an initial spatiotemporal feature map. The initial spatiotemporal feature map is input into a local temporal convolution path and a global sparse Fourier transform path to extract spatiotemporal information. The local temporal convolution path uses the initial convolution kernel in the first time window. After weighted fusion, a linear transformation is performed to generate a key tensor K and a value tensor V. A query tensor Q is generated from the initial spatiotemporal feature map. The key tensor K is divided into multiple key feature clusters according to clustering rules and the center vector of each cluster is calculated. For each query vector in the query tensor Q, the nearest preset number of key feature clusters are identified as the target range. Within the target range, the attention score of the query vector and the corresponding key vector is calculated, and the corresponding value vectors in the value tensor V are weighted and summed to obtain the aggregated output of each cluster. A gating signal is generated based on the distance between the query vector and the corresponding center vector. The aggregated output of each cluster is weighted and fused to obtain the final context representation. The corresponding center vector is updated using the key vector of each cluster in the current time window through the exponential moving average method. The final context representation is used to obtain the distribution box status analysis results or key parameter prediction values ​​for the current time window, and is reshaped into transformation kernel parameters for real-time reconfiguration of the convolution kernel of the local temporal convolution path to adjust the feature extraction mode for the next time window.

2. The method according to claim 1, characterized in that, The process of acquiring the raw time-series data of the distribution box sensor nodes within a preset time window and converting it into an initial spatiotemporal feature map includes: Extract the three-phase voltage data, three-phase current data, and temperature data collected by the sensor nodes in the distribution box as raw time-series data; The original time-series data is arranged into a one-dimensional node sequence according to each sensor node, and multiple frames of the one-dimensional node sequence within a preset time window are sequentially superimposed along the time series dimension to construct a two-dimensional feature matrix as the initial spatiotemporal feature map.

3. The method according to claim 2, characterized in that, The process of extracting spatiotemporal information by inputting the initial spatiotemporal feature map into a local temporal convolution path and a global sparse Fourier transform path, wherein the local temporal convolution path uses the initial convolution kernel in the first time window, and after weighted fusion and linear transformation, generates a key tensor K and a value tensor V, and generates a query tensor Q from the initial spatiotemporal feature map includes: Two-dimensional depthwise separable convolution kernels are used to perform convolution operations on the initial spatiotemporal feature map to output local spatiotemporal information; A two-dimensional fast Fourier transform is performed on the initial spatiotemporal feature map to extract the 10% of frequency components with the largest amplitude in the frequency domain as the set of retained frequency components and set the remaining components to zero. Then, the global spatiotemporal information is output by performing an inverse fast Fourier transform and extracting the real part. Assign fusion weights to local spatiotemporal information and global spatiotemporal information, add the weighted results of the two and fuse them, and multiply the fused feature matrix by the second preset parameter matrix and the third preset parameter matrix respectively to output the key tensor K and value tensor V; The initial spatiotemporal feature map is multiplied by the first preset parameter matrix to output the query tensor Q.

4. The method according to claim 1, characterized in that, The step of dividing the key tensor K into multiple key feature clusters according to clustering rules and calculating the center vector of each cluster, and identifying the nearest preset number of key feature clusters as the target range for each query vector in the query tensor Q, includes: In the first time window, all key vectors in the key tensor K are clustered into 256 independent key feature clusters, and the arithmetic mean vector of all key vectors contained in each key feature cluster is calculated to initialize the center vector of each cluster. In subsequent time windows, based on the Euclidean distance to the center vectors of each cluster, the key vectors in the key tensor K are assigned to the nearest key feature clusters; Calculate the Euclidean distance between the currently processed query vector in the query tensor Q and the above 256 center vectors. Sort the Euclidean distances in ascending order of value, and extract the key feature clusters to which the center vectors with the top 4 distance values ​​belong to form the target range.

5. The method according to claim 1 or 4, characterized in that, The step of calculating the attention score between the query vector and the corresponding key vector within the target range, and then weighting and summing the corresponding value vectors in the value tensor V to obtain the cluster aggregation output includes: Calculate the inner product of the query vector and each key vector within the target range, divide the inner product by the square root of the key vector dimension, and input the division results corresponding to all key vectors within the target range into the Softmax function to output the attention score; The value vector at the same index position in the value tensor V for each key vector is multiplied by the corresponding calculated attention score and scaled proportionally. The scaled value vectors are then accumulated element-wise within the range of a single key feature cluster to generate the aggregated output of the corresponding key feature cluster.

6. The method according to claim 1, characterized in that, The process of generating a gating signal based on the distance between the query vector and the corresponding center vector, aggregating and weighting the outputs of each cluster to obtain the final context representation, and updating the corresponding center vector using the key vectors of each cluster within the current time window through an exponential moving average method includes: Calculate the squared Euclidean distance between the query vector and the cluster center vectors within the target range, multiply the squared Euclidean distance by a preset negative proportionality coefficient, and then perform an exponential operation to obtain the gating signal for the corresponding cluster. Each gate signal is multiplied by the aggregated output of the corresponding cluster, and a vector addition operation is performed on the aggregated output of the four clusters scaled by the gate signals within the target range to generate the context representation of the corresponding query vector. The final context representation is generated by combining the context representations of all query vectors within the current time window. Multiply the original center vector of the corresponding key feature cluster by the decay constant, and add the compensation value obtained by multiplying the complement of the decay constant by the arithmetic mean vector of the key vectors belonging to the cluster in the current time window. The sum of the two is then used to completely replace and update the center vector of the corresponding key feature cluster.

7. The method according to claim 1, characterized in that, The step of using the final context representation to obtain the distribution box status analysis results or key parameter prediction values ​​for the current time window, reshaping it into transform kernel parameters for real-time reconfiguration of the convolution kernel of the local temporal convolution path, and adjusting the feature extraction mode for the next time window includes: The final context representation is pooled along the time dimension to obtain a window-level representation vector; The window-level representation vector is input into a numerical predictor, which includes at least two fully connected layers, and outputs the predicted values ​​of the load voltage key parameters at the next time node through linear mapping. The window-level representation vector is mapped to a one-dimensional kernel parameter vector through a parameter projection layer. The length of the one-dimensional kernel parameter vector is equal to the total number of weight parameters to be reconfigured in the two-dimensional depthwise separable convolution kernel. According to the original parameter arrangement order of the two-dimensional depth separable convolution kernel, the size of the one-dimensional kernel parameter vector is reconstructed to obtain the multi-dimensional kernel parameter tensor corresponding to the weight parameters to be reconfigured. The weight parameters of the reconfigurable two-dimensional depthwise separable convolution kernel in the local temporal convolution path are covered and replaced by the multidimensional kernel parameter tensor.

8. A smart distribution box data acquisition system, characterized in that, Includes the following modules: The generation module is used to acquire the original time-series data of the sensor nodes of the power distribution box within a preset time window and convert it into an initial spatiotemporal feature map; the initial spatiotemporal feature map is input into a local temporal convolution path and a global sparse Fourier transform path to extract spatiotemporal information. The local temporal convolution path uses the initial convolution kernel in the first time window, and after weighted fusion, it generates a key tensor K and a value tensor V through a linear transformation, and a query tensor Q is generated from the initial spatiotemporal feature map; The calculation module is used to divide the key tensor K into multiple key feature clusters according to clustering rules and calculate the center vector of each cluster. For each query vector in the query tensor Q, the module identifies the nearest preset number of key feature clusters as the target range. Within the target range, the module calculates the attention score between the query vector and the corresponding key vector, and performs a weighted summation of the corresponding value vectors in the value tensor V to obtain the aggregated output of each cluster. A gating signal is generated based on the distance between the query vector and the corresponding center vector. The aggregated output of each cluster is weighted and fused to obtain the final context representation. The corresponding center vector is updated using the key vector of each cluster in the current time window through the exponential moving average method. The adjustment module is used to reshape the final context representation used to obtain the distribution box status analysis results or key parameter prediction values ​​of the current time window into a transformation kernel parameter for real-time reconfiguration of the convolution kernel of the local temporal convolution path, and adjust the feature extraction mode of the next time window.

9. The system according to claim 8, characterized in that, The process of acquiring the raw time-series data of the distribution box sensor nodes within a preset time window and converting it into an initial spatiotemporal feature map includes: Extract the three-phase voltage data, three-phase current data, and temperature data collected by the sensor nodes in the distribution box as raw time-series data; The original time-series data is arranged into a one-dimensional node sequence according to each sensor node, and multiple frames of the one-dimensional node sequence within a preset time window are sequentially superimposed along the time series dimension to construct a two-dimensional feature matrix as the initial spatiotemporal feature map.

10. The system according to claim 8, characterized in that, The process of extracting spatiotemporal information by inputting the initial spatiotemporal feature map into a local temporal convolution path and a global sparse Fourier transform path, wherein the local temporal convolution path uses the initial convolution kernel in the first time window, and after weighted fusion and linear transformation, generates a key tensor K and a value tensor V, and generates a query tensor Q from the initial spatiotemporal feature map includes: Two-dimensional depthwise separable convolution kernels are used to perform convolution operations on the initial spatiotemporal feature map to output local spatiotemporal information; A two-dimensional fast Fourier transform is performed on the initial spatiotemporal feature map to extract the 10% of frequency components with the largest amplitude in the frequency domain as the set of retained frequency components and set the remaining components to zero. Then, the global spatiotemporal information is output by performing an inverse fast Fourier transform and extracting the real part. Assign fusion weights to local spatiotemporal information and global spatiotemporal information, add the weighted results of the two and fuse them, and multiply the fused feature matrix by the second preset parameter matrix and the third preset parameter matrix respectively to output the key tensor K and value tensor V; The initial spatiotemporal feature map is multiplied by the first preset parameter matrix to output the query tensor Q.