Charging equipment fault diagnosis method and system based on time sequence convolution and global self-attention dependent capture network

CN122904549APending Publication Date: 2026-10-13NANJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611390301.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-09
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

[0003]针对现有技术的以上缺陷或改进需求,本发明提供了一种基于时序卷积与全局自注意力依赖捕获网络的充电设备故障诊断方法及系统,由此解决充电设备故障诊断中单一数据源信息不全面、小样本识别能力不足、局部与全局特征提取受限以及共模噪声干扰严重的技术问题:

Benefits of technology

[0065]本发明通过构建多源数据融合预处理框架,整合设备报修记录、充电运营订单、设备运行报文数据和环境监测数据四类多源数据,解决了单一数据源信息不全面的问题,从多个维度全面刻画充电设备运行状态,显著提升了故障诊断的准确性;基于充电设备故障少数类过采样技术对故障样本进行扩充,有效解决了充电设备故障诊断领域普遍存在的小样本和类别不平衡问题,提升了模型对稀有故障类别的识别能力和泛化能力;采用时序卷积网络与全局依赖捕获的自注意力神经网络分层特征提取的融合架构,底层时序卷积网络通过堆叠膨胀因果卷积残差块提取多尺度局部时序特征,能够有效捕捉电压突变、电流尖峰等短时异常模式;高层全局依赖捕获的自注意力神经网络通过多头自注意力机制对时序卷积网络输出的局部特征进行全局依赖建模,直接建立任意时间步之间的长距离关联,克服了循环神经网络逐时间步串行计算导致的信息衰减问题;本发明在全局依赖捕获的自注意力神经网络编码器中引入差分注意力机制,通过计算两个独立注意力矩阵的差值抑制共模噪声,增强故障特征信号的辨识度,提升了模型在复杂噪声环境下的诊断鲁棒性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122904549A_ABST
    Figure CN122904549A_ABST
Patent Text Reader

Abstract

The application discloses a charging equipment fault diagnosis method and system based on a time sequence convolution and global self-attention dependent capture network, and belongs to the technical field of charging equipment fault diagnosis. The method comprises the following steps: collecting multi-source data generated in the operation process of charging equipment, wherein the multi-source data comprises equipment repair record data, charging operation order data, equipment operation message data and environment monitoring data; pre-processing and fusing the multi-source data to generate a multi-source fusion data set; constructing a time sequence convolution and global self-attention dependent capture network fusion diagnosis model, wherein a time convolution network is used in the bottom layer of the model to extract multi-scale local time sequence features, a global dependence modeling is performed by using an encoder of a global dependence capture self-attention neural network in the upper layer, and a differential attention mechanism is introduced to suppress common mode noise; training the model by using the multi-source fusion data set; and inputting to-be-diagnosed data into the trained model to output a fault diagnosis result. The application solves the technical problems that the existing method is limited in local and global feature extraction and is seriously interfered by common mode noise, and effectively improves the accuracy and robustness of charging equipment fault diagnosis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of charging equipment fault diagnosis technology, specifically to a charging equipment fault diagnosis method and system based on temporal convolution and global self-attention dependency capture network, applicable to fault detection and fault type identification of DC charging piles for electric vehicles. Background Technology

[0002] With the rapid development of the electric vehicle industry, charging equipment, as a critical infrastructure, plays a vital role in the promotion and application of electric vehicles through its safe and stable operation. During long-term operation, charging equipment inevitably experiences various faults due to environmental factors and equipment aging, including communication failures, insulation failures, power module failures, over-temperature failures, abnormal voltage and current, and contactor / relay failures. Failure to diagnose these faults promptly and accurately can not only affect normal charging services but also potentially lead to safety accidents. Currently, charging equipment fault diagnosis methods are mainly divided into physical model-based methods and data-driven methods. Physical model-based methods determine faults by establishing models of battery thermal runaway mechanisms and sensor monitoring models, offering strong interpretability. However, the complex parameters of charging equipment and the strong coupling between different parameters make physical modeling challenging. Data-driven methods analyze charging data using machine learning or deep learning models to achieve fault diagnosis. Existing data-driven fault diagnosis methods have the following shortcomings: Most methods rely on a single data source for fault diagnosis, such as using only charging order data or only equipment operation message data. The information from a single data source is incomplete and it is difficult to fully characterize the operating status of the charging equipment, thus limiting the accuracy of diagnosis. In the field of charging equipment fault diagnosis, there are common problems of small sample size and class imbalance. It is difficult to collect fault samples, and the number of rare fault samples is very small, which affects the model training effect and leads to insufficient ability of the model to identify fault categories in small samples. Summary of the Invention

