LIN slave node fault test method and system, electronic equipment and storage medium

The LIN slave node fault testing method automates the detection and reporting of faults by capturing and comparing LIN messages and interface variables, addressing inefficiencies in traditional testing methods and enhancing accuracy and efficiency.

CN119094332APending Publication Date: 2024-12-06CHINA FAW CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411192749.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

Traditional methods for testing LIN slave node faults in automotive networks are inefficient and lack accuracy, leading to issues such as communication interruptions and unstable transmission due to electrical interference from high-power loads and external devices.

Method used

A method and system for LIN slave node fault testing that involves determining structure parameters, capturing and comparing LIN messages, disabling slave nodes, and querying fault interface variables to generate a fault test report, all automated without manual intervention, allowing for efficient and accurate testing across different slave nodes and messages.

Benefits of technology

The method improves the efficiency and accuracy of LIN slave node fault testing by automating the process, reducing human workload, and enabling quick reusability and high automation, while maintaining high accuracy and feasibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119094332A_ABST
    Figure CN119094332A_ABST
Patent Text Reader

Abstract

The invention discloses an LIN slave node fault test method and system, electronic equipment and a storage medium, and the method comprises the steps: determining structural body parameters which comprise a first parameter, a second parameter, a third parameter and a fourth parameter; obtaining a target LIN message issued by the target slave node according to the first parameter and the second parameter, and setting the third parameter to be in a normal communication state; the target slave node is forbidden, a target LIN error message issued by the target slave node is acquired according to the first parameter and the second parameter, and the third parameter is set to be in a communication interruption state; obtaining a fault interface variable of the target slave node, judging whether the fault query of the target slave node is successful or not according to the fault interface variable, and updating the state of a fourth parameter; and generating a fault test report according to the state change of the structural body parameters. The method improves the efficiency and accuracy of LIN slave node fault testing, and can be applied to the technical field of vehicle testing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of vehicle testing, and in particular to a LIN slave node fault testing method, system, electronic equipment and storage medium. Background Art

[0002] In the field of automotive electronic communications, the LIN communication bus, as a low-cost automotive bus, is mainly used for network connections of automotive peripheral electronic communication equipment, such as automatic headlights, window seats, electric sunroofs, active air intake grilles, automatic wipers, etc. It is widely accepted by most automobile companies and spare parts manufacturers in the world and has a huge potential market.

[0003] Since the operation of high-power loads, batteries and external electronic devices on the vehicle will cause electrical interference to the vehicle control unit, these interferences may affect network communications, resulting in a large number of error frame information, communication interruptions, unstable transmission and crashes, which seriously affect the normal operation of the vehicle. Therefore, it is necessary to test the electronic control unit (ECU) on the motor vehicle and the LIN network in which it is located, but traditional non-automated testing methods have the problems of low efficiency and insufficient accuracy. Summary of the invention

[0004] The purpose of the present invention is to solve one of the technical problems existing in the prior art to at least a certain extent.

[0005] Therefore, an object of an embodiment of the present invention is to provide a LIN slave node fault testing method, which improves the efficiency and accuracy of LIN slave node fault testing.

[0006] Another object of an embodiment of the present invention is to provide a LIN slave node fault testing system.

[0007] In order to achieve the above technical objectives, the technical solutions adopted by the embodiments of the present invention include:

[0008] On the one hand, an embodiment of the present invention provides a LIN slave node fault testing method, comprising the following steps:

[0009] Determine a structure parameter, the structure parameter including a first parameter storing a name of a target slave node, a second parameter storing a name of a target LIN message, a third parameter indicating a communication state of the target LIN message on a LIN bus, and a fourth parameter indicating whether a fault query of the target slave node is successful;

[0010] Acquire the target LIN message published by the target slave node according to the first parameter and the second parameter, and set the third parameter to a normal communication state;

[0011] disabling the target slave node, acquiring a target LIN error message issued by the target slave node according to the first parameter and the second parameter, and setting the third parameter to a communication interruption state;

[0012] Acquire the fault interface variable of the target slave node, determine whether the fault query of the target slave node is successful according to the fault interface variable, and update the state of the fourth parameter;

