A vehicle bus fault testing device and method

CN122533922APending Publication Date: 2026-08-07BEIJING LEISHEN BOFENG INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING LEISHEN BOFENG INFORMATION TECH CO LTD
Filing Date
2026-07-13
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

[0004]本发明的目的在于提供一种车辆总线故障测试装置和方法,用于解决现有的车辆总线故障检测方案的检测效果差的技术问题

Benefits of technology

以控制器局域网线路的差分时间序列作为分析对象,专注于对控制器局域网线路的原始时间序列的变化规律的提炼,保障分析结果的可靠性,在此基础上,通过分析差分时间序列的稳态变化规律,动态确定差分时间序列达到统计稳态所需要的最小样本量,并以此构建滑动窗口,逐元素对差分时间序列进行滑动窗口分析,从而确定差分时间序列中每一个序列点的理想期望值,之后继续分析每一个序列点对应的残差波动程度,以确定各个序列点的波动半径,最后以各个序列点的理想期望值作为区间中点,波动半径作为区间半径,构建适配各个序列点对应工况的数值波动区间,保障据此识别到的异常序列点的准确性,进而提升控制器局域网线路的故障检测效果。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122533922A_ABST
    Figure CN122533922A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of vehicle bus detection, and particularly relates to a vehicle bus fault testing device and method.The method comprises the following steps: acquiring a differential time sequence of a controller area network line; analyzing a steady-state change rule of the differential time sequence to obtain a target window width indicating a minimum sample size required for the differential time sequence to reach a statistical steady state; based on the target window width, performing sliding window analysis on the differential time sequence element by element to determine a baseline value of an ideal expected value of each sequence point in the differential time sequence; analyzing a residual fluctuation degree corresponding to each sequence point in the differential time sequence to obtain a fluctuation radius of each sequence point; and based on the baseline value and the fluctuation radius of each sequence point, determining a numerical fluctuation interval of each sequence point to identify whether the corresponding sequence point is an abnormal sequence point according to the numerical fluctuation interval.The application can improve the fault detection effect of the controller area network line.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of vehicle bus testing, and specifically to a vehicle bus fault testing device and method. Background Technology

[0002] With the continuous improvement of automotive electronics and intelligence, vehicle control systems are increasingly composed of multiple electronic control units (ECUs) working collaboratively through in-vehicle communication networks. These ECUs are interconnected via various buses such as CAN (Controller Area Network), LIN (Linux Local Area Network), and in-vehicle Ethernet, forming a complex in-vehicle network system. Among these, the CAN bus is widely used in engine control, body control, chassis control, and driver assistance systems due to its high reliability, good real-time performance, and low cost.

[0003] In CAN bus fault testing, existing technologies rely on fixed threshold ranges for fault determination, which cannot accurately identify the frequent intermittent faults that occur in actual vehicle operation (such as loose wiring harness connections, microsecond-level bit errors caused by electromagnetic interference, and periodic jitter, delay, or loss of communication frames), resulting in widespread false alarms and missed detections. Summary of the Invention

[0004] The purpose of this invention is to provide a vehicle bus fault testing device and method to solve the technical problem of poor detection effect of existing vehicle bus fault detection schemes.

[0005] In a first aspect, one embodiment of the present invention provides a vehicle bus fault testing method, the method comprising: Obtain the differential time series of the controller area network lines; The steady-state variation pattern of the difference time series is analyzed to obtain the target window width, wherein the target window width is used to indicate the minimum sample size required for the difference time series to reach statistical steady state; Based on the target window width, a sliding window analysis is performed on the difference time series element by element to determine the baseline value of each sequence point in the difference time series, wherein the baseline value is used to indicate the ideal expected value of the corresponding sequence point; Analyze the residual volatility of each sequence point in the difference time series to obtain the volatility radius of each sequence point; Based on the baseline value and fluctuation radius of each sequence point, the numerical fluctuation range of each sequence point is determined, wherein the numerical fluctuation range is used to identify whether the corresponding sequence point is an abnormal sequence point.

[0006] In some embodiments, the step of analyzing the steady-state variation law of the difference time series to obtain the target window width includes: In differential time series analysis, inter-frame fluctuation analysis is performed based on the data differences of operating condition data of adjacent sequence points to determine the width update parameters. The operating condition data includes bus load data, task scheduling data, and vehicle speed data. The predetermined initial window width is updated according to the width update parameters to obtain the target window width.