[0003] To address the aforementioned deficiencies or improvement needs of existing technologies, this invention provides a method and system for fault diagnosis of charging equipment based on temporal convolution and global self-attention dependency capture networks. This solves the technical problems in fault diagnosis of charging equipment, such as incomplete information from a single data source, insufficient small-sample recognition capability, limited local and global feature extraction, and severe common-mode noise interference.

[0004] Processing and fusing multi-source data collected during the operation of charging equipment;

[0005] A fault diagnosis dataset for charging equipment is constructed based on the temporal characteristics of the fault diagnosis model for charging equipment.

[0006] For the fault diagnosis task of charging equipment, a model is built based on temporal convolution and global self-attention dependency capture network;

[0007] The temporal convolutional and global self-attention dependency capture networks were trained and optimized based on the constructed charging equipment fault diagnosis dataset.

[0008] The trained and optimized model is used to diagnose faults in charging equipment.

[0009] Preferably, the multi-source data collected during the operation of the charging equipment is processed and fused, as follows:

[0010] S1: Collect multi-source data generated during the operation of the charging equipment, including equipment repair record data, charging operation order data, equipment operation message data, and environmental monitoring data;

[0011] S2: Perform macroscopic feature reconstruction on the equipment repair record data, take the charging operation orders that are traced back a first preset number of days based on the fault start time as the fault type sample, and take the charging operation orders that are traced back a first preset number of days based on the equipment repair time as the non-fault type sample, encode the order end reason, and extract the order statistical features.

[0012] S3: Perform micro-time alignment on the device operation message data, associate the device operation message data with the charging operation order using the transaction serial number as the association key, and use the segmented aggregation method to sample the variable-length message sequence of each order into a fixed length at equal intervals, and extract the time-series feature parameters;

[0013] S4: The macroscopic features constructed in step S2 are fused with the microscopic temporal features extracted in step S3 to generate a multi-source fusion dataset.

[0014] Preferably, a charging equipment fault diagnosis dataset is constructed based on the time-series characteristics of the charging equipment fault diagnosis model, as follows:

[0015] S1: Perform feature filtering on the preprocessed multi-source data, and select one-hot coding features of order termination reasons, order statistical features, and continuous statistical features as artificial feature vectors;

[0016] S2: After time-aligning the device operation message data, extract the output voltage, output current, and charging interface temperature parameters to construct a micro-time-series feature matrix;

[0017] S3: Use synthetic minority class oversampling technology to oversample and expand faulty class samples. For each minority class sample, calculate its Euclidean distance to all other minority class samples, select the K nearest neighbor samples, randomly select a nearest neighbor sample from the K nearest neighbors, perform linear interpolation to generate a new synthetic sample, and repeat the above process until the number of samples in each class reaches a balance.

[0018] S4: Principal component analysis is used to reduce the dimensionality of the fused artificial feature vector and temporal feature matrix, retaining the first k principal components to reduce the feature dimension.

[0019] S5: Divide the dataset into training and test sets according to a preset ratio. Use a stratified random sampling strategy to ensure that the proportion of each category in the training and test sets is consistent with the original dataset. Set a fixed random seed to ensure the reproducibility of the experiment.

[0020] Compared to existing technologies, the above dataset construction steps utilize a hybrid feature representation that combines artificial feature vectors with micro-temporal feature matrices through feature selection. This approach incorporates domain expert knowledge while preserving original temporal details, unlike using a single type of feature. The synthetic minority class oversampling technique addresses the common problems of scarce fault samples and class imbalance in charging equipment fault diagnosis by providing targeted expansion, avoiding overfitting risks and loss of effective sample information compared to random sampling. Principal component analysis is used for dimensionality reduction, lowering the feature dimension while retaining key feature information. This reduces computational overhead for model training and alleviates the curse of dimensionality, whereas some existing technologies directly input high-dimensional hybrid features into the model, easily leading to the curse of dimensionality and increased computational costs. The stratified random sampling combined with a fixed random seed partitioning strategy ensures consistency in class distribution and experimental repeatability between the training and test sets, providing a more reliable data foundation for model training than simple random partitioning.

[0021] Preferably, for the fault diagnosis task of charging equipment, modeling is performed based on temporal convolution and global self-attention dependency capture network, as follows:

[0022] S1: Construct a temporal convolutional network feature extraction layer, consisting of multiple stacked residual blocks. Each residual block contains two layers of dilated causal convolutions and residual connections. The dilation factor of each residual block grows exponentially to extract multi-scale local temporal features. The forward propagation formula for the residual block is:

[0023]

[0024]

[0025]

[0026] In the formula, For the input tensor of the residual block, and These are the intermediate feature maps after the first and second dilated convolution layers, respectively. , These are the weight tensors of the two convolutional kernels, and It is a bias term. This is the final output tensor of the residual block. Dilation convolution operator, , Indicates the expansion rate. For weight normalization, This is a random deactivation operation. To modify the activation function of the linear unit, This is the residual projection.

[0027] S2: Perform dimension permutation on the local temporal feature tensor output by the temporal convolutional network feature extraction layer to adapt it to the input format requirements of the self-attention neural network encoder with global dependency capture. The overall output formula of the temporal convolutional network feature extraction layer is:

[0028]

[0029]

[0030]

[0031] In the formula, The original input sequence, For the first Feature maps output from each residual block For the first The globally differentiable mapping function of each residual block This represents the total number of stacking layers of the residual blocks. This is the original high-dimensional feature sequence output by the backbone network.

[0032] The formula for dimension permutation is:

[0033]

[0034] In the formula, For dimension permutation operation functions, The projected feature sequence after dimension permutation.

[0035] S3: Add learnable positional encodings to the dimension-adapted feature tensor to inject positional information from each time step in the sequence. The formula for adding this encoding is:

[0036]

[0037] In the formula, For the dimension-adapted feature tensor, A learnable position encoding matrix, The output features are those after injecting location information.

[0038] S4: Input the features after adding position encoding into the self-attention neural network encoder for global dependency capture to perform global dependency modeling. The self-attention neural network encoder for global dependency capture includes a multi-head self-attention layer and a feedforward neural network layer. The multi-head self-attention layer learns the dependency relationships of different subspaces through multiple parallel attention heads, and directly establishes long-distance associations between arbitrary time steps.

[0039] S5: A differential attention mechanism is introduced into the self-attention neural network encoder with global dependency capture. By calculating the difference between two independent attention matrices, common-mode noise is suppressed and fault feature signals are enhanced. The formula for calculating differential attention is:

[0040]

[0041] Each attention head independently calculates self-attention, as shown in the following formula:

[0042]

[0043] In the formula, For the number of attention heads, It is the first The output features of each attention head The output of the multi-head attention function, , , They are the first The query, key, and value projection matrix of the head. It is the output projection matrix. , , These are the query matrix, key matrix, and value matrix, respectively. For splicing operations, This is a function for calculating the attention of the scaled dot product.

[0044]

[0045] in, This represents the output of the differential attention mechanism, i.e., the enhanced features after canceling common-mode noise. This represents the first independent attention matrix, used to capture fault features and some common-mode noise in the original signal. This represents the second independent attention matrix, primarily used to learn the common-mode noise components. This represents the differential weighting coefficients, primarily used for learning common-mode noise components;

[0046] S6: Take the output features of the last time step of the self-attention neural network encoder with global dependency capture, map them to the fault category space through a fully connected layer, and output the fault detection result or fault classification result.

[0047] Compared to existing technologies, the above model construction steps adopt a hierarchical fusion architecture of temporal convolutional networks and self-attention neural networks that capture global dependencies. The bottom layer extracts multi-scale local temporal features through stacked dilated causal convolutional residual blocks, which can effectively capture short-term abnormal patterns such as voltage surges and current spikes. The top layer performs global dependency modeling on local features through a multi-head self-attention mechanism, directly establishing long-distance correlations between arbitrary time steps, solving the information decay problem caused by the serial calculation of recurrent neural networks step by step in existing technologies. A differential attention mechanism is introduced to suppress common-mode noise commonly found in the charging equipment operating environment through the difference operation of two independent attention matrices, enhancing the identification of fault feature signals and improving the diagnostic robustness of the model in complex noise environments. In contrast, the standard self-attention mechanism used in existing technologies cannot distinguish between fault features and common-mode noise, which can easily lead to misdiagnosis.

[0048] Preferably, the temporal convolutional and global self-attention dependency capture networks are trained and optimized based on the constructed charging equipment fault diagnosis dataset, as follows:

[0049] S1: The cross-entropy loss function is used to measure the difference between the model's predicted distribution and the true distribution;

[0050] S2: Use the AdamW optimizer to update network parameters, and set the initial learning rate, weight decay coefficient, first moment estimate exponential decay rate, and second moment estimate exponential decay rate.

