Vehicle communication test method, vehicle and storage medium
By simulating and automating the test script execution of the vehicle's controller local area network, the problem of inefficient loss detection of CAN communication nodes in the prior art is solved, and efficient and accurate node loss testing is achieved to adapt to the needs of complex networks.
Patent Information
- Application Number
- CN202411198840.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2024-12-10
AI Technical Summary
The existing technology lacks automation support when detecting the loss of CAN communication nodes, resulting in inefficient testing and susceptible to human factors. Especially in complex automotive vehicles, fault location is difficult, and the topology structure is complex as the hardware system increases. Increased flexibility, and node loss testing is more difficult.
By simulating the controller LAN network of the target vehicle, creating a vehicle simulation communication network, determining the target test node, executing pre-established test scripts for loss simulation operations, the simulation node is in a lost state, performing simulation communication tests, obtaining and parsing communications Test data to realize automated node loss testing.
It improves the efficiency of vehicle communication node loss testing, reduces human errors, can efficiently identify and solve potential communication problems in complex networks, and improves the accuracy and reliability of the testing.
Smart Images

Figure CN119109827A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle communication technology, and in particular to a vehicle communication testing method, a vehicle, and a storage medium. Background Art
[0002] CAN communication, namely Controller Area Network (CAN) communication, is a high-performance local area network technology, mainly used for communication between electronic control units (ECUs) in automotive and industrial environments.
[0003] CAN communication node loss means that some nodes in the CAN bus network cannot communicate normally, which may cause interruption or delay of information transmission, thus seriously affecting the operation of the vehicle. This communication interruption may cause a series of problems, such as the inability to send or receive key data, which makes the vehicle unable to work normally and reduces the overall performance of the vehicle.
[0004] In order to deal with these problems, it is particularly important to test the loss of CAN communication nodes. At present, with the increasing complexity of automobiles and other hardware systems, the topology of the CAN bus has also become more complex, which increases the difficulty of node loss testing. Most testing technologies still rely on manual operation and analysis and lack automated support, which may not only lead to low test efficiency, but also be easily affected by human factors. Therefore, how to implement vehicle communication node loss testing in a more efficient way has become an urgent problem to be solved in the industry. Summary of the invention
[0005] The present application aims to solve at least one of the technical problems existing in the prior art. To this end, the present application proposes a vehicle communication test method, a vehicle, and a storage medium, which can implement a loss test of a vehicle communication node in a more efficient manner.
[0006] According to the first aspect of the present application, a vehicle communication test method includes:
[0007] Simulating the controller area network of the target vehicle to obtain a vehicle simulation communication network; wherein the vehicle simulation communication network includes a plurality of simulation communication nodes;
[0008] determining a target test node from a plurality of said simulated communication nodes of said vehicle simulated communication network;
[0009] Determining, through a pre-established test script, a loss simulation operation matching the target test node;
[0010] Executing the loss simulation operation to simulate that the target test node is in a lost state;
[0011] In the process of simulating that the target test node is in a lost state, performing a simulated communication test on the vehicle simulation communication network to obtain communication test data;
[0012] The communication test data is parsed to obtain test parsed data.
[0013] According to some embodiments of the present application, before determining the loss simulation operation matching the target test node through the pre-established test script, the method further includes:
[0014] Obtain test requirement data;
[0015] Based on the test requirement data, determining the communication test message, message sending cycle and message loss threshold corresponding to each of the simulated communication nodes in the vehicle simulation communication network;
[0016] Based on the communication test message corresponding to each of the simulated communication nodes, generating a message definition function matching each of the simulated communication nodes;
[0017] Based on the message sending period corresponding to each of the simulated communication nodes, generating a message period function matching each of the simulated communication nodes;
[0018] Based on the message loss threshold corresponding to each of the simulated communication nodes, generating a standard node loss function matching each of the simulated communication nodes;
[0019] A test script is constructed according to the message definition function, the message period function and the standard node loss function that match each of the simulated communication nodes to obtain the pre-established test script.
[0020] According to some embodiments of the present application, the message loss threshold includes an update period threshold, and the generating of a standard node loss function matching each of the simulated communication nodes based on the message loss threshold corresponding to each of the simulated communication nodes includes:
[0021] Based on the communication test message corresponding to each of the simulated communication nodes, determining a periodic communication node containing a survival count bit in the communication test message;
[0022] Based on the update period threshold corresponding to each of the periodic communication nodes, a standard node loss function matching each of the simulated communication nodes is generated.
[0023] According to some embodiments of the present application, before constructing a test script according to the message definition function, the message period function and the standard node loss function matched to each of the simulated communication nodes to obtain the pre-established test script, it also includes:
[0024] Based on the communication test message corresponding to each of the simulated communication nodes, determining a verification communication node containing a transmission check bit in the communication test message;
[0025] Based on the transmission check bit corresponding to each of the check communication nodes, generating a message check function matching each of the simulated communication nodes;
[0026] The step of constructing a test script according to the message definition function, the message period function and the standard node loss function matched to each of the simulated communication nodes to obtain the pre-established test script includes:
[0027] A test script is constructed according to the message definition function, the message period function, the standard node loss function and the message verification function that match each of the simulated communication nodes to obtain the pre-established test script.
[0028] According to some embodiments of the present application, simulating the controller area network of the target vehicle to obtain a vehicle simulation communication network includes:
[0029] Obtain controller local network simulation program, simulation constraint information and test case data;
[0030] The simulation constraint information and the test case data are input into the controller local area network simulation program so that the controller local area network simulation program simulates the controller local area network of the target vehicle to obtain the vehicle simulation communication network simulated by the controller local area network simulation program.
[0031] According to some embodiments of the present application, determining the loss simulation operation matching the target test node through a pre-established test script includes:
[0032] In the controller local area network simulation program, the loss simulation operation is set according to the simulation constraint information and the test case data.
[0033] According to some embodiments of the present application, performing the loss simulation operation to simulate that the target test node is in a lost state includes:
[0034] Importing the test script into the controller local network simulation program;
[0035] The test script is run in the controller local area network simulation program to perform the loss simulation operation to simulate that the target test node in the vehicle simulation communication network is in a lost state.
[0036] According to some embodiments of the present application, after parsing the communication test data to obtain the test parsing data, the method further includes:
[0037] In response to the test parsing data not satisfying a preset communication test condition, updating the vehicle simulation communication network, and returning to determine the target test node from the multiple simulation communication nodes of the updated vehicle simulation communication network;
[0038] In response to the test analysis data satisfying the communication test condition, the controller area network of the target vehicle is optimized based on the vehicle simulation communication network corresponding to the test analysis data.
[0039] A vehicle according to a second aspect of the present application includes:
[0040] The vehicle stores a program, and the program is executed to implement the vehicle communication testing method as described in any one of the embodiments of the first aspect of the present application.
[0041] A computer-readable storage medium according to an embodiment of the third aspect of the present application includes:
[0042] The computer-readable storage medium stores a program, and the program is executed to implement the vehicle communication test method as described in any one of the embodiments of the first aspect of the present application.
[0043] According to the vehicle communication test method, vehicle, and storage medium of the embodiment of the present application, at least the following are provided:
[0044] Beneficial effects:
[0045] According to the vehicle communication test method of the embodiment of the present application, it is necessary to simulate the controller area network of the target vehicle to obtain a vehicle simulation communication network; wherein the vehicle simulation communication network includes multiple simulation communication nodes; determine the target test node from the multiple simulation communication nodes of the vehicle simulation communication network; determine the loss simulation operation matching the target test node through a pre-established test script; execute the loss simulation operation to simulate the target test node in a lost state; in the process of simulating the target test node in a lost state, perform a simulated communication test on the vehicle simulation communication network to obtain communication test data; parse the communication test data to obtain test parsing data. In this way, the loss test of the vehicle communication node can be implemented in a more efficient way.
[0046] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0048] Figure 1 A flow chart of a vehicle communication test method provided in an embodiment of the present application;
[0049] Figure 2 Another schematic diagram of a vehicle communication test method provided in an embodiment of the present application;
[0050] Figure 3 Another schematic diagram of a vehicle communication test method provided in an embodiment of the present application;
[0051] Figure 4 Another schematic diagram of a vehicle communication test method provided in an embodiment of the present application;
[0052] Figure 5 Another schematic diagram of a vehicle communication test method provided in an embodiment of the present application;
[0053] Figure 6 Another schematic diagram of a vehicle communication test method provided in an embodiment of the present application;
[0054] Figure 7 Another schematic diagram of a vehicle communication test method provided in an embodiment of the present application;
[0055] Figure 8 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0056] The present application is further described in detail. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are only examples of devices / equipment and methods consistent with some aspects of the embodiments of the present application as detailed in the attached claims.
[0057] It is understood that the terms "first", "second", etc. used in this application can be used to describe various concepts in this article, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. For example, without departing from the scope of the embodiment of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determination".
[0058] The terms "at least one", "multiple", "each", "any", etc. used in this application, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.
[0059] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0060] CAN communication, or Controller Area Network communication, is a high-performance local area network technology that is mainly used for communication between electronic control units (ECUs) in automotive and industrial environments. CAN communication needs to meet the needs of the automotive industry for real-time, reliable and flexible communication networks. CAN communication uses a message-based protocol that allows multiple devices to share the same communication media, such as twisted pair or optical fiber, for data exchange.
[0061] A CAN communication node is any device or electronic control unit (ECU) connected to the CAN bus. They can be sensors, actuators, or other types of control units. Each communication node has a unique identifier that is used to send and receive messages on the CAN bus. Communication between nodes is carried out in a broadcast manner, that is, a message sent by a node can be received by all other nodes, but only those nodes that match the message identifier will process the message.
[0062] The CAN bus network is a network structure composed of multiple CAN communication nodes, which are connected together through physical lines to form a network. The CAN bus network can be single-line or multi-line, and supports a variety of topologies, such as linear, star or ring. The CAN bus network is highly flexible and scalable, and can adapt to application requirements of different scales and complexities. In the CAN bus network, data transmission is controlled by the CAN protocol, ensuring the real-time and reliability of communication. In addition, the CAN bus network also has an error detection and handling mechanism that can detect and correct errors during data transmission, thereby ensuring the stability of communication.
[0063] It should be noted that CAN communication node loss means that some nodes in the CAN bus network cannot communicate normally, which may cause interruption or delay of information transmission, and thus have a serious impact on the operation of the vehicle. This communication interruption may cause a series of problems, such as the inability to send or receive key data, which makes the vehicle unable to work normally and the overall performance of the vehicle decline, which may affect the safety, comfort and economy of the vehicle; as well as the difficulty of fault diagnosis, because the interruption of communication makes it more complicated to diagnose and solve vehicle faults.
[0064] In order to deal with these problems, it is particularly important to test the loss of CAN communication nodes. At present, the testing technology mainly includes using fault code scanners to quickly and accurately locate the faulty node and determine the cause of the fault, using oscilloscopes to observe the waveform signals on the CAN bus, detecting signal loss, interference or damage, and using electrical measuring instruments to assist in finding the faulty node. Although these methods are helpful in diagnosing problems to a certain extent, their shortcomings cannot be ignored.
[0065] The shortcomings of current testing technology are mainly reflected in several aspects: first, the degree of intelligence is not high, and most testing technologies still rely on manual operation and analysis, lacking automated support, which may not only lead to low test efficiency, but also be easily affected by human factors; second, the accuracy and speed of diagnosis are limited, especially in complex automotive vehicles, where multiple nodes and a large amount of communication data make fault location difficult; finally, with the increasing complexity of automobiles and other hardware systems, the topology of the CAN bus has also become more complex, which increases the difficulty of node loss testing because more factors and potential interference sources need to be considered. Therefore, it is urgent to develop testing technologies with higher intelligence, higher accuracy and speed, as well as testing methods that adapt to the complexity of vehicles.
[0066] The present application aims to solve at least one of the technical problems existing in the prior art. To this end, the present application proposes a vehicle communication test method, a vehicle, and a storage medium, which can implement a loss test of a vehicle communication node in a more efficient manner.
[0067] Further explanation is given below based on the accompanying drawings.
[0068] Reference Figure 1 , the embodiment of the present application provides a vehicle communication test method, which may include:
[0069] Step S101, simulating the controller area network of the target vehicle to obtain a vehicle simulation communication network; wherein the vehicle simulation communication network includes a plurality of simulation communication nodes;
[0070] Step S102, determining a target test node from a plurality of simulated communication nodes of a vehicle simulated communication network;
[0071] Step S103, determining the loss simulation operation matching the target test node through the pre-established test script;
[0072] Step S104, performing a loss simulation operation to simulate that the target test node is in a lost state;
[0073] Step S105, in the process of simulating the target test node being in a lost state, performing a simulated communication test on the vehicle simulation communication network to obtain communication test data;
[0074] Step S106, parsing the communication test data to obtain test parsing data.
[0075] In the embodiment of the present application shown by steps S101 to S106, the vehicle communication test method needs to simulate the controller local area network of the target vehicle to obtain a vehicle simulation communication network; wherein the vehicle simulation communication network includes multiple simulation communication nodes; determine the target test node from the multiple simulation communication nodes of the vehicle simulation communication network; determine the loss simulation operation matching the target test node through a pre-established test script; perform the loss simulation operation to simulate the target test node in a lost state; in the process of simulating the target test node in a lost state, perform a simulated communication test on the vehicle simulation communication network to obtain communication test data; parse the communication test data to obtain test parsing data. In this way, the loss test of the vehicle communication node can be implemented in a more efficient way.
[0076] In some embodiments, step S101 simulates the controller area network of the target vehicle to obtain a vehicle simulation communication network; wherein the vehicle simulation communication network includes multiple simulated communication nodes. It should be noted that step S101 starts with simulating the CAN of the target vehicle to create a vehicle simulation communication network. This vehicle simulation communication network consists of multiple simulated communication nodes, each node representing an electronic control unit (ECU) in the vehicle. These nodes can simulate the communication behavior in the actual vehicle network, including the sending and receiving of data.
[0077] Specifically, the starting point of the vehicle communication test method of the embodiment of the present application is to simulate the controller area network (CAN) of the target vehicle. The purpose of this process is to create a virtual test environment, i.e., a vehicle simulation communication network, which can reproduce the communication characteristics and behaviors of the CAN network in the actual vehicle. This network is composed of multiple simulated communication nodes, and each node plays the role of an electronic control unit (ECU) in the simulation. These simulated communication nodes are designed to achieve functions similar to those of the actual ECU. They can run independently and simulate the communication protocol and data exchange process of the real ECU. In the simulation, each node can send and receive data, just like in a real vehicle network. This means that information can be exchanged between nodes to simulate the communication mode of the vehicle in normal operation or a specific test scenario.
[0078] In some more specific embodiments, the controller area network of the target vehicle is simulated and simulated, and professional simulation software and hardware tools can be used. The simulation software is responsible for defining the network topology, node behavior and communication protocol, while the hardware tool provides an interface for interacting with the simulation software to simulate the physical communication medium. Through these tools, the embodiments of the present application can build a highly realistic vehicle simulation communication network, laying the foundation for subsequent test steps.
[0079] It should be understood that the simulation in step S101 not only provides a controllable and configurable virtual environment for testing, but also provides an effective means for evaluating and optimizing the communication performance of the vehicle CAN network. In this way, the stability and reliability of the vehicle communication system can be ensured when facing various challenges.
[0080] Reference Figure 2 According to some embodiments provided by the present application, step S101 simulates the controller area network of the target vehicle to obtain a vehicle simulation communication network, which may include:
[0081] Step S201, obtaining a controller local network simulation program, simulation constraint information and test case data;
[0082] Step S202, inputting the simulation constraint information and the test case data into the CAN simulation program, so that the CAN simulation program simulates the CAN of the target vehicle to obtain a vehicle simulation communication network simulated by the CAN simulation program.
[0083] In step S201 of some embodiments, the controller area network simulator is a core software tool for performing simulation, which can simulate CAN protocol and network communication. The simulation constraint information defines the rules and restrictions that must be followed during the simulation process, such as network topology, communication parameters or time constraints. The test case data contains specific scenarios and conditions for simulation, which guide the simulator how to simulate specific communication behaviors and events.
[0084] In step S202 of some embodiments, the simulation constraint information and the test case data are input into the controller area network simulation program. This step is the key to start the simulation process, and the simulation program simulates the CAN network of the target vehicle according to the input constraints and test cases. In this way, the simulation program can generate a virtual vehicle simulation communication network, which can reflect the behavior of the actual CAN network in various test scenarios.
[0085] It should be clear that the generated vehicle simulation communication network can include multiple simulated electronic control units (i.e. simulated communication nodes), which are connected and exchange data through a simulated CAN bus (i.e. vehicle simulation communication network). This vehicle simulation communication network can simulate the communication between ECUs, including the sending and receiving of messages, the response time of the network, and the network behavior under specific conditions.
[0086] In addition, the embodiment shown in step S201 to step S202 also allows the CAN network to be tested and analyzed through the simulated vehicle simulation communication network without actual hardware, which not only reduces the test cost, but also improves the flexibility and safety of the test.
[0087] In step S102 of some embodiments, a target test node is determined from a plurality of simulated communication nodes of a vehicle simulation communication network. It should be noted that step S102 needs to determine the target test node from the above-mentioned vehicle simulation communication network. These target test nodes are simulated ECUs that will be subjected to simulation communication tests. It should be noted that the embodiments of the present application can determine the target test nodes based on the importance of each simulated communication node in the vehicle simulation communication network or problems found in previous tests.
[0088] Specifically, in step S102, specific simulated communication nodes are selected from the vehicle simulated communication network as target test nodes, and these target test nodes will become the objects of the simulation communication test. The target test nodes are essentially simulated electronic control units (ECUs) in the vehicle simulated communication network, which are selected for further testing and analysis.
[0089] In some more specific embodiments, the process of selecting the target test node may comprehensively consider multiple factors:
[0090] First, the embodiment of the present application can select the target test node based on the ECU simulated by each simulated communication node by determining the importance of each ECU in the controller area network of the target vehicle. The importance of the ECU can be evaluated based on the function of the ECU, its role in the controller area network of the target vehicle, or its impact on the operation of the target vehicle. For example, an ECU that controls a safety-critical system, such as a braking system or a power management system, can be preferentially selected as a target test node.
[0091] Secondly, problems found in previous tests may also affect the selection of target test nodes. If some ECUs have been identified to have communication problems or performance bottlenecks in early testing or monitoring, the simulated communication nodes corresponding to these ECUs can be selected as target test nodes to further diagnose and solve these problems.
[0092] In addition, the test strategy and objectives will also affect the selection of target test nodes. For example, if the purpose of the test is to evaluate the network's ability to respond to node failures, the embodiment of the present application can select those simulated communication nodes that have the greatest impact on the stability and security of the vehicle simulation communication network as target test nodes for testing.
[0093] It should be understood that in step S102, the embodiment of the present application can carefully select the nodes to be tested for simulated communication based on the importance of the simulated communication nodes to the ECU, the results of previous tests, and the test objectives. This selection process is crucial to ensure the effectiveness and pertinence of the test.
[0094] In step S103 of some embodiments, a loss simulation operation matching the target test node is determined through a pre-established test script. It should be noted that step S103 determines the loss simulation operation matching the target test node through a pre-established test script. A test script is a set of instructions that define a test process and operations, which includes specific simulation operations for the target test node, such as simulating the loss of a node.
[0095] Specifically, in step S103, the loss simulation operation matching the target test node is determined through the pre-established test script. This step is the basis for realizing automated testing and ensuring test consistency.
[0096] It should be emphasized that the test script is a set of detailed instructions that define the test process, operations, and expected test behaviors. These test scripts are usually developed and verified before the test begins to ensure that they can accurately simulate the required test scenarios. In step S103, the test script contains specific simulation operations for the target test node, which are specially designed to simulate the situation of node loss.
[0097] In some more specific embodiments, the node loss simulation operation may include simulating disconnection of the ECU from the CAN bus, simulating communication failure of the ECU, or simulating stopping the function of the ECU to send and receive messages. The purpose of these operations is to simulate communication interruption or node failure that may occur in the actual target vehicle, so as to simulate the response capability of the controller area network of the target vehicle to these abnormal situations.
[0098] There are several key advantages of using pre-established test scripts in the embodiments of the present application:
[0099] First, the test script allows the embodiments of the present application to maintain consistency and repeatability in different test runs because the test script defines precise test steps and conditions. Second, the test script can automate the test process, reduce human errors, and improve test efficiency. In addition, the test script can be modified and expanded as needed to adapt to new test requirements or update test scenarios.
[0100] In step S103, the embodiment of the present application can first ensure that the test script matches the characteristics and behaviors of the target test node. This means that the simulation operation in the test script should be able to truly reflect the impact of the ECU corresponding to the target test node on the controller area network of the target vehicle when it is lost. The embodiment of the present application can also customize or adjust the test script according to the configuration of the vehicle simulation communication network and the function of the target test node.
[0101] It should be understood that the test script in step S103 is a key tool for achieving accurate and efficient simulation testing. By using these test scripts, the embodiment of the present application can systematically evaluate the communication behavior of the target test node in the case of node loss, as well as the stability and reliability of the entire vehicle simulation communication network. This method helps to identify and solve potential communication problems in advance.
[0102] Reference Figure 3 According to some embodiments provided by the present application, before determining the loss simulation operation matching the target test node through the pre-established test script in step S103, the following may also be included:
[0103] Step S301, obtaining test requirement data;
[0104] Step S302, based on the test requirement data, determining the communication test message, message sending cycle and message loss threshold corresponding to each simulated communication node in the vehicle simulation communication network;
[0105] Step S303, based on the communication test message corresponding to each simulated communication node, generating a message definition function matching each simulated communication node;
[0106] Step S304, based on the message sending period corresponding to each simulated communication node, generating a message period function matching each simulated communication node;
[0107] Step S305, generating a standard node loss function matching each simulated communication node based on the message loss threshold corresponding to each simulated communication node;
[0108] Step S306, constructing a test script according to the message definition function, message cycle function and standard node loss function matching each simulated communication node to obtain a pre-established test script.
[0109] In step S301 of some embodiments, test requirement data is obtained. It should be clear that test requirement data is the basis of test planning and design, including test objectives, expected results, constraints of the test environment, and any specific test standards or protocols. Test requirement data provides a clear direction and basis for subsequent steps.
[0110] In step S302 of some embodiments, based on the test requirement data, it is necessary to determine the communication test message, message sending cycle and message loss threshold corresponding to each simulated communication node in the vehicle simulation communication network. This step ensures that the communication behavior and test conditions of each simulated node are clearly defined, providing specific parameters for subsequent script generation.
[0111] In step S303 of some embodiments, based on the communication test message corresponding to each simulated communication node, a message definition function matching each simulated communication node is generated. The message definition function is a component in the test script, which specifies the structure, content and format of the message sent by each node.
[0112] In step S304 of some embodiments, a message period function matching each simulated communication node is further generated based on the message sending period corresponding to each simulated communication node. The message period function defines the time interval for message sending, ensuring that the communication activities in the simulation can be carried out according to the predetermined time mode.
[0113] In step S305 of some embodiments, based on the message loss threshold corresponding to each simulated communication node, a standard node loss function matching each simulated communication node is generated. This standard node loss function is the key to evaluating whether a node is lost, and it determines whether a message arrives within the expected time interval based on a preset time threshold.
[0114] Reference Figure 4 According to some embodiments provided by the present application, the message loss threshold includes an update period threshold, and step S305 generates a standard node loss function matching each simulated communication node based on the message loss threshold corresponding to each simulated communication node, which may include:
[0115] Step S401, based on the communication test message corresponding to each simulated communication node, determining the periodic communication node containing the survival count bit in the communication test message;
[0116] Step S402: Based on the update period threshold corresponding to each periodic communication node, a standard node loss function matching each simulated communication node is generated.
[0117] According to some embodiments provided in the present application, the message loss threshold is one of the key parameters for evaluating whether a node is lost, which includes an update cycle threshold.
[0118] In step S401 of some embodiments, it should be noted that the communication test message contains a periodic communication node with a survival count bit. The survival count bit is a special message attribute used to indicate the freshness or activity of the message. In the CAN protocol, the survival count bit decreases with each successful transmission of the message. When the count bit reaches zero, if the message has not been updated, the node may be considered to be in a potential loss state. Determining these periodic communication nodes is a prerequisite for generating a standard node loss function.
[0119] In step S402 of some embodiments, a standard node loss function matching each simulated communication node is generated based on the update cycle threshold corresponding to these periodic communication nodes. The update cycle threshold is a preset time parameter, which defines the maximum number of cycles the system waits before receiving no new message updates. If this maximum number of cycles is exceeded, it means that the corresponding simulated communication node has been lost. The generated standard node loss function will use this update cycle threshold to evaluate the state of the node. If the message of the simulated communication node is not updated within the expected time interval, the standard node loss function will trigger the judgment of the loss of the simulated communication node. It should be clear that the key to this process is to accurately set the update cycle threshold.
[0120] In some embodiments, the update cycle threshold can be set based on the message update frequency of the vehicle simulation communication network during normal operation. The setting of the cycle threshold needs to take into account the real-time requirements of the vehicle simulation communication network and the importance of the simulation communication node, so as to ensure that the loss of the simulation communication node can be detected in time, while avoiding false alarms due to oversensitivity.
[0121] In some embodiments, steps S401 and S402 can generate an accurate standard node loss function for each simulated communication node, and the standard node loss function will play a core role in the simulation test, ensuring that the test script can simulate and evaluate the actual situation of the standard node loss function loss. This method improves the accuracy and reliability of the test and helps to efficiently discover potential communication problems.
[0122] In step S306 of some embodiments, a test script is constructed based on the previously generated message definition function, message cycle function, and standard node loss function. This step integrates all components into a test script to obtain a pre-established test script. This test script is the core of the automated test, and it can guide the simulation software to execute a predetermined test scenario, including the operation of simulating node loss.
[0123] Reference Figure 5 According to some embodiments provided by the present application, before constructing a test script in step S306 according to the message definition function, message period function and standard node loss function matching each simulated communication node and obtaining the pre-established test script, the following may also be included:
[0124] Step S501, based on the communication test message corresponding to each simulated communication node, determining the verification communication node containing the transmission check bit in the communication test message;
[0125] Step S502, generating a message verification function matching each simulated communication node based on the transmission verification bit corresponding to each verification communication node;
[0126] In step S306, a test script is constructed according to the message definition function, the message period function and the standard node loss function matched to each simulated communication node, and the pre-established test script may include:
[0127] Step S503, constructing a test script according to the message definition function, message period function, standard node loss function and message verification function matching each simulated communication node to obtain a pre-established test script.
[0128] In step S501 of some embodiments, based on the communication test message corresponding to each simulated communication node, a verification communication node containing a transmission check bit in the message is determined. It should be noted that the transmission check bit is a key part of the communication test message for ensuring data integrity and accuracy, and they can be cyclic redundancy check (CRC) bits or other types of check codes. It is important to determine these verification communication nodes because they will require special processing to verify whether errors occur in the communication test message during transmission.
[0129] In step S502 of some embodiments, based on the transmission check bits corresponding to these check communication nodes, a message check function matching each simulated communication node is generated. The message check function is a component in the test script, which is responsible for checking the message to ensure that it has not been damaged or tampered with during transmission. The message check function will be automatically executed during the test process, check each message, and determine whether the message is valid based on the check result.
[0130] In step S503 of some embodiments, the construction of the test script is not only based on the message definition function, the message cycle function and the standard node loss function, but also includes a newly generated message verification function. In this way, the pre-established test script will contain a complete set of functions for simulating and testing the performance of the vehicle simulation communication network in various situations, including node loss and message verification. By integrating the message verification function into the test script, the depth and breadth of the test can be enhanced. It should be emphasized that the test script is able to simulate more complex communication scenarios, including errors that may occur during the transmission of messages, and the system's response and handling capabilities to these errors. This not only improves the coverage of the test, but also helps to ensure the robustness of the vehicle communication network in the face of various abnormal situations.
[0131] It should be understood that steps S501 and S502 add the ability of message verification to the test script, while step S503 integrates this ability into the pre-established test script. In this way, this method ensures that the test script can comprehensively evaluate the performance of the vehicle simulation communication network, including the accuracy of the message, the stability of the simulated communication node, and the overall reliability of the vehicle communication. Through such a test script, potential communication problems can be more effectively identified and resolved, improving the safety and efficiency of the vehicle system.
[0132] Through the embodiment of the present application shown in steps S301 to S306, the test script can accurately simulate the communication behavior and loss of the target test node, providing a powerful tool to evaluate the performance and response of the vehicle simulation communication network when facing node loss. This method not only improves the efficiency and accuracy of the test, but also reduces human errors through automation, ensuring the reliability of the test results.
[0133] According to some embodiments provided by the present application, step S103 determines the loss simulation operation matching the target test node through a pre-established test script, which may include:
[0134] In the controller local network simulation program, the loss simulation operation is configured according to the simulation constraint information and the test case data.
[0135] It should be noted that in step S103, the loss simulation operation matching the target test node is determined by the pre-established test script, which needs to be set in detail in the controller area network simulation program. This process requires the use of simulation constraint information and test case data to specifically configure the loss simulation operation. Specifically:
[0136] First, the simulation constraint information provides the necessary boundary conditions and rules for testing, such as the topology of the vehicle simulation communication network, the communication capabilities of the simulated communication nodes, the message transmission rules, etc. These constraint information ensures that the simulation operation is carried out under predetermined parameters and conditions, thereby simulating the situations that may occur in the real vehicle network.
[0137] Secondly, the test case data provides specific test scenarios and goals, which may include the characteristics of the target test node, the purpose of the test, the behavior expected to be observed, etc. These data help the embodiments of the present application define the specific content of the loss simulation operation, for example, determining which node will be simulated as lost and how this loss will affect other parts of the network.
[0138] In some more specific embodiments, in the controller local network simulation program, according to the simulation constraint information and the test case data, configuring the loss simulation operation may specifically include:
[0139] Configure the communication parameters of the target test node to match the requirements of the test case.
[0140] Set specific conditions to trigger loss simulation, such as message transmission failure, timeout without receiving a message, etc.
[0141] Define the behavior of loss simulation, for example, nodes stop sending messages, the message sending interval is extended, etc.
[0142] The simulation program is configured to monitor the effects of the loss simulation operation and collect corresponding loss simulation response data from the vehicle simulation communication network.
[0143] With these settings, the CAN simulator can simulate the loss of the target test node and observe and record the response of the vehicle simulation communication network. This includes fault detection, error handling, and possible activation of recovery or alternative communication paths for each simulated communication node in the vehicle simulation communication network.
[0144] It should be understood that the configuration loss simulation operation in step S103 is a process that comprehensively considers simulation constraints and test objectives. By configuring the loss simulation operation in the simulation program, it can be ensured that the test script can accurately simulate the node loss situation and evaluate the responsiveness of the vehicle simulation communication network. This method helps to identify and solve potential communication problems in advance, thereby improving the reliability and safety of the vehicle network.
[0145] In step S104 of some embodiments, a loss simulation operation is performed to simulate that the target test node is in a lost state. It should be noted that the loss simulation operation is performed to simulate that the target test node is in a lost state. This may include stopping the communication activities of the node, simulating communication failures or other types of network anomalies to test the network's response and processing capabilities to node loss.
[0146] Specifically, the core goal of step S104 is to simulate the scenario where the target test node is in a lost state through specific operations, so as to evaluate the response and processing capabilities of the vehicle simulation communication network to such abnormal situations.
[0147] In some more specific embodiments, performing the loss simulation operation may include a variety of different technical means. The most intuitive one is to stop the communication activity of the target test node, thereby simulating the disconnection of the ECU in the target vehicle from the CAN bus or shutting down the communication interface of the node. This operation simulates the situation where the node cannot communicate due to hardware failure, connection problem or power failure.
[0148] In some more specific embodiments, in addition to stopping communication activities, the loss simulation operation may also include simulating other types of communication failures, such as message sending failure, reception error, data corruption or time synchronization problem, etc. By introducing the simulation of these failures, it is possible to test whether the controller area network of the target vehicle can detect communication anomalies and take corresponding measures.
[0149] In addition, the simulation operation in step S104 may also include simulating more complex network anomalies, such as network congestion, signal interference, or simultaneous loss of multiple nodes. These anomalies can more comprehensively test the fault tolerance and fault recovery mechanism of the CAN.
[0150] Through the execution of step S104, the loss simulation operation of the embodiment of the present application helps to simulate how the vehicle communication of the target vehicle performs when the ECU is lost in a real controller area network, and how to improve the robustness and reliability of vehicle communication.
[0151] Reference Figure 6 According to some embodiments provided by the present application, step S104 performs a loss simulation operation to simulate that the target test node is in a loss state, which may include:
[0152] Step S601, importing the test script into the controller local network simulation program;
[0153] Step S602, running a test script in the controller local network simulation program to perform a loss simulation operation, simulating a target test node in the vehicle simulation communication network to be in a lost state.
[0154] In step S601 of some embodiments, the test script is first imported into the controller area network simulation program. This step is to load the pre-established test script file into the simulation software. The test script includes the instructions and parameters required to simulate the loss behavior of the target test node.
[0155] In step S602 of some embodiments, the test script is run in the controller area network simulation program to actually perform the loss simulation operation. It should be noted that the controller area network simulation program starts to simulate the loss state of the target test node according to the instructions in the test script. Specifically, it may include stopping the node's message sending, simulating communication interruption or other predefined loss behaviors. In addition, running the test script will trigger a series of events and responses in the simulation environment, which can be monitored and recorded for analysis in subsequent steps.
[0156] In some embodiments, when performing loss simulation operations, the controller area network simulation program needs to monitor the responses of each simulated communication node in the vehicle simulation communication network, such as fault detection, error reporting, and possible network reconstruction or recovery actions. These responses are important indicators for evaluating network robustness and reliability.
[0157] Through the coordinated work of step S601 and step S602, the embodiment of the present application can simulate and observe the performance of the vehicle simulation communication network under the condition of node loss in a controlled simulation environment. This method not only improves the safety and flexibility of the test, but also allows the embodiment of the present application to deeply analyze and evaluate the communication performance and fault handling mechanism of the network without affecting the actual vehicle system.
[0158] In step S105 of some embodiments, in the process of simulating the target test node being in a lost state, a simulated communication test is performed on the vehicle simulation communication network to obtain communication test data. It should be noted that in the case where the simulated target test node is in a lost state, a simulated communication test is performed on the vehicle simulation communication network. This simulated communication test will generate important communication test data, reflecting the communication status and performance of the vehicle simulation communication network in the case of node loss.
[0159] It should be noted that the key point of step S105 is to perform a simulated communication test on the vehicle simulation communication network in the process of simulating the target test node being in a lost state. This step is related to evaluating the communication state and performance of the target vehicle's controller area network under abnormal conditions.
[0160] In some embodiments of the present application, when the target test node is simulated as a lost state, the simulated communication test will be started. The purpose of the simulated communication test is to observe and record the communication behavior of the remaining simulated communication nodes in the vehicle simulation communication network, as well as the response of the entire vehicle simulation communication network to the loss of the node. In this process, the continuity of data transmission, the stability of the network, the efficiency of the fault detection and reporting mechanism, and the degree of network dependence on the lost node can be clearly monitored through the communication test data.
[0161] In some more specific embodiments, the communication test data may include, but is not limited to: the success rate of message transmission, network delay, error rate, network load, communication mode of remaining nodes, and any measures taken to restore communication. Among them, the communication test data is crucial to clarify the robustness and reliability of the vehicle simulation communication network in the event of node loss.
[0162] In addition, communication test data can also reveal potential weaknesses and design flaws in the vehicle simulation communication network. For example, if it is found that the transmission of critical safety-related messages is affected after a node is lost, this may indicate that the controller area network corresponding to the vehicle simulation communication network needs to be improved in design to enhance its fault tolerance.
[0163] In some more specific embodiments, when performing simulated communication tests, the embodiments of the present application can use accurate monitoring tools and analysis methods to collect data. This can include using network analyzers, data loggers, and advanced functions of simulation software to ensure the accuracy and repeatability of the test, so that the collected data can truly reflect the behavior of the controller area network of the target vehicle in the case of node loss.
[0164] In step S106 of some embodiments, the communication test data is parsed to obtain test parsing data. It should be noted that the test parsing data reflects the communication performance of the vehicle simulation communication network when a node is lost, including the stability of the network, the effectiveness of the fault detection and recovery mechanism, and other relevant performance indicators.
[0165] Specifically, step S106 requires in-depth analysis of the communication test data collected in the case of node loss, aiming to convert the original communication test data into useful information and indicators, so as to evaluate the performance and behavior of the vehicle simulation communication network.
[0166] In some embodiments, the generation of test analysis data involves multi-dimensional analysis of the communication test data.
[0167] For example:
[0168] First, the stability of the vehicle simulation communication network needs to be checked, which can include analyzing whether the vehicle simulation communication network can maintain normal communication patterns in the event of node loss, and whether there are abnormal communication fluctuations or interruptions. Stability analysis can help identify weak links in the vehicle simulation communication network and factors that may affect communication under stress conditions.
[0169] Secondly, the test analysis data also includes the evaluation of the fault detection mechanism. This can be an analysis of how the vehicle simulation communication network identifies and responds to the loss of a node, including the speed and accuracy of fault detection. An effective fault detection mechanism is essential to quickly identify problems and take appropriate measures.
[0170] Third, the effectiveness of the recovery mechanism is evaluated. This requires analyzing whether the recovery measures taken by the vehicle simulation communication network after detecting the loss of a node can successfully restore communication, or at least reduce the impact of node loss on the performance of the vehicle simulation communication network. The recovery mechanism may include rerouting communication, enabling backup nodes, or adjusting network parameters.
[0171] In addition, the test analysis data can also cover other relevant performance indicators, such as message transmission delay, network throughput, error rate and network self-healing ability.
[0172] It should be understood that parsing the communication test data to obtain the test analysis data in step S106 is a comprehensive analysis process. The test analysis data reflects the specific performance of the vehicle simulation communication network under the condition of node loss, and provides data support for further optimizing the controller area network design of the target vehicle and improving the reliability of the controller area network.
[0173] The vehicle communication test method provided in the embodiment of the present application can effectively evaluate the performance of the vehicle CAN network when facing abnormal situations such as node loss, provide data support for further system optimization and fault prevention, help improve the reliability and security of the vehicle communication system, and ensure that various communication anomalies can be properly handled in actual operation.
[0174] Reference Figure 7 According to some embodiments provided by the present application, after parsing the communication test data in step S106 to obtain the test parsed data, the following may also be included:
[0175] Step S701, in response to the test parsing data not satisfying the preset communication test condition, updating the vehicle simulation communication network, and returning to execute determining a target test node from a plurality of simulation communication nodes of the updated vehicle simulation communication network;
[0176] Step S702 , in response to the test analysis data satisfying the communication test condition, optimizing the controller area network of the target vehicle based on the vehicle simulation communication network corresponding to the test analysis data.
[0177] In step S701 of some embodiments, it is necessary to evaluate the communication test data. If the test analysis data does not meet the preset communication test conditions, this indicates that the vehicle simulation communication network may have insufficient performance or potential problems in some aspects. In this case, the vehicle simulation communication network needs to be updated. Among them, the update of the vehicle simulation communication network may include adjusting network parameters, optimizing node configuration, improving communication protocols, or enhancing fault detection and recovery mechanisms. The purpose of updating the vehicle simulation communication network is to solve problems found in the simulation communication test and improve the performance and reliability of the network.
[0178] After the update of the vehicle simulation communication network is completed, the embodiment of the present application can return to the previous step and re-determine the target test node from the multiple simulated communication nodes of the updated vehicle simulation communication network. This step ensures that the updated network can be re-evaluated for key nodes to verify whether the update is effective and whether further optimization is required.
[0179] Step S702 of some embodiments shows the operations to be taken when the test parsing data meets the communication test conditions. If the test results meet expectations, it indicates that the current vehicle simulation communication network performs well and meets the test requirements. In this case, based on the test parsing data, the controller area network of the target vehicle can be optimized. Among them, the optimization of the controller area network of the target vehicle can include fine-tuning parameters to improve efficiency, implementing new communication strategies to reduce delays, or enhancing the security measures of the controller area network to defend against potential threats.
[0180] It should be understood that the purpose of optimizing the CAN of the target vehicle is to further improve the performance of the CAN, ensure that it can operate stably in the actual vehicle environment, and adapt to different working conditions and requirements. Through this continuous evaluation and optimization cycle, the quality and reliability of the target vehicle communication network can be continuously improved.
[0181] Through step S701 and step S702 of the embodiment of the present application, a flexible post-test processing mechanism is provided to ensure that the test results can be effectively applied. Whether it is necessary to update the vehicle simulation communication network or to optimize the controller area network based on successful test results, these steps help ensure that the controller area network can remain efficient and stable when facing various vehicle communication tasks.
[0182] The vehicle provided according to the embodiment of the present application may include:
[0183] The vehicle stores a program, and the program is executed to implement any one of the vehicle communication testing methods provided in the embodiments of the present application.
[0184] It can be seen that the contents of the above-mentioned vehicle communication test method embodiment are all applicable to the embodiments of this vehicle, the functions specifically implemented by the present vehicle embodiment are the same as those in the above-mentioned vehicle communication test method embodiment, and the beneficial effects achieved are also the same as those achieved by the above-mentioned vehicle communication test method embodiment.
[0185] The computer-readable storage medium provided according to the embodiment of the present application may include:
[0186] The computer-readable storage medium stores a program, and the program is executed to implement any one of the vehicle communication test methods provided in the embodiments of the present application.
[0187] It can be seen that the contents in the above-mentioned vehicle communication test method embodiment are all applicable to the embodiment of the present computer-readable storage medium, the functions specifically implemented by the present computer-readable storage medium embodiment are the same as those in the above-mentioned vehicle communication test method embodiment, and the beneficial effects achieved are also the same as those achieved by the above-mentioned vehicle communication test method embodiment.
[0188] Reference Figure 8 , Figure 8 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0189] The processor 801 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 application;
[0190] The memory 802 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 802 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 802, and the processor 801 calls and executes the vehicle communication test method of the embodiment of this application;
[0191] Input / output interface 803, used to implement information input and output;
[0192] The communication interface 804 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WI FI, Bluetooth, etc.);
[0193] A bus 805 that transmits information between the various components of the device (e.g., the processor 801, the memory 802, the input / output interface 803, and the communication interface 804);
[0194] The processor 801 , the memory 802 , the input / output interface 803 and the communication interface 804 are connected to each other in communication within the device via a bus 805 .
[0195] The third aspect of the present application also provides a vehicle, which includes any of the above vehicle communication test methods. Specifically, the vehicle can be a gasoline vehicle or a new energy vehicle. When the vehicle is a new energy vehicle, it can be a hybrid vehicle or a pure electric vehicle.
[0196] Specifically, the vehicle provided in the embodiment of the present application can be a gasoline vehicle or a new energy vehicle. When the vehicle is a new energy vehicle, it can be a hybrid vehicle or a pure electric vehicle.
[0197] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program, and the computer program implements the above method when executed by a processor.
[0198] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiments, the functions specifically implemented by the present storage medium 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.
[0199] 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.
[0200] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0201] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0202] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0203] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0204] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0205] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, which may include any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0206] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0207] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0208] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0209] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and may include multiple instructions to enable a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store programs.
[0210] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A vehicle communication test method, characterized in that: include: Simulating the controller area network of the target vehicle to obtain a vehicle simulation communication network; wherein the vehicle simulation communication network includes a plurality of simulation communication nodes; determining a target test node from a plurality of said simulated communication nodes of said vehicle simulated communication network; Determining, through a pre-established test script, a loss simulation operation matching the target test node; Executing the loss simulation operation to simulate that the target test node is in a lost state; In the process of simulating that the target test node is in a lost state, performing a simulated communication test on the vehicle simulation communication network to obtain communication test data; The communication test data is parsed to obtain test parsed data.
2. The method according to claim 1, characterized in that: Before determining the loss simulation operation matching the target test node through the pre-established test script, the method further includes: Obtain test requirement data; Based on the test requirement data, determining the communication test message, message sending cycle and message loss threshold corresponding to each of the simulated communication nodes in the vehicle simulation communication network; Based on the communication test message corresponding to each of the simulated communication nodes, generating a message definition function matching each of the simulated communication nodes; Based on the message sending period corresponding to each of the simulated communication nodes, generating a message period function matching each of the simulated communication nodes; Based on the message loss threshold corresponding to each of the simulated communication nodes, generating a standard node loss function matching each of the simulated communication nodes; A test script is constructed according to the message definition function, the message period function and the standard node loss function that match each of the simulated communication nodes to obtain the pre-established test script.
3. The method according to claim 2, characterized in that The message loss threshold includes an update period threshold, and the generating of a standard node loss function matching each of the simulated communication nodes based on the message loss threshold corresponding to each of the simulated communication nodes includes: Based on the communication test message corresponding to each of the simulated communication nodes, determining a periodic communication node containing a survival count bit in the communication test message; Based on the update period threshold corresponding to each of the periodic communication nodes, a standard node loss function matching each of the simulated communication nodes is generated.
4. The method according to claim 2, characterized in that: Before constructing a test script according to the message definition function, the message period function and the standard node loss function matched to each of the simulated communication nodes to obtain the pre-established test script, the method further includes: Based on the communication test message corresponding to each of the simulated communication nodes, determining a verification communication node containing a transmission check bit in the communication test message; Based on the transmission check bit corresponding to each of the check communication nodes, generating a message check function matching each of the simulated communication nodes; The step of constructing a test script according to the message definition function, the message period function and the standard node loss function matched to each of the simulated communication nodes to obtain the pre-established test script includes: A test script is constructed according to the message definition function, the message period function, the standard node loss function and the message verification function that match each of the simulated communication nodes to obtain the pre-established test script.
5. The method according to claim 1, characterized in that The simulation of the controller area network of the target vehicle to obtain a vehicle simulation communication network includes: Obtain controller local network simulation program, simulation constraint information and test case data; The simulation constraint information and the test case data are input into the controller local area network simulation program so that the controller local area network simulation program simulates the controller local area network of the target vehicle to obtain the vehicle simulation communication network simulated by the controller local area network simulation program.
6. The method according to claim 5, characterized in that The determining, through a pre-established test script, a loss simulation operation matching the target test node comprises: In the controller local area network simulation program, the loss simulation operation is set according to the simulation constraint information and the test case data.
7. The method according to claim 6, characterized in that The performing of the loss simulation operation to simulate that the target test node is in a loss state includes: Importing the test script into the controller local network simulation program; The test script is run in the controller local area network simulation program to perform the loss simulation operation to simulate that the target test node in the vehicle simulation communication network is in a lost state.
8. The method according to claim 1, characterized in that After parsing the communication test data to obtain the test parsing data, the method further includes: In response to the test parsing data not satisfying a preset communication test condition, updating the vehicle simulation communication network, and returning to determine the target test node from the multiple simulation communication nodes of the updated vehicle simulation communication network; In response to the test analysis data satisfying the communication test condition, the controller area network of the target vehicle is optimized based on the vehicle simulation communication network corresponding to the test analysis data.
9. A vehicle, characterized in that: include: A memory and a processor, wherein the memory stores a computer program, and the processor implements the vehicle communication test method according to any one of claims 1 to 8 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The storage medium stores a program, and the program is executed by a processor to implement the vehicle communication test method according to any one of claims 1 to 8.
