Charging pile fault diagnosis method and system based on multivariable time sequence visual fusion

By converting voltage and current time-series data into polar coordinate images and combining convolutional neural networks with entropy regularized attention optimization mechanisms, the problem of identifying the coupling relationship of multivariable time-series data in charging pile fault diagnosis is solved, achieving efficient and accurate fault diagnosis.

CN121456792APending Publication Date: 2026-02-03NANJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511524364.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-23
Publication Date
2026-02-03

AI Technical Summary

Technical Problem

Existing fault diagnosis methods for charging piles are unable to effectively capture the coupling relationship of multivariate time-series data, resulting in insufficient robustness of fault diagnosis. In particular, under the dynamic and nonlinear characteristics of voltage and current time-series signals, traditional methods are unable to achieve accurate diagnosis.

Method used

By mapping voltage and current time-series data to polar coordinate space and performing time-weighted Gram angle field transformation to generate two-dimensional images, and combining pre-trained convolutional neural networks and an entropy-regularized attention optimization mechanism, multi-level features are extracted and fault diagnosis is performed.

Benefits of technology

It improves the accuracy and robustness of charging pile fault diagnosis, enhances the ability to identify complex fault modes, reduces missed diagnoses and misdiagnoses, and lowers the computational resource requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121456792A_ABST
    Figure CN121456792A_ABST
Patent Text Reader

Abstract

The invention relates to a charging pile fault diagnosis method based on multivariable time sequence visual fusion, and the method specifically comprises the following steps: firstly, collecting voltage and current time sequence data from a charging pile, carrying out the data preprocessing, and dividing the normalized time sequence data according to a charging process; secondly, the time series data are mapped to a polar coordinate space in a segmented mode, polar coordinate representation is generated, and a two-dimensional image is generated based on time-weighted Grubrum angle field conversion calculation; secondly, superposing the two-dimensional images, inputting the two-dimensional images into a feature extraction network, extracting multi-level features in the images through a pre-trained visual neural network, and introducing a multi-scale fusion mechanism to obtain a feature tensor; inputting the feature tensor into a feature optimization network, performing structure conversion, dynamically calculating a dependency relationship between features based on an attention optimization mechanism of entropy regularization, and fusing multivariable features to obtain optimized feature representation; and finally, pooling the optimized feature representation, inputting the pooled feature representation into a classifier module, training a classifier, performing fine tuning on a pre-training model, and outputting probability distribution of fault types to realize fault diagnosis of the charging pile. According to the scheme, the accuracy of charging pile fault diagnosis is improved by utilizing the transfer learning technology and by means of the pre-training model and multivariable feature fusion in the visual field.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of electric vehicle charging pile fault diagnosis technology, and mainly relates to a charging pile fault diagnosis method and system based on multivariate time series visual fusion. Background Technology

[0002] With the rapid popularization of electric vehicles, charging piles, as a key infrastructure supporting their development, directly impact user experience and power grid safety through their operational reliability and fault diagnosis efficiency. During long-term operation, charging piles are susceptible to problems such as voltage anomalies, current imbalances, and insulation faults due to electrical load fluctuations, environmental factors, and equipment aging. Failure to diagnose and address these issues promptly can lead to equipment damage or even safety accidents. Therefore, developing efficient and accurate fault diagnosis methods for charging piles is of great significance for improving the operational efficiency of charging networks and ensuring charging safety.

[0003] Currently, although time-series data analysis technology based on deep learning has been gradually introduced into the fault diagnosis methods of charging piles, the following shortcomings still exist in practical applications: time-series signals such as voltage and current have dynamic and nonlinear characteristics, and traditional methods rely only on statistical features or fixed thresholds, making it difficult to capture abnormal patterns under complex operating conditions; charging pile faults are often caused by the coupling of multiple factors, and existing methods lack effective correlation and feature fusion of multivariate time-series data.

[0004] Existing technologies utilize deep learning models to process time-series data, but there is still room for improvement in data representation and feature extraction. Some methods directly input the raw time-series data into neural networks, failing to fully exploit the spatial structure information of the data, resulting in limited understanding of temporal dependencies by the model. Other methods attempt to convert time-series data into images for processing, but they are insufficient in the fusion representation of multivariate data and the mining of the correlation between image features and temporal features, making it difficult to effectively improve the robustness of fault diagnosis.

[0005] Image recognition technology based on convolutional neural networks and feature optimization methods based on attention mechanisms have shown potential in fault diagnosis across various fields. However, how to organically combine the two to achieve visual fusion representation and deep feature extraction of multivariate time-series data remains an unsolved problem. For example, while convolutional neural networks can extract local features of images, they struggle to focus on the dynamic weights of key features; attention mechanisms can optimize feature importance, but they are highly dependent on the quality of input features, and their optimization effect will be greatly reduced if feature extraction is insufficient. Methods involving multivariate time series mainly focus on the temporal dependence between samples, while treating the interaction between variables as secondary factors or supplementary information, failing to effectively capture the coupling relationship between variables. How to fuse voltage and current variables with equal importance, maintain the temporal synchronization of the two sequences, effectively fuse multivariate time-series data of charging piles, fully retain data correlation features, and accurately extract key information for accurate fault diagnosis of charging piles remains a challenge.

[0006] To address the aforementioned issues, there is an urgent need for a charging pile fault diagnosis method and system based on multivariate time series visual fusion. Summary of the Invention

[0007] To address the shortcomings of existing technologies, this invention provides a charging pile fault diagnosis method and system based on multivariate time series visual fusion. The method involves preprocessing and segmenting the voltage and current time-series data collected from the charging pile and mapping it to polar coordinate space to generate a polar coordinate representation. A two-dimensional Gram-field image is generated through time-weighted Gram-field transformation. After superposition and fusion, multi-level features are extracted using a pre-trained convolutional neural network to obtain a feature tensor. The feature tensor undergoes structural transformation, and a feature weight optimization mechanism based on entropy regularization is used to dynamically calculate feature weights and optimize the feature representation. A global feature representation is then generated through pooling, input into a classifier for training and fine-tuning, and outputs a probability distribution of fault types to achieve fault diagnosis. Based on the diagnosis results, targeted equipment maintenance and fault repair are performed on the faulty charging pile.

[0008] To achieve the above objectives, the present invention provides the following solution:

[0009] In a first aspect, this invention relates to a method for diagnosing charging pile faults based on multivariate time series visual fusion, the method comprising the following steps:

[0010] S1. Collect voltage and current time series data from the charging pile, perform data preprocessing, and divide the normalized time series data according to the charging process to obtain a time series data segment set.

[0011] S2. Segment the time-series data and map it to the polar coordinate space to generate a polar coordinate representation. Calculate and generate a two-dimensional image based on the time-weighted Gram angle field transformation.

