A fault diagnosis method, system, device and medium of a vehicle communication network

By preprocessing continuous waveform data from vehicle communication networks and performing convolution operations on neural network models, the problems of insufficient fault diagnosis accuracy and generalization ability in existing technologies are solved, bit-level feature extraction and accurate fault identification are achieved, and the fault diagnosis capability of vehicle communication networks is improved.

CN122372458APending Publication Date: 2026-07-10ZHUZHOU ELECTRIC LOCOMOTIVE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHUZHOU ELECTRIC LOCOMOTIVE CO LTD
Filing Date
2026-04-30
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing vehicle communication network fault diagnosis methods rely on human experience or simple threshold judgments, which are difficult to adapt to complex and ever-changing fault modes. Furthermore, machine learning-based methods fail to fully utilize protocol characteristics, resulting in insufficient diagnostic accuracy and generalization ability.

Method used

By acquiring continuous waveform data from the physical layer of the vehicle communication network, preprocessing is performed to extract protocol data unit signal blocks, and a trained neural network model is used for convolution operations. The feature extraction layer uses a convolution kernel of size K and stride K to convolve the signal blocks. Combined with multi-scale protocol field perception and protocol timing coding, the bit-level feature extraction capability is improved.

Benefits of technology

It achieves accurate identification and fault diagnosis of anomalies in different bit positions, significantly improving identification accuracy and generalization ability, providing fast and accurate physical layer fault diagnosis results, and providing a reliable data foundation for fault assessment of higher protocol layers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122372458A_ABST
    Figure CN122372458A_ABST
Patent Text Reader

Abstract

This application relates to a fault diagnosis method, system, device, and medium for vehicle communication networks. It involves acquiring continuous waveform data from the physical layer of the vehicle communication network, preprocessing the waveform data to obtain at least one protocol data unit (ARD) signal block of a preset length. Each ARDR signal block includes multiple logical bits, and each logical bit corresponds to K consecutive sampling points in the continuous waveform. K is determined by the protocol rate and physical layer sampling rate of the vehicle communication network. The ARDR signal block is then input into a trained neural network model. The neural network model includes a feature extraction layer, which uses a convolution kernel of size K and stride K to perform convolution operations on the input signal block. Based on the output of the neural network model, the fault diagnosis result of the vehicle communication network physical layer is determined. This significantly improves the identification accuracy and generalization ability of various faults caused by abnormalities in different bit positions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of communication network fault diagnosis technology, and in particular relates to a fault diagnosis method, system, device and medium for vehicle communication networks. Background Technology

[0002] Vehicle communication networks (such as MVB and CAN) are critical infrastructure for modern vehicle control and monitoring systems, and the stability and reliability of their physical layer are directly related to vehicle operational safety. However, due to factors such as environmental interference and equipment aging, physical layer signals often experience faults such as attenuation, distortion, and open circuits, requiring timely and accurate diagnosis.

[0003] Traditional fault diagnosis methods mainly rely on human experience or simple threshold judgments, which are inefficient and difficult to adapt to complex and ever-changing fault modes. In recent years, machine learning-based diagnostic methods have been gradually applied, such as using support vector machines and neural networks to classify acquired waveform data. However, these methods usually process the original waveform or simply extracted statistical features directly, failing to fully utilize the physical layer characteristics of vehicle communication network protocols. This makes it difficult for the model to effectively distinguish faults caused by different bit anomalies, and the diagnostic accuracy and generalization ability still need to be improved. Summary of the Invention

[0004] The purpose of this application is to provide a fault diagnosis method, system, device and medium for vehicle communication networks. The fault diagnosis method, system, device and medium for vehicle communication networks provided by this application can significantly improve the identification accuracy and generalization ability of various faults caused by abnormalities in different bits.

[0005] This application provides a fault diagnosis method for a vehicle communication network, including: Acquire continuous waveform data from the physical layer of the vehicle communication network; The continuous waveform data is preprocessed to obtain at least one protocol data unit signal block of a preset length. Each protocol data unit in the protocol data unit signal block includes multiple logic bits, and each logic bit corresponds to K consecutive sampling points in the continuous waveform, wherein K is determined by the protocol rate and physical layer sampling rate of the vehicle communication network. The protocol data unit signal block is input into a trained neural network model, which includes a feature extraction layer. The feature extraction layer uses a convolution kernel of size K and stride K to perform a convolution operation on the input signal block. Based on the output of the neural network model, the fault diagnosis result of the physical layer of the vehicle communication network is determined.

[0006] Optionally, the preprocessing of the continuous waveform data to obtain at least one protocol data unit signal block of a preset length includes: The continuous waveform data is filtered to obtain filtered data; Based on the filtered data, determine the dynamic threshold; The filtered data is then smoothed to obtain smoothed data. Based on the dynamic threshold, candidate signal segments are identified and extracted from the smoothed data, and the candidate signal segments are verified for protocol consistency to obtain at least one protocol data unit signal block of a preset length.

[0007] Optionally, the filtering method employs median filtering.

[0008] Optionally, the dynamic threshold is determined based on the mean and standard deviation of the filtered data.

[0009] Optionally, the smoothing process employs a moving mean filter.

[0010] Optionally, the step of performing protocol conformance verification on the candidate signal segment includes: Determine whether the length of the candidate signal segment is within a preset length range.

