Whole vehicle automatic test method and system, electronic equipment and storage medium
Through the method of testing connection requests based on vehicle identification code and freezing native applications, the complexity, compatibility and efficiency of vehicle automation testing in the existing technology is solved, and a more stable and safe testing process is achieved, reducing costs and human resources requirements.
Patent Information
- Application Number
- CN202411380156.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-01-07
AI Technical Summary
The existing vehicle automation testing methods are complex, high cost, poor compatibility, low testing efficiency, difficult data interpretation and safety risks.
By sending test connection requests based on the vehicle identification code, freezing native applications, starting the test application, sending test instructions to the vehicle controller one by one, and waiting for the execution results, testing, recording and displaying using the predefined vehicle signal adapter interface Test exception, send test results to the cloud.
It reduces the complexity and cost of the test system, improves the testing efficiency and coverage, enhances the stability and reliability of the test, and ensures the safety of the test process.
Smart Images

Figure CN119270822A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle technology, and in particular to a whole vehicle automated testing method, system, electronic equipment, storage medium and vehicle. Background Art
[0002] At present, the automated testing methods for complete vehicles include multiple aspects, including simulation testing technology, complete vehicle testing technology, etc., and the development trend tends to be intelligent, standardized, and automated.
[0003] The patent document with the patent number CN118259651A discloses a whole vehicle testing method, system, electronic device and storage medium, the method comprising: when the trigger device is connected to the vehicle to be tested, if the voltage signal of the vehicle to be tested is collected and changes, then start timing to obtain the timing duration; wherein the state of the controller of the vehicle to be tested changes with the increase of the timing duration; determine multiple target durations, and determine the target voltage waveform for the whole vehicle voltage jump test of the vehicle to be tested; when the timing duration reaches one of the target durations, send a trigger signal to the programmable power supply so that the programmable power supply outputs the target voltage waveform to the vehicle to be tested. This method can realize the whole vehicle voltage jump test of the vehicle to be tested without investigating the different states of the controller of the vehicle to be tested.
[0004] This patent document mainly uses a signal trigger device and a programmable power supply to send a CAN line target control instruction to the vehicle under test, monitor the duration of the vehicle voltage signal waveform change and compare it with the target duration, monitor the vehicle voltage signal waveform and compare it with the target waveform, and obtain the vehicle test pass rate based on this. The existing technology and this patent document have the following deficiencies:
[0005] 1: Complexity and cost issues
[0006] The use of signal triggers and programmable power supplies may increase system complexity, which not only makes system setup and maintenance more difficult, but may also increase overall costs. Customized signal triggers and power control solutions may be required for different vehicle models and configurations, further increasing system complexity and development costs.
[0007] 2: Compatibility issues:
[0008] Since the CAN communication protocols of different vehicles may differ, this solution may face compatibility issues and require special adjustments and tests for different models. If the vehicle's CAN bus system is updated or modified, the original test equipment may not be able to adapt to the new communication standard.
[0009] 3: Stability and reliability issues:
[0010] Relying on precise signal triggering and power control, any device failure or unstable output may lead to inaccurate test results.
[0011] After long-term use, the performance of the device may deteriorate, affecting the reliability of the test results.
[0012] 4: Test efficiency and coverage:
[0013] This approach may focus more on specific test scenarios and parameters, while ignoring other important aspects that may affect the performance of the vehicle, thus limiting the comprehensiveness and efficiency of the test. For mass-produced vehicles, it may not be realistic to conduct such detailed tests one by one, which will seriously affect production efficiency.
[0014] 5: Data interpretation and analysis:
[0015] The obtained voltage signal waveform data requires professional knowledge and skills to interpret and analyze, which increases the labor cost of the testing process.
[0016] Automated data analysis tools may not be flexible enough to accommodate all possible testing scenarios and outcomes.
[0017] 6: Security considerations:
[0018] When conducting this type of testing, it is important to ensure that no damage or potential safety risks are caused to the vehicle's original systems, as problems during testing could have a negative impact on the vehicle's functionality or safety.
[0019] Therefore, the present application provides a whole vehicle automated testing method to solve the above technical problems. Summary of the invention
[0020] The object of the present invention is to provide a whole vehicle automated testing method, system, electronic device, storage medium and vehicle to solve the technical problems in the prior art of complicated testing schemes, poor compatibility and low testing efficiency.
[0021] In order to solve the above technical problems, the present invention provides a vehicle automated testing method, comprising:
[0022] Sending a test connection request to a target vehicle based on a vehicle identification code, wherein the test connection request includes establishing a session for communicating with the vehicle for sending a test instruction;
[0023] Sending a freeze instruction to a cockpit native application of the vehicle, wherein the freeze instruction is used to suspend the calling and responding of the native application to the vehicle signal interface;
[0024] Sending a start test instruction to a test application, wherein the start test instruction includes starting the test application to execute a predetermined test case;
[0025] Based on a predefined vehicle signal adaptation layer interface, test instructions are sent to the vehicle controller one by one, and execution results are waited for, wherein the test instructions include specific operation requests issued to the vehicle controller.
[0026] In some specific embodiments, a test connection request is sent to a target vehicle based on a vehicle identification code, wherein the test connection request includes establishing a session for communicating with the vehicle for sending a test instruction, further comprising:
[0027] Reading the vehicle identification code through an external communication interface of the vehicle, wherein the external communication interface includes an RFID reader or an NFC module;
[0028] Constructing a test connection request message containing vehicle identification information according to the read vehicle identification code, wherein the message includes a header, the header includes a message type, a target address, a source address, and a payload, and the payload includes the encrypted vehicle identification code;
[0029] Sending the test connection request message to the vehicle via a communication network of the vehicle, wherein the communication network includes an internal Ethernet or a wireless local area network of the vehicle;
[0030] A response message from the vehicle is received, and a test connection is established according to the response message, wherein the response message includes a confirmation code and a session identifier for communication session management and message routing.
[0031] In some specific embodiments, sending a freeze instruction to the cockpit native application of the vehicle, wherein the freeze instruction is used to suspend the calling and responding of the native application to the vehicle signal interface, further includes:
[0032] In response to the freeze instruction, instruct the native application to enter a frozen state, wherein the freeze instruction includes an operation code for instructing a freeze operation;
[0033] Constructing a freeze request message, wherein the freeze request message includes parameters and instructions of a freeze operation, wherein the parameters include a freeze duration and a resource number of the freeze operation;
[0034] Sending the freeze request message to the native application via an internal communication network of the vehicle, wherein the internal communication network includes a CAN bus or a FlexRay bus of the vehicle;
[0035] A confirmation message from the native application is received to confirm entering the frozen state, wherein the confirmation message includes a status code for indicating a current state of the native application.
[0036] In some specific embodiments, sending a start test instruction to a test application, wherein the start test instruction includes starting the test application to execute a predetermined test case, further comprising:
[0037] The start test instruction includes a start signal of a test process, wherein the start test instruction includes an operation code for indicating the start of the test process;
[0038] Constructing a start test message including test process information, wherein the test process information includes a resource number, test parameters, and test sequence of the test case;
[0039] Sending the start test message to the test application via an internal communication network of the vehicle, wherein the internal communication network includes a MOST bus or an in-vehicle Ethernet of the vehicle;
[0040] Receive a confirmation message from the test application to confirm readiness and start executing the test process, wherein the confirmation message includes a status code for indicating the current status of the test application.
[0041] In some specific embodiments, based on a predefined vehicle signal adaptation layer interface, test instructions are sent to the vehicle controller one by one, and execution results are waited for, wherein the test instructions include specific operation requests issued to the vehicle controller, and further include:
[0042] According to the definition of the vehicle signal adaptation layer interface, construct a test instruction message including a specific operation request for the vehicle controller, wherein the test instruction message includes an operation code for indicating a specific vehicle control operation;
[0043] Sending the test instruction message to the vehicle controller via a communication network of the vehicle, wherein the communication network includes a LIN bus or a Bluetooth communication module of the vehicle;
[0044] Receive a response message from the vehicle controller, and parse the response content according to a predefined response format, wherein the response format includes a header, the header includes a response status, a response time, and a payload, and the payload includes data of an operation result;
[0045] The parsed response content is compared with the expected response value to verify whether the test case passes, wherein the comparison process includes calculating a checksum of the response content and comparing it with a preset checksum to determine the validity of the response.
[0046] In some specific embodiments, it also includes:
[0047] When the test case fails, recording identification information of the test case and detailed information of the failed vehicle signal interface, wherein the recording includes generating a log file including the test case identification, the failed signal interface identification and a timestamp;
[0048] Displaying all test exception cases on a vehicle's cockpit display screen, including identification information of the test case, the failed vehicle signal interface, and the failure reason, wherein the display includes generating a list view containing the exception information on a graphical user interface;
[0049] Send test results and process data to the cloud, including test case execution results, vehicle signal adaptation layer interface response data, and detailed information on test anomalies.
[0050] Based on the same concept, the present invention also provides a vehicle automation testing system, comprising:
[0051] A test connection establishment module, configured to send a test connection request to a target vehicle based on a vehicle identification code, wherein the test connection request includes establishing a session for communicating with the vehicle for sending a test instruction;
[0052] A freeze instruction sending module, configured to send a freeze instruction to a cockpit native application of the vehicle, wherein the freeze instruction is used to suspend the calling and responding of the native application to the vehicle signal interface;
[0053] A test case execution module, configured to send a start test instruction to a test application, wherein the start test instruction includes starting the test application to execute a predetermined test case;
[0054] The test result returning module is configured to send test instructions to the vehicle controller one by one based on a predefined vehicle signal adaptation layer interface and wait for execution results, wherein the test instructions include specific operation requests issued to the vehicle controller.
[0055] Based on the same concept, the present invention also provides an electronic device, including: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the vehicle automation testing method.
[0056] Based on the same concept, the present invention also provides a computer-readable storage medium, which stores a computer program executable by an electronic device. When the computer program runs on the electronic device, the electronic device executes the steps of the vehicle automation testing method.
[0057] Based on the same concept, the present invention also provides a vehicle, wherein the vehicle is provided with the above-mentioned whole vehicle automatic testing system.
[0058] Compared with the prior art, the invention has the following beneficial effects:
[0059] The present invention discloses a whole vehicle automated testing method, system, electronic equipment, storage medium and vehicle, which can reduce the complexity and cost of the whole vehicle testing system, improve the testing efficiency and coverage, and improve the stability and reliability of the testing process. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 It is a flowchart of a vehicle automation testing method of the present invention in some specific embodiments;
[0061] Figure 2 It is a schematic diagram of the process architecture of a vehicle automation testing method of the present invention in some applications;
[0062] Figure 3 It is a structural schematic diagram of a whole vehicle automatic testing system of the present invention in some specific embodiments;
[0063] Figure 4 It is a schematic diagram of the structure of an electronic device in some specific embodiments of the present invention. DETAILED DESCRIPTION
[0064] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0065] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings, and "multiple" generally includes at least two.
[0066] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0067] It should be understood that although the terms first, second, third, etc. may be used to describe in the embodiments of the present application, these descriptions should not be limited to these terms. These terms are only used to distinguish the descriptions. For example, without departing from the scope of the embodiments of the present application, the first may also be referred to as the second, and similarly, the second may also be referred to as the first.
[0068] As used herein, the words "if" and "if" may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.
[0069] It should also be noted that the term "includes", "comprising" or any other variation thereof is intended to cover non-exclusive inclusion, so that a commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprising a ..." do not exclude the existence of other identical elements in the commodity or device including the elements.
[0070] It should be particularly noted that any symbols and / or numbers in the specification that are not marked in the accompanying drawings are not drawing marks.
[0071] Reference Figure 1 , a vehicle automated testing method, comprising:
[0072] S101 sends a test connection request to a target vehicle based on a vehicle identification code, wherein the test connection request includes establishing a session for communicating with the vehicle for sending a test instruction;
[0073] It can be understood that this step sends a test connection request to the target vehicle based on the vehicle identification code (VIN code) and establishes a communication session with the vehicle through the network.
[0074] In some of the applications, a test connection request is sent to a target vehicle based on a vehicle identification code, the test connection request includes establishing a session for communicating with the vehicle, and is used to send a test instruction. The vehicle identification code is read through an external communication interface of the vehicle, and the external communication interface includes an RFID reader or an NFC module; a test connection request message containing vehicle identification information is constructed according to the read vehicle identification code, and the message includes a header, and the header includes a message type, a target address, a source address, and a payload, and the payload includes an encrypted vehicle identification code; the test connection request message is sent to the vehicle through the vehicle's communication network, and the communication network includes the vehicle's internal Ethernet or wireless local area network; a response message from the vehicle is received, and a test connection is established according to the response message, and the response message includes a confirmation code and a session identifier, which are used for session management and message routing of the communication.
[0075] It is understood that the RFID reader or NFC module is used to read the VIN code of the vehicle. When the vehicle enters the test area, the RFID reader communicates with the RFID tag on the vehicle through radio waves to read the VIN code in the tag.
[0076] For example, the VIN code stored on the RFID tag is "1HGCM82633A004352". The RFID reader has a read range between a few centimeters and a few meters, ensuring that the VIN code can be reliably read when the vehicle enters the test area. After reading the VIN code, a test connection request message is constructed. The message consists of two parts: the header and the payload:
[0077] The header contains the following fields:
[0078] Message Type: For example, "TestConnReq" to indicate that this is a test connection request.
[0079] Target address: The communication address of the target vehicle, for example, "192.168.1.100", which is the vehicle's Local Area Network (LAN) IP address.
[0080] Source address: The communication address of the test system, for example, "192.168.1.200", which is used to identify the system sending the message.
[0081] Payload: Contains the encrypted VIN code. For example, the VIN code "1HGCM82633A004352" is encrypted using the AES-128 encryption algorithm to generate the encrypted payload content. The encryption process includes generating a random initialization vector (IV) and then encrypting it using a pre-shared key to ensure the security of the communication.
[0082] The constructed message is sent to the target vehicle through the vehicle's communication network. If the vehicle's communication network is an internal Ethernet, the test system will send the message through a wired connection. If it is a wireless LAN, the test system will send the message to the vehicle's IP address "192.168.1.100" via Wi-Fi. During the message sending process, the test system uses TCP or UDP protocols to ensure reliable data transmission.
[0083] After receiving the test connection request message, the target vehicle will parse it and generate a response message. The response message also includes a header and a payload:
[0084] The header contains the following fields:
[0085] Acknowledgement code: For example, "ACK", indicating that the message has been successfully received and processed.
[0086] Session identifier: Generates a unique identifier for this communication session, for example, "SESSION12345", which is used for session management and message routing of subsequent communications.
[0087] Payload: Contains additional session configuration information, such as the selection of encryption algorithm, communication protocol version, etc.
[0088] After receiving the vehicle's response message, a test connection will be established based on the session identifier in the response message.
[0089] For example, if the session identifier in the response message is "SESSION12345", use this identifier as the unique reference for this test session.
[0090] S102: sending a freeze instruction to the cockpit native application of the vehicle, wherein the freeze instruction is used to suspend the calling and responding of the native application to the vehicle signal interface;
[0091] Understandably, this step is used during automated testing to ensure that the native application does not interfere with the vehicle’s signal interface.
[0092] In some of these applications, a freeze instruction is sent to a native application in the vehicle's cockpit, the freeze instruction is used to suspend the native application's calls and responses to the vehicle's signal interface, and in response to the freeze instruction, the native application is instructed to enter a frozen state, the freeze instruction includes an operation code for indicating the freeze operation; a freeze request message is constructed, the freeze request message includes parameters and instructions for the freeze operation, the parameters include the freeze duration and the resource number of the freeze operation; the freeze request message is sent to the native application through the vehicle's internal communication network, the internal communication network includes the vehicle's CAN bus or FlexRay bus; a confirmation message from the native application is received to confirm entry into the frozen state, the confirmation message includes a status code for indicating the current state of the native application.
[0093] It is understood that the specific parameters that need to be defined for the freeze operation include:
[0094] Opcode: A hexadecimal value, for example, "0x01", which explicitly indicates that a freeze operation is to be performed.
[0095] Freeze Duration: Specifies in milliseconds how long the freeze state should last.
[0096] For example, if the test is expected to execute for 10 seconds without interruption, the freeze duration is set to 10000 milliseconds.
[0097] Resource ID: A unique number used to identify a specific freeze operation, which helps with logging and troubleshooting.
[0098] For example, "FRZ20240314A", where "FRZ" stands for freeze operation, and the subsequent number and letter combination represents the specific date and serial number that generated the instruction.
[0099] Build freeze request message:
[0100] Message header: Contains the source node address, target node address, and operation code.
[0101] For example, the source node address is "0x02" (the address of the test system) and the target node address is "0x03" (the address of the cockpit controller).
[0102] Message body: Contains the freeze duration and resource ID.
[0103] For example, the message body may be an ASCII-encoded string, such as "DURATION=10000&ID=FRZ20240314A".
[0104] To ensure the security of communication, the freeze request message needs to be encrypted before sending. Use vehicle communication security protocols such as TLS / SSL and pre-shared keys to encrypt the message.
[0105] The encrypted freeze request message is sent via the vehicle's internal communication network. Assuming the vehicle uses the CAN bus as its internal communication network, the following operations are performed:
[0106] CAN frame construction: Construct the encrypted freeze request message into a CAN data frame.
[0107] For example, the frame ID is "0x300" and the data field contains the encrypted request message.
[0108] Frame sending: Send CAN data frames to the cockpit controller via the CAN bus.
[0109] After receiving and parsing the freeze request message, the cockpit native application executes the freeze operation and sends a confirmation message back to the test system. The process of constructing and sending the confirmation message is as follows:
[0110] Confirmation message construction: The native application generates a confirmation message that includes a status code.
[0111] For example, a status code of "0x10" indicates that the native application has successfully entered the frozen state.
[0112] Confirmation message sending: The native application encapsulates the confirmation message into a CAN data frame and sends it back to the test system through the CAN bus.
[0113] S103 sends a start test instruction to the test application, wherein the start test instruction includes starting the test application to execute a predetermined test case;
[0114] It can be understood that this step is used to start a predetermined test case in the whole vehicle automated test.
[0115] In some of the applications, a start test instruction is sent to a test application, the start test instruction includes starting the test application to execute a predetermined test case, the start test instruction includes a start signal for the test process, and the start test instruction includes an operation code for indicating the start of the test process; a start test message including test process information is constructed, the test process information includes a resource number, test parameters and test sequence of the test case; the start test message is sent to the test application through the vehicle's internal communication network, the internal communication network includes the vehicle's MOST bus or on-board Ethernet; a confirmation message from the test application is received to confirm readiness and start executing the test process, the confirmation message includes a status code for indicating the current status of the test application.
[0116] It is understandable that before sending the start test instruction, the start signal and operation code of the test process are first defined:
[0117] Opcode: A hexadecimal value, for example, "0x02", that explicitly indicates the start of a test flow.
[0118] Test case resource number: a unique number used to identify a specific test case.
[0119] For example, "TC101", represents the first test case.
[0120] Test parameters: used to configure the execution of test cases.
[0121] For example, the test parameters may include test duration, test environment conditions, etc., such as "DURATION=5000&TEMPERATURE=25".
[0122] Test Order: Specify the order in which the test cases are executed.
[0123] For example, it could be an array containing test case numbers, like ["TC101", "TC102", "TC103"].
[0124] Build start test message:
[0125] Message header: Contains the source node address, target node address, and operation code.
[0126] For example, the source node address is "0x02" (the address of the test system) and the target node address is "0x04" (the address of the test application).
[0127] Message body: contains the resource number, test parameters and test sequence of the test case.
[0128] For example, the message body can be a string in JSON format, such as `{"test_case_id":"TC101",
[0129] "parameters":"DURATION=5000&TEMPERATURE=25","order":['TC101','TC102','TC103']}`.
[0130] To ensure the security of communication, the test message needs to be encrypted before sending. Use vehicle communication security protocols such as TLS / SSL and pre-shared keys to encrypt messages.
[0131] The encrypted start test message is sent via the vehicle's internal communication network. Assuming the vehicle uses the MOST bus or in-vehicle Ethernet as its internal communication network, perform the following operations:
[0132] MOST bus communication: If the MOST bus is used, the encrypted start test message is encapsulated into a MOST data packet and sent to the test application via the MOST bus.
[0133] In-vehicle Ethernet communication: If in-vehicle Ethernet is used, the encrypted start test message is encapsulated into an Ethernet data frame and sent via Ethernet to the IP address of the test application.
[0134] After receiving and parsing the start test message, the test application executes the test process and sends a confirmation message back to the test system. The process of building and sending the confirmation message is as follows:
[0135] Confirmation message build: The test application generates a confirmation message that includes a status code.
[0136] For example, the status code is "0x20", which means that the test application has been successfully prepared and started to execute the test process.
[0137] Confirmation message sending: The test application encapsulates the confirmation message into the corresponding network data packet or data frame and sends it back to the test system through the vehicle's internal communication network.
[0138] S104 sends test instructions to the vehicle controller one by one based on a predefined vehicle signal adaptation layer interface and waits for execution results, wherein the test instructions include specific operation requests issued to the vehicle controller.
[0139] It can be understood that this step sends the test instruction to the vehicle controller through the predefined vehicle signal adaptation layer interface and evaluates the execution result.
[0140] In some of the applications, based on a predefined vehicle signal adaptation layer interface, test instructions are sent to the vehicle controller one by one, and the execution results are waited for, the test instructions including a specific operation request issued to the vehicle controller. According to the definition of the vehicle signal adaptation layer interface, a test instruction message is constructed, including a specific operation request to the vehicle controller, and the test instruction message includes an operation code for indicating a specific vehicle control operation; the test instruction message is sent to the vehicle controller through the vehicle's communication network, and the communication network includes the vehicle's LIN bus or Bluetooth communication module; a response message from the vehicle controller is received, and the response content is parsed according to a predefined response format, the response format includes a header, the header includes a response status, a response time, and a load, and the load includes data on the operation results; the parsed response content is compared with the expected response value to verify whether the test case passes, wherein the comparison process includes calculating a checksum of the response content and comparing it with a preset checksum to determine the validity of the response.
[0141] It can be understood that the test instruction parameters are defined based on the specification of the vehicle signal adaptation layer interface.
[0142] For example, for the window control test:
[0143] Operation Code: The window down operation code is "0x01", and the window up operation code is "0x02".
[0144] Test Case ID: Each test case has a unique ID, for example, the window control test case ID is "TC201".
[0145] Test Parameters: including the window lowering time threshold, such as 5000 milliseconds (5 seconds), indicating that the window should be completely lowered within 5 seconds.
[0146] Construct a test command message based on the above parameters. The message format is as follows:
[0147] Message Header:
[0148] Source Address: The address of the test system, for example, "0x05".
[0149] Destination Address: The address of the vehicle controller, for example, "0x06".
[0150] Operation Code: A code for a specific operation, for example, "0x01" means the window is lowered.
[0151] Message Body:
[0152] Test Case ID: For example, "TC201".
[0153] Test Parameters: Include the desired window down time, for example, `{"window_down_time":5000}`.
[0154] To ensure security, the test command message is encrypted before being sent. It is encrypted using the AES-128 algorithm and the vehicle controller public key, and then the encrypted message is sent through the vehicle's communication network.
[0155] Communication network selection: According to the vehicle configuration, select LIN bus or Bluetooth communication module for communication.
[0156] LIN bus communication: Encapsulate the encrypted test command message into a LIN data frame with a frame ID of "0x300" and send it to the vehicle controller node via the LIN bus.
[0157] Bluetooth communication: If the vehicle controller supports Bluetooth communication, encrypted messages are sent over an established secure Bluetooth connection.
[0158] After the vehicle controller executes the test command, it generates a response message and returns it through the same communication path.
[0159] Response message format: The response message contains a header and a payload.
[0160] Header: includes response status (e.g., "0x00" for success), response timestamp.
[0161] Payload: Contains data about the result of the operation, for example, the actual window down time.
[0162] Decrypt the received response message and parse the response content. Then, compare the actual execution result with the expected value:
[0163] Compare actual results to expected values: For example, compare the actual window down time (4800 milliseconds) to the expected time (5000 milliseconds).
[0164] Calculate and verify checksum: Calculate the checksum of the response content and compare it with the preset checksum to ensure the validity of the response.
[0165] Some of these applications also include recording the identification information of the test case and the detailed information of the failed vehicle signal interface when the test case fails, and the recording includes generating a log file containing the test case identification, the failed signal interface identification and the timestamp; displaying all test exception cases on the vehicle's cockpit display screen, including the identification information of the test case, the failed vehicle signal interface and the reason for the failure, and the display includes generating a list view containing the exception information on the graphical user interface; and sending the test results and process data to the cloud, including the execution results of the test case, the response data of the vehicle signal adaptation layer interface and the detailed information of the test exception.
[0166] Understandably, when a test case fails to complete successfully, the record generation process is triggered:
[0167] Generate a verbose log file:
[0168] Test case ID: A unique identification code that records the test case that failed, such as "TC202".
[0169] Failed signal interface identifier: records the name or identifier of the vehicle signal interface where the failure occurs, such as "WindowControlInterface".
[0170] Timestamp: records the exact date and time when the failure occurred, accurate to milliseconds, for example, "2024-03-14T12:00:00.000Z".
[0171] Failure reason: Provide the specific reason for the failure, such as "response timeout", "signal loss", etc.
[0172] Comparison of expected and actual results: Record the expected and actual results of the test case, for example, the window was expected to open within 5 seconds, but it actually took 7.5 seconds.
[0173] Detailed information on all test anomalies is displayed in a graphical user interface on the vehicle's cockpit display:
[0174] Generate exception information list view:
[0175] Test case name: Displays the name of the test case that failed, such as "Window control function test".
[0176] Failed signal interface name: Displays the name of the vehicle signal interface that caused the test failure, such as "window control interface".
[0177] Failure Reason: Provide a detailed description of the failure reason, such as "Operation timed out."
[0178] Expected vs. Actual Execution Time: Lists the expected execution time of an operation versus its actual execution time for immediate visual comparison.
[0179] Upload the collected test results and process data to the cloud server for further analysis and recording:
[0180] Data collection and formatting:
[0181] Test case execution results: record whether the test case succeeded or failed.
[0182] Vehicle signal adaptation layer interface response data: including expected response time and actual response time.
[0183] Details of the test exception: including the failure reason and timestamp.
[0184] Data upload:
[0185] Upload data over a secure network connection using the HTTPS protocol.
[0186] The data is organized in JSON format to ensure that cloud servers can easily parse and store it.
[0187] Combine the following Figure 2 The following are some examples of the vehicle automation testing method of the present invention in some applications:
[0188] This embodiment uses the SOA signal and CAN signal received and sent by the cockpit controller to traverse and call all software interfaces and compare them with the target response value. Combined with the vehicle VIN code, the operating status of all controllers of each vehicle can be obtained.
[0189] like Figure 2 As shown,
[0190] 1: The cloud initiates a TSP connection request to the vehicle under test based on the actual vehicle VIN code. Under the premise that the vehicle network is normal, the target vehicle responds to the request.
[0191] 2_0: The TSP module sends a freeze command to the cockpit native APP. At this time, the native APP does not call the vehicle signal interface and will not respond to the vehicle signal callback to avoid interfering with the test process at this time.
[0192] 2_1: The TSP module sends a start test instruction to the test APP component.
[0193] 2_2: When the real vehicle network is abnormal and the cloud-to-vehicle network connection cannot be established, interactive operations can be performed directly on the vehicle-side UI interface. The test APP replaces 1-2_1 and sends a freeze command to the native APP.
[0194] 3: The test component calls and waits for the execution results of the peer controller one by one according to the downlink setting interfaces predefined by the vehicle signal adaptation layer Oem_Carservice of the vehicle model. For example, it requests to turn on the air conditioner and set the temperature to 26 degrees Celsius, and expects the peer controller to reply that the air conditioner has been turned on and the temperature has been set to 26 degrees Celsius.
[0195] 4: Oem_Carservice needs to notify the peer controller via CAN signals based on the actual situation of the vehicle model. Carlib (CarService: a vehicle-related service in the system, mainly based on CarProperty to implement some vehicle-related policies. Vhal: Vehicle HAL: a vehicle's hardware abstraction layer description, defining the interface of vehicle properties that can be implemented by the car manufacturer. Carlib: CarService interacts with the App through CarLib (aidl).) provides an API interface to Oem_Carservice and notifies Android Vhal through two layers of binder. Vhal and QNX Mcu_service (Mcu proxy service) processes communicate through DDS (DDS: (Data Distribution Service) DDS provides a communication mechanism in publish-subscribe mode, allowing data producers (publishers) to publish data to specific topics (Topic), and data consumers (subscribers) can subscribe to topics of interest to receive corresponding data) shared memory. Mcu_Service is the data proxy process on the MCU side and also the bridge for communication between SOC and MCU. In this method, the Spi communication bus is taken as an example. The signal data is transmitted to the MCU through the SPI bus. The MCU side follows Classic Autosar (Classic Autosar (CP for short) is an automotive open system architecture (Automotive Open The abbreviation of Autosar System Architecture includes: Application layer: contains multiple software components (SWC), each SWC implements a type of function. Runtime Environment (RTE): as the core, it implements the function of the virtual bus and supports communication between SWCs. Basic Software Layer (BSW): It is subdivided into service layer, abstraction layer and microcontroller abstraction layer, providing core services and hardware abstraction. ) architecture, based on the typical BSW-RTE-SWC architecture to run real-time tasks, Spi_SWC is responsible for disassembling the corresponding signal data from the Spi bottom cache, and sending the CAN signal and the CAN message containing the signal to the opposite controller through the Autosar standard signal flow processing process.
[0196] 5: Oem_Carservice needs to send notifications to the peer controller through the SOA signal mechanism based on the actual condition of the vehicle. To this end, SOA_SDK provides an API interface to Oem_Carservice to ensure transparent transmission of signal values and monitor signal anomalies, such as timeouts, disconnections, or service failures. SOA_SDK and SOA_HAL communicate through a layer of Binder (a mechanism used for communication between processes), while SOA_HAL (SOA abstraction layer) is responsible for mapping function interface parameters to the signal values of the vehicle's SOA matrix. Someipd (SOMEIP's background process) is responsible for service discovery, publish / subscribe operations, and handles data serialization and deserialization, as well as the encapsulation of transmission protocols. The entire process strictly follows the definition of the vehicle's network matrix to ensure accurate notification to the peer controller through IP plus PORT.
[0197] 6: The peer controller receives the CAN signal, performs corresponding service processing, and feedbacks the service processing status through the predefined CAN signal. It is transmitted to Oem_Carservice through the reverse link in step 4.
[0198] 7: The peer controller receives the SOA signal, performs corresponding service processing, and feeds back the service processing status through the predefined SOA signal. It is transmitted to Oem_Carservice through the reverse link in step 5.
[0199] 8: The test component responds to the signal reception callback and determines whether the test case passes based on the actual value in the signal. If not, the test case ID and the failed vehicle signal interface are recorded. At this time, the test component displays all test abnormalities on the cockpit display screen and stores the process log and TCPDUMP data to UFS (flash memory).
[0200] 9-10: The test component sends the test results and process data to the TSP. If the network connection is normal, the vehicle-side data is uploaded to the cloud for display on the cloud dashboard or persistent storage.
[0201] Based on the above steps, the automatic testing of the function switches of all controllers of the whole vehicle is realized.
[0202] This embodiment is described below in conjunction with application scenarios:
[0203] Develop a test application component APK on the Android system of the cockpit controller. The APK integrates the SDK of the vehicle signal service and calls the SDK interface. The operating system communication middleware will send it to each peer controller according to the network matrix defined by the vehicle. The peer controller feeds back the status signal, and the application component determines whether the signal value meets the expectation and generates a test report. When the network is normal, it is directly uploaded to the cloud; when the network is abnormal, it supports local storage to facilitate subsequent USB disk export.
[0204] 1: Agility of the test method: No external test equipment is required, and the purpose of vehicle testing can be achieved based on the existing software architecture and communication capabilities of the cockpit controller;
[0205] 2: The efficiency of the test method. The vehicle test time is less than 2 minutes. Without considering resource usage, it supports parallel interface calls to test different controller functions. That is, there is no need to wait for the previous controller test process to end before executing the next controller test process. The execution time of a single test case does not exceed 1 second. Assuming that a controller supports 100 function settings, the total test time does not exceed 2 minutes.
[0206] 3: Convenience of testing methods: It supports both remote cloud dashboard display and graphical display on the vehicle display, and is also convenient for R&D personnel to copy logs from the vehicle and analyze them locally. It provides three ways to conduct three-dimensional testing and troubleshoot vehicle problems.
[0207] 4: Wide coverage of test methods: In addition to the normal test process shown in the above figure, it can also support a variety of abnormal scenario tests, such as continuous high-frequency triggering of the opening and closing of functional switches such as air conditioning, HUD, and windows, and stress testing the software robustness of the peer controller.
[0208] In summary, the present invention can reduce the complexity and cost of the vehicle test system: by using the existing interface of the cockpit controller of each vehicle model, there is no need to make software or hardware changes to any controller of the vehicle, nor to add additional test equipment; only adding software modules to the cockpit controller does not destroy the existing software architecture of the cockpit controller, nor does it affect any other controller of the vehicle; it can touch the signal interaction of all controllers of the vehicle, with a wide coverage. The test process time consumption only depends on the communication delay within the cockpit controller system and the signal interaction delay of the vehicle. A single test case can be controlled within 100ms, which greatly improves the efficiency of vehicle testing.
[0209] For the method steps disclosed in the above embodiments, the method steps are described as a series of action combinations for the purpose of simple description, but those skilled in the art should know that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0210] like Figure 3 As shown, the present invention also provides a whole vehicle automatic testing system, comprising:
[0211] A test connection establishing module 201 is configured to send a test connection request to a target vehicle based on a vehicle identification code, wherein the test connection request includes establishing a session for communicating with the vehicle for sending a test instruction;
[0212] A freeze instruction sending module 202 is configured to send a freeze instruction to the cockpit native application of the vehicle, wherein the freeze instruction is used to suspend the calling and responding of the native application to the vehicle signal interface;
[0213] The test case execution module 203 is configured to send a start test instruction to the test application, wherein the start test instruction includes starting the test application to execute a predetermined test case;
[0214] The test result returning module 204 is configured to send test instructions to the vehicle controller one by one based on a predefined vehicle signal adaptation layer interface and wait for execution results, wherein the test instructions include specific operation requests issued to the vehicle controller.
[0215] It is worth noting that although only some basic functional modules are disclosed in the embodiments of the present invention, it does not mean that the composition of the present system is limited to the above basic functional modules. On the contrary, what the present embodiment wants to express is that on the basis of the above basic functional modules, those skilled in the art can arbitrarily add one or more functional modules in combination with the prior art to form an infinite number of embodiments or technical solutions. In other words, the present system is open rather than closed. Just because the present embodiment only discloses individual basic functional modules, it cannot be considered that the protection scope of the claims of the present invention is limited to the disclosed basic functional modules. At the same time, for the convenience of description, the above devices are described in terms of functions and are described separately in various units and modules. Of course, when implementing the present invention, the functions of each unit and module can be implemented in the same or one or more software and / or hardware.
[0216] like Figure 4As shown, the present invention also provides an electronic device, comprising: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the vehicle automation testing method.
[0217] Figure 4 Schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Figure 4 The electronic device provided in the embodiment of the present invention includes: one or more processors 710 and a storage device 720; the processor 710 in the electronic device may be one or more, Figure 4 A processor 710 is taken as an example; the storage device 720 is used to store one or more programs; the one or more programs are executed by the one or more processors 710, so that the one or more processors 710 implement the vehicle automation testing method as described in any one of the embodiments of the present invention.
[0218] The electronic device may further include: an input device 730 and an output device 740 .
[0219] The processor 710, storage device 720, input device 730 and output device 740 in the electronic device can be connected via a bus or other means. Figure 4 The example of connecting through bus is taken in the following.
[0220] The storage device 720 in the electronic device is a computer-readable storage medium that can be used to store one or more programs, which can be software programs, computer executable programs, and modules, such as program instructions / modules corresponding to the vehicle automation test method provided in the embodiment of the present invention. The processor 710 executes various functional applications and data processing of the electronic device by running the software programs, instructions, and modules stored in the storage device 720, that is, the vehicle automation test method in the above method embodiment is implemented.
[0221] The storage device 720 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the electronic device, etc. In addition, the storage device 720 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the storage device 720 may further include a memory remotely arranged relative to the processor 710, and these remote memories may be connected to the device 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.
[0222] The input device 730 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the electronic device. The output device 740 may include a display device such as a display screen.
[0223] The present invention also provides a computer-readable storage medium, which stores a computer program that can be executed by an electronic device. When the computer program runs on the electronic device, the electronic device executes the steps of the vehicle automation testing method.
[0224] Specifically, the computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present embodiment, the computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0225] The present invention also provides a vehicle, wherein the vehicle is provided with the above-mentioned whole vehicle automatic testing system.
[0226] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A vehicle automated testing method, characterized in that: include: Sending a test connection request to a target vehicle based on a vehicle identification code, wherein the test connection request includes establishing a session for communicating with the vehicle for sending a test instruction; Sending a freeze instruction to a cockpit native application of the vehicle, wherein the freeze instruction is used to suspend the calling and responding of the native application to the vehicle signal interface; Sending a start test instruction to a test application, wherein the start test instruction includes starting the test application to execute a predetermined test case; Based on a predefined vehicle signal adaptation layer interface, test instructions are sent to the vehicle controller one by one, and execution results are waited for, wherein the test instructions include specific operation requests issued to the vehicle controller.
2. The vehicle automation testing method according to claim 1, characterized in that: Sending a test connection request to a target vehicle based on a vehicle identification code, wherein the test connection request includes establishing a session for communicating with the vehicle for sending a test instruction, further comprising: Reading the vehicle identification code through an external communication interface of the vehicle, wherein the external communication interface includes an RFID reader or an NFC module; Constructing a test connection request message containing vehicle identification information according to the read vehicle identification code, wherein the message includes a header, the header includes a message type, a target address, a source address, and a payload, and the payload includes the encrypted vehicle identification code; Sending the test connection request message to the vehicle via a communication network of the vehicle, wherein the communication network includes an internal Ethernet or a wireless local area network of the vehicle; A response message from the vehicle is received, and a test connection is established according to the response message, wherein the response message includes a confirmation code and a session identifier for communication session management and message routing.
3. The vehicle automation testing method according to claim 1, characterized in that: Sending a freeze instruction to a cockpit native application of the vehicle, wherein the freeze instruction is used to suspend the calling and responding of the native application to the vehicle signal interface, further comprising: In response to the freeze instruction, instruct the native application to enter a frozen state, wherein the freeze instruction includes an operation code for instructing a freeze operation; Constructing a freeze request message, wherein the freeze request message includes parameters and instructions of a freeze operation, wherein the parameters include a freeze duration and a resource number of the freeze operation; Sending the freeze request message to the native application via an internal communication network of the vehicle, wherein the internal communication network includes a CAN bus or a FlexRay bus of the vehicle; A confirmation message from the native application is received to confirm entering the frozen state, wherein the confirmation message includes a status code for indicating a current state of the native application.
4. The vehicle automation testing method according to claim 1, characterized in that: Sending a start test instruction to a test application, wherein the start test instruction includes starting the test application to execute a predetermined test case, further comprising: The start test instruction includes a start signal of a test process, wherein the start test instruction includes an operation code for indicating the start of the test process; Constructing a start test message including test process information, wherein the test process information includes a resource number, test parameters, and test sequence of the test case; Sending the start test message to the test application via an internal communication network of the vehicle, wherein the internal communication network includes a MOST bus or an in-vehicle Ethernet of the vehicle; Receive a confirmation message from the test application to confirm readiness and start executing the test process, wherein the confirmation message includes a status code for indicating the current status of the test application.
5. The vehicle automation testing method according to claim 1, characterized in that: Based on a predefined vehicle signal adaptation layer interface, test instructions are sent to the vehicle controller one by one, and execution results are waited for, wherein the test instructions include specific operation requests issued to the vehicle controller, and further include: According to the definition of the vehicle signal adaptation layer interface, construct a test instruction message including a specific operation request for the vehicle controller, wherein the test instruction message includes an operation code for indicating a specific vehicle control operation; Sending the test instruction message to the vehicle controller via a communication network of the vehicle, wherein the communication network includes a LIN bus or a Bluetooth communication module of the vehicle; Receive a response message from the vehicle controller, and parse the response content according to a predefined response format, wherein the response format includes a header, the header includes a response status, a response time, and a payload, and the payload includes data of an operation result; The parsed response content is compared with the expected response value to verify whether the test case passes, wherein the comparison process includes calculating a checksum of the response content and comparing it with a preset checksum to determine the validity of the response.
6. The vehicle automation testing method according to claim 1, characterized in that: Also includes: When the test case fails, recording identification information of the test case and detailed information of the failed vehicle signal interface, wherein the recording includes generating a log file including the test case identification, the failed signal interface identification and a timestamp; Displaying all test exception cases on a vehicle's cockpit display screen, including identification information of the test case, the failed vehicle signal interface, and the failure reason, wherein the display includes generating a list view containing the exception information on a graphical user interface; Send test results and process data to the cloud, including test case execution results, vehicle signal adaptation layer interface response data, and detailed information on test anomalies.
7. A vehicle automated testing system, characterized in that: include: A test connection establishment module, configured to send a test connection request to a target vehicle based on a vehicle identification code, wherein the test connection request includes establishing a session for communicating with the vehicle for sending a test instruction; A freeze instruction sending module, configured to send a freeze instruction to a cockpit native application of the vehicle, wherein the freeze instruction is used to suspend the calling and responding of the native application to the vehicle signal interface; A test case execution module, configured to send a start test instruction to a test application, wherein the start test instruction includes starting the test application to execute a predetermined test case; The test result returning module is configured to send test instructions to the vehicle controller one by one based on a predefined vehicle signal adaptation layer interface and wait for execution results, wherein the test instructions include specific operation requests issued to the vehicle controller.
8. An electronic device, characterized in that: include: A processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the method described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: It stores a computer program executable by an electronic device, and when the computer program runs on the electronic device, the electronic device executes the steps of the method described in any one of claims 1 to 6.
10. A vehicle, characterized in that: The vehicle is provided with the whole vehicle automated testing system as claimed in claim 7.
Citation Information
Patent Citations
Whole vehicle test method and system, electronic equipment and storage medium
CN118259651A