[0012] S3. Overlay the two-dimensional images, input them into the feature extraction network, extract multi-level features from the images through a pre-trained visual neural network, introduce a multi-scale fusion mechanism to obtain the feature tensor;

[0013] S4. Input the feature tensor into the feature optimization network, perform structural transformation, dynamically calculate the dependencies between features based on the entropy regularization attention optimization mechanism, fuse multivariate features, and obtain the optimized feature representation.

[0014] S5. The optimized feature representation is pooled and input into the classifier module to train the classifier, and the pre-trained model is fine-tuned to output the probability distribution of fault types, thereby realizing the fault diagnosis of charging piles.

[0015] As a preferred embodiment, in S1, voltage and current time-series data are collected from the charging pile, preprocessed, and the normalized time-series data is divided according to the charging process to obtain a set of time-series data segments, including:

[0016] Step 1: Collect voltage and current time series data from the charging piles and perform data preprocessing, including outlier detection, removal, and normalization.

[0017] The system collects fault repair records, charging order data, and voltage and current time series data of charging piles from the management system of electric vehicle charging stations and the message data of each charging pile. The voltage and current time series data of the charging piles is represented as follows: and ,in Indicates a point in time Collected voltage and current data, This indicates the length of the voltage-current time series, and the value of each sample point represents the voltage and current data of the charging pile at the sampling time.

[0018] First, a sliding window statistical outlier detection method is used to detect and remove outliers. Let the window size be... The outlier removal criteria are defined as follows:

[0019]

[0020] in, , These represent the average values ​​of voltage and current within the sliding window, respectively. , These represent the confidence coefficients for voltage and current, respectively. Voltage is typically taken as 2, and current is typically taken as 2.5~3. , These represent the standard deviations of voltage and current within the sliding window, respectively. , These represent the voltage and current correction values ​​after the anomaly is removed, respectively.

[0021] Secondly, the samples after anomaly removal are normalized and scaled to an interval. The calculation formula is as follows:

[0022]

[0023]

[0024] in, and The range is obtained by normalization scaling. Voltage and current timing data, , These represent the maximum values ​​in the historical voltage and current data, , These represent the minimum values ​​in the historical voltage and current data, , These represent the normalized voltage and current time series data, respectively.

[0025] Step 2: Analyze the normalized voltage and current time series according to the charging process. and The data is divided into segments, resulting in a set of time series data segments, denoted as:

[0026]

[0027] in, The total number of segments, each segment It contains the voltage and current subsequences corresponding to a single acquisition. and They represent the first A segmented sequence of voltage and current data. and They represent the first The first segment Voltage and current data at each time point.

[0028] Traditional methods typically use the raw voltage / current sequences directly for normalization preprocessing without a rejection mechanism. This can lead to sporadic fluctuations or sensor errors severely perturbing the entire feature map, reducing model stability. The addition of outlier detection and rejection can more sensitively identify isolated anomalies while preserving effective trends, improving feature quality and facilitating the subsequent extraction of stable temporal patterns by the visual network, thus enhancing classification accuracy. This proposed solution divides the normalized voltage and current time-series data into multiple segments according to the actual charging process, rather than using traditional fixed or sliding windows. This segmentation closely matches the actual charging event sequence, fully capturing the fault evolution characteristics within each charging cycle and reducing noise interference unrelated to charging behavior, thereby improving diagnostic accuracy.

[0029] As a preferred embodiment, in S2, the time-series data is segmented and mapped to polar coordinate space to generate a polar coordinate representation. A two-dimensional image is then generated based on the time-weighted Gram angle field transformation, including:

[0030] Step 1: Map the time series data into polar coordinate space to generate a polar coordinate representation.

[0031] After segmentation and The polar coordinate transformation is calculated using the following formula:

[0032]

[0033] in, and They represent the first The first segment The phase angle of the voltage and current sequences mapped at each time point. Indicates the first The first segment The polar coordinate radius mapped at each time point. The inverse cosine function is used to define the range of... Data values ​​mapped to polar coordinates in radians , For the first The length of each segment of the sequence.

[0034] Step 2: Calculate the time-series data represented in polar coordinates based on the time-weighted Gram angle field to generate a two-dimensional image.

[0035] Calculate the inner product between different voltage vectors and between different current vectors, for a length of... voltage sequence and current sequence The inner product in the Gram angle field is defined as the cosine of the sum of the angles between different vectors, and the calculation formula is as follows:

[0036]

[0037] in, and For time points and voltage vector, and For time points and The current vector, , , and Corresponding to their phase angles,

[0038] Based on the inner product calculation of time series dependencies, the time-weighted Gram angle field matrix can be defined as:

[0039]

[0040] in, and These represent the elements of the time-weighted Gram angle field matrix for the voltage and current sequences, respectively. and Representing time points and voltage phase angle, and Representing time points and The current phase angle, and The time weighting coefficients for voltage and current are defined as follows:

[0041]

[0042] in, Indicates a point in time and The spacing, and The time decay coefficients of voltage and current represent the time decay rates of the weighted decay, respectively. It is a natural exponential function, which exponentializes fractions to ensure positive values ​​and amplifies differences.

[0043] The elements of the obtained time-weighted Gram matrix are mapped to pixels of the two-dimensional Gram angular field image to obtain an image that can characterize the structural information of the time series in polar coordinate angular space. and .

[0044] This scheme requires the simultaneous calculation of Gram matrices for both voltage and current sequences to form a dual-channel image. Traditional GAF (Gas-Oriented Fault Analysis) typically only targets single-variable time series. This transformation reflects the coupling relationship between multiple variables, enriching feature information and improving the distinguishability and diagnostic reliability of fault features. The scheme introduces time weighting. Traditional GAF ignores the non-uniformity of the time dimension. GAF without time weighting, especially when processing time series data, is prone to excessive repetition of local features. The time weighting mechanism can more realistically reflect the dynamic characteristics of voltage, current, and other signals under non-uniform sampling. In intermittent operating conditions such as charging piles, the impact of short-term abrupt changes or interval variations can be captured more accurately, thereby improving the time sensitivity of fault characterization. The scheme also introduces dual-channel stacking and tensor splicing mechanisms. Conventional GAF only uses cosine and sine GAF images as input. Channel-level stacking allows the model to automatically extract voltage-current coupling features through convolutional learning, improving the distinguishability of fault modes.

[0045] After segmentation, the time-series data is transformed into polar coordinates and then calculated using a time-weighted Gram matrix. This matrix quantitatively characterizes the temporal dependencies and structural relationships between different moments in the original voltage sequence. Finally, the matrix element values ​​are mapped to pixel values ​​to generate the attached figure. Figure 1 The time-weighted gram angle field image shown can preserve the interrelationships between variables by aligning the time axis during the transformation process.