[0051] S3: Employ an early stopping strategy. When the validation set loss no longer decreases after a preset number of consecutive rounds, stop training and save the model parameters with the lowest validation set loss.

[0052] Compared to existing technologies, the above training optimization steps adopt the cross-entropy loss function to adapt to multi-class fault diagnosis tasks, which is more suitable for multi-class scenarios than loss functions such as mean square error; the AdamW optimizer is used to update network parameters, which has a better regularization effect than the standard Adam optimizer; and the early stopping strategy automatically terminates training and saves the optimal model parameters by monitoring the validation set loss, avoiding the subjectivity of manually setting the training rounds.

[0053] Preferably, a well-trained and optimized model is used to diagnose faults in the charging equipment, as follows:

[0054] S1: The multi-source data of the charging device to be diagnosed is preprocessed, fused and dataset constructed according to the methods described in claims 2 and 3 to generate a sample to be diagnosed;

[0055] S2: Input the sample to be diagnosed into the trained temporal convolutional and global self-attention dependency capture network fusion diagnostic model, and the model outputs the predicted probability of each fault category;

[0056] S3: Select the category with the highest predicted probability as the fault diagnosis result. When the fault probability value is greater than the preset threshold, it is determined to be a fault state and an alarm notification is triggered; when the fault probability value is less than the preset threshold, it is determined to be a normal state.

[0057] Compared to existing technologies, the above fault diagnosis steps adopt a probability threshold determination mechanism. Compared to the hard classification method that directly takes the category with the highest probability, it can achieve a balance between fault detection rate and false alarm rate through threshold adjustment, and can be applied to application scenarios with different safety level requirements.

[0058] According to another aspect of the present invention, a fault diagnosis system for charging devices based on temporal convolution and global self-attention dependency capture networks is provided, comprising:

[0059] Data acquisition module: used to collect multi-source data generated during the operation of charging equipment, including equipment repair record data, charging operation order data, equipment operation message data and environmental monitoring data;

[0060] Data preprocessing and fusion module: used to preprocess and fuse the collected multi-source data to construct a multi-source data fusion charging equipment fault diagnosis dataset;

[0061] Model building module: used to build diagnostic models based on the fusion of temporal convolution and global self-attention dependency capture networks;

[0062] Model training module: used to train the temporal convolutional and global self-attention dependency capture network fusion diagnostic model using the dataset;

[0063] Fault diagnosis module: This module takes the data to be diagnosed, inputs it into the trained and optimized model, performs fault diagnosis, and outputs the fault diagnosis results.

[0064] In summary, compared with the prior art, the above-described technical solutions conceived by this invention can achieve the following beneficial effects:

[0065] This invention constructs a multi-source data fusion preprocessing framework, integrating four types of multi-source data: equipment repair records, charging operation orders, equipment operation message data, and environmental monitoring data. This solves the problem of incomplete information from a single data source, comprehensively depicting the operating status of charging equipment from multiple dimensions and significantly improving the accuracy of fault diagnosis. Based on the minority class oversampling technique for charging equipment faults, the fault samples are expanded, effectively solving the common problems of small sample size and class imbalance in the field of charging equipment fault diagnosis, and improving the model's ability to identify and generalize rare fault categories. A fusion architecture is adopted, combining a temporal convolutional network with a self-attention neural network for global dependency capture for hierarchical feature extraction. The underlying temporal convolutional network... By extracting multi-scale local temporal features through stacked dilated causal convolutional residual blocks, short-term abnormal patterns such as voltage surges and current spikes can be effectively captured. The high-level global dependency capture self-attention neural network performs global dependency modeling on the local features output by the temporal convolutional network through a multi-head self-attention mechanism, directly establishing long-distance correlations between arbitrary time steps, overcoming the information decay problem caused by sequential calculations step-by-step in recurrent neural networks. This invention introduces a differential attention mechanism into the global dependency capture self-attention neural network encoder, suppressing common-mode noise by calculating the difference between two independent attention matrices, enhancing the identification of fault feature signals, and improving the diagnostic robustness of the model in complex noise environments.