[0011] Optionally, the neural network model further includes a multi-scale protocol field awareness module, which deploys multiple convolutional kernels of different sizes in parallel to extract features at different protocol field scales.

[0012] Optionally, the multi-scale protocol field awareness module includes a convolutional kernel of size K, a convolutional kernel of size 3K, and a convolutional kernel of size 5K, which respectively extract features of single bits, control fields, and address fields.

[0013] Optionally, the convolution kernels with sizes of 3K and 5K employ dilated convolution, with the dilation rate increasing progressively.

[0014] Optionally, the neural network model further includes a protocol timing coding layer, which encodes the timing position of each logical bit in the input signal block within the protocol data unit signal block.

[0015] Optionally, the protocol timing coding layer uses a sine-cosine position coding function to mark the preset positions of the preset protocol fields in the protocol data unit signal block.

[0016] Optionally, the trained neural network model is trained using a loss function that includes protocol structure constraints, which are used to guide the model to prioritize learning features of preset protocol fields.

[0017] Optionally, the loss function includes cross-entropy loss and gradient regularization, wherein the gradient regularization constrains the model gradient based on protocol constraint information used to indicate the position of a preset protocol field.

[0018] This application also provides a fault diagnosis system for a vehicle communication network, comprising: The acquisition module is used to acquire continuous waveform data from the physical layer of the vehicle communication network. A preprocessing module is used to preprocess the continuous waveform data to obtain at least one protocol data unit signal block of a preset length. Each protocol data unit in the protocol data unit signal block includes multiple logic bits, and each logic bit corresponds to K consecutive sampling points in the continuous waveform, wherein K is determined by the protocol rate and physical layer sampling rate of the vehicle communication network. The inference module is used to input the protocol data unit signal block into a trained neural network model. The neural network model includes a feature extraction layer, which uses a convolution kernel of size K and stride K to perform a convolution operation on the input signal block. The fault identification module is used to determine the fault diagnosis result of the physical layer of the vehicle communication network based on the output of the neural network model.

[0019] This application also provides an electronic device, including: a processor, a memory, and a communication bus; The communication bus is used to realize the connection and communication between the processor and the memory; The processor is used to execute a fault diagnosis processing program for a vehicle communication network stored in the memory to implement the steps of the fault diagnosis method for a vehicle communication network as described in any of the above claims.

[0020] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when loaded and executed by a processor, implement the steps of the fault diagnosis method for the vehicle communication network as described in any of the preceding claims.

[0021] Compared with existing technologies, this application provides a fault diagnosis method, system, device, and medium for vehicle communication networks. It acquires continuous waveform data from the physical layer of the vehicle communication network, preprocesses the continuous waveform data to obtain at least one protocol data unit signal block of a preset length. Each protocol data unit in the signal block includes multiple logic bits, and each logic bit corresponds to K consecutive sampling points in the continuous waveform, where K is determined by the protocol rate and physical layer sampling rate of the vehicle communication network. The protocol data unit signal block is then input into a trained neural network model, which includes... The feature extraction layer uses a convolution kernel of size K and stride K to perform convolution operations on the input signal block. Based on the output of the neural network model, the fault diagnosis result of the physical layer of the vehicle communication network is determined. In this application, the number of sampling points K corresponding to each logical bit is accurately determined by the protocol rate and sampling rate, and bit-level feature extraction is performed using a convolution kernel of size K and stride K. This enables precise alignment between the physical layer waveform and the protocol bits, allowing the model to independently extract subtle waveform features within each bit. This significantly improves the recognition accuracy and generalization ability of various faults caused by anomalies in different bit positions. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 This is a flowchart illustrating a fault diagnosis method for a vehicle communication network disclosed in an embodiment of this application. Figure 2 This is a schematic diagram of the structure of a fault diagnosis system for a vehicle communication network disclosed in an embodiment of this application; Figure 3 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of this application. Detailed Implementation

[0024] To enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0025] It should be noted that when a component is referred to as being "fixed to" or "set on" another component, it can be directly on or indirectly set on the other component; when a component is referred to as being "connected to" another component, it can be directly connected to or indirectly connected to the other component.

[0026] It should be noted that the structures, proportions, sizes, etc., shown in the accompanying drawings of this specification are only for the purpose of assisting those skilled in the art in understanding and reading the content disclosed in the specification, and are not intended to limit the conditions under which this application can be implemented. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in the proportions, or adjustments to the size should still fall within the scope of the technical content disclosed in this application, provided that they do not affect the effects and purposes that this application can produce.

[0027] The embodiments of this application can be applied to fault diagnosis of MVB subsystems in multi-layered ISO network convergence environments such as Train Communication Network (TCN).

[0028] like Figure 1 As shown in the figure, this application provides a fault diagnosis method for a vehicle communication network, including: S1. Obtain continuous waveform data of the physical layer of the vehicle communication network; In this embodiment, a data acquisition device connected to the physical medium of the vehicle communication network (such as an MVB bus or CAN bus) continuously samples the physical layer signal at a preset sampling rate to obtain raw waveform data. The sampling rate can be set according to the diagnostic accuracy requirements, and is usually several times higher than the protocol rate to ensure that signal details can be captured. For example, for an MVB network with a protocol rate of 1.5MHz, the sampling rate can be set to 125MHz to obtain a continuous digital waveform sequence of voltage or current changing over time, which serves as input data for subsequent processing.