[0046] As a preferred approach, in S3, two-dimensional images are overlaid and input into a feature extraction network. A pre-trained visual neural network extracts multi-level features from the image, and a multi-scale fusion mechanism is introduced to obtain a feature tensor, including:

[0047] Step 1: Overlay and fuse the time-weighted Gram corner field images to form a dual-channel input image, logically represented as follows:

[0048]

[0049] in, and These represent Gram angle field images generated based on voltage and current sequences, respectively. This represents a two-dimensional dual-channel image obtained by superimposing and fusing two time-weighted Gram angle field images. This indicates a tensor stacking operation, which stitches and merges two single-channel images along the channel dimension.

[0050] Step 2: Extract multi-level features from the image using a pre-trained visual neural network. Introduce a multi-scale fusion mechanism between the outputs of different layers of the feature extraction network to obtain the feature tensor.

[0051] A pre-trained visual neural network was selected as the feature extraction module of the model, and the fused time-weighted gram images were used. As the input to a convolutional network, let the convolution kernel in the convolutional neural network be... Size is The convolution process can then be represented as:

[0052]

[0053] in, These are the coordinates of the convolution kernel's position in the image. Indicates the image at position pixel values, Indicates the first Layer convolution kernel In position The value, That is, the first The feature map obtained after convolution. The number of convolutional kernel layers.

[0054] A multi-scale fusion mechanism is introduced to obtain the feature tensor, and the fusion formula is defined as follows:

[0055]

[0056] in, The feature tensor, the final output of the feature extraction network, contains multiple levels of feature mappings. Indicates the total number of feature layers. Indicates the first The fusion weight coefficients of the layer features satisfy the following conditions: , This indicates an operation that upsamples low-resolution features to a uniform size.

[0057] This scheme employs a visual pre-trained model, offering the following advantages: First, compared to training from scratch, transfer learning requires only minor parameter tuning to converge, reducing training time by over 80% and improving model stability. Second, the pre-trained network has a better weight initialization distribution, maintaining consistent feature abstraction capabilities across different scenarios and charging pile data, resulting in strong generalization ability. Finally, it can quickly obtain high-quality feature representations with a small sample size, significantly reducing the risk of model overfitting and demonstrating strong feature transfer capability. This scheme also employs a multi-scale fusion mechanism, offering the following advantages: First, features at different scales correspond to "local short-term changes" and "overall trend changes" in the charging pile's operating status, respectively; fusion allows simultaneous perception of both modes, improving the ability to identify complex faults. Second, through feature fusion, the model can retain temporal details (such as voltage fluctuations) at lower levels and capture macroscopic trends (such as overall charging patterns) at higher levels, constructing a more complete multi-layer feature space. Finally, the cross-fusion of features at different scales creates information redundancy in the model, providing adaptive correction capabilities for noise and outliers, thereby improving the stability of diagnostic results.

[0058] As a preferred approach, in S4, the feature tensor is input into the feature optimization network for structural transformation. Based on an entropy-regularized attention optimization mechanism, the dependencies between features are dynamically calculated, and multivariate features are fused to obtain the optimized feature representation, including:

[0059] Step 1: Perform structural transformations on the feature tensor, namely rearrangement and flattening operations.

[0060] tensor Shape ,in, Indicates batch size, This represents the number of channels in the feature map. and Representing the height and width of the feature map respectively, the transformation process, through feature rearrangement and flattening operations in the alignment module, can be represented as follows:

[0061]

[0062] in, This represents the tensor reshaping operation, which reshapes the tensor's dimensions without changing the total number of elements or the data order. The input tensor... The dimension is Output tensor The dimension is , This represents the length of the one-dimensional sequence after flattening the two-dimensional feature map.

[0063] Step 2: Employ an entropy-regularized attention optimization mechanism to dynamically calculate the dependencies between features, fuse multivariate features, and obtain the optimized feature representation.

[0064] By optimizing feature representations through the interaction of query vectors, key vectors, and value vectors, tensors in the self-attention module... First, through linear transformation, it is divided into three parts: query vector, key vector, and value vector, represented as follows:

[0065]

[0066] in, , , For each corresponding , , The learnable weight matrix is ​​obtained by calculating the attention weights of the key vectors through the correlation between the query vector and the key vectors. Then, the attention weights and key values ​​are weighted and summed to obtain the final attention feature representation.

[0067]

[0068] in, This is the final output of the attention module. The attention weights are normalized using a normalized exponential function, ensuring that the sum of all attention weights equals 1. Representing the query matrix AND key matrix transpose Multiply to calculate the similarity between the query and the key. Let be the dimension of the key vector. Used for scaling dot products.

[0069] Building upon the attention mechanism, an information entropy-based regularization term is introduced, and the total model loss is defined as:

[0070]

[0071] in, Represents the overall loss function. This represents the cross-entropy classification loss function. This represents the attention entropy regularization term. To control the non-negative balance coefficient of the regularization strength, To focus on the number of heads, This represents the matrix trace operation, used to sum the matrix entropy values. For matrix logarithm operations, This represents the attention mechanism processing function based on entropy regularization. This is the feature representation optimized by an entropy-regularized attention mechanism.

[0072] This scheme introduces entropy regularization constraints on top of the multi-head attention mechanism, offering the following advantages: First, standard multi-head attention merely distributes attention through a multi-head mechanism, but lacks consistency constraints among the heads. Introducing entropy regularization suppresses redundancy among the heads, allowing each head to learn a complementary information subspace, avoiding repeated attention to the same feature region, thereby enhancing the model's feature diversity and representational ability. Second, ordinary attention and multi-head attention are only used for forward feature weighting. Introducing entropy regularization automatically achieves the optimal balance between feature dispersion and discriminativity, improving classification accuracy and accelerating convergence. Finally, ordinary attention output struggles to explain the rationality of attention allocation. Introducing entropy regularization quantifies the complexity of attention distribution, providing interpretability metrics for the model and enhancing its interpretability and decision credibility.

[0073] As shown in the attached figure. Figure 2 As shown, the feature tensors are first rearranged and flattened, which preserves the spatial structure information of the feature maps. At the same time, an attention optimization mechanism based on entropy regularization is adopted, with each head focusing on different subspaces of the features. The outputs of each head are concatenated and fused through linear projection, which can dynamically capture the dependencies between multiple variables in the time dimension, enhance the model's ability to perceive key fault features, and finally fuse multivariate features to form a feature optimization network.

[0074] As a preferred embodiment, in S5, the optimized feature representation is pooled and input into the classifier module to train the classifier, and the pre-trained model is fine-tuned to output the probability distribution of fault types, thereby realizing charging pile fault diagnosis, including:

[0075] Step 1: Pool the output feature representation of the multi-head attention mechanism to generate a global feature representation:

[0076]

[0077] in, This is the global feature representation after pooling. This indicates that the features are being pooled.

[0078] Step 2: Input the pooled global features into the classifier module to train the classifier, fine-tune the pre-trained model, and output the probability distribution of fault types to achieve charging pile fault diagnosis.

[0079] Global feature representation The input is fed into the classifier and mapped to the fault category space. A transfer learning mechanism is used to fine-tune the parameters based on a pre-trained visual model. The optimization objective is:

[0080]

[0081] in, This represents the set of optimal parameters obtained after optimization. This represents finding the parameters that minimize the objective function. The operation, This represents the set of all trainable parameters in the model. Indicates the number of training samples. Indicates the sample index. , Indicates the first Input features of each sample Indicates the first Classification labels for each sample, The parameter is The model for input The predicted output, This represents the loss function, which measures the difference between the model's predicted output and the true label. This means averaging the loss over all training samples to obtain the empirical risk.

[0082] The fine-tuning training method is as follows: First, adjust the parameters of the pre-trained model... First, the initial parameters for downstream tasks are used to avoid convergence difficulties and performance instability caused by random initialization. Second, based on task complexity and data scale, the parameters of some layers in the model are frozen to retain their general feature extraction capabilities, and only subsequent layers are trained to adapt to task-specific high-level semantic features. Finally, the model is trained using a charging facility fault diagnosis dataset to update the parameters of selected layers, and the loss function is optimized through backpropagation to make the model output more adaptable to classification requirements.

[0083] After training, the probability distribution of the output fault types is calculated using the following formula:

[0084]

[0085] in, and These are the weight matrix and bias vector of the fully connected layer, respectively. The final output is the category probability distribution.

[0086] Based on the probability distribution The system determines the fault status of the charging station and uses the fault category with the highest probability as the final diagnostic output to complete the automatic fault identification.

[0087] This scheme proposes a hierarchical fine-tuning strategy with the following advantages: First, while maintaining the underlying general features, this method focuses on optimizing the high-level semantic features related to charging pile data, significantly reducing the required training data and computation, and improving the convergence speed; second, it can effectively avoid model overfitting and feature degradation, retain the stable structure of the pre-trained model, and ensure a balanced match between the transferred features and the distribution of charging pile data; finally, it has high scalability and cross-domain adaptability, and can be quickly transferred to new devices or new operating conditions without having to train the entire network from scratch.

[0088] As a preferred embodiment, the method performs equipment maintenance on faulty charging piles in the charging station based on the fault diagnosis results of the charging piles, and performs fault repair according to the diagnosed fault category.

[0089] A second aspect of this invention relates to a charging pile fault diagnosis system based on multivariate time series visual fusion. The system includes a data acquisition module, a feature fusion module, a model calculation module, and a fault diagnosis module. The data acquisition module is used to collect fault repair records, charging order data, and voltage-current time series data from the management system of electric vehicle charging stations and message data from each charging pile. It preprocesses the collected voltage-current time series data and divides it according to the charging process to obtain a time series data segment set. The feature fusion module is used to map the segmented time series data using polar coordinates. The system generates a two-dimensional image by performing a time-weighted Gram angle field conversion and then superimposing and fusing the time-weighted Gram angle field images generated based on voltage and current sequences to produce a two-dimensional dual-channel image. The model operation module is used to construct a fault diagnosis model by using a pre-trained model feature extraction and an attention optimization mechanism based on entropy regularization, to extract and analyze features from the input image, and to diagnose the fault status of the charging pile. The fault diagnosis module is used to respond and report based on the fault diagnosis results of the charging pile, and to intervene and handle the charging piles in the charging station, so as to carry out precise fault operation and maintenance based on the fault diagnosis results.

[0090] The beneficial effects of this invention are that, compared with the prior art, the charging pile fault diagnosis method and system based on multivariate time series visual fusion in this invention generates and fuses images by mapping voltage and current time series data to polar coordinates and performing time-weighted Gram angle field transformation. It then combines convolutional neural networks and an entropy-regularized attention optimization mechanism to extract optimized features, thereby achieving fault diagnosis and guiding maintenance. This invention utilizes the visual fusion and deep feature extraction capabilities of multivariate time series data to improve the accuracy and robustness of fault diagnosis, increase the efficiency of charging pile fault investigation, and provide strong support for ensuring the stable operation of the charging network.

[0091] The beneficial effects of the present invention also include:

[0092] 1. In this invention, voltage and current time series data are mapped to polar coordinate space and time-weighted Gram angle field transformation is performed to generate a two-dimensional image that retains the original time series dependencies and spatial features. This provides an effective way to transform time series data into visual features, realizes the fusion representation of multivariate time series information, and overcomes the limitations of single-dimensional data diagnosis.

[0093] 2. In this invention, multi-level features of images are extracted by pre-trained convolutional neural networks, and feature weights are dynamically calculated by combining an attention optimization mechanism based on entropy regularization. This enables the focus on key fault features, enhances the ability to identify complex fault modes, improves the model's diagnostic sensitivity for early and minor faults, and reduces missed diagnoses and misdiagnoses.

[0094] 3. This invention employs a transfer learning mechanism, fine-tuning a pre-trained visual model. Without changing all model parameters, only a small number of key layers and adaptation parameters are fine-tuned, effectively achieving efficient adaptation of the pre-trained model to charging pile fault diagnosis tasks. This method significantly reduces the demand for computing resources and storage space while maintaining the model's original feature extraction capabilities. It achieves diagnostic performance comparable to full fine-tuning with fewer trainable parameters, improving training efficiency and reducing deployment costs. Attached Figure Description

[0095] Figure 1 This is a schematic diagram of the time-weighted Gram transform process in the charging pile fault diagnosis method based on multivariate time series visual fusion.

[0096] Figure 2 This is a schematic diagram of the feature optimization network in a charging pile fault diagnosis method based on multivariate time series visual fusion.

[0097] Figure 3 This is a schematic diagram of the visualization results of the charging pile fault diagnosis method based on multivariate time series visual fusion on the test set;

[0098] Figure 4 This is a flowchart illustrating the steps of a charging pile fault diagnosis method based on multivariate time series visual fusion according to the present invention.

[0099] Figure 5 This is a schematic diagram of the module structure of a charging pile fault diagnosis system based on multivariate time series visual fusion according to the present invention. Detailed Implementation

[0100] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of this invention. The embodiments described in this invention are merely some embodiments of this invention, and not all embodiments. Based on the spirit of this invention, all other embodiments not described in this invention obtained by those skilled in the art based on the embodiments described in this invention without creative effort should fall within the protection scope of this invention.

