Train communication network fault diagnosis method and device based on space-time diagram convolution

The MS-STGCN model, based on multi-scale spatiotemporal graph convolution, solves the problem of fault diagnosis for high-dimensional and dynamic data in train communication networks, achieving accurate fault identification and real-time detection for complex topologies, and improving the accuracy and efficiency of fault diagnosis.

CN121173644APending Publication Date: 2025-12-19GUANGXI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511402097.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-28
Publication Date
2025-12-19

AI Technical Summary

Technical Problem

Existing technologies struggle to capture communication behavior and fault evolution processes when processing high-dimensional and highly dynamic data from train communication networks, and they are unable to effectively handle complex topologies, resulting in insufficient fault diagnosis capabilities.

Method used

A fault diagnosis method for train communication networks based on multi-scale spatiotemporal graph convolution is adopted. By constructing the MS-STGCN model and combining multi-scale graph convolutional network and dual attention gated recurrent unit, spatial and temporal features between nodes are extracted, and node similarity and static adjacency matrix are constructed to improve fault identification capability.

Benefits of technology

It enables accurate fault identification and real-time status detection of train communication networks, improving the accuracy and efficiency of fault diagnosis, and is applicable to train communication networks with complex spatial structures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121173644A_ABST
    Figure CN121173644A_ABST
Patent Text Reader

Abstract

The invention discloses a train communication network fault diagnosis method and device based on space-time diagram convolution, and the method comprises the following steps: collecting the communication data of each communication node during the operation of a train communication network, carrying out the preprocessing and analysis of the collected communication data, splicing the feature sets of each communication node into a feature set according to the column, and carrying out the recognition of the feature set; calculating a feature similarity relationship among the nodes for the features among the nodes in the training set, constructing a node similarity adjacency matrix through the feature similarity relationship, and then constructing a node static adjacency matrix according to the size of communication traffic among the nodes; an MS-STGCN model of train communication network fault diagnosis is constructed, spatial relations in different scales in a feature set are extracted, high accuracy is achieved through training and fault recognition, and the train communication network fault diagnosis method is used for achieving train communication network fault diagnosis. According to the method, time and space information of a train communication network is fused, and the feature extraction capability of the model is improved by using a multi-scale receptive field.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of intelligent diagnostic technology for train communication networks, and in particular, it designs a fault diagnosis method and device for train communication networks based on spatiotemporal graph convolution. Background Technology

[0002] Accelerated urbanization and the continuous growth in public transportation demand have made rail transit play a crucial role in alleviating traffic congestion, improving transportation efficiency, and promoting green travel. As a core component of train control and information interaction, accurately identifying the health status of the train communication network is key to ensuring the safe and stable operation of the train system. Failures in the train communication network can easily lead to serious consequences such as interrupted information transmission and malfunctioning control commands. Therefore, improving its fault diagnosis capabilities is of great significance for ensuring the safety and reliability of the system.

[0003] Currently, fault detection in train communication networks typically employs traditional machine learning or deep learning methods. While these traditional methods achieved some success in early fault diagnosis of train communication networks, they struggle to capture the time-varying communication behavior and fault evolution processes when faced with today's high-dimensional and highly dynamic data. On one hand, traditional methods rely on manually constructed features, limiting their ability to represent fault characteristics; on the other hand, they cannot handle communication systems with complex topologies, making it difficult to capture the topological relationships and adjacency dependencies between nodes.

[0004] With the increasing integration of rail transit train systems, traditional train communication network fault diagnosis methods are no longer sufficient to meet the demands for operational efficiency and safety in urban rail transit development. Therefore, there is an urgent need for a train communication network fault diagnosis method and device based on multi-scale spatiotemporal graph convolution to achieve real-time status detection and accurate fault identification. Summary of the Invention

[0005] The purpose of this invention is to provide a method and apparatus for fault diagnosis of train communication networks based on spatiotemporal graph convolution, which overcomes the limitations of existing technologies in processing communication systems with complex spatial topologies and high-dimensional and highly dynamic data. To achieve the above objective, this invention adopts the following technical solution:

[0006] According to one aspect of the present invention, a fault diagnosis method for train communication networks based on multi-scale spatiotemporal graph convolution is provided, comprising the following steps:

[0007] S01: Collect communication data from each communication node during train communication network operation, including normal data and single fault data during train communication network operation;

[0008] S02: The collected communication data is preprocessed and parsed to obtain the feature set of each communication node. Then, according to the topological order of each communication node in the train communication network, the feature sets of each communication node are concatenated column by column to construct a feature set. The feature set is then divided into a training set and a test set according to a certain ratio. The data collected from each target node is parsed to obtain the state feature set of each target node. Then, the feature sets between nodes are combined vertically (column) to form a total feature set, which enables rapid data cleaning of the total data and elimination of outliers in the data.

[0009] S03: Calculate the feature similarity relationship between nodes for each node in the training set, construct a node similarity adjacency matrix based on the feature similarity relationship, and then construct a static node adjacency matrix based on the amount of communication between nodes; construct a node similarity adjacency matrix by calculating the similarity value of features between each pair of nodes in the training set, and construct a static topological adjacency matrix by statistically analyzing the amount of communication between pairs of nodes.

[0010] S04: Construct the MS-STGCN model for fault diagnosis of train communication network. The main body of the MS-STGCN model includes a multi-scale graph convolutional network and a dual-attention gated recurrent unit. The multi-scale graph convolutional network performs convolution operations on the input feature set to extract the spatial relationships within different scales in the feature set. Then, the dual-attention gated recurrent unit is used to perform differential modeling on different time steps and nodes of the feature set to enhance the fault classification performance of the model. Two attention mechanisms are added on the basis of the gated recurrent unit to make the model focus on key time steps and important spatial equipment nodes, thereby improving the prediction accuracy and generalization performance of the model.

[0011] S05: Input the training set, similarity adjacency matrix and static adjacency matrix into the MS-STGCN model for training. Iteratively optimize the parameters of the MS-STGCN model. Then input the test set into the trained MS-STGCN model for fault identification. If the MS-STGCN model shows high accuracy on the test set, it can be used to realize fault diagnosis of train communication network.

[0012] In a further preferred embodiment of the above scheme, in step S02, the collected communication data is preprocessed and parsed, and then the dataset is divided into a training set and a test set according to a certain ratio, including the following sub-steps;