[0029] S2. Preprocess the continuous waveform data to obtain at least one protocol data unit signal block of a preset length. Each protocol data unit in the protocol data unit signal block includes multiple logic bits, and each logic bit corresponds to K consecutive sampling points in the continuous waveform. Here, K is determined by the protocol rate and physical layer sampling rate of the vehicle communication network. In this embodiment, the core of the preprocessing step is to identify and extract the signal segment corresponding to the complete Protocol Data Unit (PDU) from the original waveform. Since the vehicle communication network protocol defines the duration of each logical bit at the physical layer, the number of sampling points K corresponding to each logical bit can be accurately calculated using the ratio of the protocol rate (i.e., bit rate) to the sampling rate. For example, when the protocol rate is 1.5MHz and the sampling rate is 125MHz, K = 125 × 10⁻⁶. 6 / 1.5×106 ≈83.33, rounded to 83 points, meaning each logic bit is represented by 83 consecutive sampling points.

[0030] During preprocessing, the starting position of a valid PDU is first located from the continuous waveform based on protocol characteristics (such as the specific waveform pattern of the frame start identifier). Then, a waveform segment containing the complete PDU is extracted. Since PDUs of different protocols may contain a fixed number of bits (e.g., 35 bits for an MVB basic frame), the length of the extracted signal block should be the product of the number of bits N and K, i.e., preset length = N×K. For protocols with variable bit numbers, the actual length of the current PDU can be determined through protocol parsing. After extraction, at least one signal block of preset length is obtained. Each signal block is the waveform representation of a protocol data unit at the physical layer, where each logical bit corresponds to K sampling points. This achieves precise alignment between the physical layer waveform and the protocol bits. This preprocessing result preserves the microscopic features of the original waveform and lays the foundation for subsequent bit-level feature extraction.

[0031] S3. Input the protocol data unit signal block into the trained neural network model. The neural network model includes a feature extraction layer. The feature extraction layer uses a convolution kernel of size K and stride K to perform convolution operation on the input signal block. In this embodiment, the neural network model adopts a convolutional neural network architecture. Its first layer (i.e., the feature extraction layer) is designed as a convolutional layer aligned with the physical layer bits. This convolutional layer includes multiple convolutional kernels, each with a strictly set size of K (i.e., the number of sampling points corresponding to each logical bit), and a convolutional stride of K. This ensures that when sliding across the input signal block, each convolutional kernel precisely covers the K sampling points corresponding to a complete logical bit, with no overlap between adjacent convolutional windows. Through this "bit-aligned" convolutional operation, the convolutional kernel can independently extract waveform features within each bit, such as amplitude, rising edge slope, pulse width, and noise distribution. These features directly reflect the state of the bit during physical transmission, providing crucial information for fault diagnosis.

[0032] The neural network model obtains optimized convolutional kernel parameters through pre-training. During training, a large number of PDU signal blocks labeled with fault types are used as samples, enabling the model to learn to identify various fault modes from bit-level waveform features. After the trained model is deployed, when a new PDU signal block is input, the feature extraction layer automatically outputs the feature vector of each bit. Subsequent network layers (such as fully connected layers and classification layers) further integrate these features to finally output the fault diagnosis result.

[0033] S4. Based on the output of the neural network model, determine the fault diagnosis results of the physical layer of the vehicle communication network.

[0034] In this embodiment, the output layer of the neural network model typically uses the softmax function to output a probability distribution vector, representing the probability that the currently input PDU signal block belongs to various types of faults (including normal states). Based on the category corresponding to the highest probability, the physical layer fault diagnosis result can be determined, such as normal signal, open circuit fault, short circuit fault, abnormal signal attenuation, timing violation, etc. The diagnostic results can be output in the form of digital signals for real-time monitoring and processing by the train control system or maintenance personnel, thereby achieving rapid and accurate identification of physical layer faults in the vehicle communication network.

[0035] These MVB physical layer fault diagnosis results, accurate to the bit level, can serve as low-level input, providing a reliable data foundation for the convergence status assessment and fault tracing of higher protocol layers (such as the data link layer and application layer) of the Train Communication Network (TCN).

[0036] Compared with existing technologies, this application provides a fault diagnosis method, system, device, and medium for vehicle communication networks. It acquires continuous waveform data from the physical layer of the vehicle communication network, preprocesses the continuous waveform data to obtain at least one protocol data unit signal block of a preset length. Each protocol data unit in the signal block includes multiple logic bits, and each logic bit corresponds to K consecutive sampling points in the continuous waveform, where K is determined by the protocol rate and physical layer sampling rate of the vehicle communication network. The protocol data unit signal block is then input into a trained neural network model, which includes... The feature extraction layer uses a convolution kernel of size K and stride K to perform convolution operations on the input signal block. Based on the output of the neural network model, the fault diagnosis result of the physical layer of the vehicle communication network is determined. In this application, the number of sampling points K corresponding to each logical bit is accurately determined by the protocol rate and sampling rate, and bit-level feature extraction is performed using a convolution kernel of size K and stride K. This enables precise alignment between the physical layer waveform and the protocol bits, allowing the model to independently extract subtle waveform features within each bit. This significantly improves the recognition accuracy and generalization ability of various faults caused by anomalies in different bit positions.