[0007] In some embodiments, the step of determining the initial window width includes: In a preset plurality of lag orders, the degree of autocorrelation of the difference time series at each lag order is analyzed to obtain multiple order autocorrelation coefficients, wherein the plurality of lag orders are arranged in ascending order; Among the plurality of autocorrelation coefficients, the autocorrelation coefficient that matches the confidence critical condition is determined as the critical autocorrelation coefficient. The initial window width is determined based on the lag order corresponding to the critical order autocorrelation coefficient.

[0008] In some embodiments, the target window width is greater than the initial window width.

[0009] In some embodiments, the step of performing a sliding window analysis on the difference time series element by element based on the target window width to determine the baseline value of each sequence point in the difference time series includes: The STL time series decomposition algorithm is used to process the differential time series to obtain a first sequence indicating the inter-frame changes and periodic fluctuations of the sequence, and a second sequence indicating the abnormal changes of the sequence. In the multiple sequence points included in the differential time series, a linear fit is performed on the first fitting window corresponding to each sequence point in the first sequence to obtain the fitting function corresponding to each sequence point. The width of the first fitting window is the width of the target window, and the last window element in the first fitting window and the corresponding sequence point indicate the same time. In the differential time series, the baseline value of each sequence point is determined based on the fitting function corresponding to each sequence point.

[0010] In some embodiments, the step of performing linear fitting on a first fitting window corresponding to each sequence point in the first sequence among the multiple sequence points included in the differential time series to obtain the fitting function corresponding to each sequence point includes: In the multiple sequence points included in the differential time series, the local dispersion of each window element within the first fitting window corresponding to each sequence point is analyzed to obtain the key element factors of each window element corresponding to each sequence point. In the multiple sequence points included in the differential time series, the temporal decay degree of each window element within the first fitting window corresponding to each sequence point is analyzed to obtain the temporal key factor of each window element corresponding to each sequence point. In the multiple sequence points included in the differential time series, the key element factors and time-series key factors of each window element corresponding to each sequence point are fused to obtain the fitting weight of each window element corresponding to each sequence point. Based on the fitting weight of each window element corresponding to each sequence point, a weighted linear fit is performed on multiple window elements of the first fitting window corresponding to each sequence point to obtain the fitting function corresponding to each sequence point.

[0011] In some embodiments, the step of analyzing the local dispersion of each window element within a first fitting window corresponding to each sequence point in the plurality of sequence points included in the differential time series, to obtain the key element factors of each window element corresponding to each sequence point, includes: In the multiple sequence points included in the differential time series, the absolute difference between each window element and the mean of the corresponding window element within the first fitting window corresponding to each sequence point is calculated to obtain the deviation value of each window element corresponding to each sequence point. In the multiple sequence points included in the differential time series, the ratio of the deviation value within the first fitting window corresponding to each sequence point to the standard deviation of the corresponding window element is calculated to obtain the discrete factor of each window element corresponding to each sequence point. In the multiple sequence points included in the differential time series, the discrete factor of each window element corresponding to each sequence point is numerically transformed to obtain the key element factor of each window element corresponding to each sequence point. The sum of the key element factors of multiple window elements corresponding to the same sequence point is 1, and the key element factor and the corresponding discrete factor are negatively correlated.

[0012] In some embodiments, the step of analyzing the temporal decay degree of each window element within the first fitting window corresponding to each sequence point in the plurality of sequence points included in the differential time series, to obtain the temporal key factor of each window element corresponding to each sequence point, includes: In the multiple sequence points included in the differential time series, the time series value of each window element in the first fitting window corresponding to each sequence point is processed based on a preset exponential decay function to obtain the time series key value of each window element corresponding to each sequence point. In the differential time series, the time-series key value of each window element corresponding to each sequence point is numerically transformed to obtain the time-series key factor of each window element corresponding to each sequence point. The sum of the time-series key factors of multiple window elements corresponding to the same sequence point is 1, and the time-series key factor and the corresponding time-series key value are positively correlated.

[0013] In some embodiments, the fluctuation radius is the median absolute deviation of the corresponding sequence point in the second fitting window in the second sequence, the width of the second fitting window is the target window width, and the last window element in the second fitting window and the corresponding sequence point indicate the same time.

[0014] Secondly, another embodiment of the present invention also provides a vehicle bus fault testing device, the device comprising: The data acquisition module is used to acquire the differential time series of the controller local area network lines; The window width analysis module is used to analyze the steady-state change pattern of the difference time series to obtain the target window width, wherein the target window width is used to indicate the minimum sample size required for the difference time series to reach statistical steady state; The baseline extraction module is used to perform sliding window analysis on the difference time series element by element based on the target window width to determine the baseline value of each sequence point in the difference time series, wherein the baseline value is used to indicate the ideal expected value of the corresponding sequence point; The residual analysis module is used to analyze the degree of residual fluctuation corresponding to each sequence point in the difference time series in order to obtain the fluctuation radius of each sequence point; The dynamic interval construction module is used to determine the numerical fluctuation interval of each sequence point based on the baseline value and fluctuation radius of each sequence point. The numerical fluctuation interval is used to identify whether the corresponding sequence point is an abnormal sequence point.