[0101] Attached Figure Figure 4 This is a schematic flowchart illustrating the steps of a charging pile fault diagnosis method based on multivariate time series visual fusion according to the present invention. (See attached figure.) Figure 4 As shown, in a first aspect, the present invention relates to a method for fault diagnosis of charging piles based on multivariate time series visual fusion, the method comprising the following steps:

[0102] S1. Collect voltage and current time series data from the charging pile, perform data preprocessing, and divide the normalized time series data according to the charging process to obtain a time series data segment set.

[0103] S2. Segment the time-series data and map it to the polar coordinate space to generate a polar coordinate representation. Calculate and generate a two-dimensional image based on the time-weighted Gram angle field transformation.

[0104] S3. Overlay the two-dimensional images, input them into the feature extraction network, extract multi-level features from the images through a pre-trained visual neural network, introduce a multi-scale fusion mechanism to obtain the feature tensor;

[0105] S4. Input the feature tensor into the feature optimization network, perform structural transformation, dynamically calculate the dependencies between features based on the entropy regularization attention optimization mechanism, fuse multivariate features, and obtain the optimized feature representation.

[0106] S5. The optimized feature representation is pooled and input into the classifier module to train the classifier. The pre-trained model is then fine-tuned to output the probability distribution of the fault type, thereby realizing the fault diagnosis of the charging pile.

[0107] In S1, voltage and current time-series data are collected from the charging pile, preprocessed, and the normalized time-series data is divided according to the charging process to obtain a set of time-series data segments, including:

[0108] Step 1: Collect voltage and current time series data from the charging piles and perform data preprocessing, including outlier detection, removal, and normalization.

[0109] The system collects fault repair records, charging order data, and voltage and current time series data of charging piles from the management system of electric vehicle charging stations and the message data of each charging pile. The voltage and current time series data of the charging piles is represented as follows: and ,in Indicates a point in time Collected voltage and current data, This indicates the length of the voltage-current time series, and the value of each sample point represents the voltage and current data of the charging pile at the sampling time.

[0110] First, a sliding window statistical outlier detection method is used to detect and remove outliers. Let the window size be... The outlier removal criteria are defined as follows:

[0111]

[0112] in, , These represent the average values ​​of voltage and current within the sliding window, respectively. , These represent the confidence coefficients for voltage and current, respectively. Voltage is typically taken as 2, and current is typically taken as 2.5~3. , These represent the standard deviations of voltage and current within the sliding window, respectively. , These represent the voltage and current correction values ​​after the anomaly is removed, respectively.

[0113] Secondly, the samples after anomaly removal are normalized and scaled to an interval. The calculation formula is as follows:

[0114]

[0115]

[0116] in, and The range is obtained by normalization scaling. Voltage and current timing data, , These represent the maximum values ​​in the historical voltage and current data, , These represent the minimum values ​​in the historical voltage and current data, , These represent the normalized voltage and current time series data, respectively.

[0117] Step 2: Analyze the normalized voltage and current time series according to the charging process. and The data is divided into segments, resulting in a set of time series data segments, denoted as:

[0118]

[0119] in, The total number of segments, each segment It contains the voltage and current subsequences corresponding to a single acquisition. and They represent the first A segmented sequence of voltage and current data. and They represent the first The first segment Voltage and current data at each time point.

[0120] In S2, the time-series data is segmented and mapped to polar coordinate space to generate a polar coordinate representation. A two-dimensional image is then generated based on the time-weighted Gram angle field transformation, including:

[0121] Step 1: Map the time series data into polar coordinate space to generate a polar coordinate representation.

[0122] After segmentation and The polar coordinate transformation is calculated using the following formula:

[0123]

[0124] in, and They represent the first The first segment The phase angle of the voltage and current sequences mapped at each time point. Indicates the first The first segment The polar coordinate radius mapped at each time point. The inverse cosine function is used to define the range of... Data values ​​mapped to polar coordinates in radians , For the first The length of each segment of the sequence.

[0125] Step 2: Calculate the time-series data represented in polar coordinates based on the time-weighted Gram angle field to generate a two-dimensional image.

[0126] Calculate the inner product between different voltage vectors and between different current vectors, for a length of... voltage sequence and current sequence The inner product in the Gram angle field is defined as the cosine of the sum of the angles between different vectors, and the calculation formula is as follows:

[0127]

[0128] in, and For time points and voltage vector, and For time points and The current vector, , , and Corresponding to their phase angles,

[0129] Based on the inner product calculation of time series dependencies, the time-weighted Gram angle field matrix can be defined as:

[0130]

[0131] in, and These represent the elements of the time-weighted Gram angle field matrix for the voltage and current sequences, respectively. and Representing time points and voltage phase angle, and Representing time points and The current phase angle, and The time weighting coefficients for voltage and current are defined as follows:

[0132]

[0133] in, Indicates a point in time and The spacing, and The time decay coefficients of voltage and current represent the time decay rates of the weighted decay, respectively. It is a natural exponential function, which exponentializes fractions to ensure positive values ​​and amplifies differences.

[0134] The elements of the obtained time-weighted Gram matrix are mapped to pixels of the two-dimensional Gram angular field image to obtain an image that can characterize the structural information of the time series in polar coordinate angular space. and .

[0135] Example: After segmentation, the time-series data is transformed into polar coordinates and then calculated using a time-weighted Gram matrix. This matrix quantitatively characterizes the temporal dependencies and structural relationships between different moments in the original voltage sequence. Finally, the matrix element values ​​are mapped to pixel values ​​to generate the attached figure. Figure 1 The time-weighted gram angle field image shown can preserve the interrelationships between variables by aligning the time axis during the transformation process.

[0136] In S3, two-dimensional images are overlaid and input into a feature extraction network. A pre-trained visual neural network extracts multi-level features from the images, and a multi-scale fusion mechanism is introduced to obtain a feature tensor, including:

[0137] Step 1: Overlay and fuse the time-weighted Gram corner field images to form a dual-channel input image, logically represented as follows:

[0138]

[0139] in, and These represent Gram angle field images generated based on voltage and current sequences, respectively. This represents a two-dimensional dual-channel image obtained by superimposing and fusing two time-weighted Gram angle field images. This indicates a tensor stacking operation, which stitches and merges two single-channel images along the channel dimension.

[0140] Step 2: Extract multi-level features from the image using a pre-trained visual neural network. Introduce a multi-scale fusion mechanism between the outputs of different layers of the feature extraction network to obtain the feature tensor.

[0141] A pre-trained visual neural network was selected as the feature extraction module of the model, and the fused time-weighted gram images were used. As the input to a convolutional network, let the convolution kernel in the convolutional neural network be... Size is The convolution process can then be represented as:

[0142]