[0037] As one implementation method, in this embodiment of the application, continuous waveform data is preprocessed to obtain at least one protocol data unit signal block of a preset length, including: S21. Filter the continuous waveform data to obtain filtered data; In this embodiment, the filtering process aims to suppress noise interference in the original waveform while preserving key signal characteristics related to the protocol data units. During transmission, the physical layer signals of the vehicle communication network may be affected by environmental electromagnetic interference, equipment noise, and other factors, resulting in waveform glitches or high-frequency jitter. Filtering can effectively remove these noise components, making the effective signal clearer. As an optional implementation, a nonlinear filter capable of effectively removing pulse interference can be used for filtering.

[0038] S22. Determine the dynamic threshold based on the filtered data; In this embodiment, to accurately distinguish valid signal segments from background noise in the filtered data, a reasonable discrimination threshold needs to be set. Since signal amplitude may vary across different time periods and environments, a fixed threshold is insufficient to adapt to all situations. Therefore, the threshold is dynamically calculated based on the statistical characteristics of the filtered data. For example, the amplitude distribution of the data can be analyzed, and values ​​that can exclude most background noise can be selected as the upper and lower limits of the threshold. The dynamic threshold can adaptively follow the overall changes in signal amplitude, thus effectively identifying valid protocol data unit signal segments even when the signal is weak or the noise is strong.

[0039] S23. Smooth the filtered data to obtain smoothed data; In this embodiment, the filtered data may still retain some local fluctuations or minor spikes, which may affect the accurate determination of the start and end positions of the signal segment. Smoothing processing eliminates these local high-frequency jitters by averaging or fitting adjacent sampling points in some form, making the signal waveform smoother and more continuous. Smoothing processing can employ various methods, such as moving average, exponential smoothing, or smoothing algorithms based on polynomial fitting.

[0040] After smoothing, the waveform change trend of the data is more obvious, which makes it easier to accurately identify the start and end positions of candidate signal segments based on thresholds.

[0041] S24. Based on the dynamic threshold, identify and extract candidate signal segments from the smoothed data, and perform protocol consistency verification on the candidate signal segments to obtain at least one protocol data unit signal block of a preset length.

[0042] In this embodiment, the smoothed data obtained in step S23 is first scanned using the dynamic threshold determined in step S22. Data segments that are continuously within the threshold range (i.e., the signal amplitude is higher or lower than a certain limit) are marked as candidate signal segments. These candidate segments may correspond to a complete protocol data unit, or they may be pseudo segments caused by noise or interference. In order to eliminate pseudo segments and ensure that the extracted signal segments do indeed correspond to valid protocol data units, protocol consistency verification is required for each candidate signal segment. The verification may include: whether the length of the candidate signal segment conforms to the data unit length range specified by the protocol (considering possible deviations), whether the waveform of the starting part matches the start identifier pattern defined by the protocol, and whether it includes a valid protocol field structure, etc. The candidate signal segments that pass the verification are determined as valid protocol data unit signal blocks. Their length may be standardized to a uniform preset length as needed (e.g., by padding with zeros or truncating), thereby obtaining at least one protocol data unit signal block of preset length for subsequent neural network model processing.

[0043] This step ensures that the signal blocks of the input model have accurate alignment and consistent dimensions, laying a data foundation for bit-level fault diagnosis.

[0044] As one implementation method, in this embodiment of the application, median filtering is used.

[0045] In this embodiment, median filtering is a nonlinear filtering technique. Its basic principle is to take the median of all sampling points within the window and the sampling point itself as the filtered output value. Since impulse noise usually manifests as isolated high-amplitude points, its values ​​are often located at both ends after being sorted within the window. Taking the median can effectively filter it out, without smoothing out the edge transitions of the signal like linear filtering. For physical layer signals in vehicle communication networks, key features such as steep transitions in the start-of-frame identifier need to be preserved. Median filtering can effectively maintain these edge information while suppressing impulse interference.

[0046] As a specific parameter setting, the window width for median filtering can be set to 7 sampling points. That is, for each sampling point, the amplitudes of the current point and the three points before and after it (a total of 7 points) are sorted, and the median of the sorted values ​​is used as the new amplitude for that point. The choice of window width requires a trade-off between noise suppression and signal fidelity: a window that is too small may not completely eliminate noise, while a window that is too large may smooth out the signal's detailed features. Experiments show that a 7-point window can achieve good filtering results in typical noise environments. Through median filtering, impulse noise in the original waveform is effectively removed, resulting in smoother data that retains the key waveform features of the protocol data units, providing a high-quality data foundation for subsequent threshold calculation and signal segmentation.

[0047] As one implementation method, in this embodiment of the application, the dynamic threshold is determined based on the mean and standard deviation of the filtered data.

[0048] In this embodiment, the mean μ and standard deviation σ are calculated for the filtered data sequence using conventional statistical methods. The mean μ reflects the overall average level of the data, and the standard deviation σ reflects the dispersion of the data. Based on the mean and standard deviation, upper and lower limits for the dynamic threshold are set: the lower threshold T... L =μ ασ, upper threshold T H =μ+ασ, where α is a preset constant (which can be adjusted according to the noise level). In this embodiment, α is preferably 2.5. When the amplitude of the sampling point exceeds this threshold range, it is considered to be a valid signal.