[0015] Thirdly, in another embodiment of the present invention, an electronic device is provided, including a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the method described in the first aspect.

[0016] Fourthly, in another embodiment of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps of the method described in the first aspect.

[0017] The present invention has the following beneficial effects: This study focuses on the differential time series of Controller Area Network (CAN) lines, extracting the variation patterns of the original time series to ensure the reliability of the analysis results. Based on this, it dynamically determines the minimum sample size required for the differential time series to reach statistical steady state by analyzing the steady-state variation patterns. A sliding window is then constructed to perform element-by-element sliding window analysis on the differential time series, thereby determining the ideal expected value for each sequence point. Next, the residual fluctuation degree corresponding to each sequence point is analyzed to determine the fluctuation radius of each sequence point. Finally, using the ideal expected value of each sequence point as the midpoint of the interval and the fluctuation radius as the interval radius, a numerical fluctuation interval adapted to the corresponding operating conditions of each sequence point is constructed. This ensures the accuracy of the identified abnormal sequence points, thereby improving the fault detection effect of CAN lines. Attached Figure Description

[0018] Figure 1 This is a flowchart illustrating a vehicle bus fault testing method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of a vehicle bus fault testing device provided in an embodiment of the present invention. Detailed Implementation

[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0020] The specific details of the vehicle bus fault testing device and method provided by the present invention will be described below with reference to the accompanying drawings.

[0021] In one embodiment, the present invention provides a vehicle bus fault testing method, such as... Figure 1 As shown, the method includes: Step S1: Obtain the differential time series of the controller local area network lines.

[0022] In this invention, the steps for obtaining the differential time series are as follows: a fault test is conducted based on the controller local area network line, and SOF timestamps corresponding to multiple communication frames are collected during the test. Then, in the multiple communication frames, the timestamp difference between adjacent communication frames is calculated (the SOF timestamp of the later communication frame minus the SOF timestamp of the earlier communication frame), which yields multiple differential time values. The multiple differential time values ​​are arranged in ascending order according to the average value of the SOF timestamps of the corresponding two communication frames, thus obtaining the aforementioned differential time series.

[0023] In the above settings, the differential time series of the controller area network (SAR) line is used as the analysis object. This allows us to focus on extracting the variation patterns of the original time series of the SAR line (i.e., the SOF timestamps corresponding to multiple communication frames), ensuring the reliability of the final analysis results.

[0024] Step S2: Analyze the steady-state variation law of the differential time series to obtain the target window width.

[0025] The target window width is used to indicate the minimum sample size required for the difference time series to reach statistical steady state.

[0026] Analysis revealed that changes in vehicle driving conditions lead to variations in bus load and ECU task scheduling pressure, resulting in natural fluctuations in the frame interval of communication frames that conform to protocol specifications. Additionally, the task scheduling within the ECU itself introduces periodic minor jitters, which also cause fluctuations in the frame interval of communication frames. Both of these situations are considered normal communication fluctuations not caused by faults. In actual fault testing, these normal communication fluctuations are superimposed on abnormal communication fluctuations caused by issues such as loose wiring harness connections and electromagnetic interference. Current technology lacks the ability to identify these normal communication fluctuations, and using the same fixed threshold range for anomaly detection on all communication frames leads to frequent missed detections and false detections.

[0027] Based on this, the present invention proposes to dynamically configure the corresponding abnormal detection interval according to the actual working conditions and actual scheduling of each communication frame, so as to eliminate the numerical fluctuations caused by normal communication fluctuations and environmental interference, accurately identify the numerical deviations caused by faults in the corresponding communication frames, suppress the risk of missing abnormal communication frames and misdetecting normal communication frames, and then perform fault detection based on the identified abnormal communication frames to obtain more accurate and reliable detection results.

[0028] In order to accurately identify the actual working conditions and scheduling of each communication frame, it is necessary to analyze the frame interval of the communication frames in the previous period. Compared with manually setting the time window width corresponding to the frame interval, analyzing the steady-state change law of the differential time series to determine the minimum sample size required for the differential time series to reach the statistical steady state, and then using the minimum sample size to dynamically set the time window width corresponding to the frame interval, is more suitable for the actual situation of fault testing. This can avoid excessive data noise and additional resource overhead caused by improper setting of the time window width.