[0143] in, These are the coordinates of the convolution kernel's position in the image. Indicates the image at position pixel values, Indicates the first Layer convolution kernel In position The value, That is, the first The feature map obtained after convolution. The number of convolutional kernel layers.

[0144] A multi-scale fusion mechanism is introduced to obtain the feature tensor, and the fusion formula is defined as follows:

[0145]

[0146] in, The feature tensor, the final output of the feature extraction network, contains multiple levels of feature mappings. Indicates the total number of feature layers. Indicates the first The fusion weight coefficients of the layer features satisfy the following conditions: , This indicates an operation that upsamples low-resolution features to a uniform size.

[0147] Example: The VGG16 visual neural network is selected as the visual pre-training model. It consists of 13 convolutional layers, 5 max-pooling layers, and 3 fully connected layers. The convolutional kernel size is 3×3 with a stride of 1, and the pooling layer size is 2×2. During feature extraction, lower-level convolutional blocks mainly extract general visual features, while higher-level convolutional blocks represent task-specific features, achieving a layer-by-layer representation of local image features from fine-grained to highly abstract.

[0148] In S4, the feature tensor is input into the feature optimization network for structural transformation. Based on an entropy-regularized attention optimization mechanism, the dependencies between features are dynamically calculated, and multivariate features are fused to obtain the optimized feature representation, including:

[0149] Step 1: Perform structural transformations on the feature tensor, namely rearrangement and flattening operations.

[0150] tensor Shape ,in, Indicates batch size, This represents the number of channels in the feature map. and Representing the height and width of the feature map respectively, the transformation process, through feature rearrangement and flattening operations in the alignment module, can be represented as follows:

[0151]

[0152] in, This represents the tensor reshaping operation, which reshapes the tensor's dimensions without changing the total number of elements or the data order. The input tensor... The dimension is Output tensor The dimension is , This represents the length of the one-dimensional sequence after flattening the two-dimensional feature map.

[0153] Step 2: Employ an entropy-regularized attention optimization mechanism to dynamically calculate the dependencies between features, fuse multivariate features, and obtain the optimized feature representation.

[0154] By optimizing feature representations through the interaction of query vectors, key vectors, and value vectors, tensors in the self-attention module... First, through linear transformation, it is divided into three parts: query vector, key vector, and value vector, represented as follows:

[0155]

[0156] in, , , For each corresponding , , The learnable weight matrix is ​​obtained by calculating the attention weights of the key vectors through the correlation between the query vector and the key vectors. Then, the attention weights and key values ​​are weighted and summed to obtain the final attention feature representation.

[0157]

[0158] in, This is the final output of the attention module. The attention weights are normalized using a normalized exponential function, ensuring that the sum of all attention weights equals 1. Representing the query matrix AND key matrix transpose Multiply to calculate the similarity between the query and the key. Let be the dimension of the key vector. Used for scaling dot products.

[0159] Building upon the attention mechanism, an information entropy-based regularization term is introduced, and the total model loss is defined as:

[0160]

[0161] in, Represents the overall loss function. This represents the cross-entropy classification loss function. This represents the attention entropy regularization term. To control the non-negative balance coefficient of the regularization strength, To focus on the number of heads, This represents the matrix trace operation, used to sum the matrix entropy values. For matrix logarithm operations, This represents the attention mechanism processing function based on entropy regularization. This is the feature representation optimized by an entropy-regularized attention mechanism.

[0162] Example: As shown in the attached image Figure 2 As shown, the feature tensors are first rearranged and flattened, which preserves the spatial structure information of the feature maps. At the same time, an attention optimization mechanism based on entropy regularization is adopted, with each head focusing on different subspaces of the features. The outputs of each head are concatenated and fused through linear projection, which can dynamically capture the dependencies between multiple variables in the time dimension, enhance the model's ability to perceive key fault features, and finally fuse multivariate features to form a feature optimization network.

[0163] In S5, the optimized feature representation is pooled and input into the classifier module to train the classifier. The pre-trained model is then fine-tuned, and the probability distribution of fault types is output to achieve charging pile fault diagnosis, including:

[0164] Step 1: Pool the output feature representation of the multi-head attention mechanism to generate a global feature representation:

[0165]

[0166] in, This is the global feature representation after pooling. This indicates that the features are being pooled.

[0167] Step 2: Input the pooled global features into the classifier module to train the classifier, fine-tune the pre-trained model, and output the probability distribution of fault types to achieve charging pile fault diagnosis.

[0168] Global feature representation The input is fed into the classifier and mapped to the fault category space. A transfer learning mechanism is used to fine-tune the parameters based on a pre-trained visual model. The optimization objective is:

[0169]

[0170] in, This represents the set of optimal parameters obtained after optimization. This represents finding the parameters that minimize the objective function. The operation, This represents the set of all trainable parameters in the model. Indicates the number of training samples. Indicates the sample index. , Indicates the first Input features of each sample Indicates the first Classification labels for each sample, The parameter is The model for input The predicted output, This represents the loss function, which measures the difference between the model's predicted output and the true label. This means averaging the loss over all training samples to obtain the empirical risk.

[0171] The fine-tuning training method is as follows: First, adjust the parameters of the pre-trained model... First, the initial parameters for downstream tasks are used to avoid convergence difficulties and performance instability caused by random initialization. Second, based on task complexity and data scale, the parameters of some layers in the model are frozen to retain their general feature extraction capabilities, and only subsequent layers are trained to adapt to task-specific high-level semantic features. Finally, the model is trained using a charging facility fault diagnosis dataset to update the parameters of selected layers, and the loss function is optimized through backpropagation to make the model output more adaptable to classification requirements.

[0172] After training, the probability distribution of the output fault types is calculated using the following formula:

[0173]

[0174] in, and These are the weight matrix and bias vector of the fully connected layer, respectively. The final output is the category probability distribution.

[0175] Based on the probability distribution The system determines the fault status of the charging station and uses the fault category with the highest probability as the final diagnostic output, thus completing automatic fault identification.

[0176] Example: Real fault data collected from actual charging piles in operation at a charging station, including six fault types, 279 fault samples, and 122 fault-free samples. (See attached figure) Figure 3 The visualization results of the hidden layer feature distribution of this method on the test set show that it exhibits good class separability in the feature space: the boundaries between samples of each class are clear, the inter-class distance is large, and the intra-class samples are highly clustered, indicating that the proposed method has good discriminative ability.

[0177] The method performs equipment maintenance on faulty charging piles in the charging station based on the fault diagnosis results of the charging piles, and performs fault repair according to the diagnosed fault category.

[0178] Attached Figure Figure 5 This is a schematic diagram of the module structure of a charging pile fault diagnosis system based on multivariate time series visual fusion according to the present invention.