[0049] As one implementation method, in this embodiment of the application, the smoothing process employs a moving average filter.

[0050] In this embodiment, the moving average filtering suppresses high-frequency jitter and random noise in the signal by taking the arithmetic mean of each sampling point and its neighboring sampling points. Specifically, for the filtered data sequence x, each element of the smoothed data xsmooth is calculated as follows: taking the i-th sampling point in the original data as the starting point of the window, and taking that point and the continuous We... One sampling point (i.e., x[i] to x[i+We) 1) The amplitude is calculated, and its arithmetic mean is taken as xsmooth[i], that is: , Where i is the index of the current sampling point in the smoothed data; j is the index of the sampling point in the original data that participates in the summation; and We is the width of the sliding window.

[0051] As an optional parameter setting, the window width We can be set to 80 sampling points, which is approximately 1.2 to 1.5 times the number of sampling points corresponding to the protocol bit duration (for example, when each logical bit corresponds to 83 sampling points, the 80-point window can effectively suppress high-frequency jitter while better preserving the steep transition characteristics of key waveforms such as the start identifier).

[0052] By using moving average filtering, local fluctuations in the data are significantly reduced, providing a more stable waveform basis for subsequent extraction of candidate signal segments based on dynamic thresholds.

[0053] As one implementation method, in this embodiment of the application, the protocol consistency verification of the candidate signal segment includes: determining whether the length of the candidate signal segment is within a preset length range.

[0054] In this embodiment, after candidate signal segment extraction based on dynamic thresholds, the resulting candidate segments may include various situations: some are signal segments corresponding to complete protocol data units, while others may be pseudo signal segments generated due to sudden noise, data collisions, or other interference. In order to filter out truly valid protocol data unit signal blocks, it is necessary to perform protocol consistency verification on the candidate signal segments, among which length verification is one of the most basic and effective verification methods.

[0055] Since the signal length corresponding to each protocol data unit at the physical layer should theoretically be a fixed value, i.e., the number of logical bits N in the protocol data unit multiplied by the number of sampling points K corresponding to each logical bit, the validity of a candidate signal segment can be determined by judging whether its actual length is close to this theoretical value. Considering that the actual signal may be affected by noise interference or sampling start point deviation during transmission, the actual length may fluctuate slightly around the theoretical value. Therefore, a tolerance range δ is preset, forming a preset length range [N×K-δ, N×K+δ]. When the length of a candidate signal segment falls within this range, it is considered to have passed the length verification and may be a valid protocol data unit; otherwise, it is discarded as an invalid signal segment.

[0056] For example, for a 35-bit MVB protocol frame, when K=83, the theoretical length is 35×83=2905 sampling points. If the preset tolerance range is ±50 points, then the preset length range is 2855 to 2955 points. When the length of the candidate signal segment is within this range, it can proceed to subsequent processing. Candidate segments that are too short (e.g., less than 400 points) are usually fragmented interference caused by data collisions and can be discarded directly. Candidate segments that are too long (e.g., much longer than the theoretical value) may include multiple superimposed signal units and also require further processing.

[0057] Furthermore, length verification can not only serve as a basis for screening valid PDUs, but also for preliminary judgment of fault types. For example, if the length of a candidate signal segment extracted by dynamic thresholding is much smaller than the standard length (e.g., less than 300 points), it is likely not a complete PDU, but rather a signal fragment caused by bus data conflict or strong pulse interference. Such cases can be directly marked as "suspected bus conflict events." Similarly, if the length of a candidate signal segment does not fall within the standard range of 2855 to 2955, but is in a specific abnormal interval (e.g., less than 500 points), and its amplitude distribution exhibits exponential decay characteristics, it may indicate that a verification error or abnormal termination occurred during PDU transmission. By identifying and analyzing these abnormal length intervals, rapid screening and preliminary location of some typical faults can be achieved before fine classification by the input neural network, thereby improving the processing efficiency of the entire diagnostic system. These preliminary predictions can serve as a quick output of the fault diagnosis system to trigger immediate alarms. Meanwhile, these candidate signal segments (whether or not they are predicted) will still be standardized and fed into the neural network model for more refined fault mode classification to ensure the comprehensiveness and accuracy of the diagnosis.

[0058] Length verification effectively filters out a large number of pseudo-signal segments that clearly do not conform to protocol characteristics, reducing the burden on subsequent model processing. It also ensures that the signal blocks input to the neural network model have a consistent protocol structure and a reliable basis for fault diagnosis. After length verification is passed, it can be combined with other verification methods (such as start identifier pattern matching, checksum verification, etc.) to further improve the accuracy of verification.

[0059] Verified and valid candidate signal segments are identified as protocol data unit signal blocks. To ensure the uniformity of the data dimension input to the neural network model, these signal blocks must be standardized: for signal blocks shorter than the preset length (e.g., 2905 points), zeros are padded to the end to the preset length; for signal blocks longer than the preset length, a continuous data segment of the preset length is truncated from its starting position. After standardization, protocol data unit signal blocks with consistent dimensions are obtained for subsequent fault diagnosis in the neural network model.