[0013] A fault test report is generated according to the state change of the structural parameters.

[0014] Furthermore, in one embodiment of the present invention, the structural parameters are configured through a host module, the host module is communicatively connected with the ECU to be tested through a test module, and both the host module and the test module are connected with a log module.

[0015] Further, in one embodiment of the present invention, the acquiring the target LIN message published by the target slave node according to the first parameter and the second parameter, and setting the third parameter to a normal communication state, specifically includes:

[0016] Capturing a first LIN message of the ECU to be tested by the test module, and determining a corresponding first slave node name and a first message name according to the first LIN message;

[0017] Comparing the first slave node name with the first parameter, and comparing the first message name with the second parameter;

[0018] When the first slave node is consistent with the first parameter, and the first message name is consistent with the second parameter, determining that the corresponding first LIN message is the target LIN message published by the target slave node;

[0019] It is determined that the target slave node can normally publish the target LIN message, and the third parameter is set to a normal communication state.

[0020] Further, in one embodiment of the present invention, disabling the target slave node, obtaining the target LIN error message issued by the target slave node according to the first parameter and the second parameter, and setting the third parameter to a communication interruption state specifically includes:

[0021] Performing fault injection on the ECU under test by means of the test module, so that the ECU under test disables the target slave node;

[0022] Capturing the LIN error message of the ECU to be tested by the test module, and determining the corresponding second slave node name and second message name according to the LIN error message;

[0023] Comparing the second slave node name with the first parameter, and comparing the second message name with the second parameter;

[0024] When the second slave node is consistent with the first parameter, and the second message name is consistent with the second parameter, determining that the corresponding LIN error message is the target LIN error message issued by the target slave node;

[0025] It is determined that the target slave node has been prohibited from issuing the target LIN message, and the third parameter is set to a communication interruption state.

[0026] Further, in one embodiment of the present invention, the acquiring of the fault interface variable of the target slave node, judging whether the fault query of the target slave node is successful according to the fault interface variable, and updating the state of the fourth parameter specifically includes:

[0027] Read the fault interface variable of the target slave node by using the XCP calibration function through the test module;

[0028] Comparing the fault interface variable with a preset interface variable expected value;

[0029] When the fault interface variable is consistent with the expected value of the interface variable, it is determined that the fault query of the target slave node is successful, and the fourth parameter is set to a fault query success state.

[0030] Further, in one embodiment of the present invention, generating a fault test report according to the state change of the structural parameter specifically includes:

[0031] Determine the name of the target slave node according to the first parameter, and determine the name of the target LIN message according to the second parameter;

[0032] If the third parameter is set from the normal communication state to the communication interruption state, and the fourth parameter is set to the fault query success state, it is determined that the fault test result of the target slave node is a test pass;

[0033] The fault test report is generated according to the name of the target slave node, the name of the target LIN message and the fault test result.

[0034] On the other hand, an embodiment of the present invention provides a LIN slave node fault testing system, comprising:

[0035] A parameter determination module, used to determine a structure parameter, wherein the structure parameter includes a first parameter for storing a name of a target slave node, a second parameter for storing a name of a target LIN message, a third parameter for indicating a communication state of the target LIN message on a LIN bus, and a fourth parameter for indicating whether a fault query of the target slave node is successful;

[0036] A LIN message detection module, configured to obtain the target LIN message issued by the target slave node according to the first parameter and the second parameter, and set the third parameter to a normal communication state;

[0037] A slave node disabling module, used for disabling the target slave node, obtaining a target LIN error message issued by the target slave node according to the first parameter and the second parameter, and setting the third parameter to a communication interruption state;

[0038] A fault query judgment module, used for obtaining a fault interface variable of the target slave node, judging whether the fault query of the target slave node is successful according to the fault interface variable, and updating the state of the fourth parameter;

[0039] A fault test report generating module is used to generate a fault test report according to the state change of the structure parameters.

[0040] On the other hand, an embodiment of the present invention provides an electronic device, comprising a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory, wherein the program, when executed by the processor, realizes the LIN slave node fault testing method as described above.