[0013] S0201: The Scapy library in Python is used on the mobile client to parse and statistically analyze the collected data. For each target terminal node, 27 time-domain communication indicators are statistically analyzed to determine their relevant characteristics. A feature set is constructed using these time-domain communication indicators. These relevant characteristics mainly include received byte size, packet load, packet interval arrival time, transmission delay, delay jitter, and the number of received packets. These indicators can effectively determine the health status of the train communication network. In this invention, relevant characteristics of 8(i) target nodes are collected during the data collection period, such as the numerical values ​​of load size and byte size. 27(j) features are collected for each target node. At this time, the 27 feature columns of each target node are stored separately, facilitating the concatenation of all features from these 8 target nodes in S0202 to form a total feature column set, i.e., the node feature matrix input to the diagnostic model.

[0014] S0202: The relevant features of each time-domain communication indicator are combined into columns of normal data and single-failure data according to the order between nodes to obtain a feature set; the collected node features are vertically combined and sorted according to the order between nodes. The horizontal axis represents the splicing of different target node features, and the vertical axis represents different time steps / points. Therefore, the collected and organized dataset contains information of multiple target node feature columns at multiple time points, which is convenient for the MS-STGCN model to extract the spatial and temporal features of these datasets (as input data / input feature matrix).

[0015] S0203: Transform the feature set into a tabular dataset, eliminate noise, duplicates, missing values ​​and erroneous values ​​in the data, and then randomly divide the tabular dataset into training set and test set according to a certain ratio;

[0016] S0204: For each sample in the randomly partitioned training and test sets, sort the nodes according to the actual topology of the train communication network to form a node feature matrix, which serves as the input data for fault diagnosis; the node feature matrix F satisfies the following expression:

[0017] F = [f 1,1 ,f 1,2 ,...,f 1,8 ,...,f i,j-1 ,f i,j ], (1);

[0018] Among them, f i,j Let i represent the j-th feature column of the i-th node. max =8,j max =27.

[0019] In a further preferred embodiment of the above scheme, in step S03, constructing a node similarity adjacency matrix based on feature similarity relationships, and then constructing a node static adjacency matrix based on the communication volume between nodes, includes the following sub-steps:

[0020] S0301: Calculate the similarity value between each pair of node features based on the feature set of each node in the training set. For each target node, 27 feature columns were collected. Based on the training set after S0203, calculate the similarity value between each pair of target node feature columns. The formula for calculating the similarity value satisfies:

[0021]

[0022] in X represents the similarity value between node i and node j at the k-th attention head. i , This represents the feature columns contained in the i-th and j-th nodes respectively. Let the linear transformation matrix of the k-th attention head be represented. Indicates bias, d h · represents the output dimension, and · represents the vector inner product. When constructing the similarity adjacency matrix between nodes, multiple attention head mechanisms are used. Each attention head constructs its own similarity adjacency matrix. After construction, a fusion mechanism is used to converge them into a single similarity adjacency matrix for subsequent graph convolution operations.

[0023] S0302: Sort the similarity values ​​of a terminal target node with other nodes in descending order, select the K most similar nodes of the terminal target node as neighbors to form a connection relationship, and thus construct a similarity adjacency matrix for each terminal target node. The value of the adjacency matrix is ​​the similarity value between nodes. For nodes that do not form a connection relationship, the elements in the similarity adjacency matrix are replaced with 0 or a very small value.

[0024] S0303: Normalize the constructed similarity adjacency matrix, construct a static topological adjacency matrix based on the collected average communication volume between nodes, and use the normalized communication volume values ​​as the edges of the static adjacency matrix. The normalized features satisfy:

[0025]

[0026] Among them, f i,j Let f' represent the j-th feature column of the i-th sample. i,j f represents the normalized eigenvalues. j Represents all feature values ​​in column j;

[0027] S0304: Calculate the average communication volume between each pair of nodes for the collected normal data and single fault data, and use the average communication volume as the edge of the static adjacency matrix between each pair of nodes.

[0028] S0305: In the static adjacency matrix, the elements on the main diagonal are set to 1. For unconnected pairs of nodes, a minimum value ∈ is used for replacement. The values ​​between different nodes are selected from the normalized eigenvalues ​​in S0303. The static adjacency matrix satisfies the following expression:

[0029]

[0030] Among them, A t [i,j] represents the adjacency matrix corresponding to time step t. This represents the average communication volume from node i to j at the k-th time point.

[0031] In a further preferred embodiment of the above scheme, step 4, establishing the MS-STGCN model for train communication network fault diagnosis, specifically includes the following sub-steps:

[0032] S0401: To obtain richer information between nodes, a multi-scale graph convolutional network is used to capture spatial information in the feature set. The multi-scale graph convolutional network consists of three graph convolutional branches, distributed as high, medium, and low branches. Multiple branches capture spatial neighborhood information at different levels. The low branch uses low-order convolution to aggregate adjacent spatial information, the high branch uses multi-hop convolution to obtain global neighborhood information, and the medium branch captures neighborhood information missed by the low and high branches. The graph convolutional relationship of any branch satisfies:

[0033]

[0034] in Let B represent the feature set (input feature matrix) of the target node at time step t, B represent the batch size, N represent the number of target nodes, and d represent the number of target nodes. in This represents the number of feature columns of a target node. Let S represent the similarity adjacency matrix at time step t. t x t The adjacency matrix represents a weighted summation of node features, and the residual connection x represents the residual connection. t +S t x t Used to prevent over-smoothing The weight matrix represents the linear transformation. h represents the bias of the linear transformation. i This represents the graph convolution output of a single branch, where h is... i It is already an output node feature matrix that aggregates information from multiple spatial neighborhoods;

[0035] The multi-branch structure consists of three branches: high, medium, and low. These branches capture spatial information at different levels and distances. As the number of graph convolutions increases, the input feature matrix and adjacency matrix aggregate spatial neighborhood information from their respective nodes during graph convolution. To fully capture the local and global spatial neighborhood information of each node, multi-scale graph convolution is employed. After independent graph convolution in each branch, a gated weighted fusion mechanism is used to fuse the information from the three branches. The low-level branch uses low-order convolutions to aggregate adjacent spatial information (local); the lower the convolution order, the fewer graph convolutions are performed on that branch. The high-level branch uses multi-hop convolutions to acquire global neighborhood information; the more hops in the graph convolution, the deeper the neighborhood information captured on that branch. The medium-level branch captures the neighborhood information missed by the low-level and high-level branches.