[0060] As an optional implementation, the aforementioned parameters (such as the median filter window width, threshold confidence coefficient α, and moving average filter window width We) are not fixed but can be adaptively adjusted according to dynamic changes in the channel environment. For example, a parameter adaptive module can be designed to monitor the statistical characteristics of background noise (such as variance and signal-to-noise ratio) in real time. When an increase in noise level is detected, the median filter window width can be automatically increased (e.g., from 7 points to 9 points) to enhance denoising capability, while the threshold confidence coefficient α can be appropriately widened (e.g., from 2.5 to 3.0) to prevent valid signals from being misjudged as noise; conversely, when the channel quality is good, the default parameters are restored to maintain signal fidelity. This parameter adaptive mechanism enables the method to maintain stable signal segmentation and feature extraction performance under various complex electromagnetic environments and operating conditions.

[0061] As one implementation method, in this embodiment of the application, the neural network model further includes a multi-scale protocol field perception module, which deploys multiple convolutional kernels of different sizes in parallel to extract features at different protocol field scales.

[0062] In this embodiment, after obtaining the independent features of each logical bit through the feature extraction layer, a multi-scale protocol field perception module is introduced to further capture the correlation information within and between protocol fields. Since the protocol data unit of a vehicle communication network consists of multiple fields with different functions (such as start identifier, control field, address field, data field, check field, etc.), and each field has a different bit length, its fault modes often involve joint anomalies of multiple consecutive bits. A single-scale convolutional kernel cannot simultaneously handle short-range details (such as single-bit distortion) and long-range dependencies (such as cross-field temporal offsets). Therefore, this module adopts a parallel multi-branch architecture, with each branch deploying convolutional kernels of different sizes to obtain feature maps with multiple receptive fields. Small-sized convolutional kernels focus on subtle fluctuations within a single bit and local correlations between adjacent bits; medium-sized convolutional kernels cover the overall features of medium-length fields (such as control fields); and large-sized convolutional kernels can perceive longer fields (such as address fields) or cross-field dependencies. The outputs of each branch form a multi-scale joint representation through feature fusion (such as concatenation, weighted summation, etc.), providing richer semantic information for subsequent fault classification.

[0063] This design allows the model to focus on both local details and global structure simultaneously, significantly improving its ability to identify complex faults that span bits and fields.

[0064] In one implementation, the multi-scale protocol field awareness module in this application includes a convolutional kernel of size K, a convolutional kernel of size 3K, and a convolutional kernel of size 5K, which respectively extract features of single bits, control fields, and address fields.

[0065] In this embodiment, the multi-scale protocol field perception module specifically includes three parallel convolutional branches with kernel sizes of K, 3K, and 5K, respectively. K represents the number of sampling points per logical bit (determined by the protocol rate and sampling rate). Therefore, a K-sized convolutional kernel precisely covers the range of one logical bit, used to extract fine waveform features within a single bit, such as voltage level, pulse width, and rising edge slope. These features are crucial for detecting faults such as open circuits and short circuits in single bits. A 3K-sized convolutional kernel covers three consecutive bits, and its receptive field matches that of the control field (typically 3 bits) in common protocols, enabling it to capture correlation patterns between bits within the control field, such as abnormal logical combinations of control codes. A 5K-sized convolutional kernel covers five consecutive bits, suitable for extracting long-range dependent features of the address field (typically 5 bits), and capable of perceiving overall waveform distortion or inter-bit timing offsets in the address field.

[0066] Three branches process the input feature map in parallel, extracting features at different scales respectively. Then, a feature fusion layer integrates the outputs of each branch to form a comprehensive representation of the protocol data unit. Through this size design aligned with the protocol field length, the model can selectively learn fault modes for different fields, improving the efficiency and accuracy of feature extraction.

[0067] As one implementation method, in the embodiments of this application, the convolution kernels with sizes of 3K and 5K employ dilated convolution, and the dilation rate increases progressively.

[0068] In this embodiment, to further expand the receptive field without significantly increasing the number of parameters, the 3K and 5K convolutional kernels employ dilated convolution structures with an increasing dilation rate. Dilated convolution expands the coverage of the convolutional kernel by inserting zero values ​​(i.e., holes) between kernel elements, and its effective receptive field is proportional to the dilation rate. Specifically, for the 3K convolutional kernel, a dilation rate of 2 is set, meaning a hole is inserted between adjacent kernel elements, expanding the actual covered sampling point range to approximately 6K; for the 5K convolutional kernel, a dilation rate of 3 is set, further expanding its coverage to approximately 15K. Through this increasing dilation rate design, the two branches can obtain a larger receptive field while maintaining a small number of parameters (only learning the parameters of 3K and 5K convolutional kernels), thereby capturing longer bit sequence dependencies. For example, a 3K convolutional kernel with a dilation rate of 2 can detect a range that would normally require 5K kernels to cover, while a 5K kernel with a dilation rate of 3 can cover a range of nearly 11K. This helps identify cross-field anomalies caused by data conflicts or temporal shifts. Furthermore, the use of dilated convolutions can avoid the surge in parameters and overfitting risks caused by simply stacking large convolutional kernels, making model training more efficient and stable.

[0069] The dilated convolution outputs of each branch, together with the standard convolution output of size K, constitute multi-scale features, providing the model with rich fault discrimination criteria.

[0070] In one embodiment of this application, the neural network model further includes a protocol timing coding layer, which encodes the timing position of each logical bit in the input signal block within the protocol data unit signal block.