[0179] A second aspect of this invention relates to a charging pile fault diagnosis system based on multivariate time series visual fusion, the system being implemented using the steps of the method in the first aspect of this invention; and the system includes a data acquisition module, a feature fusion module, a model calculation module, and a fault diagnosis module, wherein the data acquisition module is used to collect fault repair records, charging order data, and voltage and current time series data of charging piles from the management system of electric vehicle charging stations and the message data of each charging pile, and to preprocess and divide the collected voltage and current time series data according to the charging process to obtain a time series data segment set; the feature fusion module is used to segment the data... The subsequent time-series data is used to generate a two-dimensional image through polar coordinate mapping and time-weighted Gram angle field transformation. The time-weighted Gram angle field images generated based on voltage and current sequences are then superimposed and fused to generate a two-dimensional dual-channel image. The model operation module is used to construct a fault diagnosis model by using pre-trained model feature extraction and an attention optimization mechanism based on entropy regularization. It performs feature extraction and analysis on the input image to diagnose the fault status of the charging pile. The fault diagnosis module is used to respond and report based on the fault diagnosis results of the charging pile, and to intervene and handle the charging piles in the charging station to carry out precise fault operation and maintenance based on the fault diagnosis results.

[0180] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0181] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0182] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0183] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0184] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A charging pile fault diagnosis method based on multivariate time series visual fusion, characterized in that, The method includes the following steps: S1. Collect voltage and current time series data from the charging pile, perform data preprocessing, and divide the normalized time series data according to the charging process to obtain a time series data segment set. S2. Segment the time-series data and map it to the polar coordinate space to generate a polar coordinate representation. Calculate and generate a two-dimensional image based on the time-weighted Gram angle field transformation. S3. Overlay the two-dimensional images, input them into the feature extraction network, extract multi-level features from the images through a pre-trained visual neural network, introduce a multi-scale fusion mechanism to obtain the feature tensor; S4. Input the feature tensor into the feature optimization network, perform structural transformation, dynamically calculate the dependencies between features based on the entropy regularization attention optimization mechanism, fuse multivariate features, and obtain the optimized feature representation. S5. The optimized feature representation is pooled and input into the classifier module to train the classifier. The pre-trained model is then fine-tuned to output the probability distribution of the fault type, thereby realizing the fault diagnosis of the charging pile.

2. The charging pile fault diagnosis method based on multivariate time series visual fusion as described in claim 1, characterized in that, In step S1, voltage and current time series data are collected from the charging pile, preprocessed, and the normalized time series data is divided according to the charging process to obtain a time series data segment set, including: Step 1: Collect voltage and current time series data from the charging piles and perform data preprocessing, including outlier detection, removal, and normalization. The system collects fault repair records, charging order data, and voltage and current time series data of charging piles from the management system of electric vehicle charging stations and the message data of each charging pile. The voltage and current time series data of the charging piles is represented as follows: and ,in Indicates at a point in time Collected voltage and current data, This indicates the length of the voltage-current time series, and the value of each sample point represents the voltage and current data of the charging pile at the sampling time. First, a sliding window statistical outlier detection method is used to detect and remove outliers. Let the window size be... The outlier removal criteria are defined as follows: in, , These represent the average values ​​of voltage and current within the sliding window, respectively. , These represent the confidence coefficients for voltage and current, respectively, with voltage taking a value of 2 and current taking a value of 2.5~3. , These represent the standard deviations of voltage and current within the sliding window, respectively. , These represent the voltage and current correction values ​​after anomaly removal, respectively. Secondly, the samples after anomaly removal are normalized and scaled to an interval. The calculation formula is as follows: in, and The range is obtained by normalization scaling. Voltage and current timing data, , These represent the maximum values ​​in the historical voltage and current data, , These represent the minimum values ​​in the historical voltage and current data, , These represent the normalized voltage and current time series data, respectively. Step 2: Analyze the normalized voltage and current time series according to the charging process. and The data is divided into segments, resulting in a set of time series data segments, denoted as: in, The total number of segments, each segment It contains the voltage and current subsequences corresponding to a single acquisition. and They represent the first A segmented sequence of voltage and current data. and They represent the first The first segment Voltage and current data at each time point.

3. The charging pile fault diagnosis method based on multivariate time series visual fusion as described in claim 1, characterized in that, In step S2, the time-series data is segmented and mapped to polar coordinate space to generate a polar coordinate representation. A two-dimensional image is then generated based on the time-weighted Gram angle field transformation, including: Step 1: Map the time series data into polar coordinate space to generate a polar coordinate representation. After segmentation and The polar coordinate transformation is calculated using the following formula: in, and They represent the first The first segment The phase angle of the voltage and current sequences mapped at each time point. Indicates the first The first segment The polar coordinate radius mapped at each time point. The inverse cosine function is used to define the range of... Data values ​​mapped to polar coordinates in radians , For the first The length of each segment of the sequence. Step 2: Calculate the time-series data represented in polar coordinates based on the time-weighted Gram angle field to generate a two-dimensional image. Calculate the inner product between different voltage vectors and between different current vectors, for a length of... voltage sequence and current sequence The inner product in the Gram angle field is defined as the cosine of the sum of the angles between different vectors, and the calculation formula is as follows: in, and For time points and voltage vector, and For time points and The current vector, , , and Corresponding to their phase angles, Based on the inner product calculation of time series dependencies, the time-weighted Gram angle field matrix can be defined as: in, and These represent the elements of the time-weighted Gram angle field matrix for the voltage and current sequences, respectively. and Representing time points and voltage phase angle, and Representing time points and The current phase angle, and The time weighting coefficients for voltage and current are defined as follows: in, Indicates a point in time and The spacing, and The time decay coefficients of voltage and current represent the time decay rates of the weighted decay, respectively. For the natural exponential function, fractional exponentiation is used to ensure positive values ​​and amplify differences. The elements of the obtained time-weighted Gram matrix are mapped to pixels of the two-dimensional Gram angular field image to obtain an image that can characterize the structural information of the time series in polar coordinate angular space. and .