[0066] Furthermore, this invention has the following advantages: It employs a data-driven end-to-end diagnostic framework, eliminating the need to build complex physical models of charging devices and avoiding the problem of difficult-to-accurate modeling due to multi-parameter coupling in physical modeling, thus exhibiting strong versatility and transferability. The model architecture of this invention adopts a modular design, allowing for independent optimization and replacement of the temporal convolutional feature extraction layer, the globally dependent capture self-attention encoder, and the differential attention module, facilitating targeted adjustments based on the needs of different application scenarios. This invention integrates a multi-source data processing framework that combines macroscopic statistical features with microscopic temporal features, fully utilizing various data resources generated during the operation of charging devices, thereby improving data utilization efficiency and the comprehensiveness of diagnostic results. Attached Figure Description

[0067] Figure 1 This is an overall flowchart of the charging device fault diagnosis method based on temporal convolution and global self-attention dependency capture network of the present invention;

[0068] Figure 2 This is a flowchart of the multi-source data preprocessing and fusion process of the present invention;

[0069] Figure 3 This is a schematic diagram of the structure of the self-attention neural network encoder with global dependency capture according to the present invention;

[0070] Figure 4This is a schematic diagram of the structure of the diagnostic model that integrates temporal convolution and global self-attention dependency capture network according to the present invention. Detailed Implementation

[0071] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.

[0072] Example 1: See Figure 1 A fault diagnosis method for charging devices based on temporal convolution and global self-attention dependency capture networks, the method comprising the following steps:

[0073] Processing and fusing multi-source data collected during the operation of charging equipment;

[0074] A fault diagnosis dataset for charging equipment is constructed based on the temporal characteristics of the fault diagnosis model for charging equipment.

[0075] For the fault diagnosis task of charging equipment, a model is built based on temporal convolution and global self-attention dependency capture network;

[0076] The temporal convolutional and global self-attention dependency capture networks were trained and optimized based on the constructed charging equipment fault diagnosis dataset.

[0077] The trained and optimized model is used to diagnose faults in charging equipment.

[0078] Preferably, the multi-source data collected during the operation of the charging equipment is processed and fused, see [reference]. Figure 2 The process is as follows:

[0079] S1: Collect multi-source data generated during the operation of the charging equipment, including equipment repair record data, charging operation order data, equipment operation message data, and environmental monitoring data;

[0080] S2: Perform macroscopic feature reconstruction on the equipment repair record data, take the charging operation orders that are traced back a first preset number of days based on the fault start time as the fault type sample, and take the charging operation orders that are traced back a first preset number of days based on the equipment repair time as the non-fault type sample, encode the order end reason, and extract the order statistical features.

[0081] S3: Perform micro-time alignment on the device operation message data, associate the device operation message data with the charging operation order using the transaction serial number as the association key, and use the segmented aggregation method to sample the variable-length message sequence of each order into a fixed length at equal intervals, and extract the time-series feature parameters;

[0082] S4: The macroscopic features constructed in step S2 are fused with the microscopic temporal features extracted in step S3 to generate a multi-source fusion dataset.

[0083] Preferably, a charging equipment fault diagnosis dataset is constructed based on the time-series characteristics of the charging equipment fault diagnosis model, as follows:

[0084] S1: Perform feature filtering on the preprocessed multi-source data, and select one-hot coding features of order termination reasons, order statistical features, and continuous statistical features as artificial feature vectors;

[0085] S2: After time-aligning the device operation message data, extract the output voltage, output current, and charging interface temperature parameters to construct a micro-time-series feature matrix;

[0086] S3: Use synthetic minority class oversampling technology to oversample and expand faulty class samples. For each minority class sample, calculate its Euclidean distance to all other minority class samples, select the K nearest neighbor samples, randomly select a nearest neighbor sample from the K nearest neighbors, perform linear interpolation to generate a new synthetic sample, and repeat the above process until the number of samples in each class reaches a balance.

[0087] S4: Principal component analysis is used to reduce the dimensionality of the fused artificial feature vector and temporal feature matrix, retaining the first k principal components to reduce the feature dimension.

[0088] S5: Divide the dataset into training and test sets according to a preset ratio. Use a stratified random sampling strategy to ensure that the proportion of each category in the training and test sets is consistent with the original dataset. Set a fixed random seed to ensure the reproducibility of the experiment.

[0089] Preferably, for the fault diagnosis task of charging equipment, modeling is performed based on temporal convolution and global self-attention dependency capture network, as follows:

[0090] S1: Construct a temporal convolutional network feature extraction layer, consisting of multiple stacked residual blocks. Each residual block contains two layers of dilated causal convolutions and residual connections. The dilation factor of each residual block grows exponentially to extract multi-scale local temporal features. The forward propagation formula for the residual block is:

[0091]

[0092]

[0093]