[0029] Specifically, the step of analyzing the steady-state variation law of the difference time series to obtain the target window width includes: In differential time series analysis, inter-frame fluctuation analysis is performed based on the data differences of operating condition data of adjacent sequence points to determine the width update parameters. The operating condition data includes bus load data, task scheduling data, and vehicle speed data. The predetermined initial window width is updated according to the width update parameters to obtain the target window width.

[0030] The target window width is greater than the initial window width.

[0031] Analysis revealed that the CAN bus is a shared communication medium, and the higher the actual load on the bus, the more likely frame transmission will experience natural delays. In addition, since the ECU undertakes multiple control tasks for the entire vehicle, the more its computing power is occupied by other tasks, the more severely the communication frame transmission scheduling will be affected. Finally, when the vehicle changes gears, the communication needs of each ECU in the vehicle will also change accordingly, which will trigger a chain reaction of changes in bus load and ECU scheduling.

[0032] Based on this, the present invention sets the operating condition data to include bus load data, task scheduling data and vehicle speed data, so as to comprehensively encompass all factors affecting the transmission of communication frames and ensure that the calculated width update parameters can accurately characterize the inter-frame fluctuation of the test conditions corresponding to multiple communication frames.

[0033] It should be understood that the greater the difference in operating condition data between adjacent sequence points, the more significant the inter-frame fluctuation of the corresponding test condition in the differential time series, which in turn indicates that the differential time series takes longer to reach statistical steady state and the greater the increase required on the basis of the initial window width.

[0034] In the above settings, the bus load data is specifically the average of the actual bus load rate of the two corresponding communication frames, the task scheduling data is specifically the average of the ECU task occupancy rate of the two corresponding communication frames, and the vehicle speed data is specifically the absolute value of the average vehicle acceleration of the two corresponding communication frames.

[0035] The process of obtaining the width update parameter is as follows: the working condition data of multiple sequence points are vectorized to obtain the working condition vector of each sequence point; among the multiple sequence points, the Euclidean distance between the working condition vectors of adjacent sequence points is calculated to obtain multiple vector distances; the average value of the multiple vector distances is calculated to obtain the width update parameter.

[0036] The vectorization process involves: normalizing the bus load data, task scheduling data, and vehicle speed data to obtain load normalization values, scheduling normalization values, and vehicle speed normalization values; then concatenating these values ​​to obtain the corresponding operating condition vector.

[0037] In this invention, numerical normalization should be understood as the process of calculating the ratio of the corresponding data to the corresponding data threshold. The data threshold can be understood as the largest bus load data / task scheduling data / vehicle speed data collected in history, or as the maximum value that the bus load data / task scheduling data / vehicle speed data can reach based on theoretical calculations.

[0038] Among them, the target window width It can be represented as: in, Indicates the initial window width. This is an adjustment factor (set to 0.5 based on experience) used to control the numerical impact of the width update parameter. This indicates the aforementioned width update parameter. This represents the function for rounding up.

[0039] In one example, an optional range of values ​​for the window width can be obtained based on experience or experimental analysis, and then the minimum value in that optional range can be determined as the initial window width.

[0040] In another example, the initial window width that adapts to the data changes of the difference time series can be dynamically determined by analyzing the autocorrelation of the difference time series, thereby further improving the accuracy of the determined target window width.

[0041] In this example, the steps for determining the initial window width include: In a preset plurality of lag orders, the degree of autocorrelation of the difference time series at each lag order is analyzed to obtain multiple order autocorrelation coefficients, wherein the plurality of lag orders are arranged in ascending order; Among the plurality of autocorrelation coefficients, the autocorrelation coefficient that matches the confidence critical condition is determined as the critical autocorrelation coefficient. The initial window width is determined based on the lag order corresponding to the critical order autocorrelation coefficient.

[0042] The aforementioned multiple order autocorrelation coefficients correspond one-to-one with multiple lag orders. Specifically, the order autocorrelation coefficients are the autocorrelation coefficients of the difference time series at the corresponding lag order.

[0043] In this invention, the order autocorrelation coefficient matching the confidence critical condition can be understood as: the first order autocorrelation coefficient among multiple order autocorrelation coefficients that is less than the autocorrelation coefficient threshold, wherein the autocorrelation coefficient threshold is the product of the first order autocorrelation coefficient and the attenuation coefficient among multiple order autocorrelation coefficients, and the attenuation coefficient can be set to 0.1 or 0.2 based on experience.