[0041] On the other hand, an embodiment of the present invention further provides a storage medium, which is a computer-readable storage medium used for computer-readable storage, and the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the LIN slave node fault testing method as described above.

[0042] On the other hand, an embodiment of the present invention further provides a vehicle, the vehicle comprising the LIN slave node fault testing system or electronic device as described above.

[0043] The advantages and beneficial effects of the present invention will be partly given in the following description, partly become apparent from the following description, or be understood through the practice of the present invention:

[0044] The embodiment of the present invention determines the structure parameters, the structure parameters include a first parameter for storing the name of the target slave node, a second parameter for storing the name of the target LIN message, a third parameter for indicating the communication state of the target LIN message on the LIN bus, and a fourth parameter for indicating whether the fault query of the target slave node is successful, the target LIN message issued by the target slave node is obtained according to the first parameter and the second parameter, and the third parameter is set to the normal communication state, the target slave node is disabled, the target LIN error message issued by the target slave node is obtained according to the first parameter and the second parameter, and the third parameter is set to the communication interruption state, the fault interface variable of the target slave node is obtained, and the fault query of the target slave node is judged according to the fault interface variable. Whether it is successful, and the state of the fourth parameter is updated, and a fault test report is generated according to the state change of the structure parameters. The embodiment of the present invention can realize the detection of the target LIN message issued by the target slave node, the detection of the target LIN error message after disabling the target slave node, and the detection of the fault interface variable of the target slave node by configuring the structure parameters, without manual intervention in the test process, and the fault test of different slave node dimensions and different LIN message dimensions can be realized by modifying the structure parameters, thereby improving the efficiency and accuracy of the LIN slave node fault test. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solution in the embodiments of the present invention, the following introduction is made to the drawings required for use in the embodiments of the present invention. It should be understood that the drawings introduced below are only for the convenience of clearly describing some embodiments of the technical solution of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0046] Figure 1 A step flow chart of a LIN slave node fault testing method provided by an embodiment of the present invention;

[0047] Figure 2 A schematic diagram of a test scenario of a LIN slave node fault test method provided by an embodiment of the present invention;

[0048] Figure 3 A step flow chart of step S102 provided in an embodiment of the present invention;

[0049] Figure 4 A step flow chart of step S103 provided in an embodiment of the present invention;

[0050] Figure 5 A step flow chart of step S104 provided in an embodiment of the present invention;

[0051] Figure 6 A step flow chart of step S105 provided in an embodiment of the present invention;

[0052] Figure 7 A schematic diagram of instructions for a LIN slave node fault testing method provided by an embodiment of the present invention;

[0053] Figure 8 A schematic diagram of the structure of a LIN slave node fault test system provided by an embodiment of the present invention;

[0054] Fig. 9 A schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present invention;

[0055] Fig.10 A schematic diagram of the structure of a storage medium provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0056] Embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limitations on the present application. It should be noted that, although the functional module division is performed in the system schematic diagram and the logical order is shown in the flow chart, in some cases, the steps shown or described may be performed in a different order from the module division in the system schematic diagram or the flow chart. For the step numbers in the following embodiments, they are only set for the convenience of explanation, and the order between the steps is not limited in any way. The execution order of each step in the embodiment can be adaptively adjusted according to the understanding of those skilled in the art.

[0057] In the description of the present invention, the meaning of "a plurality" is two or more. If there is a description of the first or the second, it is only for the purpose of distinguishing the technical features, and it cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features. In addition, unless otherwise defined, all technical and scientific terms used in this document have the same meaning as those commonly understood by technicians in the technical field of this application. The terms used in this document are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.

[0058] The LIN slave node fault test method provided in the embodiment of the present application can be applied to the terminal, can also be applied to the server side, and can also be software running in the terminal or the server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a set-top box, etc.; the server side can be configured as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, and can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the LIN slave node fault test method, etc., but is not limited to the above forms.

[0059] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0060] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with the relevant laws, regulations, and standards of the relevant countries and regions. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.