[0071] In this embodiment, the protocol timing coding layer employs a sine-cosine position coding function to explicitly encode the timing position of each logical bit in the protocol data unit signal block. Specifically, for a signal block comprising N logical bits, each logical bit has a fixed order within the protocol frame (e.g., the start identifier is located at the frame header, followed by the control field, etc.). The sine-cosine position coding function generates a unique position code based on the position index of each bit and combines this code with the feature representation of the corresponding bit, enabling the model to perceive the timing position information of different bits in subsequent processing. In this way, the model can clearly distinguish the boundaries of different protocol fields such as the start identifier, control field, and address field, thereby more accurately identifying fault modes associated with specific fields.

[0072] As one implementation method, in this embodiment of the application, the protocol timing coding layer uses a sine-cosine position coding function to mark the preset positions of preset protocol fields in the protocol data unit signal block.

[0073] In this embodiment, sine-cosine position coding is a fixed coding method based on trigonometric functions, generating position coding vectors according to conventional methods in the art. Specifically, for each logical bit in the protocol data unit signal block, a unique position code is generated based on its sequential position in the block, and this code is combined with the bit's feature representation. Through this coding, the model can perceive the temporal position of each bit, thereby clearly distinguishing the boundaries of different protocol fields (e.g., start identifier, control field, address field, etc.), which have predefined bit position ranges in the protocol. For example, in the MVB protocol, the start identifier always occupies the sampling point range corresponding to the first 8 bits. Through the annotation of position codes, the model can accurately identify the start and end positions of each field, avoiding cross-field confusion, thereby improving the detection capability of faults related to specific fields (e.g., start identifier distortion, control field logic errors, etc.).

[0074] In one implementation method, in this embodiment of the application, the trained neural network model is trained using a loss function that includes protocol structure constraints. The protocol structure constraints are used to guide the model to prioritize learning the features of preset protocol fields.

[0075] In this embodiment, to further enhance the model's sensitivity to preset protocol fields (such as start identifiers and checksums), a protocol structure constraint term is introduced as part of the loss function during training. This constraint term, combined with standard classification loss (such as cross-entropy loss), jointly optimizes the model parameters. Guided by the protocol structure constraint term, the model focuses more on fields crucial for fault diagnosis during feature learning, rather than focusing on all bits equally. This effectively avoids overfitting to irrelevant noise and improves the model's generalization ability and diagnostic accuracy. The specific form of the constraint term can be implemented using various methods known in the art, such as gradient regularization based on the protocol mask matrix, which biases the model parameter update direction towards feature extraction of key fields.

[0076] Based on the above embodiments, this application provides a specific implementation of a protocol structure constraint term. As one embodiment, in this application, the loss function includes cross-entropy loss and a gradient regularization term. The gradient regularization term constrains the model gradient based on protocol constraint information used to indicate the position of a preset protocol field.

[0077] In this embodiment, to further enhance the model's learning of preset protocol fields (such as start identifiers, checksums, etc.), a gradient regularization term is introduced during training. This regularization term modulates the gradient of the model parameters during backpropagation using protocol constraint information (such as a mask matrix generated based on the preset positions of the preset protocol fields in the protocol data unit signal block).

[0078] Specifically, protocol constraint information identifies which feature locations correspond to key fields. After gradient calculation, the gradient regularization term suppresses gradient components corresponding to non-key fields (e.g., by multiplying by a smaller coefficient), while keeping or enhancing gradient components corresponding to key fields unchanged. This allows the model parameter updates to focus more on learning the features of key fields. This mechanism, together with cross-entropy loss, optimizes the model, guiding the network to prioritize protocol fields crucial for fault diagnosis during feature extraction, effectively avoiding overfitting to irrelevant noise and improving the model's diagnostic accuracy and generalization ability. The gradient regularization term can be implemented using various methods known in the art, such as gradient scaling or gradient clipping based on the mask matrix.

[0079] It should be noted that although the above embodiments use an MVB network as an example to describe the technical solution of this application in detail, the core concept of this application is to accurately determine the number of bit-level sampling points K by using the protocol rate and sampling rate, and to use a convolutional kernel with size and stride K for bit-level feature extraction, which is not limited to the MVB protocol. Those skilled in the art will understand that for other vehicle communication networks with clearly defined protocol specifications, such as Controller Area Networks (CAN), Local Area Networks (LIN), or Ethernet, as long as the protocol rate can be determined and a sufficiently high sampling rate is used to sample the physical layer signal, the method provided in this application can be applied. By replacing the parameter K in this method with the bit-sampling point correspondence of the target protocol and adjusting the PDU length N accordingly, a bit-aligned convolutional neural network suitable for that protocol can be constructed to diagnose physical layer faults in that network. Such protocol template extension methods based on the same concept are all within the protection scope of this application.

[0080] like Figure 2 As shown in the illustration, this application also provides a fault diagnosis system for a vehicle communication network, comprising: The acquisition module 21 is used to acquire continuous waveform data of the physical layer of the vehicle communication network; Preprocessing module 22 is used to preprocess continuous waveform data to obtain at least one protocol data unit signal block of preset length. Each protocol data unit in the protocol data unit signal block includes multiple logic bits, and each logic bit corresponds to K consecutive sampling points in the continuous waveform, wherein K is determined by the protocol rate and physical layer sampling rate of the vehicle communication network. Inference module 23 is used to input protocol data unit signal blocks into a trained neural network model. The neural network model includes a feature extraction layer, which uses a convolution kernel of size K and stride K to perform convolution operations on the input signal blocks. The fault identification module 24 is used to determine the fault diagnosis results of the physical layer of the vehicle communication network based on the output of the neural network model.