[0044] The value of the initial window width is the value of the lag order corresponding to the critical order autocorrelation coefficient.

[0045] Step S3: Based on the target window width, perform sliding window analysis on the difference time series element by element to determine the baseline value of each sequence point in the difference time series.

[0046] The baseline value is used to indicate the ideal expected value of the corresponding sequence point.

[0047] Specifically, the step of performing a sliding window analysis element-by-element on the difference time series based on the target window width to determine the baseline value of each sequence point in the difference time series includes: The STL time series decomposition algorithm is used to process the differential time series to obtain a first sequence indicating the inter-frame changes and periodic fluctuations of the sequence, and a second sequence indicating the abnormal changes of the sequence. In the multiple sequence points included in the differential time series, a linear fit is performed on the first fitting window corresponding to each sequence point in the first sequence to obtain the fitting function corresponding to each sequence point. The width of the first fitting window is the width of the target window, and the last window element in the first fitting window and the corresponding sequence point indicate the same time. In the differential time series, the baseline value of each sequence point is determined based on the fitting function corresponding to each sequence point.

[0048] In application, to ensure the smooth use of the STL time series decomposition algorithm, a linear interpolation algorithm can be used first to resample the non-equidistant difference time series into equidistant scattered time series, and then the STL time series decomposition algorithm can be used for time series decomposition processing to obtain the aforementioned first and second sequences.

[0049] In actual processing, after processing by the STL time series decomposition algorithm, the differential time series will be split into a trend series reflecting the inter-frame changes of operating conditions, a periodic series reflecting the periodic fluctuations of task scheduling, and a residual series reflecting environmental disturbances and faults. The trend series and periodic series are integrated into the first series, while the residual series is defined as the aforementioned second series.

[0050] It should be noted that the sequence points targeted in the above linear fitting process should be understood as sequence points in the difference time series whose time length tracing back to the first sequence point is greater than or equal to the target window width.

[0051] In the above settings, linear fitting is used to simulate the numerical change pattern before the corresponding sequence point, and then the ideal expected value of the corresponding sequence point is predicted based on the corresponding numerical change pattern.

[0052] The baseline value should be understood as the function output obtained by using the corresponding sequence points as function input and the corresponding fitting function for function calculation.

[0053] The step of performing linear fitting on a first fitting window corresponding to each sequence point in the first sequence among the multiple sequence points included in the differential time series to obtain the fitting function corresponding to each sequence point includes: In the multiple sequence points included in the differential time series, the local dispersion of each window element within the first fitting window corresponding to each sequence point is analyzed to obtain the key element factors of each window element corresponding to each sequence point. In the multiple sequence points included in the differential time series, the temporal decay degree of each window element within the first fitting window corresponding to each sequence point is analyzed to obtain the temporal key factor of each window element corresponding to each sequence point. In the multiple sequence points included in the differential time series, the key element factors and time-series key factors of each window element corresponding to each sequence point are fused to obtain the fitting weight of each window element corresponding to each sequence point. Based on the fitting weight of each window element corresponding to each sequence point, a weighted linear fit is performed on multiple window elements of the first fitting window corresponding to each sequence point to obtain the fitting function corresponding to each sequence point.

[0054] In the above settings, by analyzing the local dispersion and temporal decay of each window element within the first fitting window corresponding to each sequence point, the importance of each window element in the temporal dimension and the numerical dimension are evaluated accordingly. Based on this, the weight of each window element when participating in the fitting is determined, thereby amplifying the numerical influence of window elements that are close to the corresponding sequence point, as well as the numerical influence of window elements whose numerical changes are similar to those of the corresponding first fitting window, thus improving the accuracy of the corresponding fitting function obtained.

[0055] It should be understood that the weaker the local dispersion of the window element, the larger the corresponding element critical factor; similarly, the weaker the temporal decay of the window element, the larger the corresponding temporal critical factor. The fitting weight is positively correlated with the element critical factor, and the fitting weight is also positively correlated with the temporal critical factor.

[0056] In this invention, the weighted least squares method is specifically used to complete the above-mentioned weighted linear fitting operation.

[0057] Specifically, the fitting weights are the average values ​​of the corresponding element key factors and the time-series key factors.