[0061] The embodiment of the present invention provides a LIN slave node fault test method, which can accurately and efficiently test the electronic control unit on the motor vehicle and the LIN network in which it is located. The present invention aims to verify the impact of the LIN slave node fault on the LIN bus in a simulation environment, and describes in detail a LIN slave node fault test method based on parameter configuration. The tester only needs to modify the parameter configuration of the structure to achieve full automatic execution of fault injection and test, which solves the problem of cumbersome operation of LIN simulation slave node fault test. Compared with the existing methods, it is more specific and more practical, and the feasibility and accuracy of the test method have been verified in actual projects. The embodiment of the present invention greatly reduces the workload of test case writing, has high efficiency, reduced human participation, and high accuracy. The fault injection method based on the data structure realizes the decoupling of the slave node from the actual controller. The same type of test on different controllers can be quickly completed by modifying the configuration parameters, which greatly improves the reusability, strong expansibility, and high degree of automation.

[0062] like Figure 1 FIG. 1 is a flow chart showing a method for testing a LIN slave node failure according to an embodiment of the present invention. Figure 1 The embodiment of the present invention provides a LIN slave node fault testing method, which specifically includes the following steps:

[0063] S101. Determine structure parameters, where the structure parameters include a first parameter for storing the name of a target slave node, a second parameter for storing the name of a target LIN message, a third parameter for indicating the communication status of the target LIN message on a LIN bus, and a fourth parameter for indicating whether a fault query of the target slave node is successful.

[0064] Specifically, in the parameter initialization phase, the i-th structure Slave_test[i] is defined and declared. The structure contains four variables, namely slave_name, which stores the name of the slave node, i.e. the first parameter; msg_name, which stores the name of the LIN message published by the slave node, i.e. the second parameter; msg_flag, which represents the communication status of the message on the LIN bus, i.e. the third parameter; and err_flag, which represents whether the fault query of the slave node is successful or not, i.e. the fourth parameter. The parameters of this structure are user-defined based on the LIN communication database file LDF of this version of the software to be tested.

[0065] like Figure 2 FIG. 1 is a schematic diagram of a test scenario of a LIN slave node fault test method provided by an embodiment of the present invention, referring to FIG. Figure 2 As an optional implementation, the structure parameters are configured through the host module, the host module is connected to the ECU under test through the test module, and the host module and the test module are both connected to the log module.

[0066] Specifically, the implementation of the embodiment of the present invention relies on four main components: a host module, a test module, an ECU to be tested, and a log module, among which:

[0067] The host module is operated and controlled by the tester, and the licensed CANOE software is deployed on it (CANoe is a bus development environment launched by the German company Vetor, the full name is CAN openenvironment, which is mainly used for automotive bus development and design. CANoe is a professional tool for network and ECU development, testing and analysis, supporting the entire system development process from demand analysis to system implementation). It can run test code, realize custom parameter configuration, automatically execute test processes, and display test results, thereby controlling the entire test process.

[0068] The test module consists of two parts: a programmable power supply and a VN device. The programmable power supply provides an input voltage that can be controlled by the program and is connected to the host computer via USB wiring; the VN device provides LIN simulation communication and fault injection implementation functions. In addition to the internal wiring with the programmable power supply, it is also connected to the host computer through the network port to achieve various controls. The VN device is controlled by the interface function linDeactivateResps() of the host computer test code; by controlling the configuration parameters passed in, the VN device disables the corresponding simulation slave node according to the passed parameters to achieve fault injection.

[0069] The ECU to be tested is a controller to be tested that has completed the flashing of the program to be tested and is connected to the test module through a wiring harness to ensure that all LIN communication links are unobstructed.

[0070] The log module is used to store historical data and test reports for each test. It is a subordinate part of the test module and is connected to the host computer via USB wiring.

[0071] After determining the structure parameters, test initialization is required, that is, initialization of the ECU to be tested, including: compiling the test script, running the simulation environment, setting the LOG file storage address, and powering on the controller.

[0072] S102, acquiring a target LIN message issued by a target slave node according to the first parameter and the second parameter, and setting the third parameter to a normal communication state.

[0073] Specifically, before the detection fault injection, the LIN slave node to be tested can publish messages normally on the simulation system.

