Vehicle intelligent cockpit log collection method and device
By integrating log collection tools in the test equipment, real-time acquisition and automatic packaging and storage of vehicle logs are achieved, the complex problem of vehicle log collection methods is solved, the efficiency and accuracy of log collection is improved, and the operation steps and security risks are reduced.
Patent Information
- Application Number
- CN202211554569.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-06
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2042-12-06
AI Technical Summary
In the prior art, the methods of collecting vehicle logs are complex and diverse, resulting in the process of vehicle failure repair to consume a lot of human resources, and the operation steps are numerous, which makes it easy to miss key information, which poses safety hazards.
Provide a vehicle intelligent cockpit log collection method and device. By integrating log collection tools in the test equipment, obtaining vehicle log files in real time after starting the test, recording the current time by triggering the switch button, and turning on the thread to open the log files within the specified time period Package, compress and save, reduce operation steps, and realize the encapsulation and one-click completion of log interception.
Improve the accuracy and timeliness of vehicle log collection, reduce the operation difficulty of testers, reduce the cost of testing environment construction, reduce the safety of dynamic testing of real vehicles, ensure the simple and efficient log acquisition, and improve the efficiency of development and problem solving .
Smart Images

Figure CN115993810B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle control technology, and in particular to a vehicle intelligent cockpit log collection method and device. Background Art
[0002] With the rapid development of Internet of Vehicles technology, more and more intelligent controllers are integrated into vehicles, which enrich the driving experience, greatly improve the safety and performance of the car, and enhance the user experience. However, due to the large number of functions integrated into the vehicle system, more vulnerabilities may occur in the system, resulting in a higher probability of vehicle host failure. In order to quickly fix the vulnerabilities, developers need to collect system logs in real time in the vehicle system, and then analyze the collected system logs to find out the cause of the host failure and quickly fix the failure.
[0003] At present, after a vehicle host fails, developers need to go to the actual vehicle to obtain system logs, which not only consumes a lot of human resources, but also requires the cooperation of the car owner, resulting in a more difficult repair process and a poor user experience; secondly, in the prior art, adb tools are generally used to intercept Android-related logs, CAN tools (Vspy, Kavser, CANOE, USBCAN, etc.) are used to collect vehicle bus logs, serial port tools are used to collect QNX logs, driving recorders are used to collect test site videos, and voice recorders are used to collect test site recordings, and the log collection tools are scattered; therefore, the vehicle log collection methods are complex and diverse, and when problems occur, many steps and equipment need to be operated, and key information is easily missed. In addition, when problems are encountered during real vehicle dynamic testing, there are too many operation steps, which can easily lead to safety hazards. Summary of the invention
[0004] The present invention provides a vehicle intelligent cockpit log collection method and device to solve the technical problem of complex and diverse vehicle log collection methods in the prior art, which can reduce the vehicle log collection methods and reduce the difficulty of testers in collecting vehicle logs, thereby improving the accuracy and timeliness of vehicle log collection.
[0005] In order to achieve the above objectives, in a first aspect, an embodiment of the present invention provides a vehicle intelligent cockpit log collection method, comprising:
[0006] After starting the test, start the main thread to obtain the vehicle log file in real time; the vehicle log file includes the vehicle Android system log, the vehicle CAN log, the driving video, the vehicle computer operation video, the synthesized voice audio in the vehicle computer, and the conversation audio between the driver and the passengers in the vehicle space;
[0007] When the switch button is triggered, the power status of the test device at the current time T0 and the calling status of the external interface are determined;
[0008] If the power state is in the power-on state and the external interface has not been called, trigger the switch instruction, call the external interface to record the current time T0; start the first thread, package and compress the vehicle log files obtained in the time period from the start of the test to m minutes after T0, and then close the first thread;
[0009] If the power state is in the power-on state and the external interface has been called, the switch instruction is triggered to call the external interface to record the current time T0; the first thread is started, the vehicle log files acquired within the time period from the last recorded time of the external interface to m minutes after T0 are packaged and compressed for storage, and then the first thread is closed;
[0010] After the test is completed, the saved vehicle log file is exported.
[0011] As an improvement of the above solution, during the time period from opening the first thread to closing the first thread, the main thread keeps acquiring the vehicle log file in real time and will not be interrupted.
[0012] As an improvement of the above solution, the display area of the test device displays the printing status of the vehicle log file and the operating status of the test device in real time.
[0013] As an improvement of the above solution, the triggering of the switch button specifically refers to when a problem occurs in the vehicle after the test starts.
[0014] As an improvement on the above scheme, between the steps of opening the first thread and closing the first thread, it also includes: when the switch button is triggered again, the test device directly triggers the switch instruction, calls the external interface to record the moment T1 of triggering the switch button again; opens the second thread, packages and compresses the vehicle log files obtained in the time period from T0 to T1 and then closes the second thread.
[0015] As an improvement of the above solution, the m minutes is a preset time, where 1≤m≤10.
[0016] In a second aspect, an embodiment of the present invention provides a vehicle intelligent cockpit log collection device, comprising:
[0017] A test start unit is used to start the main thread to obtain the vehicle log file in real time after starting the test; wherein the vehicle log file includes the vehicle Android system log, the vehicle CAN log, the driving video, the vehicle computer operation video, the synthesized voice audio in the vehicle computer, and the conversation audio between the driver and the passengers in the vehicle space;
[0018] The test judgment unit is used to judge the power state of the test device at the current time T0 and the calling status of the external interface when the switch button is triggered;
[0019] The first calling unit is used to trigger a switch instruction if the power state is in the power-on state and the external interface has not been called, call the external interface to record the current time T0; start the first thread, package and compress the vehicle log files obtained in the time period from the start time of the test to m minutes after T0, and then close the first thread;
[0020] The second calling unit is used to trigger the switch instruction if the power state is the power-on state and the external interface has been called, call the external interface to record the current time T0; start the first thread, package and compress the vehicle log files obtained in the time period from the last recorded time of the external interface to m minutes after T0, and then close the first thread;
[0021] The test completion unit is used to export the saved vehicle log file after the test is completed.
[0022] As an improvement of the above solution, the vehicle intelligent cockpit log collection device further includes:
[0023] The third calling unit is used for, when the switch button is triggered again, the test device directly triggers the switch instruction, calls the external interface to record the moment T1 of re-triggering the switch button; starts the second thread, packages and compresses the vehicle log files obtained in the time period from T0 to T1 and then closes the second thread.
[0024] Compared with the prior art, the embodiment of the present invention discloses a vehicle intelligent cockpit log collection method and device. By integrating the vehicle log collection tool into the test equipment, after starting the test, the main thread is started to obtain the vehicle log file in real time. When a problem occurs in the first vehicle test, only the switch button needs to be pressed, and the test equipment will automatically mark the time with the current time, start another thread, delay m minutes, package and compress the vehicle log file from m minutes after the marking time point to the start time of the equipment operation, and then close this thread. When the second problem occurs in the vehicle test, the switch button is pressed again, the test equipment marks the current time, and another thread is started, delay m minutes, and the log, video, and audio from m minutes after the marking time point to the previous marking time of the test equipment are packaged and compressed and saved, and then this thread is closed. After the test is completed, the saved vehicle log file is exported. Therefore, the embodiment of the present invention can realize one-click completion of log interception in the smart cockpit by encapsulating all vehicle log interception methods, thereby improving test efficiency; and there is no need to use a professional environment, which greatly reduces the cost of setting up the test environment; while reducing the operating steps of testers, it reduces the safety of real vehicle dynamic testing and makes log acquisition simple and efficient; it avoids the lack of effective logs in test problems, thereby improving the efficiency of development and problem solving. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 It is a flow chart of a vehicle intelligent cockpit log collection method provided by an embodiment of the present invention;
[0026] Figure 2 It is a structural schematic diagram of a vehicle intelligent cockpit log collection device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0027] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0028] It should be noted that the terms "comprises" and "specifically" and any variations of the present invention are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or inherent to these processes, methods, products or apparatuses.
[0029] See also Figure 1 , Figure 11 is a flow chart of a vehicle intelligent cockpit log collection method provided by an embodiment of the present invention, the vehicle intelligent cockpit log collection method comprises steps S11 to S15:
[0030] S11: After starting the test, start the main thread to obtain the vehicle log file in real time; wherein the vehicle log file includes the vehicle Android system log, the vehicle CAN log, the driving video, the vehicle computer operation video, the synthesized voice audio in the vehicle computer, and the conversation audio between the driver and the passengers in the vehicle space;
[0031] It should be noted that the Android system log mainly saves the logs of the vehicle's Android system when it is running, including the logs of Bluetooth, network and application; the vehicle CAN log mainly saves the CAN communication log when the Android system interacts with the CAN node; the driving video and the vehicle computer operation video mainly record the vehicle condition video outside the vehicle while driving and the video of how the operator operates the vehicle computer screen; the synthesized voice audio in the vehicle computer is mainly the audio file saved by the vehicle computer when the vehicle computer uses voice-related functions;
[0032] S12: When the switch button is triggered, the power state of the test device at the current time T0 and the calling status of the external interface are determined;
[0033] S13: If the power state is in the power-on state and the external interface has not been called, trigger the switch instruction, call the external interface to record the current time T0; start the first thread, package and compress the vehicle log files obtained in the time period from the start of the test to m minutes after T0, and then close the first thread;
[0034] S14: If the power state is on and the external interface has been called, trigger the switch instruction, call the external interface to record the current time T0; start the first thread, package and compress the vehicle log files obtained from the time when the external interface was last recorded to m minutes after T0, and then close the first thread;
[0035] S15: After the test is completed, export the saved vehicle log file.
[0036] It should be noted that the test equipment includes adb interface, OBD interface, serial port interface, radio MIC and camera. Before the test starts, the on-board adb interface, OBD interface and serial port interface of the test equipment are connected to the on-board vehicle computer; the camera is installed and fixed, camera 1 monitors the on-board central control, camera 2 monitors the instrument, and camera 3 monitors the road conditions; the Android ADB tool can be used to intercept the Android system log and the synthesized voice audio in the vehicle computer; the CAN tool is used to connect to the OBD interface on the vehicle to intercept the on-board CAN log; the camera can be used to obtain driving video and vehicle computer operation video; the radio MIC is used to obtain the audio of the conversation between the driver and the passengers in the vehicle space. The test equipment will unify all the ways of obtaining vehicle logs and expose a single interface to the outside. When a problem occurs during the test, just press the switch button of the test equipment and the test equipment will automatically mark the time with the current time. All vehicle logs, videos, and audios will continue to print, and another thread will be opened to package and compress the logs, videos, and audios from m minutes after the marking time to the start time of the equipment operation, and then close this thread. When a problem occurs during the test again, press the switch button again and the equipment will automatically mark the time with the current time. All logs, videos, and audios will continue to print, and another thread will be opened to package and compress the logs, videos, and audios from five minutes after the marking time to the previous marking time of the equipment, and then close this thread. After the test is completed, connect the test equipment to the computer and export the saved log files.
[0037] Specifically, during the time period from opening the first thread to closing the first thread, the main thread keeps acquiring the vehicle log file in real time and will not be interrupted.
[0038] Optionally, the display area of the test device displays the printing status of the vehicle log file and the operating status of the test device in real time.
[0039] Specifically, the triggering of the switch button refers to when a problem occurs in the vehicle after the test starts.
[0040] Furthermore, between the steps of opening the first thread and closing the first thread, it also includes that when the switch button is triggered again, the test device directly triggers the switch instruction, calls the external interface to record the moment T1 of triggering the switch button again; opens the second thread, packages and compresses the vehicle log files obtained in the time period from T0 to T1 and then closes the second thread.
[0041] Specifically, the m minutes is a preset time, where 1≤m≤10.
[0042] In the specific implementation, when the test starts, press the switch to run the test equipment, that is, Start&Press. At this time, the program will record the Start time point, which is described here as: StartTime; when problem A occurs, press the Get Log button, that is, Problem A&Press. At this time, the program will start thread 1, and will record the Problem A&Press time point, which is described here as Problem A&PressTime, and then will start to package and compress all logs from StartTime to m minutes after Problem A&PressTime for storage, and close this thread after completion; the m minutes here can be flexibly configured from 1 to 10 minutes; in addition, when problem B occurs, press the Get Log button, that is, Problem B&Press. At this time, the program will start thread 1 again, and will record the Problem B&Press time point, which is described here as Problem B&PressTime, and then will start to package and compress all logs from Problem A&PressTime to m minutes after Problem B&PressTime for storage, and close this thread after completion; the m minutes here can also be flexibly configured from 1 to 10 minutes.
[0043] In another case, when thread 1 is still working, problem B occurs. At this time, while thread 1 continues to work, thread 2 will be started, and then all logs from problem A&PressTime to m minutes after problem B&PressTime will be packaged and compressed for storage, and the thread will be closed after completion. That is, when multiple problems occur concurrently during vehicle testing, multiple threads can be started to package and compress all logs for storage, ensuring the integrity of vehicle log collection and no missing key information.
[0044] It should be noted that the printing of vehicle logs takes time. If the logs are truncated and packaged at the time when the problem occurs, the logs may not be printed yet, resulting in the developer being unable to analyze the problem. Therefore, it is necessary to set a waiting time to ensure the integrity of the log interception. In addition, many problem developers need to analyze the logs after the problem occurs, so the waiting time m can be manually configured, which can more flexibly ensure the integrity of the log interception in various scenarios and facilitate developer problem analysis.
[0045] See also Figure 2 , Figure 2 : is a structural schematic diagram of a vehicle intelligent cockpit log collection device provided by an embodiment of the present invention, the vehicle intelligent cockpit log collection device comprising:
[0046] The test start unit 21 is used to start the main thread to obtain the vehicle log file in real time after starting the test; wherein the vehicle log file includes the vehicle Android system log, the vehicle CAN log, the driving video, the vehicle computer operation video, the synthesized voice audio in the vehicle computer, and the conversation audio between the driver and the passengers in the vehicle space;
[0047] The test judgment unit 22 is used to judge the power state of the test device at the current time T0 and the calling status of the external interface when the switch button is triggered;
[0048] The first calling unit 23 is used to trigger a switch instruction if the power state is in the power-on state and the external interface has not been called, call the external interface to record the current time T0; start the first thread, package and compress the vehicle log files obtained in the time period from the start time of the test to m minutes after T0, and then close the first thread;
[0049] The second calling unit 24 is used to trigger the switch instruction if the power state is the power-on state and the external interface has been called, call the external interface to record the current time T0; start the first thread, package and compress the vehicle log files obtained in the time period from the last recorded time of the external interface to m minutes after T0, and then close the first thread;
[0050] The test completion unit 25 is used to export the saved vehicle log file after the test is completed.
[0051] Furthermore, the vehicle intelligent cockpit log collection device further includes:
[0052] The third calling unit is used for, when the switch button is triggered again, the test device directly triggers the switch instruction, calls the external interface to record the moment T1 of re-triggering the switch button; starts the second thread, packages and compresses the vehicle log files obtained in the time period from T0 to T1 and then closes the second thread.
[0053] A vehicle intelligent cockpit log collection device provided by an embodiment of the present invention can implement all processes of the vehicle intelligent cockpit log collection method of the above-mentioned embodiment. The functions of each module in the device and the technical effects achieved are respectively the same as the functions and technical effects achieved by the vehicle intelligent cockpit log collection method of the above-mentioned embodiment, and will not be repeated here.
[0054] In summary, the embodiment of the present invention discloses a vehicle intelligent cockpit log collection method and device. By integrating the vehicle log collection tool into the test equipment, after starting the test, the main thread is started to obtain the vehicle log file in real time. When a problem occurs in the first vehicle test, only the switch button needs to be pressed, and the test equipment will automatically mark the time with the current time, start another thread, delay m minutes, and package and compress the vehicle log file from m minutes after the marking time point to the start time of the equipment operation, and then close this thread. When the second problem occurs in the vehicle test, the switch button is pressed again, the test equipment marks the current time, and another thread is started, and the delay is m minutes. The log, video, and audio from m minutes after the marking time point to the previous marking time of the test equipment are packaged and compressed and saved, and then this thread is closed. After the test is completed, the saved vehicle log file is exported. Therefore, the embodiment of the present invention can realize one-click log interception in the smart cockpit by encapsulating all vehicle log interception methods, thereby improving test efficiency; and there is no need to use a professional environment, which greatly reduces the cost of setting up the test environment; while reducing the operating steps of testers, it reduces the safety of real vehicle dynamic testing and makes vehicle log acquisition simple and efficient; it avoids the lack of effective logs in test problems, thereby improving the efficiency of development and problem solving.
[0055] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A vehicle intelligent cockpit log collection method, characterized in that: include: After starting the test, start the main thread to obtain vehicle log files in real time; The vehicle log files include the vehicle Android system log, the vehicle CAN log, driving video, vehicle computer operation video, synthesized voice audio in the vehicle computer, and the conversation audio between the driver and passengers in the vehicle space; When the switch button is triggered, the power status of the test device at the current time T0 and the call status of the external interface are determined; If the power state is on and the external interface has not been called, trigger a switch instruction to call the external interface to record the current time T0; start a first thread, compress and save the vehicle log files obtained from the time when the test starts to m minutes after T0, and then close the first thread; If the power state is on and the external interface has been called, the switch instruction is triggered to call the external interface to record the current time T0; the first thread is started, the vehicle log files obtained from the time last recorded by the external interface to the time period m minutes after T0 are packaged and compressed and saved, and the first thread is closed; After the test is completed, the saved vehicle log file is exported.
2. The vehicle intelligent cockpit log collection method according to claim 1, characterized in that: During the time period from opening the first thread to closing the first thread, the main thread keeps acquiring the vehicle log file in real time and will not be interrupted.
3. The vehicle intelligent cockpit log collection method according to claim 1, characterized in that: The display area of the test device displays the printing status of the vehicle log file and the operating status of the test device in real time.
4. The vehicle intelligent cockpit log collection method according to claim 1, characterized in that: The triggering of the switch button specifically refers to when a problem occurs with the vehicle after the test begins.
5. The vehicle intelligent cockpit log collection method according to claim 1, characterized in that: Between the steps of opening the first thread and closing the first thread, it also includes: when the switch button is triggered again, the test device directly triggers the switch instruction, calls the external interface to record the time T1 when the switch button is triggered again; opens the second thread, packages and compresses the vehicle log files obtained in the time period from T0 to T1 and then closes the second thread.
6. The vehicle intelligent cockpit log collection method according to any one of claims 1 to 5, characterized in that: The m minutes is a preset time, where 1≤m≤10.
7. A vehicle intelligent cockpit log collection device, characterized in that: include: The test start unit is used to start the main thread to obtain the vehicle log file in real time after the test starts; The vehicle log files include the vehicle Android system log, the vehicle CAN log, driving video, vehicle computer operation video, synthesized voice audio in the vehicle computer, and the conversation audio between the driver and passengers in the vehicle space; The test judgment unit is used to judge the power status of the test device at the current time T0 and the call status of the external interface when the switch button is triggered; The first calling unit is configured to, if the power state is on and the external interface has not been called, trigger a switch instruction to call the external interface to record the current time T0; start a first thread, package and compress the vehicle log files obtained within a period from the start of the test to m minutes after T0, and then close the first thread; The second calling unit is configured to, if the power state is on and the external interface has been called, trigger the switch instruction, call the external interface to record the current time T0; start the first thread, package and compress the vehicle log files obtained within the time period from the last recorded time of the external interface to m minutes after T0, and then close the first thread; The test completion unit is used to export the saved vehicle log file after the test is completed.
8. The vehicle intelligent cockpit log collection device according to claim 7, characterized in that: Also includes: The third calling unit is used to, when the switch button is triggered again, cause the test device to directly trigger the switch instruction and call the external interface to record the moment T1 of re-triggering the switch button; start the second thread, package and compress the vehicle log files obtained in the time period from T0 to T1 and then m minutes later, and then close the second thread.