[0058] Specifically, the step of analyzing the local dispersion of each window element within the first fitting window corresponding to each sequence point in the multiple sequence points included in the differential time series, in order to obtain the key element factors of each window element corresponding to each sequence point, includes: In the multiple sequence points included in the differential time series, the absolute difference between each window element and the mean of the corresponding window element within the first fitting window corresponding to each sequence point is calculated to obtain the deviation value of each window element corresponding to each sequence point. In the multiple sequence points included in the differential time series, the ratio of the deviation value within the first fitting window corresponding to each sequence point to the standard deviation of the corresponding window element is calculated to obtain the discrete factor of each window element corresponding to each sequence point. In the multiple sequence points included in the differential time series, the discrete factor of each window element corresponding to each sequence point is numerically transformed to obtain the key element factor of each window element corresponding to each sequence point. The sum of the key element factors of multiple window elements corresponding to the same sequence point is 1, and the key element factor and the corresponding discrete factor are negatively correlated.

[0059] In the above settings, the larger the dispersion factor, the more significant the local dispersion of the corresponding window elements.

[0060] In one example, the numerical transformation process for the discrete factor is as follows: Calculate the reciprocal of the discrete factor of each window element corresponding to each sequence point to obtain the lumped factor of each window element corresponding to each sequence point; Calculate the sum of the set factors of all window elements corresponding to each sequence point to obtain the set sum value corresponding to each sequence point; Calculate the ratio of the concentration factor and the corresponding concentration sum of each window element corresponding to each sequence point, and thus obtain the element key factor of each window element corresponding to each sequence point.

[0061] In this example, when the standard deviation of the window element is 0, the corresponding discrete factor calculation process is skipped, and the corresponding lumped factor is forcibly set to the maximum value of multiple lumped factors obtained by reciprocal calculation.

[0062] Specifically, the step of analyzing the temporal decay degree of each window element within the first fitting window corresponding to each sequence point in the multiple sequence points included in the differential time series, in order to obtain the temporal key factor of each window element corresponding to each sequence point, includes: In the multiple sequence points included in the differential time series, the time series value of each window element in the first fitting window corresponding to each sequence point is processed based on a preset exponential decay function to obtain the time series key value of each window element corresponding to each sequence point. In the differential time series, the time-series key value of each window element corresponding to each sequence point is numerically transformed to obtain the time-series key factor of each window element corresponding to each sequence point. The sum of the time-series key factors of multiple window elements corresponding to the same sequence point is 1, and the time-series key factor and the corresponding time-series key value are positively correlated.

[0063] In this embodiment, all window elements within the first fitting window can be arranged sequentially in ascending order of their time difference with the corresponding sequence points to obtain the element sequence corresponding to each sequence point. In this case, the time series value can be understood as the sequence number of the corresponding window element in the corresponding element sequence.

[0064] The numerical transformation process is as follows: Calculate the sum of the temporal key values ​​of all window elements corresponding to each sequence point to obtain the temporal key sum value corresponding to each sequence point; Calculate the ratio of the temporal key value to the corresponding temporal key sum value for each window element corresponding to each sequence point, thus obtaining the temporal key factor for each window element corresponding to each sequence point.

[0065] In this invention, the exponential decay function can be understood as the reciprocal form of an exponential function with the natural constant e as its base.

[0066] Step S4: Analyze the residual fluctuation degree corresponding to each sequence point in the difference time series to obtain the fluctuation radius of each sequence point.

[0067] Wherein, the fluctuation radius is the median absolute deviation of the corresponding sequence point in the second fitting window in the second sequence, the width of the second fitting window is the target window width, and the last window element in the second fitting window and the corresponding sequence point indicate the same time.

[0068] As mentioned earlier, although the second sequence is a residual sequence reflecting environmental disturbances and fault problems, occasional fault problems are fully suppressed in the second fitting window indicated by the target window width. At this time, the determined median absolute deviation can be used to accurately reflect environmental disturbances, so as to effectively separate environmental disturbances and fault problems by utilizing the setting of the second fitting window, and ensure the accuracy of the subsequently determined numerical fluctuation range. In this process, the median absolute deviation is used to indicate the data dispersion trend shown by multiple window points in the corresponding second fitting window, so as to adapt to the long-term performance of environmental disturbances under the corresponding test conditions and reduce the probability of misjudging environmental disturbances as fault problems.

[0069] Step S5: Based on the baseline value and fluctuation radius of each sequence point, determine the numerical fluctuation range of each sequence point.

[0070] The numerical fluctuation range is used to identify whether the corresponding sequence point is an abnormal sequence point.

[0071] Specifically, if the value of a sequence point is within its corresponding numerical fluctuation range, the sequence point is judged to be a normal sequence point; if the value of a sequence point is outside its corresponding numerical fluctuation range, the sequence point is judged to be an abnormal sequence point.