[0074] like Figure 3 FIG. 1 is a flow chart of step S102 provided in an embodiment of the present invention, referring to FIG. Figure 3As an optional implementation, the target LIN message published by the target slave node is obtained according to the first parameter and the second parameter, and the third parameter is set to a normal communication state, which specifically includes:

[0075] S1021, capturing a first LIN message of the ECU to be tested through a test module, and determining a corresponding first slave node name and a first message name according to the first LIN message;

[0076] S1022, comparing the first slave node name with the first parameter, and comparing the first message name with the second parameter;

[0077] S1023. When the first slave node is consistent with the first parameter, and the first message name is consistent with the second parameter, determine that the corresponding first LIN message is the target LIN message published by the target slave node;

[0078] S1024: Determine whether the target slave node can normally publish the target LIN message, and set the third parameter to a normal communication state.

[0079] Specifically, the message on the LIN line is captured. When the captured LIN message matches Slave_test[i].slave_name and Slave_test[i].msg_name, it is determined that the captured LIN message is the target LIN message, which means that the LIN slave node to be tested can publish messages normally on the simulation system, and Slave_test[i].msg_flag is set to 1, that is, the normal communication state; conversely, if the LIN message matching Slave_test[i].slave_name and Slave_test[i].msg_name cannot be captured, it means that the LIN message under the slave node cannot be sent normally under the simulation environment, and Slave_test[i].msg_flag is set to 0, that is, the communication interruption state.

[0080] S103, disabling the target slave node, obtaining a target LIN error message issued by the target slave node according to the first parameter and the second parameter, and setting the third parameter to a communication interruption state.

[0081] Specifically, after the detection fault injection, the LIN slave node to be tested is disabled, and the LIN message to be checked stops being issued.

[0082] like Figure 4 FIG. 1 is a flow chart of step S103 provided in an embodiment of the present invention, referring to FIG. Figure 4 As an optional implementation, disabling the target slave node, obtaining the target LIN error message issued by the target slave node according to the first parameter and the second parameter, and setting the third parameter to a communication interruption state, specifically includes:

[0083] S1031, injecting faults into the ECU to be tested through the test module, so that the ECU to be tested disables the target slave node;

[0084] S1032, capturing the LIN error message of the ECU to be tested through the test module, and determining the corresponding second slave node name and second message name according to the LIN error message;

[0085] S1033, comparing the second slave node name with the first parameter, and comparing the second message name with the second parameter;

[0086] S1034, when the second slave node is consistent with the first parameter, and the second message name is consistent with the second parameter, determining that the corresponding LIN error message is a target LIN error message issued by the target slave node;

[0087] S1035. Determine that the target slave node has been prohibited from issuing the target LIN message, and set the third parameter to a communication interruption state.

[0088] Specifically, the simulated slave node named Slave_test[i].slave_name is disabled, a slave node fault is injected, and the message on the LIN line is captured. When the captured LIN err message matches Slave_test[i].slave_name and Slave_test[i].msg_name, it indicates that the slave node fault is successfully manufactured, and the next step of fault inspection can be performed, and Slave_test[i].msg_flag is set to 0, that is, the communication interruption state; conversely, if the LIN err message matching Slave_test[i].slave_name and Slave_test[i].msg_name is not captured, it indicates that the slave node fault manufacturing has failed, and Slave_test[i].msg_flag is set to 1, that is, the normal communication state.

[0089] S104: Acquire the fault interface variable of the target slave node, determine whether the fault query of the target slave node is successful according to the fault interface variable, and update the state of the fourth parameter.

[0090] Specifically, it is detected whether the corresponding fault interface variable returns the expected value in the case of fault injection.

[0091] like Figure 5 FIG. 1 is a flow chart of step S104 provided in an embodiment of the present invention, referring to FIG. Figure 5 As an optional implementation, obtaining a fault interface variable of the target slave node, judging whether the fault query of the target slave node is successful according to the fault interface variable, and updating the state of the fourth parameter specifically includes:

[0092] S1041, reading the fault interface variable of the target slave node by using the XCP calibration function through the test module;

[0093] S1042, comparing the fault interface variable with a preset interface variable expected value;