[0094] In the formula, For the input tensor of the residual block, and These are the intermediate feature maps after the first and second dilated convolution layers, respectively. , These are the weight tensors of the two convolutional kernels, and It is a bias term. This is the final output tensor of the residual block. Dilation convolution operator, , Indicates the expansion rate. For weight normalization, This is a random deactivation operation. To modify the activation function of the linear unit, This is the residual projection.

[0095] S2: Perform dimension permutation on the local temporal feature tensor output by the temporal convolutional network feature extraction layer to adapt it to the input format requirements of the self-attention neural network encoder with global dependency capture. The overall output formula of the temporal convolutional network feature extraction layer is:

[0096]

[0097]

[0098]

[0099] In the formula, The original input sequence, For the first Feature maps output from each residual block For the first The globally differentiable mapping function of each residual block This represents the total number of stacking layers of the residual blocks. This is the original high-dimensional feature sequence output by the backbone network.

[0100] The formula for dimension permutation is:

[0101]

[0102] In the formula, For dimension permutation operation functions, The projected feature sequence after dimension permutation.

[0103] S3: Add learnable positional encodings to the dimension-adapted feature tensor to inject positional information from each time step in the sequence. The formula for adding this encoding is:

[0104]

[0105] In the formula, For the dimension-adapted feature tensor, A learnable position encoding matrix, The output features are those after injecting location information.

[0106] S4: Input the features with added positional encoding into the self-attention neural network encoder for global dependency capture to perform global dependency modeling. See [link to documentation]. Figure 3 The global dependency capture self-attention neural network encoder includes a multi-head self-attention layer and a feedforward neural network layer. The multi-head self-attention layer learns the dependencies of different subspaces through multiple parallel attention heads, and directly establishes long-distance associations between arbitrary time steps.

[0107] S5: A differential attention mechanism is introduced into the self-attention neural network encoder with global dependency capture. By calculating the difference between two independent attention matrices, common-mode noise is suppressed and fault feature signals are enhanced. The formula for calculating differential attention is:

[0108]

[0109] Each attention head independently calculates self-attention, as shown in the following formula:

[0110]

[0111] In the formula, For the number of attention heads, It is the first The output features of each attention head The output of the multi-head attention function, , , They are the first The query, key, and value projection matrix of the head. It is the output projection matrix. , , These are the query matrix, key matrix, and value matrix, respectively. For splicing operations, This is a function for calculating the attention of the scaled dot product.

[0112]

[0113] in, This represents the output of the differential attention mechanism, i.e., the enhanced features after canceling common-mode noise. This represents the first independent attention matrix, used to capture fault features and some common-mode noise in the original signal. This represents the second independent attention matrix, primarily used to learn the common-mode noise components. This represents the differential weighting coefficients, primarily used for learning common-mode noise components;

[0114] S6: Take the output features of the last time step of the self-attention neural network encoder with global dependency capture, map them to the fault category space through a fully connected layer, and output the fault detection result or fault classification result.

[0115] Preferably, the temporal convolutional and global self-attention dependency capture networks are trained and optimized based on the constructed charging equipment fault diagnosis dataset, see [link to relevant documentation]. Figure 4 The process is as follows:

[0116] S1: The cross-entropy loss function is used to measure the difference between the model's predicted distribution and the true distribution;

[0117] S2: Use the AdamW optimizer to update network parameters, and set the initial learning rate, weight decay coefficient, first moment estimate exponential decay rate, and second moment estimate exponential decay rate.

[0118] S3: Employ an early stopping strategy. When the validation set loss no longer decreases after a preset number of consecutive rounds, stop training and save the model parameters with the lowest validation set loss.

[0119] Preferably, a well-trained and optimized model is used to diagnose faults in the charging equipment, as follows:

[0120] S1: The multi-source data of the charging device to be diagnosed is preprocessed, fused and dataset constructed according to the methods described in claims 2 and 3 to generate a sample to be diagnosed;

[0121] S2: Input the sample to be diagnosed into the trained temporal convolutional and global self-attention dependency capture network fusion diagnostic model, and the model outputs the predicted probability of each fault category;

[0122] S3: Select the category with the highest predicted probability as the fault diagnosis result. When the fault probability value is greater than the preset threshold, it is determined to be a fault state and an alarm notification is triggered; when the fault probability value is less than the preset threshold, it is determined to be a normal state.

[0123] Example 2: A fault diagnosis system for charging devices based on temporal convolution and global self-attention dependency capture networks, comprising:

[0124] Data acquisition module: used to collect multi-source data generated during the operation of charging equipment, including equipment repair record data, charging operation order data, equipment operation message data and environmental monitoring data;

[0125] Data preprocessing and fusion module: used to preprocess and fuse the collected multi-source data to construct a multi-source data fusion charging equipment fault diagnosis dataset;

[0126] Model building module: used to build diagnostic models based on the fusion of temporal convolution and global self-attention dependency capture networks;

[0127] Model training module: used to train the temporal convolutional and global self-attention dependency capture network fusion diagnostic model using the dataset;

[0128] Fault diagnosis module: This module takes the data to be diagnosed, inputs it into the trained and optimized model, performs fault diagnosis, and outputs the fault diagnosis results.

[0129] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for fault diagnosis of charging equipment based on temporal convolution and global self-attention dependency capture network, characterized in that, include: Processing and fusing multi-source data collected during the operation of charging equipment; A fault diagnosis dataset for charging equipment is constructed based on the temporal characteristics of the fault diagnosis model for charging equipment. For the fault diagnosis task of charging equipment, a model is built based on temporal convolution and global self-attention dependency capture network; The temporal convolutional and global self-attention dependency capture networks were trained and optimized based on the constructed charging equipment fault diagnosis dataset. The trained and optimized model is used to diagnose faults in charging equipment.

2. The method according to claim 1, characterized in that, The process of processing and fusing multi-source data collected during the operation of charging equipment is as follows: S1: Collect multi-source data generated during the operation of charging equipment. The multi-source data includes equipment repair record data, charging operation order data, equipment operation message data, and environmental monitoring data. S2: Perform macro-feature reconstruction on equipment repair record data. Based on the fault start time, charge operation orders that trace back the first preset number of days are used as fault-type samples, and based on the equipment repair time, charge operation orders that trace back the first preset number of days are used as non-fault-type samples. Encode the order termination reasons and extract order statistical features. S3: Perform micro-time alignment on the equipment operation message data, associate the equipment operation message data with the charging operation order using the transaction serial number as the association key, and use the segmented aggregation method to sample the variable-length message sequence of each order into a fixed length at equal intervals to extract the time-series feature parameters; S4: The macroscopic features constructed in step S2 are fused with the microscopic temporal features extracted in step S3 to generate a multi-source fusion dataset.

3. The method according to claim 1, characterized in that, A fault diagnosis dataset for charging equipment is constructed based on the time-series characteristics of the fault diagnosis model for charging equipment. The process is as follows: S1: Perform feature filtering on the preprocessed multi-source data, and select one-hot coding features of order termination reasons, order statistical features, and continuous statistical features as artificial feature vectors; S2: After time-aligning the device operation message data, extract the output voltage, output current, and charging interface temperature parameters to construct a micro-time-series feature matrix; S3: Use synthetic minority class oversampling technology to oversample and expand faulty class samples. For each minority class sample, calculate its Euclidean distance to all other minority class samples, select the K nearest neighbor samples, randomly select a nearest neighbor sample from the K nearest neighbors, perform linear interpolation to generate a new synthetic sample, and repeat the above process until the number of samples in each class reaches a balance. S4: Principal component analysis is used to reduce the dimensionality of the fused artificial feature vector and temporal feature matrix, retaining the first k principal components to reduce the feature dimension. S5: Divide the dataset into training and test sets according to a preset ratio. Use a stratified random sampling strategy to ensure that the proportion of each category in the training and test sets is consistent with the original dataset. Set a fixed random seed to ensure the reproducibility of the experiment.