[0072] After identifying several outlier sequence points in the differential time series, the fault detection results are obtained by analyzing the distribution pattern, numerical anomaly degree, and corresponding operating condition data of the outlier sequence points, so as to determine whether the vehicle network system will have fault problems under certain specific operating conditions.

[0073] In summary, this invention uses the differential time series of Controller Area Network (CAN) lines as the analysis object, focusing on extracting the variation patterns of the original time series of CAN lines to ensure the reliability of the analysis results. Based on this, by analyzing the steady-state variation patterns of the differential time series, the minimum sample size required for the differential time series to reach statistical steady state is dynamically determined. A sliding window is then constructed based on this, and sliding window analysis is performed element-by-element on the differential time series to determine the ideal expected value of each sequence point. Subsequently, the residual fluctuation degree corresponding to each sequence point is analyzed to determine the fluctuation radius of each sequence point. Finally, using the ideal expected value of each sequence point as the midpoint of the interval and the fluctuation radius as the interval radius, a numerical fluctuation interval adapted to the corresponding operating conditions of each sequence point is constructed, ensuring the accuracy of the identified abnormal sequence points and thus improving the fault detection effect of CAN lines.

[0074] In one embodiment, the present invention also provides a vehicle bus fault testing device, such as... Figure 2 As shown, the device 200 includes: The data acquisition module 201 is used to acquire the differential time series of the controller local area network lines; The window width analysis module 202 is used to analyze the steady-state change pattern of the difference time series to obtain the target window width, wherein the target window width is used to indicate the minimum sample size required for the difference time series to reach statistical steady state; The baseline extraction module 203 is used to perform sliding window analysis on the difference time series element by element based on the target window width to determine the baseline value of each sequence point in the difference time series, wherein the baseline value is used to indicate the ideal expected value of the corresponding sequence point; The residual analysis module 204 is used to analyze the degree of residual fluctuation corresponding to each sequence point in the difference time series in order to obtain the fluctuation radius of each sequence point; The dynamic interval construction module 205 is used to determine the numerical fluctuation interval of each sequence point based on the baseline value and fluctuation radius of each sequence point, wherein the numerical fluctuation interval is used to identify whether the corresponding sequence point is an abnormal sequence point.

[0075] It should be noted that the apparatus provided in the above embodiments is only an example of the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device can be divided into different functional modules to complete all or part of the functions described above. In addition, the vehicle bus fault testing apparatus and the vehicle bus fault testing method embodiment provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiment, which will not be repeated here.

[0076] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

Claims

1. A method for testing vehicle bus faults, characterized in that, The method includes: Obtain the differential time series of the controller area network lines; The steady-state variation pattern of the difference time series is analyzed to obtain the target window width, wherein the target window width is used to indicate the minimum sample size required for the difference time series to reach statistical steady state; Based on the target window width, a sliding window analysis is performed on the difference time series element by element to determine the baseline value of each sequence point in the difference time series, wherein the baseline value is used to indicate the ideal expected value of the corresponding sequence point; Analyze the residual volatility of each sequence point in the difference time series to obtain the volatility radius of each sequence point; Based on the baseline value and fluctuation radius of each sequence point, the numerical fluctuation range of each sequence point is determined, wherein the numerical fluctuation range is used to identify whether the corresponding sequence point is an abnormal sequence point.

2. The vehicle bus fault testing method according to claim 1, characterized in that, The step of analyzing the steady-state variation law of the difference time series to obtain the target window width includes: In differential time series analysis, inter-frame fluctuation analysis is performed based on the data differences of operating condition data of adjacent sequence points to determine the width update parameters. The operating condition data includes bus load data, task scheduling data, and vehicle speed data. The predetermined initial window width is updated according to the width update parameters to obtain the target window width.

3. The vehicle bus fault testing method according to claim 2, characterized in that, The steps for determining the initial window width include: In a preset plurality of lag orders, the degree of autocorrelation of the difference time series at each lag order is analyzed to obtain multiple order autocorrelation coefficients, wherein the plurality of lag orders are arranged in ascending order; Among the plurality of autocorrelation coefficients, the autocorrelation coefficient that matches the confidence critical condition is determined as the critical autocorrelation coefficient. The initial window width is determined based on the lag order corresponding to the critical order autocorrelation coefficient.

4. The vehicle bus fault testing method according to claim 2, characterized in that, The target window width is greater than the initial window width.