[0094] S1043: When the fault interface variable is consistent with the expected value of the interface variable, it is determined that the fault query of the target slave node is successful, and the fourth parameter is set to a fault query success state.

[0095] Specifically, the XCP calibration function is used to read the corresponding slave node fault interface variable value and compare it with the preset interface variable expected value (such as Slave_test[i].err). If a match occurs, it means that the slave node fault query is successful, and Slave_test[i].err_flag is set to 1, that is, the fault query is successful; if a mismatch occurs, it means that the slave node fault query fails, and Slave_test[i].err_flag is set to 0, that is, the fault query fails.

[0096] S105. Generate a fault test report according to the state change of the structural parameters.

[0097] Specifically, by reading and writing the values ​​of two flags of a group of structures, a fault test of a slave node to which a LIN message belongs is implemented, and the counter realizes the traversal of all slave node messages, thereby finally realizing the fully automated and fully covered operation of the test system. The tester only needs to query the final automatically generated test report to clearly understand the test results. It should be noted that the reason why the test refinement of the embodiment of the present invention is not at the slave node level but at the message level is to ensure that it can detect that "all LIN messages issued by a slave node will stop after disabling it", so the message level check is necessary.

[0098] like Figure 6 FIG. 1 is a flow chart of step S105 provided in an embodiment of the present invention, referring to FIG. Figure 6 As an optional implementation, a fault test report is generated according to the state change of the structure parameters, which specifically includes:

[0099] S1051. Determine the name of the target slave node according to the first parameter, and determine the name of the target LIN message according to the second parameter;

[0100] S1052: if the third parameter is set from the normal communication state to the communication interruption state, and the fourth parameter is set to the fault query success state, it is determined that the fault test result of the target slave node is a test pass;

[0101] S1053. Generate a fault test report according to the name of the target slave node, the name of the target LIN message, and the fault test result.

[0102] Specifically, Figure 7 The instruction diagram of the LIN slave node fault test method provided by the embodiment of the present invention is shown. It can be seen that if the slave node satisfies that the LIN message under the slave node can be sent normally before being disabled (i.e., normal communication state), the LIN message under the node stops sending after being disabled (i.e., communication interruption state), and the fault query is determined to be successful based on the fault interface variable, then it can be determined that the fault test of the slave node has passed; if the LIN message under the slave node cannot be sent normally before the slave node is disabled (i.e., communication interruption state), or the LIN message under the node can still be sent after the slave node is disabled (i.e., normal communication state), or the fault query fails based on the fault interface variable, then it can be determined that the fault test of the slave node has not passed. When a slave node completes the test, i is set to i+1, and the structural parameters of the next slave node are obtained for testing, until all n slave nodes to be tested have completed the test, and the fault test report can be output.

[0103] The method steps of the embodiment of the present invention are described above. It can be understood that the embodiment of the present invention can realize the detection of the target LIN message published by the target slave node, the detection of the target LIN error message after disabling the target slave node, and the detection of the fault interface variable of the target slave node by configuring the structure parameters, without manual intervention in the test process, and the fault test of different slave node dimensions and different LIN message dimensions can be realized by modifying the structure parameters, thereby improving the efficiency and accuracy of the LIN slave node fault test.

[0104] like Figure 8 FIG. 1 is a schematic diagram showing a structure of a LIN slave node fault test system provided by an embodiment of the present invention, referring to FIG. Figure 8 The embodiment of the present invention provides a LIN slave node fault testing system, comprising:

[0105] A parameter determination module, used to determine structure parameters, the structure parameters including a first parameter storing the name of the target slave node, a second parameter storing the name of the target LIN message, a third parameter indicating the communication state of the target LIN message on the LIN bus, and a fourth parameter indicating whether the fault query of the target slave node is successful;

[0106] A LIN message detection module, used for acquiring a target LIN message issued by a target slave node according to a first parameter and a second parameter, and setting a third parameter to a normal communication state;

[0107] A slave node disabling module, used for disabling a target slave node, obtaining a target LIN error message issued by the target slave node according to a first parameter and a second parameter, and setting a third parameter to a communication interruption state;