[0081] like Figure 3 As shown, this application embodiment also provides an electronic device, including: a processor 31, a memory 32, and a communication bus 33; Communication bus 33 is used to realize the connection and communication between processor 31 and memory 32; The processor 31 is used to execute the fault diagnosis processing program of the vehicle communication network stored in the memory 32 to implement the steps of any of the above-described fault diagnosis methods for the vehicle communication network.

[0082] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when loaded and executed by a processor, implement the steps of any of the above-described vehicle communication network fault diagnosis methods.

[0083] The above description is merely an embodiment of the present invention. It should be noted that those skilled in the art can make improvements without departing from the inventive concept of the present invention, but these improvements all fall within the protection scope of the present invention.

Claims

1. A fault diagnosis method for a vehicle communication network, characterized in that, include: Acquire continuous waveform data from the physical layer of the vehicle communication network; The continuous waveform data is preprocessed to obtain at least one protocol data unit signal block of a preset length. Each protocol data unit in the protocol data unit signal block includes multiple logic bits, and each logic bit corresponds to K consecutive sampling points in the continuous waveform, wherein K is determined by the protocol rate and physical layer sampling rate of the vehicle communication network. The protocol data unit signal block is input into a trained neural network model, which includes a feature extraction layer. The feature extraction layer uses a convolution kernel of size K and stride K to perform a convolution operation on the input signal block. Based on the output of the neural network model, the fault diagnosis result of the physical layer of the vehicle communication network is determined.

2. The method according to claim 1, characterized in that, The preprocessing of the continuous waveform data to obtain at least one protocol data unit signal block of a preset length includes: The continuous waveform data is filtered to obtain filtered data; Based on the filtered data, determine the dynamic threshold; The filtered data is then smoothed to obtain smoothed data. Based on the dynamic threshold, candidate signal segments are identified and extracted from the smoothed data, and the candidate signal segments are verified for protocol consistency to obtain at least one protocol data unit signal block of a preset length.

3. The method according to claim 2, characterized in that, The filtering method used is median filtering.

4. The method according to claim 2, characterized in that, The dynamic threshold is determined based on the mean and standard deviation of the filtered data.

5. The method according to claim 2, characterized in that, The smoothing process employs a moving mean filter.

6. The method according to claim 2, characterized in that, The protocol consistency verification of the candidate signal segment includes: Determine whether the length of the candidate signal segment is within a preset length range.

7. The method according to claim 1, characterized in that, The neural network model also includes a multi-scale protocol field awareness module, which deploys multiple convolutional kernels of different sizes in parallel to extract features at different protocol field scales.

8. The method according to claim 7, characterized in that, The multi-scale protocol field perception module includes convolutional kernels of size K, 3K, and 5K, which extract features of single bits, control fields, and address fields, respectively.

9. The method according to claim 8, characterized in that, The convolution kernels with sizes of 3K and 5K employ dilated convolution, with the dilation rate increasing progressively.

10. The method according to claim 1, characterized in that, The neural network model also includes a protocol timing coding layer, which encodes the timing position of each logical bit in the input signal block within the protocol data unit signal block.

11. The method according to claim 10, characterized in that, The protocol timing coding layer uses a sine-cosine position coding function to mark the preset positions of the preset protocol fields in the protocol data unit signal block.

12. The method according to claim 1, characterized in that, The trained neural network model is obtained by training a loss function that includes protocol structure constraints, which are used to guide the model to prioritize learning the features of preset protocol fields.

13. The method according to claim 12, characterized in that, The loss function includes cross-entropy loss and gradient regularization, which constrains the model gradient based on protocol constraint information used to indicate the position of a preset protocol field.

14. A fault diagnosis system for a vehicle communication network, characterized in that, include: The acquisition module is used to acquire continuous waveform data from the physical layer of the vehicle communication network. A preprocessing module is used to preprocess the continuous waveform data to obtain at least one protocol data unit signal block of a preset length. Each protocol data unit in the protocol data unit signal block includes multiple logic bits, and each logic bit corresponds to K consecutive sampling points in the continuous waveform, wherein K is determined by the protocol rate and physical layer sampling rate of the vehicle communication network. The inference module is used to input the protocol data unit signal block into a trained neural network model. The neural network model includes a feature extraction layer, which uses a convolution kernel of size K and stride K to perform a convolution operation on the input signal block. The fault identification module is used to determine the fault diagnosis result of the physical layer of the vehicle communication network based on the output of the neural network model.

15. An electronic device, characterized in that, include: Processor, memory, and communication bus; The communication bus is used to realize the connection and communication between the processor and the memory; The processor is used to execute a fault diagnosis processing program for a vehicle communication network stored in the memory, so as to implement the steps of the fault diagnosis method for a vehicle communication network as described in any one of claims 1-13.

16. A computer-readable storage medium, characterized in that, The readable storage medium stores computer-executable instructions, which, when loaded and executed by a processor, implement the steps of the fault diagnosis method for the vehicle communication network as described in any one of claims 1 to 13.