[0036] S0402: In multi-scale graph convolution, different branches h i After capturing the spatial information of the corresponding neighborhood range, a gating fusion mechanism is added after the three graph convolution branches to adjust the importance of different graph convolution branches in the multi-scale graph convolutional network, and to aggregate the graph convolution outputs of different branches. The graph convolution outputs of different branches satisfy the following condition:

[0037]

[0038] Where h i Let represent the feature matrix of the convolutional output node of the i-th branch, σ(·) represent the Sigmoid function, I represent the total number of branches, and h t This represents the feature matrix of the output nodes after fusion;

[0039] In multi-scale graph convolution, different branches h i By capturing structural information from different neighborhood ranges, gated weighted fusion allows the model to adaptively adjust the importance of each branch. The node feature matrix H after gated weighted fusion is then obtained. t This is then used again as the input node feature matrix for the next stage. The output H after gated weighted fusion... t By performing the graph convolution operation shown in Equation 5 with the static adjacency matrix, the graph in Equation 5 is... If we replace it with the static adjacency matrix at time step t, then the input x at this time... t The output H after gating and weighted fusion t The node feature matrix is ​​multiplied with the static adjacency matrix to further improve the accuracy and consistency of the spatial representation.

[0040] S0403: The fused output node feature matrix from S0402 is input into a dual-attention gated recurrent unit network to extract time-series information from the output node feature matrix. In terms of capturing time-series information, the original gated recurrent unit is improved by adding a dual-attention mechanism for time steps and key network nodes. This allows the model to dynamically focus on key time steps and spatial device nodes, improving the model's diagnostic accuracy. The operations extracted in the dual-attention gated recurrent unit network satisfy the following:

[0041]

[0042] in This represents the input feature matrix, which is also the output feature matrix in multi-scale graph convolution. The learnable parameters representing the node attention weights, Softmax is a function that compresses any real-valued vector into a probability distribution (summing to 1). This represents the node features adjusted by attention weights along the node dimension; GRU stands for Gated Recurrent Unit. Where d h is the hidden layer dimension of GRU, representing the dynamic representation of nodes encoded in the time dimension; Dropout is a regularization technique that randomly "drops" some neurons during training; ReLU is a simple non-linear activation function that clears negative values ​​to zero and retains positive values; LN (Layer Normalization) is a technique that standardizes all features of a single sample. This represents the robust representation after normalization and nonlinear mapping. d represents the learnable parameter representing the attention weights at each time step. h Represents the hidden dimension of GRU, and the final output. The scores for various fault diagnosis methods represent the final representation that integrates node attention and temporal attention.

[0043] The output H of Formula 7 is first compressed into time using time pooling. Subsequently, the features are aggregated into Finally, after linear layer feature mapping, the final output probability vector is obtained. B represents the sample batch, and L is represented in the form that satisfies:

[0044] L = [a1, a2, ..., a n (8);

[0045] Where n is the total number of categories, a n This represents the score by which the input sample is classified as a type n fault, where a1 + a2 + ... + a n =1.

[0046] In a further preferred embodiment of the above scheme, in step S05, the training set is input into the fault diagnosis MS-STGCN model for training and optimization, and the test set is input into the trained MS-STGCN model for performance verification. If the MS-STGCN model shows excellent fault diagnosis accuracy and F1 score on the test set after continuous parameter optimization on the training set, it can be used to realize fault diagnosis of train communication network.

[0047] According to another aspect of the present invention, the present invention provides a fault diagnosis device for train communication networks based on multi-scale spatiotemporal graph convolution, the fault diagnosis device comprising a train communication network data acquisition module, a data parsing and processing module, a data construction module, a graph structure generation module, a fault training and testing module, and a fault result display module;

[0048] Train communication network data acquisition module: used to acquire communication data between communication nodes of various terminal devices in the train communication network and capture data packets in real time, and then store the data packets in the form of PCAP data files on the mobile client;

[0049] Data parsing and processing module: This module reads the original PCAP data file, processes the read PCAP data, eliminates outliers, obtains the feature set of each communication node, and then randomly divides the processed feature set into training and test sets in a 7:3 ratio.

[0050] Data construction module: used to fix the node order of each sample in the randomly divided training and test sets according to the actual topology of the train communication network, forming a node feature matrix as input for fault training;

[0051] Graph structure generation module: used to obtain dynamic and static adjacency relationships between communication nodes, and to obtain dynamic similarity adjacency matrix by performing similarity calculation based on the characteristics between nodes, and to obtain static adjacency matrix by calculating the amount of communication between nodes;

[0052] Fault training and testing module: used to acquire node feature matrix, similarity adjacency matrix and static adjacency matrix and train and optimize them, then acquire test set to identify and verify faults and output fault classification results;

[0053] Fault Result Display Module: Used to display the fault classification results output by the training and fault training models, and to remind professionals to maintain the train communication network based on the fault classification results.

[0054] In a further optimized version of the previous scheme, the train communication network data acquisition module includes: a Layer 2 switch, a Layer 3 switch, a terminal device, a network tester, and a mobile client.

[0055] In summary, because the present invention adopts the above-described technical solution, the present invention has the following beneficial technical effects:

[0056] (1) In this invention, spatial information is introduced into the data collection of train communication network, which enriches the data compared with the collection of time sequence information of a single node; a dynamic and static adjacency matrix generation method is proposed, which combines dynamic and static methods to capture the deep spatial relationship between nodes; and by extracting spatial features in different ranges, the fault identification capability of the model under the complex spatial structure of the train communication network is improved, the model's identification accuracy and efficiency for multiple faults are improved, and intelligent fault diagnosis of the train communication network is realized.

[0057] (2) In this invention, a gated loop unit module based on dual attention mechanism is established, which enables the model to autonomously pay attention to key time segments and important nodes, effectively improving the selectivity and expressive power of feature representation. It has significant advantages such as fast diagnosis speed, high diagnosis accuracy and high stability, which can meet the actual application needs of train communication network, and also has certain application potential in other fields. Attached Figure Description

[0058] Figure 1 This is a flowchart illustrating a fault diagnosis method for train communication networks based on multi-scale spatiotemporal graph convolution according to the present invention.

[0059] Figure 2 This is a schematic diagram of the topology of the train communication network of the present invention;

[0060] Figure 3 This is a schematic diagram of the dynamic adjacency matrix generation method of the train communication network of the present invention;

[0061] Figure 4 This is a structural block diagram of a train communication network fault diagnosis device based on multi-scale spatiotemporal graph convolution provided by the present invention. Detailed Implementation

[0062] To make the objectives, technical solutions, and advantages of this invention clearer, preferred embodiments will be listed below with reference to the accompanying drawings, and the invention will be described clearly and completely. However, it should be noted that the examples in the specification are preferred examples, not all examples. Furthermore, many details listed in the specification are merely to provide the reader with a deep understanding of the key issues of this invention; the invention can be implemented even without these specific details.

[0063] According to one aspect of the present invention, a fault diagnosis method for train communication networks based on multi-scale spatiotemporal graph convolution is provided, such as... Figure 1 As shown, the diagnostic method includes the following steps:

[0064] S01: Collect communication data from each communication node during the operation of the train communication network. The communication data includes normal data and single fault data during the operation of the train communication network. The single fault data refers to the data generated when a single fault occurs in the train communication network, and stores it in the mobile client.

[0065] S02: The collected communication data is preprocessed and parsed to obtain the feature set of each communication node. Then, according to the topological order of each communication node in the train communication network (or a predefined node order), the feature sets of each communication node are concatenated column by column to construct a feature set. The feature set is then divided into a training set and a test set according to a certain ratio. In this invention, the preprocessing and parsing of the collected communication data, and the subsequent division of the dataset into a training set and a test set according to a certain ratio, includes the following sub-steps:

[0066] S0201: Use the Scapy library in Python to collect features from the normal data and single-fault data, analyze and statistically analyze the collected normal data and single-fault data, and statistically analyze several time-domain communication indicators for each terminal target node; analyze the collected data to obtain the feature set of each node, and combine the feature sets between nodes by column to obtain the total feature set (dataset).

[0067] S0202: Combine the relevant features of each time-domain communication indicator into columns of normal data and single-fault data according to the order between nodes to obtain a feature set;

[0068] S0203: Transform the feature set F into a tabular dataset, eliminate noise, duplication, missing values ​​and erroneous values ​​in the data, and then randomly divide the tabular dataset into training set and test set according to a certain ratio; clean up outliers and missing values ​​in the feature set, and then divide the total feature set into multiple time series samples, and randomly shuffle them into training set and test set in a 7:3 ratio;

[0069] S0204: For each sample in the randomly partitioned training and test sets, sort the nodes according to the actual topology of the train communication network to form a node feature matrix, which serves as the input data for fault diagnosis; the node feature matrix F satisfies the following expression:

[0070] F = [f 1,1 ,f 1,2 ,...,f 1,8 ,...,fi,j-1 ,f i,j ], (1);

[0071] Among them, f i,j This represents the j-th feature column of the i-th node;

[0072] S03: Calculate the feature similarity relationship between nodes for each node in the training set, construct the node similarity adjacency matrix through the feature similarity relationship, and then construct the node static adjacency matrix according to the communication volume between nodes. By calculating the average communication volume between each pair of nodes and performing normalization processing, the static adjacency matrix between nodes is constructed based on the normalized communication volume.

[0073] S04: Construct an MS-STGCN model for fault diagnosis of train communication networks. The main body of the MS-STGCN model includes a multi-scale graph convolutional network and a dual-attention gated recurrent unit. The multi-scale graph convolutional network performs convolution operations on the input feature set to extract the spatial relationships within different scales of the feature set. Then, the dual-attention gated recurrent unit is used to perform differential modeling on different time steps and nodes of the feature set. The multi-attention gated recurrent unit mechanism improves the model's temporal representation ability and enhances the model's classification performance.

[0074] S05: The training set, similarity adjacency matrix, and static adjacency matrix are input into the MS-STGCN model for training. The parameters of the MS-STGCN model are optimized iteratively. Then, the test set is input into the trained MS-STGCN model for fault identification. If the MS-STGCN model shows high accuracy on the test set, it is used to realize fault diagnosis of train communication networks. In this invention, the data-processed dataset is divided into a training set and a test set in a 7:3 ratio, with 112,489 sample points as the training set and 48,210 sample points as the test set. The training set (node ​​feature matrix), similarity adjacency matrix, and static adjacency matrix are input into the fault diagnosis MS-STGCN model for training and testing. First, the parameters of the MS-STGCN model are trained and optimized. Then, the test set is input into the trained MS-STGCN model to identify different fault types. If the MS-STGCN model can identify different fault types on the test set, it can be used to achieve fault diagnosis of train communication networks, specifically demonstrating good accuracy, stability, and F1 score. The F1 score expression is as follows:

[0075]

[0076] In this model, TP refers to the number of samples where the predicted value is 1 and the actual value is also 1; TN refers to the number of samples where the predicted value is 0 and the actual value is also 0; FP refers to the number of samples where the predicted value is 1 and the actual value is 0; and FN refers to the number of samples where the predicted value is 0 and the actual value is 1. Therefore, the maximum value of the F1 score is 1, and the minimum value is 0. In this case, it is specified that the MS-STGCN model demonstrates good fault diagnosis performance when both the model's fault diagnosis accuracy and F1 score are greater than 99%. This invention collects fault data from the train communication network and uses a pre-trained MS-STGCN model to achieve intelligent diagnosis. Finally, based on the model's classification results, it issues alarm information to guide professionals to perform maintenance.

[0077] Figure 2 This is a schematic diagram of the train communication network topology provided by the present invention. In this invention, according to the IEC 61375 series standards and typical railway applications, the train marshalling yard adopts a ring topology, and link redundancy is achieved between switches. Each Ethernet Consist Network Node (ECNN) connects two terminal devices.

[0078] The Ethernet network system architecture of the EMU (Electric Multiple Unit) is divided into three layers: the train-level bus adopts the Ethernet Train Backbone (ETB), and the train-level network follows the IEC 61375-2-5 backbone network standard; the vehicle-level bus adopts the Ethernet Consist Network (ECN) form, and the vehicle-level network follows the IEC 61375-3-4 constitutive network standard. The IEC 61375-3-4 constitutive network standard specifies linear, star, and ring network structures, while this invention uses a ring topology. A constitutive network consists of four motor cars, and communication between these four motor cars is via ring communication. TC01…TC08 represent eight cars, namely ECNN1-ECNN8, and the terminal equipment communicates directly with the ECNN equipment. EMUs are typically configured with eight cars, using a 4-motor, 4-trailer configuration.

[0079] The specific grouping is TC01+M02+TP03+MH05+MB05+TP06+M07+TC08, representing respectively Figure 2 In the network, ECNN1-ECNN8, where TC is the driver's cab trailer car, usually located at both ends of the train, M is the motor car, and TP is the trailer car with a pantograph. Based on the train's power configuration and formation, every four cars are divided into one network segment, and each ECNN represents one car within that segment. Figure 2In the Chinese text, ETBN stands for Ethernet Train Backbone Node, and ED stands for End Device in the train communication network.

[0080] In this invention, Figure 3 This is a schematic diagram of the dynamic similarity adjacency matrix generation method for the train communication network provided by the present invention. The method involves constructing a node similarity adjacency matrix based on feature similarity relationships, and then constructing a static node adjacency matrix based on the communication volume between nodes, including the following sub-steps:

[0081] S0301: Calculate the similarity value between each pair of node features based on the feature set of each node in the training set, satisfying the following:

[0082]

[0083] in X represents the similarity value between node i and node j at the k-th attention head. i , This represents the several feature columns (input feature columns) contained in the i-th and j-th nodes respectively. Let the linear transformation matrix of the k-th attention head be represented. Indicates bias, d h · represents the output dimension, and · represents the vector dot product;

[0084] S0302: The similarity values ​​(attention score matrix) of a certain terminal target node and other nodes are sorted in descending order, and the top K (1-8) nodes with the strongest similarity to the terminal target node are selected as neighbors to form a connection relationship. Thus, a similarity adjacency matrix is ​​constructed for each terminal target node. In this invention, the node feature matrix is ​​used as input data, that is, the feature column after data parsing and sorting. Feature embedding refers to raising the feature column of the node feature matrix from low dimension to high dimension, which facilitates the subsequent adjacency matrix construction and feature extraction.

[0085] Attention mechanisms measure feature similarity by calculating the dot product between the query vector of the target node and the key vectors of other nodes. Figure 3 In the middle, A (1) ...A (n) ...refers to multiple attention mechanisms used in the construction of the similarity adjacency matrix. Each attention mechanism constructs a similarity attention score between node features according to its own calculation formula. The attention mechanism calculates the degree of similarity between feature columns of different nodes, which is reflected in the attention score. The similarity adjacency matrix is ​​constructed from the feature matrix after feature embedding, resulting in an N×N matrix where each element represents node N. i and Nj The degree of similarity of features. After calculating the corresponding similarity matrix for each attention mechanism, a fusion mechanism is used to merge multiple similarity matrices into one attention matrix. Finally, the final attention score matrix (i.e., the final similarity adjacency matrix) is obtained according to the top K selection principle.

[0086] S0303: Normalize the constructed similarity adjacency matrix. The normalized features satisfy:

[0087]

[0088] Among them, f i,j Let f' represent the j-th feature column of the i-th sample. i,j f represents the normalized eigenvalues. j Represents all feature values ​​in column j;

[0089] S0304: Calculate the average communication volume between each pair of nodes for the collected normal data and single fault data, and use the average communication volume as the edge of the static adjacency matrix between each pair of nodes.

[0090] S0305: In the static adjacency matrix, the elements on the main diagonal are set to 1. For unconnected pairs of nodes, a minimum value ∈ is used for replacement. The values ​​between different nodes are selected from the normalized values ​​in S0303. The static adjacency matrix is ​​constructed as follows:

[0091]

[0092] Among them, A t [i,j] represents the adjacency matrix corresponding to time step t. This represents the average communication volume from node i to j at the k-th time point.

[0093] In this invention, a fault diagnosis MS-STGCN model for train communication networks is constructed. The main body of the multi-scale spatiotemporal graph convolutional model consists of a multi-scale graph convolutional network and a dual-attention gated recurrent unit. The MS-STGCN model captures global and local spatial neighborhood relationships between nodes through multi-scale graph convolution, and captures key historical moments and important spatial equipment nodes in the time series data through dual-attention gated recurrent units. The specific process of constructing the fault diagnosis MS-STGCN model includes the following steps:

[0094] S0401: A multi-scale graph convolutional network is employed to capture spatial information in the feature set. This multi-scale graph convolutional network includes three graph convolutional branches: a low-scale branch, a medium-scale branch, and a high-scale branch. The low-scale branch aggregates local spatial information of adjacent nodes through low-order convolutions; the high-scale branch uses multi-hop convolutions to obtain global neighborhood information; and the medium-scale branch supplements the medium-scale neighborhood information not covered by the low-scale and high-scale branches. Through this multi-scale design, the model can capture shallow and deep graph structure relationships on different branches, thereby achieving comprehensive modeling of both local and global spatial information.

[0095] During feature extraction, each branch independently performs graph convolution operations. The input feature matrix and adjacency matrix continuously aggregate node neighborhood information during convolution. Lower branches use low-order convolutions to aggregate adjacent spatial information (local); the smaller the convolution order, the fewer graph convolutions are performed on that branch. Higher branches employ multi-hop convolutions to acquire global neighborhood information; the more hops in the graph convolution, the deeper the neighborhood information captured on that branch. Middle branches capture neighborhood information missed by lower and higher branches. Subsequently, a gated weighted fusion mechanism is used to fuse the results of the three branches, achieving a unified representation of multi-scale spatial features. This structure effectively captures the spatial dependencies of nodes at different scales, ensuring a balance and complementarity between local and global information. The graph convolution relationship of any branch satisfies:

[0096]

[0097] in, Let B represent the feature set (input feature matrix) of the target node at time step t, B represent the batch size, N represent the number of target nodes, and d represent the number of target nodes. in This represents the number of feature columns of a target node. Let S represent the similarity adjacency matrix at time step t. t x t The adjacency matrix represents a weighted sum of node features, where S represents the similarity adjacency matrix calculated at a certain time step t, x represents the input at that time t (the node feature matrix, i.e., the total feature column after concatenating the feature columns of multiple target nodes), and t represents a certain time or a certain time step; residual connection x t +S t x t Used to prevent over-smoothing The weight matrix represents the linear transformation. h represents the bias of the linear transformation. i This represents the graph convolution output of different branches, where h is... i It is already an output feature matrix that aggregates information from multiple spatial neighborhoods.

[0098] S0402: In multi-scale graph convolution, different branches hi After capturing the spatial information of the corresponding neighborhood range, a gating fusion mechanism is added after the three graph convolution branches to adjust the importance of different graph convolution branches in the multi-scale graph convolutional network and aggregate the graph convolution outputs of different branches; in order to adjust the importance of different branches in multi-scale graph convolution and enhance the model's ability to select effective information;

[0099] This invention incorporates a gated fusion mechanism into multi-scale graph convolution, effectively aggregating structural information from different branches. After the high, medium, and low branches extract their respective spatial neighborhood information, the input data (node ​​feature matrix) on each branch aggregates different spatial information, facilitating subsequent time-series information extraction. Therefore, it is necessary to fuse the output node feature matrices after graph convolution in the three branches. The graph convolution outputs of different branches satisfy the following conditions:

[0100]

[0101] Where h i Let represent the output of the i-th branch, σ(·) represent the sigmoid function, I represent the total number of branches, which is equal to 3, and h t As the output node feature matrix after fusion, i.e. H t .

[0102] The present invention uses the output node feature matrix H after gated weighted fusion. t The feature matrix is ​​then used again as the input node feature matrix for the next stage, and the output H after gated weighted fusion is... t By performing the graph convolution operation shown in Equation 6 with the static adjacency matrix, the dynamic similarity adjacency matrix in Equation 6 is transformed. Instead of the static adjacency matrix at time step t, the graph convolution input x in Equation 6 is now... t The output H after fusion using Formula 7 t The node feature matrix is ​​multiplied with the static adjacency matrix to improve the accuracy and consistency of the spatial representation.

[0103] In multi-scale graph convolution, different branches h i By capturing structural information from different neighborhood ranges, gated weighted fusion allows the model to adaptively adjust the importance of each branch. The output node feature matrix H after gated weighted fusion is... t This is then used again as the input node feature matrix for the next stage. The output H after gated weighted fusion... t By performing the graph convolution operation shown in Equation 6 with the static adjacency matrix, the graph in Equation 6 is... Replacing it with the static adjacency matrix at time step t, x t H represents tThe node feature matrix is ​​multiplied with the static adjacency matrix to improve the accuracy and consistency of the spatial representation.

[0104] S0403: Input the fused output node feature matrix from S0402 into a dual attention-gated recurrent unit network to extract the time series information in the output node feature matrix;

[0105] To enable the model to dynamically focus on key historical moments and important spatial nodes, an attention mechanism was introduced into the time steps and key nodes based on the original gated recurrent unit. This mechanism not only improves the model's ability to perceive long-distance temporal relationships and key nodes, but also enhances its ability to suppress noise and redundant information, which helps to improve the overall prediction accuracy and generalization performance.

[0106] This invention improves upon the original gated recurrent unit by using a dual-attention gated recurrent unit. It adds an attention mechanism for time steps and device nodes, enabling the dual-attention gated recurrent unit network to dynamically focus on key historical moments and important spatial device nodes at different time steps t. Spatial nodes refer to terminal device nodes; the term "spatial" is used to represent the topological structure of the train communication network. This enhances the model's ability to perceive long-distance temporal relationships and key node features. Specifically, the dual-attention gated recurrent unit network further acquires information from the output of multi-scale graph convolution, obtaining the time-series information of the input data, and ultimately obtaining various fault diagnosis scores.

[0107] In this invention, the operations extracted from the dual-attention gated recurrent unit network satisfy the following specific conditions:

[0108]

[0109] in This represents the input feature matrix, which is also the output feature matrix in multi-scale graph convolution. The learnable parameters representing the node attention weights, Softmax is a function that compresses any real-valued vector into a probability distribution (summing to 1). This represents the node features adjusted by attention weights along the node dimension; GRU stands for Gated Recurrent Unit. Where d h is the hidden layer dimension of GRU, representing the dynamic representation of nodes encoded in the time dimension; Dropout is a regularization technique that randomly "drops" some neurons during training; ReLU is a simple non-linear activation function that clears negative values ​​to zero and retains positive values; LN (Layer Normalization) is a technique that standardizes all features of a single sample. This represents the robust representation after normalization and nonlinear mapping. d represents the learnable parameter representing the attention weights at each time step. h Represents the hidden dimension of GRU, and the final output. The scores for various fault diagnosis methods represent the final representation that integrates node attention and temporal attention. The time-series information distribution of the input data x satisfies:

[0110] x = [x1, x2, ..., x n ] T (9)

[0111] Where x represents the node feature matrix, n = 1, 2, ..., M, and M represents the time step. n Let [·] represent the feature matrix of the child nodes corresponding to different time steps n. T In this context, T represents the transpose operation;

[0112] The output H of Formula 8 is first compressed into time using time pooling. Subsequently, the features are aggregated into Finally, after linear layer feature mapping, the final output probability vector is obtained. B represents the sample batch, and L is represented in the form that satisfies:

[0113] L = [a1, a2, ..., a n ], (10);

[0114] Where n is the total number of categories, a n This represents the score by which the input sample is classified as a type n fault, where a1 + a2 + ... + a n =1. The final output L of the dual-attention gated recurrent unit network is a probability vector, where each element represents the probability that the sample belongs to a specific failure mode or health state, for example [0.02, 0.85, 0.10, 0.03], and all elements in the vector sum to 1;

[0115] In this invention, to verify the effectiveness of the proposed train communication network fault diagnosis method, it is compared with deep learning and spatiotemporal graph convolution methods, namely Bi-GRU, TCN-LSTM, Transformer, DATTD, VAEAT, AdpSTGCN, AGCRN, and TodyNet. Furthermore, to verify the effectiveness of the proposed multi-scale graph convolution and dual-attention gated recurrent unit modules, ablation experiments are conducted. The invention is validated using train communication network fault data; Tables 1 and 2 respectively verify the performance of each model in the comparative and ablation experiments.

[0116] Table 1 Comparison of experimental performance

[0117]

[0118] As can be seen from the experimental results in Table 1, the MS-STGCN model in this paper exhibits the best classification performance in multiple repeated experiments compared to other baseline models, with an average test accuracy of 99.41%. Other baseline models show poor overall performance on the dataset, all below 99%, which is significantly lower than the model in this paper. Furthermore, considering the fluctuation of accuracy over three rounds, the maximum fluctuation amplitude of the model in this paper is only 0.09%, far lower than methods such as DATTD, VAEAT, and TodyNet. The experimental results in Table 1 fully demonstrate that the MSGCN-DARGRU model in this paper outperforms existing models in both average accuracy and the degree of fluctuation in test accuracy, exhibiting excellent fault classification capabilities.

[0119] Furthermore, to evaluate the effectiveness of the multi-scale graph convolutional MSC and the gated recurrent unit attention module Atten, ablation experiments were conducted as shown in Table 2.

[0120] Table 2 Comparison of ablation test performance

[0121]

[0122] The experimental results are shown in Table 2. Compared with the complete model, each variant showed a certain degree of decline in performance across different evaluation metrics. The most significant performance degradation occurred with the removal of the attention mechanism, resulting in a decrease of approximately 0.56% across all four metrics. This indicates that this module plays a crucial role in capturing key temporal and spatial features. Furthermore, removing the multi-scale graph convolution module also caused a significant performance decline, further validating the importance of multi-scale modeling for enhancing the representation of spatiotemporal features.

[0123] According to another aspect of the invention, such as Figure 4 As shown, the present invention provides a fault diagnosis device for train communication networks based on multi-scale spatiotemporal graph convolution. The fault diagnosis device includes a train communication network data acquisition module 501, a data parsing and processing module 502, a data construction module 503, a graph structure generation module 504, a fault training and testing module 505, and a fault result display module 506.

[0124] The train communication network data acquisition module 501 is used to acquire communication data between communication nodes of various terminal devices in the train communication network and capture data packets in real time. The data packets are then stored in the mobile client in the form of PCAP data files. The train communication network is connected to the mobile client via an RJ45 network cable. The client is equipped with Wireshark packet capture software to capture communication data in the network and store the data packets in the form of PCAP files.

[0125] The data parsing and processing module 502 is used to read the original PCAP data file, process the read PCAP data, eliminate outliers in the data, obtain the feature set of each communication node, and then randomly divide the processed feature set into training set and test set in a 7:3 ratio. On the PC, Python with Scapy library is used to parse the PCAP file, and 27 feature columns are counted for each target node, mainly including the number of packets sent and received, the number of bytes, transmission delay, etc. A total of 216 feature columns are counted for 8 target nodes. Then, the statistical feature columns are cleaned to eliminate outliers in the data, obtain the feature data set required for the fault diagnosis model, and then randomly divide the feature data set into training set and test set in a 7:3 ratio.

[0126] The data construction module 503 is used to fix the node order of each sample in the randomly divided training set and test set according to the actual topology of the train communication network, forming a node feature matrix as the input for fault training.

[0127] Graph structure generation module 504: used to obtain dynamic and static adjacency relationships between communication nodes, and to obtain a dynamic similarity adjacency matrix by performing similarity calculation based on the characteristics between nodes, and to obtain a static adjacency matrix by calculating the amount of communication between nodes;

[0128] The fault training and testing module 505 is used to acquire node feature matrices, similarity adjacency matrices, and static adjacency matrices for training and optimization. It then uses a test set for fault identification and verification, outputting fault classification results. First, the fault diagnosis MS-STGCN module of the fault training and testing module is trained and its parameters optimized using the training set. The trained model is then tested using the test set to achieve fault classification in the train communication network. Corresponding predicted labels are then output. The value of the predicted label determines the type of fault in the input data. The label for address allocation fault (AAF) is 0, for high CPU utilization fault is 1, for link congestion fault (LC) is 2, for link disconnection fault (LD) is 3, for normal data is 4, and for port subscription fault (PUS) is 5.

[0129] The fault result display module 506 is used to display the fault classification results output by the training and fault training models. Based on the fault classification results, it reminds professionals to maintain the train communication network, presents the fault diagnosis classification results, and notifies relevant personnel to carry out repairs.

[0130] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. It should be noted that for those skilled in the art, any improvements, equivalent substitutions, and modifications made without departing from the principles of the present invention should also be considered within the scope of protection of the present invention.

Claims

1. A fault diagnosis method for train communication networks based on multi-scale spatiotemporal graph convolution, characterized in that: The fault diagnosis method includes the following steps: S01: Collect communication data from each communication node during train communication network operation, including normal data and single fault data during train communication network operation; S02: The collected communication data is preprocessed and parsed to obtain the feature set of each communication node. Then, according to the topological order of each communication node in the train communication network, the feature sets of each communication node are concatenated in columns to construct a feature set. The feature set is then divided into a training set and a test set according to a certain ratio. S03: Calculate the feature similarity relationship between nodes for each node in the training set, construct the node similarity adjacency matrix through the feature similarity relationship, and then construct the node static adjacency matrix according to the amount of communication between nodes. S04: Construct an MS-STGCN model for fault diagnosis of train communication network. The main body of the MS-STGCN model includes a multi-scale graph convolutional network and a dual-attention gated recurrent unit. The multi-scale graph convolutional network performs convolution operations on the input feature set to extract the spatial relationships within different scales in the feature set. Then, the dual-attention gated recurrent unit is used to perform differential modeling on different time steps and nodes of the feature set to enhance the fault classification performance of the model. S05: Input the training set, similarity adjacency matrix, and static adjacency matrix into the MS-STGCN model for training. Iteratively optimize the parameters of the MS-STGCN model. Then, input the test set into the trained MS-STGCN model for fault identification. If the MS-STGCN model shows high accuracy on the test set, it can be used to realize fault diagnosis of the train communication network.

2. The fault diagnosis method for train communication networks based on multi-scale spatiotemporal graph convolution according to claim 1, characterized in that: In step S02, the collected communication data is preprocessed and parsed, and then the dataset is divided into training and testing sets according to a certain ratio, including the following sub-steps: S0201: Use the Scapy library in Python to collect features from the normal data and single fault data, analyze and statistically analyze the collected normal data and single fault data, and statistically analyze several time-domain communication indicators for each terminal target node. S0202: Combine the relevant features of each time-domain communication indicator into columns of normal data and single-fault data according to the order between nodes to obtain a feature set; S0203: Transform the feature set into a tabular dataset, eliminate noise, duplicates, missing values ​​and erroneous values ​​in the data, and then randomly divide the tabular dataset into training set and test set according to a certain ratio; S0204: The nodes of each sample in the randomly divided training and test sets are sorted according to the actual topology of the train communication network to form a node feature matrix, which is used as input data for fault diagnosis. The node feature matrix F satisfies the following expression: F=[f 1,1 ,f 1,2 ,...,f 1,8 ,...,f i,j-1 ,f i,j ],(1); Among them, f i,j This represents the j-th feature column of the i-th node.

3. The fault diagnosis method for train communication networks based on multi-scale spatiotemporal graph convolution according to claim 1, characterized in that: In step S03, constructing a node similarity adjacency matrix based on feature similarity relationships, and then constructing a node static adjacency matrix based on the amount of communication between nodes, includes the following sub-steps: S0301: Calculate the similarity value between each pair of node features based on the feature set of each node in the training set. The formula for calculating the similarity value satisfies: in Let represent the similarity value between node i and node j at the k-th attention head. This represents the feature columns contained in the i-th and j-th nodes respectively. Let the linear transformation matrix of the k-th attention head be represented. Indicates bias, d h · represents the output dimension, and · represents the vector dot product; S0302: Sort the similarity values ​​of a terminal target node with other nodes in descending order, select the K most similar nodes of the terminal target node as neighbors to form a connection relationship, and thus construct a similarity adjacency matrix for each terminal target node. S0303: Normalize the constructed similarity adjacency matrix. The normalized features satisfy: Among them, f i,j f represents the normalized eigenvalues. i f represents the value of the j-th feature column of the i-th sample. j Represents all feature values ​​in column j; S0304: Calculate the average communication volume between each pair of nodes for the collected normal data and single fault data, and use the average communication volume as the edge of the static adjacency matrix between each pair of nodes. S0305: In the static adjacency matrix, the elements on the main diagonal are set to 1. For unconnected pairs of nodes, a minimum value ∈ is used for replacement. The values ​​between different nodes are selected from the normalized eigenvalues ​​in S0303. The static adjacency matrix satisfies the following expression: Among them, A t [i,j] represents the adjacency matrix corresponding to time step t. This represents the average communication volume from node i to j at the k-th time point.

4. The fault diagnosis method for train communication networks based on multi-scale spatiotemporal graph convolution according to claim 1, characterized in that: In step 4, establishing the MS-STGCN model for train communication network fault diagnosis specifically includes the following sub-steps: S0401: A multi-scale graph convolutional network is used to capture spatial information in the feature set. The multi-scale graph convolutional network consists of three graph convolutional branches, distributed as a high branch, a medium branch, and a low branch. The low branch uses low-order convolutions to aggregate adjacent spatial information, the high branch uses multi-hop convolutions to obtain global neighborhood information, and the medium branch captures the neighborhood information missed by the low and high branches. The graph convolutional relationship of any branch satisfies: in Let B represent the feature set of the target node at time step t; B represents the batch size; N represents the number of target nodes; and d represents the number of time steps. in This represents the number of feature columns of a target node. Let S represent the similarity adjacency matrix at time step t. t x t The adjacency matrix represents a weighted summation of node features, and the residual connection x represents the residual connection. t +S t x t Used to prevent over-smoothing The weight matrix represents the linear transformation. h represents the bias of the linear transformation. i This represents the graph convolution output of a single branch, where h is... i It is already an output node feature matrix that aggregates information from multiple spatial neighborhoods; S0402: In multi-scale graph convolution, different branches h i After capturing the spatial information of the corresponding neighborhood range, a gating fusion mechanism is added after the three graph convolution branches to adjust the importance of different graph convolution branches in the multi-scale graph convolutional network, and to aggregate the graph convolution outputs of different branches. The graph convolution outputs of different branches satisfy the following condition: Where h i Let represent the feature matrix of the convolutional output node of the i-th branch, σ(·) represent the Sigmoid function, I represent the total number of branches, and h t This represents the feature matrix of the output nodes after fusion; S0403: Input the fused output node feature matrix from S0402 into a dual-attention gated recurrent unit network to extract the time series information from the output node feature matrix. The extraction operation in the dual-attention gated recurrent unit network satisfies the following: in, Represents the input feature matrix. The learnable parameters represent the node attention weights, and Softmax represents the probability distribution function that compresses any real-valued vector. This represents the node features adjusted by attention weights along the node dimension; GRU stands for Gated Recurrent Unit. Where d h is the hidden layer dimension of GRU, representing the dynamic representation of nodes encoded in the time dimension; Dropout is a regularization technique that randomly "drops" some neurons during training; ReLU is a simple non-linear activation function that clears negative values ​​to zero and retains positive values; LN is a technique that standardizes all features of a single sample. This represents the robust representation after normalization and nonlinear mapping. d represents the learnable parameter representing the attention weights at each time step. h Represents the hidden dimension of GRU, and the final output. The scores for various fault diagnosis methods represent the final representation that integrates node attention and temporal attention.

5. The fault diagnosis method for train communication networks based on multi-scale spatiotemporal graph convolution according to claim 1, characterized in that: In step S05, the training set is input into the fault diagnosis MS-STGCN model for training and optimization, and the test set is input into the trained MS-STGCN model for performance verification. If the MS-STGCN model shows excellent fault diagnosis accuracy and F1 score on the test set after continuous parameter optimization on the training set, it can be used to realize fault diagnosis of train communication network.

6. A fault diagnosis device for train communication networks based on multi-scale spatiotemporal graph convolution, characterized in that: When the fault diagnosis device is in operation, it implements the steps of a train communication network fault diagnosis method based on multi-scale spatiotemporal graph convolution as described in any one of claims 1 to 5.

7. The fault diagnosis device for train communication networks based on multi-scale spatiotemporal graph convolution according to claim 6, characterized in that: The fault diagnosis device includes a train communication network data acquisition module, a data parsing and processing module, a data construction module, a graph structure generation module, a fault training and testing module, and a fault result display module. Train communication network data acquisition module: used to acquire communication data between communication nodes of various terminal devices in the train communication network and capture data packets in real time, and then store the data packets in the form of PCAP data files on the mobile client; Data parsing and processing module: This module reads the original PCAP data file, processes the read PCAP data, eliminates outliers, obtains the feature set of each communication node, and then randomly divides the processed feature set into training and test sets in a 7:3 ratio. Data construction module: used to fix the node order of each sample in the randomly divided training and test sets according to the actual topology of the train communication network, forming a node feature matrix as input for fault training; Graph structure generation module: used to obtain dynamic and static adjacency relationships between communication nodes, and to obtain dynamic similarity adjacency matrix by performing similarity calculation based on the characteristics between nodes, and to obtain static adjacency matrix by calculating the amount of communication between nodes; Fault training and testing module: used to acquire node feature matrix, similarity adjacency matrix and static adjacency matrix and train and optimize them, then acquire test set to identify and verify faults and output fault classification results; Fault Result Display Module: Used to display the fault classification results output by the training and fault training models, and to remind professionals to maintain the train communication network based on the fault classification results.

8. The fault diagnosis device for train communication networks based on multi-scale spatiotemporal graph convolution according to claim 7, characterized in that: The train communication network data acquisition module includes terminal equipment, a two-layer switch, a three-layer switch, a network tester, and a data collection client.