[0108] A fault query judgment module is used to obtain a fault interface variable of a target slave node, judge whether the fault query of the target slave node is successful according to the fault interface variable, and update the state of a fourth parameter;

[0109] The fault test report generation module is used to generate a fault test report according to the state changes of the structure parameters.

[0110] The contents of the above method embodiments are all applicable to the present system embodiments. The functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0111] The embodiment of the present invention also provides an electronic device, the electronic device comprising: a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory, and the program is executed by the processor to realize the above-mentioned LIN slave node fault test method. The electronic device can be any intelligent terminal including a tablet computer, a vehicle-mounted computer, etc.

[0112] like Fig. 9 FIG. 1 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention, referring to FIG. Fig. 9 , an embodiment of the present invention provides an electronic device, including:

[0113] The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present invention;

[0114] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 calls and executes the LIN slave node fault test method of the embodiment of the present invention;

[0115] Input / output interface 903, used to implement information input and output;

[0116] Communication interface 904, used to realize communication interaction between the device and other devices, which can be realized by wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);

[0117] A bus 905 that transmits information between various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);

[0118] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .

[0119] like Fig.10 FIG. 1 is a schematic diagram of a storage medium according to an embodiment of the present invention. Fig.10 The embodiment of the present invention further provides a storage medium, which is a computer-readable storage medium used for computer-readable storage. The storage medium stores one or more programs 1001, and the one or more programs 1001 can be executed by one or more processors to implement the above-mentioned LIN slave node fault test method.

[0120] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0121] An embodiment of the present invention further provides a vehicle, which includes the above-mentioned LIN slave node fault test system or an electric drive assembly of an electronic device.

[0122] Specifically, the vehicle may be a private car, such as a sedan, SUV, MPV or pickup truck. The vehicle may also be an operating vehicle, such as a van, bus, small truck or large trailer. The vehicle may be a gasoline vehicle or a new energy vehicle. When the vehicle is a new energy vehicle, it may be a hybrid vehicle or a pure electric vehicle.

[0123] The embodiment of the present invention further provides a computer program product or a computer program, wherein the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes Figure 1 The method shown.

[0124] In some selectable embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the above-mentioned boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided by way of example, for the purpose of providing a more comprehensive understanding of technology. The disclosed method is not limited to the operation and logic flow presented herein. Selectable embodiments are expected, wherein the order of various operations is changed and the sub-operation of a part for which is described as a larger operation is performed independently.

[0125] In addition, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise specified to the contrary, one or more of the above-mentioned functions and / or features can be integrated into a single physical device and / or software module, or one or more functions and / or features can be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present invention. More specifically, in view of the properties, functions and internal relationships of the various functional modules in the device disclosed herein, the actual implementation of the module will be understood within the conventional skills of the engineer. Therefore, those skilled in the art can implement the present invention set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.

[0126] If the above functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the above methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0127] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.

[0128] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and editable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the above-mentioned program is printed, since the above-mentioned program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or processing in other suitable ways as necessary, and then stored in a computer memory.

[0129] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0130] In the above description of this specification, the description with reference to the terms "one embodiment / example", "another embodiment / example" or "certain embodiments / examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0131] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.

[0132] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the above embodiments. Those skilled in the art may make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.

Claims

1. A LIN slave node fault testing method, characterized in that: The following steps are involved: Determine a structure parameter, the structure parameter including a first parameter storing a name of a target slave node, a second parameter storing a name of a target LIN message, a third parameter indicating a communication state of the target LIN message on a LIN bus, and a fourth parameter indicating whether a fault query of the target slave node is successful; Acquire the target LIN message published by the target slave node according to the first parameter and the second parameter, and set the third parameter to a normal communication state; disabling the target slave node, acquiring a target LIN error message issued by the target slave node according to the first parameter and the second parameter, and setting the third parameter to a communication interruption state; Acquire the fault interface variable of the target slave node, determine whether the fault query of the target slave node is successful according to the fault interface variable, and update the state of the fourth parameter; A fault test report is generated according to the state change of the structural parameters.