4. The charging pile fault diagnosis method based on multivariate time series visual fusion as described in claim 1, characterized in that, In step S3, the two-dimensional images are overlaid and input into the feature extraction network. A pre-trained visual neural network extracts multi-level features from the images, and a multi-scale fusion mechanism is introduced to obtain the feature tensor, including: Step 1: Overlay and fuse the time-weighted Gram corner field images to form a dual-channel input image, logically represented as follows: in, and These represent Gram angle field images generated based on voltage and current sequences, respectively. This represents a two-dimensional dual-channel image obtained by superimposing and fusing two time-weighted Gram angle field images. This indicates a tensor stacking operation, which stitches and merges two single-channel images along the channel dimension. Step 2: Extract multi-level features from the image using a pre-trained visual neural network. Introduce a multi-scale fusion mechanism between the outputs of different layers of the feature extraction network to obtain the feature tensor. A pre-trained visual neural network was selected as the feature extraction module of the model, and the fused time-weighted gram images were used. As the input to a convolutional network, let the convolution kernel in the convolutional neural network be... Size is The convolution process can then be represented as: in, These are the coordinates of the convolution kernel's position in the image. Indicates the image at position pixel values, Indicates the first Layer convolution kernel In position The value, That is, the first The feature map obtained after convolution. The number of convolutional kernel layers. A multi-scale fusion mechanism is introduced to obtain the feature tensor, and the fusion formula is defined as follows: in, The feature tensor, the final output of the feature extraction network, contains multiple levels of feature mappings. Indicates the total number of feature layers. Indicates the first The fusion weight coefficients of the layer features satisfy the following conditions: , This indicates an operation that upsamples low-resolution features to a uniform size.

5. The charging pile fault diagnosis method based on multivariate time series visual fusion as described in claim 1, characterized in that, In step S4, the feature tensor is input into the feature optimization network for structural transformation. Based on an entropy-regularized attention optimization mechanism, the dependencies between features are dynamically calculated, and multivariate features are fused to obtain the optimized feature representation, including: Step 1: Perform structural transformations on the feature tensor, namely rearrangement and flattening operations. tensor Shape ,in, Indicates batch size, This represents the number of channels in the feature map. and Representing the height and width of the feature map respectively, the transformation process, through feature rearrangement and flattening operations in the alignment module, can be represented as follows: in, This represents the tensor reshaping operation, which reshapes the tensor's dimensions without changing the total number of elements or the data order. The input tensor... The dimension is Output tensor The dimension is , This represents the length of the one-dimensional sequence after flattening the two-dimensional feature map. Step 2: Employ an entropy-regularized attention optimization mechanism to dynamically calculate the dependencies between features, fuse multivariate features, and obtain the optimized feature representation. By optimizing feature representations through the interaction of query vectors, key vectors, and value vectors, tensors in the self-attention module... First, through linear transformation, it is divided into three parts: query vector, key vector, and value vector, represented as follows: in, , , For each corresponding , , The learnable weight matrix is ​​obtained by calculating the attention weights of the key vectors through the correlation between the query vector and the key vectors. Then, the attention weights and key values ​​are weighted and summed to obtain the final attention feature representation. in, This is the final output of the attention module. The attention weights are normalized using a normalized exponential function, ensuring that the sum of all attention weights equals 1. Representing the query matrix AND key matrix transpose Multiply to calculate the similarity between the query and the key. Let be the dimension of the key vector. Used for scaling dot products. Building upon the attention mechanism, an information entropy-based regularization term is introduced, and the total model loss is defined as: in, Represents the overall loss function. This represents the cross-entropy classification loss function. This represents the attention entropy regularization term. To control the non-negative balance coefficient of the regularization strength, To focus on the number of heads, This represents the matrix trace operation, used to sum the matrix entropy values. For matrix logarithm operations, This represents the attention mechanism processing function based on entropy regularization. This is the feature representation optimized by an entropy-regularized attention mechanism.

6. The charging pile fault diagnosis method based on multivariate time series visual fusion as described in claim 1, characterized in that, In step S5, the optimized feature representation is pooled and input into the classifier module to train the classifier. The pre-trained model is then fine-tuned to output the probability distribution of fault types, thereby achieving charging pile fault diagnosis. This includes: Step 1: Pool the output feature representation of the multi-head attention mechanism to generate a global feature representation: in, This is the global feature representation after pooling. This indicates that the features are being pooled. Step 2: Input the pooled global features into the classifier module to train the classifier, fine-tune the pre-trained model, and output the probability distribution of fault types to achieve charging pile fault diagnosis. Global feature representation The input is fed into the classifier and mapped to the fault category space. A transfer learning mechanism is used to fine-tune the parameters based on a pre-trained visual model. The optimization objective is: in, This represents the set of optimal parameters obtained after optimization. This represents finding the parameters that minimize the objective function. The operation, This represents the set of all trainable parameters in the model. Indicates the number of training samples. Indicates the sample index. , Indicates the first Input features of each sample Indicates the first Classification labels for each sample, The parameter is The model for input The predicted output, This represents the loss function, which measures the difference between the model's predicted output and the true label. This means averaging the loss over all training samples to obtain the empirical risk. The fine-tuning training method is as follows: First, adjust the parameters of the pre-trained model... First, the initial parameters for downstream tasks are used to avoid convergence difficulties and performance instability caused by random initialization. Second, based on task complexity and data scale, the parameters of some layers in the model are frozen to retain their general feature extraction capabilities, and only subsequent layers are trained to adapt to task-specific high-level semantic features. Finally, the model is trained using a charging facility fault diagnosis dataset to update the parameters of selected layers, and the loss function is optimized through backpropagation to make the model output more adaptable to classification requirements. After training, the probability distribution of the output fault types is calculated using the following formula: in, and These are the weight matrix and bias vector of the fully connected layer, respectively. The final output is the category probability distribution. Based on the probability distribution The system determines the fault status of the charging station and uses the fault category with the highest probability as the final diagnostic output to complete the automatic fault identification.

7. A charging pile fault diagnosis system based on multivariate time series visual fusion, characterized in that, This method is used to implement the charging pile fault diagnosis method based on multivariate time series visual fusion as described in any one of claims 1-6. The system includes a data acquisition module, a feature fusion module, a model calculation module, and a fault diagnosis module, wherein... The data acquisition module is used to collect fault repair records, charging order data, and voltage and current time series data of charging piles from the management system of electric vehicle charging stations and the message data of each charging pile. It also preprocesses the collected voltage and current time series data and divides it according to the charging process to obtain a time series data segment set. The feature fusion module is used to generate a two-dimensional image from the segmented time-series data through polar coordinate mapping and time-weighted Gram angle field transformation, and to superimpose and fuse the time-weighted Gram angle field images generated based on voltage and current sequences to generate a two-dimensional dual-channel image. The model operation module is used to construct a fault diagnosis model by using pre-trained model feature extraction and an attention optimization mechanism based on entropy regularization, to extract and analyze features from the input image, and to diagnose the fault status of the charging pile. The fault diagnosis module is used to respond and report based on the fault diagnosis results of the charging pile, and to intervene and handle the charging piles in the charging station, so as to carry out precise fault operation and maintenance based on the fault diagnosis results.

8. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the charging pile fault diagnosis method based on multivariate time series visual fusion as described in any one of claims 1 to 6.

Citation Information

Cited By

  • Plunger gas lift anomaly detection method based on visual Transform and Gramer angle field transformation

    CN121921577A