4. The method according to claim 1, characterized in that, For the fault diagnosis task of charging equipment, a model is built based on temporal convolution and global self-attention dependency capture network, as follows: S1: Construct a temporal convolutional network feature extraction layer, consisting of multiple stacked residual blocks. Each residual block contains two layers of dilated causal convolutions and residual connections. The dilation factor of each residual block grows exponentially to extract multi-scale local temporal features. The forward propagation formula for the residual block is: In the formula, For the input tensor of the residual block, and These are the intermediate feature maps after the first and second dilated convolution layers, respectively. , These are the weight tensors of the two convolutional kernels, and It is a bias term. This is the final output tensor of the residual block. Dilation convolution operator, , Indicates the expansion rate. For weight normalization, This is a random deactivation operation. To modify the activation function of the linear unit, For residual projection, S2: Perform dimension permutation on the local temporal feature tensor output by the temporal convolutional network feature extraction layer to adapt it to the input format requirements of the self-attention neural network encoder with global dependency capture. The overall output formula of the temporal convolutional network feature extraction layer is: In the formula, The original input sequence, For the first Feature maps output from each residual block For the first The globally differentiable mapping function of each residual block This represents the total number of stacking layers of the residual blocks. The original high-dimensional feature sequence output by the backbone network. The formula for dimension permutation is: In the formula, For dimension permutation operation functions, The projected feature sequence after dimension permutation S3: Add learnable positional encodings to the dimension-adapted feature tensor to inject the positions at each time step in the sequence. The formula for adding the encodings is as follows: In the formula, For the dimension-adapted feature tensor, A learnable position encoding matrix, The output features after injecting location information, S4: Input the features with added position encoding into the self-attention neural network encoder for global dependency capture to perform global dependency modeling. The self-attention neural network encoder for global dependency capture includes a multi-head self-attention layer and a feedforward neural network layer. The multi-head self-attention layer learns the dependency relationships of different subspaces through multiple parallel attention heads, and directly establishes long-distance associations between arbitrary time steps. S5: A differential attention mechanism is introduced into the self-attention neural network encoder with global dependency capture. By calculating the difference between two independent attention matrices, common-mode noise is suppressed and fault feature signals are enhanced. The formula for calculating differential attention is: Each attention head independently calculates self-attention, as shown in the following formula: In the formula, For the number of attention heads, It is the first The output features of each attention head The output of the multi-head attention function, , , They are the first The query, key, and value projection matrix of the head. It is the output projection matrix. , , These are the query matrix, key matrix, and value matrix, respectively. For splicing operations, For scaling dot product attention computation function, in, This represents the output of the differential attention mechanism, i.e., the enhanced features after canceling common-mode noise. This represents the first independent attention matrix, used to capture fault features and some common-mode noise in the original signal. This represents the second independent attention matrix, primarily used to learn the common-mode noise components. This represents the differential weighting coefficients, primarily used for learning common-mode noise components; S6: Take the output features of the last time step of the self-attention neural network encoder with global dependency capture, map them to the fault category space through a fully connected layer, and output the fault detection result or fault classification result.

5. The method according to claim 1, characterized in that, The temporal convolutional and global self-attention dependency capture networks were trained and optimized based on the constructed charging equipment fault diagnosis dataset. The process is as follows: S1: The cross-entropy loss function is used to measure the difference between the model's predicted distribution and the true distribution; S2: Use the AdamW optimizer to update network parameters, and set the initial learning rate, weight decay coefficient, first moment estimate exponential decay rate, and second moment estimate exponential decay rate. S3: Employ an early stopping strategy. When the validation set loss no longer decreases after a preset number of consecutive rounds, stop training and save the model parameters with the lowest validation set loss.

6. The method according to claim 1, characterized in that, The trained and optimized model is used to diagnose faults in charging equipment. The process is as follows: S1: Preprocess, fuse, and construct datasets from multi-source data of the charging device to be diagnosed to generate a sample to be diagnosed; S2: Input the sample to be diagnosed into the trained temporal convolutional and global self-attention dependency capture network fusion diagnostic model, and the model outputs the predicted probability of each fault category; S3: Select the category with the highest predicted probability as the fault diagnosis result. When the fault probability value is greater than the preset threshold, it is determined to be a fault state and an alarm notification is triggered. When the failure probability value is less than the preset threshold, it is judged to be in a normal state.

7. A fault diagnosis system for charging equipment based on temporal convolution and global self-attention dependency capture network, characterized in that, The system for implementing the method according to any one of claims 1-6, the system comprising: Data acquisition module: used to collect multi-source data generated during the operation of charging equipment, including equipment repair record data, charging operation order data, equipment operation message data and environmental monitoring data; Data preprocessing and fusion module: used to preprocess and fuse the collected multi-source data to construct a multi-source data fusion charging equipment fault diagnosis dataset; Model building module: used to build diagnostic models based on the fusion of temporal convolution and global self-attention dependency capture networks; Model training module: used to train the temporal convolutional and global self-attention dependency capture network fusion diagnostic model using the dataset; Fault diagnosis module: This module takes the data to be diagnosed, inputs it into the trained and optimized model, performs fault diagnosis, and outputs the fault diagnosis results.

8. An electronic device comprising a memory and a processor, the memory for storing computer-executable instructions, the processor for executing the computer-executable instructions, wherein the computer-executable instructions, when executed by the processor, implement the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having stored thereon computer program instructions, which, when executed by a processor, implement the steps of the method according to any one of claims 1 to 6.