2. A LIN slave node fault testing method according to claim 1, characterized in that: The structural parameters are configured through a host module, the host module is communicatively connected with the ECU to be tested through a test module, and both the host module and the test module are connected with a log module.

3. A LIN slave node fault testing method according to claim 2, characterized in that: The step of acquiring the target LIN message published by the target slave node according to the first parameter and the second parameter, and setting the third parameter to a normal communication state specifically includes: Capturing a first LIN message of the ECU to be tested by the test module, and determining a corresponding first slave node name and a first message name according to the first LIN message; Comparing the first slave node name with the first parameter, and comparing the first message name with the second parameter; When the first slave node is consistent with the first parameter, and the first message name is consistent with the second parameter, determining that the corresponding first LIN message is the target LIN message published by the target slave node; It is determined that the target slave node can normally publish the target LIN message, and the third parameter is set to a normal communication state.

4. A LIN slave node fault testing method according to claim 2, characterized in that: The disabling of the target slave node, acquiring the target LIN error message issued by the target slave node according to the first parameter and the second parameter, and setting the third parameter to a communication interruption state specifically includes: Performing fault injection on the ECU under test by means of the test module, so that the ECU under test disables the target slave node; Capturing the LIN error message of the ECU to be tested by the test module, and determining the corresponding second slave node name and second message name according to the LIN error message; Comparing the second slave node name with the first parameter, and comparing the second message name with the second parameter; When the second slave node is consistent with the first parameter, and the second message name is consistent with the second parameter, determining that the corresponding LIN error message is the target LIN error message issued by the target slave node; It is determined that the target slave node has been prohibited from issuing the target LIN message, and the third parameter is set to a communication interruption state.

5. A LIN slave node fault testing method according to claim 2, characterized in that: The acquiring of the fault interface variable of the target slave node, judging whether the fault query of the target slave node is successful according to the fault interface variable, and updating the state of the fourth parameter specifically includes: Read the fault interface variable of the target slave node by using the XCP calibration function through the test module; Comparing the fault interface variable with a preset interface variable expected value; When the fault interface variable is consistent with the expected value of the interface variable, it is determined that the fault query of the target slave node is successful, and the fourth parameter is set to a fault query success state.

6. A LIN slave node fault testing method according to any one of claims 1 to 5, characterized in that: The generating of the fault test report according to the state change of the structural parameters specifically includes: Determine the name of the target slave node according to the first parameter, and determine the name of the target LIN message according to the second parameter; If the third parameter is set from the normal communication state to the communication interruption state, and the fourth parameter is set to the fault query success state, it is determined that the fault test result of the target slave node is a test pass; The fault test report is generated according to the name of the target slave node, the name of the target LIN message and the fault test result.

7. A LIN slave node fault test system, characterized in that: include: A parameter determination module, used to determine a structure parameter, wherein the structure parameter includes a first parameter for storing a name of a target slave node, a second parameter for storing a name of a target LIN message, a third parameter for indicating a communication state of the target LIN message on a LIN bus, and a fourth parameter for indicating whether a fault query of the target slave node is successful; A LIN message detection module, configured to obtain the target LIN message issued by the target slave node according to the first parameter and the second parameter, and set the third parameter to a normal communication state; A slave node disabling module, used for disabling the target slave node, obtaining a target LIN error message issued by the target slave node according to the first parameter and the second parameter, and setting the third parameter to a communication interruption state; A fault query judgment module, used for obtaining a fault interface variable of the target slave node, judging whether the fault query of the target slave node is successful according to the fault interface variable, and updating the state of the fourth parameter; A fault test report generating module is used to generate a fault test report according to the state change of the structure parameters.

8. An electronic device, characterized in that: The electronic device includes a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory. When the program is executed by the processor, the steps of the LIN slave node fault testing method as described in any one of claims 1 to 6 are realized.

9. A storage medium, the storage medium being a computer-readable storage medium, used for computer-readable storage, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the LIN slave node fault testing method according to any one of claims 1 to 6.

10. A vehicle, characterized in that: The vehicle includes the LIN slave node fault test system according to claim 7 or the electronic device according to claim 8.