5. The vehicle bus fault testing method according to claim 1, characterized in that, The step of performing a sliding window analysis on the difference time series element by element, based on the target window width, to determine the baseline value of each series point in the difference time series includes: The STL time series decomposition algorithm is used to process the differential time series to obtain a first sequence indicating the inter-frame changes and periodic fluctuations of the sequence, and a second sequence indicating the abnormal changes of the sequence. In the multiple sequence points included in the differential time series, a linear fit is performed on the first fitting window corresponding to each sequence point in the first sequence to obtain the fitting function corresponding to each sequence point. The width of the first fitting window is the width of the target window, and the last window element in the first fitting window and the corresponding sequence point indicate the same time. In the differential time series, the baseline value of each sequence point is determined based on the fitting function corresponding to each sequence point.

6. The vehicle bus fault testing method according to claim 5, characterized in that, The step of performing linear fitting on a first fitting window corresponding to each sequence point in the first sequence among the multiple sequence points included in the differential time series to obtain the fitting function corresponding to each sequence point includes: In the multiple sequence points included in the differential time series, the local dispersion of each window element within the first fitting window corresponding to each sequence point is analyzed to obtain the key element factors of each window element corresponding to each sequence point. In the multiple sequence points included in the differential time series, the temporal decay degree of each window element within the first fitting window corresponding to each sequence point is analyzed to obtain the temporal key factor of each window element corresponding to each sequence point. In the multiple sequence points included in the differential time series, the key element factors and time-series key factors of each window element corresponding to each sequence point are fused to obtain the fitting weight of each window element corresponding to each sequence point. Based on the fitting weight of each window element corresponding to each sequence point, a weighted linear fit is performed on multiple window elements of the first fitting window corresponding to each sequence point to obtain the fitting function corresponding to each sequence point.

7. The vehicle bus fault testing method according to claim 6, characterized in that, The step of analyzing the local dispersion of each window element within the first fitting window corresponding to each sequence point in the multiple sequence points of the differential time series, in order to obtain the key element factors of each window element corresponding to each sequence point, includes: In the multiple sequence points included in the differential time series, the absolute difference between each window element and the mean of the corresponding window element within the first fitting window corresponding to each sequence point is calculated to obtain the deviation value of each window element corresponding to each sequence point. In the multiple sequence points included in the differential time series, the ratio of the deviation value within the first fitting window corresponding to each sequence point to the standard deviation of the corresponding window element is calculated to obtain the discrete factor of each window element corresponding to each sequence point. In the multiple sequence points included in the differential time series, the discrete factor of each window element corresponding to each sequence point is numerically transformed to obtain the key element factor of each window element corresponding to each sequence point. The sum of the key element factors of multiple window elements corresponding to the same sequence point is 1, and the key element factor and the corresponding discrete factor are negatively correlated.

8. The vehicle bus fault testing method according to claim 6, characterized in that, The step of analyzing the temporal decay degree of each window element within the first fitting window corresponding to each sequence point in the multiple sequence points included in the differential time series, in order to obtain the temporal key factor of each window element corresponding to each sequence point, includes: In the multiple sequence points included in the differential time series, the time series value of each window element in the first fitting window corresponding to each sequence point is processed based on a preset exponential decay function to obtain the time series key value of each window element corresponding to each sequence point. In the differential time series, the time-series key value of each window element corresponding to each sequence point is numerically transformed to obtain the time-series key factor of each window element corresponding to each sequence point. The sum of the time-series key factors of multiple window elements corresponding to the same sequence point is 1, and the time-series key factor and the corresponding time-series key value are positively correlated.

9. The vehicle bus fault testing method according to claim 5, characterized in that, The fluctuation radius is the median absolute deviation of the corresponding sequence point in the second fitting window in the second sequence. The width of the second fitting window is the target window width, and the last window element in the second fitting window and the corresponding sequence point indicate the same time.

10. A vehicle bus fault testing device, characterized in that, The device includes: The data acquisition module is used to acquire the differential time series of the controller local area network lines; The window width analysis module is used to analyze the steady-state change pattern of the difference time series to obtain the target window width, wherein the target window width is used to indicate the minimum sample size required for the difference time series to reach statistical steady state; The baseline extraction module is used to perform sliding window analysis on the difference time series element by element based on the target window width to determine the baseline value of each sequence point in the difference time series, wherein the baseline value is used to indicate the ideal expected value of the corresponding sequence point; The residual analysis module is used to analyze the degree of residual fluctuation corresponding to each sequence point in the difference time series in order to obtain the fluctuation radius of each sequence point; The dynamic interval construction module is used to determine the numerical fluctuation interval of each sequence point based on the baseline value and fluctuation radius of each sequence point. The numerical fluctuation interval is used to identify whether the corresponding sequence point is an abnormal sequence point.