Test method, device, electronic equipment and storage medium of vehicle domain controller
By acquiring the domain controller transmission logs, determining the time interval between the MCU and SOC, and generating a test report, the problem of low efficiency and insufficient accuracy caused by the large amount of data in the testing of domain controllers for autonomous vehicles is solved, and efficient and accurate testing is achieved.
Patent Information
- Application Number
- CN202310207259.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-06
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2043-03-06
AI Technical Summary
Existing technologies face challenges in the system performance testing of domain controllers for autonomous vehicles, including low efficiency and insufficient accuracy in processing large amounts of log data, which affects testing efficiency and accuracy.
By acquiring the transmission logs in the domain controller, the time interval between the microcontroller unit and the system-on-a-chip can be determined, a test report can be generated, the amount of data can be reduced, and the testing efficiency and accuracy can be improved.
By determining the time interval between the MCU sending data to the SOC and the SOC parsing the data to be tested, a test report for the domain controller is generated, reducing testing pressure and improving testing efficiency and accuracy.
Smart Images

Figure CN116088483B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to autonomous driving technology, and in particular to a testing method, device, electronic device, and storage medium for a vehicle domain controller. Background Art
[0002] With the rapid development of autonomous driving technology, cars are equipped with more and more ADAS (Advanced Driving Assistance System) functions. The vehicle domain controller, as the "heart" of the car, ensures the normal use of ADAS functions and directly affects the driving safety of the vehicle.
[0003] Therefore, system performance testing of the domain controller of autonomous vehicles is particularly important. The test of the vehicle domain controller is to check whether there is any delay or data loss in the transmission of the data stream through the generated logs when the domain controller runs for a long time. However, the long-term operation of the system will inevitably generate logs with a large amount of data. Analyzing a large amount of data will affect the testing efficiency of the vehicle domain controller. Summary of the Invention
[0004] The present application provides a vehicle domain controller testing method, device, electronic device, and storage medium to improve the testing efficiency of the vehicle domain controller.
[0005] In a first aspect, the present application provides a method for testing a vehicle domain controller, wherein the domain controller includes a microcontroller unit and a system on a chip, wherein the microcontroller unit is configured to receive test data from the vehicle and send the test data to the system on a chip, wherein the system on a chip is configured to receive the test data sent by the microcontroller unit, parse the test data, and send the parsed test data to a preset vehicle control node; the method includes:
[0006] Obtaining a transmission log generated when the data to be tested is transmitted in the domain controller; wherein the transmission log includes the time when the microcontroller sends the data to be tested to the system on chip, the time when the system on chip receives the data to be tested, and the time when the system on chip sends the parsed data to be tested to the vehicle control node;
[0007] Determining a first time interval and a second time interval based on the transmission log; wherein the first time interval is used to represent the time difference between the time when the microcontroller sends the test data to the system on chip and the time when the system on chip receives the test data, and the second time interval is used to represent the time when the system on chip parses the test data;
[0008] A test report of the domain controller is generated and displayed according to the first time interval and the second time interval.
[0009] In a second aspect, the present application provides a test device for a vehicle domain controller, the domain controller including a microcontroller unit and a system on chip, the microcontroller unit being configured to receive test data from the vehicle and send the test data to the system on chip, the system on chip being configured to receive the test data sent by the microcontroller unit, parse the test data, and send the parsed test data to a preset vehicle control node; including:
[0010] a log acquisition module, configured to acquire a transmission log generated when the test data is transmitted in the domain controller; wherein the transmission log includes the time when the microcontroller sends the test data to the system-on-chip, the time when the system-on-chip receives the test data, and the time when the system-on-chip sends the parsed test data to the vehicle control node;
[0011] an interval determination module, configured to determine a first time interval and a second time interval based on the transmission log; wherein the first time interval is used to represent the time difference between the time when the microcontroller sends the test data to the system-on-chip and the time when the system-on-chip receives the test data, and the second time interval is used to represent the time when the system-on-chip parses the test data;
[0012] A report generating module is used to generate and display a test report of the domain controller according to the first time interval and the second time interval.
[0013] In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;
[0014] The memory stores computer-executable instructions;
[0015] The processor executes the computer-executable instructions stored in the memory to implement the vehicle domain controller testing method as described in the first aspect of the present application.
[0016] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the vehicle domain controller testing method as described in the first aspect of the present application.
[0017] In a fifth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the vehicle domain controller testing method as described in the first aspect of the present application.
[0018] The present application provides a vehicle domain controller testing method, device, electronic device, and storage medium. By obtaining the transmission log generated when the test data is transmitted in the domain controller, two time intervals are determined: the time interval between the MCU (Microcontroller Unit) sending the test data to the SOC (System on Chip) and the SOC receiving the test data, and the time interval between the SOC parsing the test data. Based on the two time intervals, a test report for the domain controller is generated and displayed. By determining the time interval, the required amount of data is reduced, and data that can represent the performance of the domain controller is determined from a large amount of data, reducing the test pressure and improving the test efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0020] Figure 1 A flowchart of a vehicle domain controller testing method provided in an embodiment of the present application;
[0021] Figure 2 A flowchart of a vehicle domain controller testing method provided in an embodiment of the present application;
[0022] Figure 3 A structural block diagram of a vehicle domain controller testing device provided in an embodiment of the present application;
[0023] Figure 4 A structural block diagram of a vehicle domain controller testing device provided in an embodiment of the present application;
[0024] Figure 5 A structural block diagram of an electronic device provided in an embodiment of the present application;
[0025] Figure 6 This is a structural block diagram of an electronic device provided in an embodiment of the present application.
[0026] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION
[0027] In order to make the objectives, technical solutions and advantages of the present application clearer, the embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
[0028] It should be clear that the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0029] When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are merely examples of devices and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0030] In the description of this application, it should be understood that the terms "first", "second", "third", etc. are only used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence, nor can they be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to the specific circumstances. In addition, in the description of this application, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship.
[0031] It should be noted that due to space limitations, this specification does not exhaustively list all optional implementation methods. After reading this specification, those skilled in the art should be able to understand that, as long as the technical features do not contradict each other, any combination of the technical features can constitute an optional implementation method. The following describes each embodiment in detail.
[0032] With the rapid development of autonomous driving technology, vehicles are increasingly equipped with advanced driver assistance systems (ADAS) features. As the "heart" of the vehicle, the vehicle's domain controller (DC) ensures stable and reliable operation, crucial for the proper functioning of ADAS features and, more importantly, for vehicle safety. Therefore, system performance testing of the DCU for autonomous vehicles is crucial. This testing aims to verify data transmission delays and packet loss through logs generated by the controller during extended operation. However, long-term system operation inevitably generates large amounts of log data, necessitating a solution for handling this massive amount of data.
[0033] Performance testing of autonomous driving domain controller systems requires a runtime exceeding 12 hours, generating a large amount of log data. Currently, Excel cannot load all log data. For example, Excel can only load 1.04 million rows of data. This can easily lead to data loss during log loading, resulting in low data processing efficiency and accuracy, which in turn affects the efficiency and accuracy of domain controller testing. Furthermore, analyzing test results using large log volumes can easily lead to data confusion, further impacting test efficiency and accuracy.
[0034] The present application provides a vehicle domain controller testing method, device, electronic device, and storage medium, which aim to solve the above technical problems in the prior art.
[0035] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0036] Figure 1 This is a flow chart of a vehicle domain controller testing method provided in accordance with an embodiment of the present application. The method provided in this embodiment is executed by a vehicle domain controller testing device. The domain controller includes a microcontroller unit and a system on chip. The microcontroller unit is used to receive the vehicle's test data and send the test data to the system on chip. The system on chip is used to receive the test data sent by the microcontroller unit, parse the test data, and send the parsed test data to a preset vehicle control node. Figure 1 As shown, the method includes the following steps:
[0037] S101. Obtain a transmission log generated when the data to be tested is transmitted in the domain controller; wherein the transmission log includes the time when the microcontroller unit sends the data to be tested to the system on chip, the time when the system on chip receives the data to be tested, and the time when the system on chip sends the parsed data to be tested to the vehicle control node.
[0038] Exemplarily, the data to be tested may be data generated during the driving process of the vehicle when the vehicle is tested. The data to be tested may be data during actual driving of the vehicle, or may be simulated data during simulated driving of the vehicle. For example, the data to be tested may be chassis data, camera data, and millimeter-wave radar data of the vehicle. Chassis data may be various vehicle dynamics-related data, such as wheel speed and steering wheel angle. To test the domain controller of the vehicle, it is necessary to transmit the data to be tested in the domain controller to determine whether there are delays and data packet loss in the transmission of the data stream. During the transmission of the data to be tested in the domain controller, a transmission log of the data to be tested may be generated. The transmission log may indicate information such as the transmission time of the data to be tested in the domain controller, the amount of data transmitted, and the name of the data transmitted.
[0039] The domain controller may include an MCU and an SOC. The MCU is used to receive the data to be tested. For example, the data to be tested is simulated data in the form of CAN (Controller Area Network) messages. When testing the system performance of the domain controller, the domain controller can be connected to the computer via a network cable and a PCAN-USB (CAN to USB interface) cable, and a total of 7 CAN messages such as chassis data, smart camera data, and five-way millimeter-wave radar data in the computer are sent to the domain controller, and the MCU side in the domain controller receives the CAN messages. After receiving the data to be tested, the MCU sends the data to be tested to the SOC. The SOC is used to receive the data to be tested sent by the MCU, parse the data to be tested, and publish the parsed data to be tested to a preset vehicle control node. The vehicle control node is an algorithm node that performs automatic driving control on the vehicle. For example, the vehicle control node can control the vehicle to decelerate, accelerate, or stop according to the parsed data.
[0040] The MCU can send the received data to be tested to the SOC in real time or at a scheduled time. For example, the data to be tested can be sent to the SOC in batches. The transmission log may include the amount of data to be tested received by the MCU, the amount of data to be tested received by the SOC, the time when the MCU received the data to be tested, the time when the MCU sent the data to be tested to the SOC, the time when the SOC received the data to be tested, and the time when the SOC sent the parsed data to be tested to the vehicle control node. The time when the MCU sent the data to be tested to the SOC, the time when the SOC received the data to be tested, and the time when the SOC sent the parsed data to be tested to the vehicle control node can be represented in the form of a timestamp. Import the transmission log into Python, use the Pandas library in Python to process and analyze the data in the transmission log, and obtain the test results of the domain controller. Implement data processing using Pandas, and apply Pandas data processing to the performance test of the autonomous driving domain controller.
[0041] S102. Determine a first time interval and a second time interval based on the transmission log; wherein the first time interval is used to represent the time difference between the time when the microcontroller unit sends the test data to the system on chip and the time when the system on chip receives the test data, and the second time interval is used to represent the time when the system on chip parses the test data.
[0042] For example, after obtaining the transmission log, the time when the MCU sends the test data to the SOC, the time when the SOC receives the test data, and the time when the SOC sends the parsed test data to the vehicle control node are obtained from the transmission log. The first time interval is obtained based on the time when the MCU sends the test data to the SOC and the time when the SOC receives the test data; the second time interval is obtained based on the time when the SOC receives the test data and the time when the SOC sends the parsed test data to the vehicle control node. That is, the time when the MCU sends the test data to the SOC and the time when the SOC receives the test data are subtracted, and the difference obtained is the first time interval; the time when the SOC sends the parsed test data to the vehicle control node and the time when the SOC receives the test data are subtracted, and the difference obtained is the second time interval.
[0043] In this embodiment, the transmission log includes a data identifier corresponding to the data to be tested; determining the first time interval and the second time interval based on the transmission log includes: obtaining from the transmission log the time when the microcontroller unit corresponding to the same data identifier sends the data to be tested to the system on chip, the time when the system on chip receives the data to be tested, and the time when the system on chip sends the parsed data to be tested to the vehicle control node; determining the first time interval based on the time when the microcontroller unit corresponding to the same data identifier sends the data to be tested to the system on chip and the time when the system on chip receives the data to be tested, and determining the second time interval based on the time when the system on chip corresponding to the same data identifier receives the data to be tested and the time when the system on chip sends the parsed data to be tested to the vehicle control node.
[0044] Specifically, the domain controller transmits multiple test data, so the transmission log includes information about the multiple test data during transmission. When the MCU sends the test data to the SOC, a unique data identifier is assigned to the test data sent by the MCU. That is, each batch of test data sent by the MCU corresponds to a unique data identifier.
[0045] The transmission log stores the time information of the test data corresponding to each data identifier during the transmission process. This time information may include the time when the MCU sends the test data to the SOC, the time when the SOC receives the test data, and the time when the SOC sends the parsed test data to the vehicle control node. From the transmission log, the time when the MCU sends the test data to the SOC, the time when the SOC receives the test data, and the time when the SOC sends the parsed test data to the vehicle control node for each data identifier is obtained.
[0046] The first time interval for the data identifier is determined based on the time when the MCU sends the test data to the SOC and the time when the SOC receives the test data for the same data identifier. Furthermore, the second time interval for the data identifier is determined based on the time when the SOC receives the test data and the time when the SOC sends the parsed test data to the vehicle control node for the same data identifier. The corresponding first and second time intervals can be calculated for different data identifiers.
[0047] The beneficial effect of this setting is that by recording different data identifiers, the first time interval and the second time interval of each batch of test data sent by the MCU can be calculated, each batch of test data can be distinguished, data confusion can be avoided, and test accuracy can be improved.
[0048] In this embodiment, the time when the microcontroller unit corresponding to the same data identifier sends the data to be tested to the system on chip, the time when the system on chip receives the data to be tested, and the time when the system on chip sends the parsed data to be tested to the vehicle control node are obtained from the transmission log, including: according to a preset keyword query rule, querying from the transmission log the time when the microcontroller unit sends the data to be tested to the system on chip, the time when the system on chip receives the data to be tested, and the time when the system on chip sends the parsed data to be tested to the vehicle control node; dividing the queried time when the microcontroller unit sends the data to be tested to the system on chip, the time when the system on chip receives the data to be tested, and the time when the system on chip sends the parsed data to be tested to the vehicle control node according to the data identifier in the transmission log, to obtain the time when the microcontroller unit corresponding to the same data identifier sends the data to be tested to the system on chip, the time when the system on chip receives the data to be tested, and the time when the system on chip sends the parsed data to be tested to the vehicle control node.
[0049] Specifically, the transmission log can be in the form of a table, where the rows in the table represent the information of each batch of test data during transmission, and the columns in the table represent the categories of information during transmission. For example, the columns of the table may include field categories such as data identifier, MCU working timestamp, and SOC working timestamp. The MCU working timestamp can be the time when the MCU sends the test data to the SOC, and the SOC working timestamp can include the time when the SOC receives the test data and the time when the SOC sends the parsed test data to the vehicle control node. The units of the MCU working timestamp and the SOC working timestamp can be nanoseconds. The columns of the table can also include a keyword field, that is, a column is set as a column under the keyword field, and the keyword is used to filter the data in the table. For example, the field content under the keyword field can be "receive_finish" or "pub_finish", and a keyword query rule is pre-set. The keyword query rule can be to search for data in a column in the row where the keyword "receive_finish" is located. Table 1 is a transmission log table.
[0050] Table 1 Transmission log table
[0051]
[0052] In Table 1, 0 is the default value. The data corresponding to the SOC operating timestamp column in the row containing the keyword "receive_finish" indicates the time when the SOC received the test data. The data corresponding to the SOC operating timestamp column in the row containing the keyword "pub_finish" indicates the time when the SOC sent the parsed test data to the vehicle control node. A preset keyword query rule can query the SOC operating timestamp and MCU operating timestamp in the rows containing the keywords "receive_finish" and "pub_finish" to obtain the time when the MCU sent the test data to the SOC, the time when the SOC received the test data, and the time when the SOC sent the parsed test data to the vehicle control node.
[0053] The first and second rows in Table 1 are information about the same batch of test data during transmission, and the third and fourth rows are information about the same batch of test data during transmission. According to the data identifier in the transmission log, the time when the queried MCU sends the test data to the SOC, the time when the SOC receives the test data, and the time when the SOC sends the parsed test data to the vehicle control node are divided. That is, the time when the MCU with the same data identifier sends the test data to the SOC, the time when the SOC receives the test data, and the time when the SOC sends the parsed test data to the vehicle control node are divided into one group, and the time when the MCU corresponding to the same data identifier sends the test data to the SOC, the time when the SOC receives the test data, and the time when the SOC sends the parsed test data to the vehicle control node are obtained.
[0054] The beneficial effect of this setting is that by performing data query through keywords, the required data can be found from a large amount of data, the amount of data to be calculated can be reduced, and the test efficiency and test accuracy can be improved.
[0055] In this embodiment, according to a preset keyword query rule, the time when the microcontroller unit sends the data to be tested to the system on chip, the time when the system on chip receives the data to be tested, and the time when the system on chip sends the parsed data to be tested to the vehicle control node are queried from the transmission log, including: according to a preset first keyword, querying from the transmission log the time when the microcontroller unit sends the data to be tested to the system on chip and the time when the system on chip receives the data to be tested; according to a preset second keyword, querying from the transmission log the time when the system on chip sends the parsed data to be tested to the vehicle control node.
[0056] Specifically, according to the table of the transmission log, the keywords to be queried are set. For example, the table of the transmission log is shown in Table 1. The time when the SOC receives the data to be tested and the time when the SOC sends the parsed data to be tested to the vehicle control node are divided into the same column of different rows, and the time when the SOC receives the data to be tested and the time when the MCU sends the data to be tested to the SOC are divided into different columns of the same row. The first keyword can be set to "receive_finish" and the second keyword can be set to "pub_finish".
[0057] Using the first keyword, you can find the data in the SOC working timestamp and MCU working timestamp columns in the row where "receive_finish" is located, which serve as the time when the SOC receives the test data and the time when the MCU sends the test data to the SOC. Using the second keyword, you can find the data in the SOC working time column in the row where "pub_finish" is located, which serves as the time when the SOC sends the parsed test data to the vehicle control node.
[0058] The beneficial effect of such a setting is that by setting different keywords, the efficiency and accuracy of data search can be improved, thereby improving the efficiency and accuracy of domain controller testing.
[0059] S103: Generate and display a test report of the domain controller according to the first time interval and the second time interval.
[0060] For example, after obtaining the first and second time intervals, it is possible to determine whether the data stream of the test data experiences delays or other phenomena during transmission, thereby obtaining the test results of the domain controller. For example, if the first and second time intervals are greater than a preset time interval threshold, a delay is determined to exist. A test report is generated based on the test results of the domain controller and displayed. The test report can be in the form of a chart, and Python can be used to automatically draw the chart to obtain the test report. For example, the Python matlibplot library can be used to draw a scatter plot of the first and second time intervals.
[0061] In this embodiment, the transmission log includes data identifiers. When the data identifiers are generated, they are numbered sequentially based on the size of the numbers. Therefore, the maximum and minimum values of the data identifiers can be obtained from the transmission log. Based on the maximum and minimum values of the data identifiers, the total amount of the transmitted data to be tested can be determined. For example, the total amount of the batch of data to be tested can be determined. The number of data identifiers present in the transmission log is then counted, i.e., the number of data to be tested present in the transmission log. If the amount of data to be tested present in the transmission log is less than or equal to the total amount of data to be tested transmitted, for example, if the maximum and minimum values of the data identifiers in the transmission log are 10 and 0, respectively, and there is no row with data identifier 7 in the transmission log, it can be determined that the data to be tested with data identifier 7 has experienced packet loss. Based on the amount of data to be tested present in the transmission log and the total amount of data to be tested transmitted, the packet loss rate of the data to be tested can be determined. For example, the number of data to be tested present in the transmission log is divided by the total amount of data to be tested transmitted to obtain an intermediate value. This intermediate value is then subtracted from 1 to obtain the packet loss rate. The packet loss rate can be written into the test report for display, and Pandas data processing can be applied to the calculation of the system packet loss rate.
[0062] An embodiment of the present application provides a vehicle domain controller testing method. By acquiring the transmission log generated when test data is transmitted within the domain controller, two time intervals are determined: the time interval between when the MCU sends the test data to the SOC and when the SOC receives the test data, and the time interval when the SOC parses the test data. Based on these two time intervals, a domain controller test report is generated and displayed. By determining the time intervals, the required data volume is reduced, and data that can represent the performance of the domain controller can be determined from the large amount of data, reducing testing pressure and improving testing efficiency.
[0063] Figure 2 A flowchart of a method for testing a vehicle domain controller provided in an embodiment of the present application is provided. This embodiment is an optional embodiment based on the above embodiment.
[0064] In this embodiment, a test report of the domain controller is generated based on the first time interval and the second time interval, which can be further refined as follows: based on at least two first time intervals within a preset time period, a test result of the first time interval is determined; wherein the test result includes a maximum value, a minimum value, and an average value; based on at least two second time intervals within the preset time period, a test result of the second time interval is determined; and based on the test result of the first time interval and the test result of the second time interval, a test report of the domain controller is obtained.
[0065] like Figure 2 The method comprises the following steps:
[0066] S201. Obtain a transmission log generated when the data to be tested is transmitted in the domain controller; wherein the transmission log includes the time when the microcontroller unit sends the data to be tested to the system on chip, the time when the system on chip receives the data to be tested, and the time when the system on chip sends the parsed data to be tested to the vehicle control node.
[0067] For example, this step may refer to the above-mentioned step S101 and will not be described in detail.
[0068] S202. Determine a first time interval and a second time interval based on the transmission log; wherein the first time interval is used to represent the time difference between the time when the microcontroller unit sends the test data to the system on chip and the time when the system on chip receives the test data, and the second time interval is used to represent the time when the system on chip parses the test data.
[0069] For example, this step may refer to the above-mentioned step S102 and will not be described in detail.
[0070] S203. Determine a test result of a first time interval according to at least two first time intervals within a preset time period; wherein the test result includes a maximum value, a minimum value, and an average value.
[0071] Exemplarily, transmission logs within a preset time period are obtained, for example, transmission logs generated within 12 hours. Based on the transmission logs within the preset time period, first time intervals and second time intervals corresponding to respective pieces of to-be-tested data within the preset time period are obtained, i.e., multiple first time intervals and multiple second time intervals are obtained.
[0072] Determine the test results of the domain controller within the preset time period based on the multiple first time intervals. The test results may include the maximum value, minimum value, and average value of the first time intervals, that is, the maximum value, minimum value, and average value of the first time intervals may be calculated.
[0073] In this embodiment, the test result of the first time interval is determined based on at least two first time intervals within a preset time period, including: if there is a first time interval greater than a preset first threshold value among the at least two first time intervals within the preset time period, the first time interval greater than the preset first threshold value is screened out as the first abnormal data, and the first time interval less than or equal to the first threshold value is determined as the first target data; and the test result of the first time interval is determined based on the first target data.
[0074] Specifically, a first threshold is pre-set. After obtaining each first time interval within a preset time period, the first time interval is compared with the first threshold to determine whether any first time interval is greater than the first threshold. If any first time interval is greater than the first threshold, the first time interval greater than the preset first threshold is determined as first abnormal data and filtered out. The first abnormal data is then determined as first target data and retained. The maximum, minimum, and average values of the first target data are determined as the test results for the first time interval.
[0075] The beneficial effect of this setting is that, by setting the first threshold, abnormal data is filtered out, for example, abnormal data is data when the domain controller is powered off. The test results of the domain controller when it is operating normally are determined by the first target data, thereby improving the test accuracy of the domain controller.
[0076] S204: Determine a test result of a second time interval according to at least two second time intervals within the preset time period.
[0077] Exemplarily, the transmission logs within a preset time period are obtained, for example, the transmission logs generated within 12 hours are obtained. According to the transmission logs within the preset time period, the second time intervals corresponding to the respective test data within the preset time period are obtained, that is, multiple second time intervals are obtained.
[0078] Determine the test results of the domain controller within the preset time period based on the multiple second time intervals. The test results may include the maximum value, minimum value, and average value of the second time intervals, that is, the maximum value, minimum value, and average value of the second time intervals may be calculated.
[0079] In this embodiment, a test result of the second time interval is determined based on at least two second time intervals within a preset time period, including: if there is a second time interval greater than a preset second threshold value among the at least two second time intervals within the preset time period, the second time interval greater than the preset second threshold value is screened out as second abnormal data, and the second time interval less than or equal to the second threshold value is determined as second target data; and the test result of the second time interval is determined based on the second target data.
[0080] Specifically, a second threshold is pre-set. After obtaining each second time interval within a preset time period, the second time interval is compared with the second threshold to determine whether any second time interval is greater than the second threshold. If any second time interval is greater than the second threshold, the second time interval greater than the preset second threshold is determined as second abnormal data and filtered out. Second time intervals less than or equal to the second threshold are determined as second target data and retained. The maximum, minimum, and average values of the second target data are determined as the test results for the second time interval.
[0081] The beneficial effect of this setting is that, by setting the second threshold, abnormal data can be filtered out, for example, abnormal data is data when the domain controller is powered off. The test results of the domain controller when it is operating normally are determined by the second target data, thereby improving the test accuracy of the domain controller.
[0082] S205: Obtain a test report of the domain controller according to the test results of the first time interval and the test results of the second time interval.
[0083] For example, the maximum, minimum, and average values of the first time interval, as well as the maximum, minimum, and average values of the second time interval, are written into a test report, and the test report is displayed. For example, a scatter plot of the maximum, minimum, and average values can be drawn using Python as a test report. This scatter plot allows users to intuitively see the intervals in which the test results are located, making it easier for users to view.
[0084] In this embodiment, the method further includes: determining the number of first abnormal data and the number of second abnormal data; determining the abnormal probability of the first time interval based on the number of first time intervals and the number of first abnormal data within a preset time period, which is a test result of the first time interval; and determining the abnormal probability of the second time interval based on the number of second time intervals and the number of second abnormal data within the preset time period, which is a test result of the second time interval.
[0085] Specifically, the number of first time intervals and the number of first abnormal data within a preset time period are determined, and a probability of abnormality for the first time interval is determined based on the number of first time intervals and the number of first abnormal data within the preset time period, as a test result for the first time interval. For example, the probability of abnormality for the first time interval is obtained by dividing the number of first abnormal data by the number of first time intervals.
[0086] The number of second time intervals and the number of second abnormal data within the preset time period are determined, and a probability of abnormality of the second time interval is determined based on the number of second time intervals and the number of abnormal data within the preset time period as a test result for the second time interval. For example, the probability of abnormality of the second time interval is obtained by dividing the number of second abnormal data by the number of second time intervals.
[0087] The beneficial effect of such a setting is that the abnormal probability of the time interval is determined, a comprehensive test of the domain controller is achieved, and the test accuracy is improved.
[0088] An embodiment of the present application provides a vehicle domain controller testing method. By acquiring the transmission log generated when test data is transmitted within the domain controller, two time intervals are determined: the time interval between when the MCU sends the test data to the SOC and when the SOC receives the test data, and the time interval when the SOC parses the test data. Based on these two time intervals, a domain controller test report is generated and displayed. By determining the time intervals, the required data volume is reduced, and data that can represent the performance of the domain controller can be determined from the large amount of data, reducing testing pressure and improving testing efficiency.
[0089] Figure 3 This is a structural block diagram of a vehicle domain controller test device provided in an embodiment of the present application. For ease of explanation, only the parts related to the embodiment of the present disclosure are shown. The domain controller includes a microcontroller unit and a system on chip. The microcontroller unit is used to receive the test data of the vehicle and send the test data to the system on chip. The system on chip is used to receive the test data sent by the microcontroller unit, parse the test data, and send the parsed test data to a preset vehicle control node. Figure 3 The device includes: a log acquisition module 301, an interval determination module 302 and a report generation module 303.
[0090] The log acquisition module 301 is configured to acquire a transmission log generated when the test data is transmitted in the domain controller; wherein the transmission log includes the time when the microcontroller sends the test data to the system-on-chip, the time when the system-on-chip receives the test data, and the time when the system-on-chip sends the parsed test data to the vehicle control node;
[0091] An interval determination module 302 is configured to determine a first time interval and a second time interval based on the transmission log; wherein the first time interval is used to represent the time difference between the time when the microcontroller sends the test data to the system-on-chip and the time when the system-on-chip receives the test data, and the second time interval is used to represent the time when the system-on-chip parses the test data;
[0092] The report generating module 303 is configured to generate and display a test report of the domain controller according to the first time interval and the second time interval.
[0093] Figure 4 This is a structural block diagram of a vehicle domain controller test device provided by an embodiment of the present application. The transmission log includes a data identifier corresponding to the data to be tested. Figure 3 Based on the embodiment shown, Figure 4 As shown, the interval determination module 302 includes a time acquisition unit 3021 and an interval calculation unit 3022 .
[0094] A time acquisition unit 3021 is configured to acquire, from the transmission log, the time when the microcontroller corresponding to the same data identifier sends the test data to the system-on-chip, the time when the system-on-chip receives the test data, and the time when the system-on-chip sends the parsed test data to the vehicle control node;
[0095] The interval calculation unit 3022 is used to determine the first time interval based on the time when the microcontroller unit corresponding to the same data identifier sends the test data to the system on chip and the time when the system on chip receives the test data, and to determine the second time interval based on the time when the system on chip corresponding to the same data identifier receives the test data and the time when the system on chip sends the parsed test data to the vehicle control node.
[0096] In one example, the time acquisition unit 3021 includes:
[0097] a keyword query subunit, configured to query, from the transmission log, according to a preset keyword query rule, the time when the microcontroller unit sends the test data to the system-on-chip, the time when the system-on-chip receives the test data, and the time when the system-on-chip sends the parsed test data to the vehicle control node;
[0098] The time division subunit is used to divide the time when the microcontroller sends the data to be tested to the system on chip, the time when the system on chip receives the data to be tested, and the time when the system on chip sends the parsed data to be tested to the vehicle control node according to the data identifier in the transmission log, and obtain the time when the microcontroller sends the data to be tested to the system on chip, the time when the system on chip receives the data to be tested, and the time when the system on chip sends the parsed data to be tested to the vehicle control node corresponding to the same data identifier.
[0099] In one example, the keyword query subunit is specifically used to:
[0100] querying, from the transmission log, the time when the microcontroller unit sends the data to be tested to the system on chip and the time when the system on chip receives the data to be tested, according to a preset first keyword;
[0101] According to the preset second keyword, the time when the system on chip sends the parsed data to be tested to the vehicle control node is queried from the transmission log.
[0102] In one example, the report generation module 303 includes:
[0103] A first result determination unit, configured to determine a test result of the first time interval according to at least two first time intervals within a preset time period; wherein the test result includes a maximum value, a minimum value, and an average value;
[0104] a second result determining unit, configured to determine a test result of the second time interval according to at least two second time intervals within a preset time period;
[0105] A test report determining unit is configured to obtain a test report of the domain controller according to the test result of the first time interval and the test result of the second time interval.
[0106] In one example, the first result determination unit is specifically configured to:
[0107] If there is a first time interval greater than a preset first threshold value among at least two first time intervals within the preset time period, the first time interval greater than the preset first threshold value is filtered out as the first abnormal data, and the first time interval less than or equal to the first threshold value is determined as the first target data;
[0108] A test result of the first time interval is determined according to the first target data.
[0109] In one example, the second result determination unit is specifically configured to:
[0110] If there is a second time interval greater than a preset second threshold value among at least two second time intervals within the preset time period, the second time interval greater than the preset second threshold value is filtered out as second abnormal data, and the second time interval less than or equal to the second threshold value is determined as the second target data;
[0111] A test result of the second time interval is determined according to the second target data.
[0112] In one example, the apparatus further includes:
[0113] an abnormality quantity determination module, configured to determine the quantity of the first abnormal data and the quantity of the second abnormal data;
[0114] a first probability determination module, configured to determine an abnormality probability of the first time interval according to the number of first time intervals and the number of the first abnormal data within a preset time period, which is a test result of the first time interval;
[0115] The second probability determination module is configured to determine the abnormality probability of the second time interval according to the number of the second time intervals and the number of the second abnormal data within a preset time period, which is a test result of the second time interval.
[0116] Figure 5 This is a structural block diagram of an electronic device provided in an embodiment of the present application, such as Figure 5 As shown, the electronic device includes: a memory 51 and a processor 52; the memory 51 is a memory for storing instructions executable by the processor 52.
[0117] The processor 52 is configured to execute the method provided in the above embodiment.
[0118] The electronic device further includes a receiver 53 and a transmitter 54. The receiver 53 is used to receive instructions and data sent by other devices, and the transmitter 54 is used to send instructions and data to external devices.
[0119] Figure 6 This is a block diagram of an electronic device according to an exemplary embodiment. The device may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0120] Device 600 may include one or more of the following components: a processing component 602 , a memory 604 , a power component 606 , a multimedia component 608 , an audio component 610 , an input / output (I / O) interface 612 , a sensor component 614 , and a communication component 616 .
[0121] The processing component 602 generally controls the overall operation of the device 600, such as operations associated with display, phone calls, data communications, camera operation, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 602 may include one or more modules to facilitate interaction between the processing component 602 and other components. For example, the processing component 602 may include a multimedia module to facilitate interaction between the multimedia component 608 and the processing component 602.
[0122] The memory 604 is configured to store various types of data to support operations on the device 600. Examples of such data include instructions for any application or method operating on the device 600, contact data, phone book data, messages, pictures, videos, etc. The memory 604 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.
[0123] The power supply component 606 provides power to the various components of the device 600. The power supply component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device 600.
[0124] The multimedia component 608 includes a screen that provides an output interface between the device 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor can not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 includes a front camera and / or a rear camera. When the device 600 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have a focal length and optical zoom capability.
[0125] The audio component 610 is configured to output and / or input audio signals. For example, the audio component 610 includes a microphone (MIC), which is configured to receive external audio signals when the device 600 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 604 or transmitted via the communication component 616. In some embodiments, the audio component 610 also includes a speaker for outputting audio signals.
[0126] I / O interface 612 provides an interface between processing component 602 and peripheral interface modules, such as a keyboard, click wheel, buttons, etc. These buttons may include but are not limited to: a home button, volume buttons, a start button, and a lock button.
[0127] The sensor assembly 614 includes one or more sensors for providing various aspects of the status assessment of the device 600. For example, the sensor assembly 614 can detect the open / closed state of the device 600, the relative positioning of components, such as the display and keypad of the device 600. The sensor assembly 614 can also detect changes in the position of the device 600 or a component of the device 600, the presence or absence of user contact with the device 600, the orientation or acceleration / deceleration of the device 600, and temperature changes of the device 600. The sensor assembly 614 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 614 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 may also include an accelerometer, a gyroscope, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0128] The communication component 616 is configured to facilitate wired or wireless communication between the device 600 and other devices. The device 600 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 616 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0129] In an exemplary embodiment, the device 600 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0130] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 604 including instructions, which can be executed by the processor 620 of the device 600 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0131] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of a terminal device, enables the terminal device to execute the above-mentioned method for testing a vehicle domain controller of the terminal device.
[0132] The present application also discloses a computer program product, including a computer program, which implements the method described in this embodiment when executed by a processor.
[0133] Various embodiments of the systems and techniques described above in this application can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0134] The program code for implementing the method of the present application can be written in any combination of one or more programming languages. Such program code can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or electronic device.
[0135] In the context of the present application, a machine-readable medium can be a tangible medium that can contain or store a program for use by an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, 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 foregoing.
[0136] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0137] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as data electronics), or a computing system that includes middleware components (e.g., application electronics), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0138] A computer system may include a client and an electronic device. The client and the electronic device are generally remote from each other and typically interact through a communication network. The relationship between the client and the electronic device is established by computer programs running on the corresponding computers and having a client-electronic device relationship with each other. The electronic device may be a cloud electronic device, also known as a cloud computing electronic device or a cloud host, which is a host product in a cloud computing service system. It solves the problems of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The electronic device may also be an electronic device of a distributed system, or an electronic device integrated with a blockchain. It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this application can be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solution disclosed in this application can be achieved. This document does not limit this.
[0139] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0140] It should be understood that the present application is not limited to the exact structure described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A vehicle domain controller testing method, characterized in that: The domain controller includes a microcontroller unit and a system on chip. The microcontroller unit is used to receive the test data of the vehicle and send the test data to the system on chip. The system on chip is used to receive the test data sent by the microcontroller unit, parse the test data, and send the parsed test data to a preset vehicle control node. The method includes: Obtaining a transmission log generated when the test data is transmitted in the domain controller; wherein the transmission log includes the time when the microcontroller sends the test data to the system-on-chip, the time when the system-on-chip receives the test data, the time when the system-on-chip sends the parsed test data to the vehicle control node, and the data identifier corresponding to the test data; Determine a first time interval and a second time interval based on the transmission log; wherein the first time interval is used to represent the time difference between the time when the microcontroller sends the test data to the system on chip and the time when the system on chip receives the test data, and the second time interval is used to represent the time when the system on chip parses the test data; Generate and display a test report of the domain controller according to the first time interval and the second time interval; Obtain the maximum and minimum values of the data identifier from the transmission log, and determine the total batch size of the data to be tested based on the maximum and minimum values of the data identifier; Determine the number of data identifiers in the transmission log, and determine the packet loss rate of the data to be tested based on the number of data identifiers in the transmission log and the total number of batches of the data to be tested, and write the packet loss rate into the test report for display; Generate a test report of the domain controller according to the first time interval and the second time interval, including: Determine a test result of the first time interval based on at least two first time intervals within a preset time period; wherein the test result of the first time interval includes a maximum value, a minimum value, and an average value of the first target data; and the first target data is a first time interval that is less than or equal to a first threshold value; Determine a test result of a second time interval according to at least two second time intervals within a preset time period; the test result of the second time interval includes a maximum value, a minimum value, and an average value of the second target data; the second target data is a first time interval that is less than or equal to a second threshold; A test report of the domain controller is obtained according to the test result of the first time interval and the test result of the second time interval.
2. The method according to claim 1, characterized in that Determining the first time interval and the second time interval according to the transmission log includes: Obtaining from the transmission log the time when the microcontroller unit corresponding to the same data identifier sends the test data to the system-on-chip, the time when the system-on-chip receives the test data, and the time when the system-on-chip sends the parsed test data to the vehicle control node; The first time interval is determined based on the time when the microcontroller unit corresponding to the same data identifier sends the data to be tested to the system on chip and the time when the system on chip receives the data to be tested, and the second time interval is determined based on the time when the system on chip corresponding to the same data identifier receives the data to be tested and the time when the system on chip sends the parsed data to be tested to the vehicle control node.
3. The method according to claim 2, characterized in that Obtaining from the transmission log the time when the microcontroller unit corresponding to the same data identifier sends the test data to the system on chip, the time when the system on chip receives the test data, and the time when the system on chip sends the parsed test data to the vehicle control node, including: According to a preset keyword query rule, query from the transmission log the time when the micro control unit sends the test data to the system on chip, the time when the system on chip receives the test data, and the time when the system on chip sends the parsed test data to the vehicle control node; According to the data identifier in the transmission log, the time when the microcontroller sends the data to be tested to the system on chip, the time when the system on chip receives the data to be tested, and the time when the system on chip sends the parsed data to be tested to the vehicle control node are divided to obtain the time when the microcontroller sends the data to be tested to the system on chip, the time when the system on chip receives the data to be tested, and the time when the system on chip sends the parsed data to be tested to the vehicle control node corresponding to the same data identifier.
4. The method according to claim 3, characterized in that According to a preset keyword query rule, querying from the transmission log the time when the microcontroller unit sends the test data to the system on chip, the time when the system on chip receives the test data, and the time when the system on chip sends the parsed test data to the vehicle control node, including: querying, from the transmission log, the time when the microcontroller unit sends the data to be tested to the system on chip and the time when the system on chip receives the data to be tested, according to a preset first keyword; According to the preset second keyword, the time when the system on chip sends the parsed data to be tested to the vehicle control node is queried from the transmission log.
5. The method according to claim 1, wherein Determining, according to at least two first time intervals within a preset time period, a test result of the first time interval, comprising: If there is a first time interval greater than a preset first threshold value among at least two first time intervals within the preset time period, the first time interval greater than the preset first threshold value is filtered out as the first abnormal data, and the first time interval less than or equal to the first threshold value is determined as the first target data; A test result of the first time interval is determined according to the first target data.
6. The method according to claim 5, characterized in that Determining, according to at least two second time intervals within a preset time period, a test result of each of the second time intervals, including: If there is a second time interval greater than a preset second threshold value among at least two second time intervals within the preset time period, the second time interval greater than the preset second threshold value is filtered out as second abnormal data, and the second time interval less than or equal to the second threshold value is determined as the second target data; A test result of the second time interval is determined according to the second target data.
7. The method according to claim 6, characterized in that The method further comprises: determining the number of the first abnormal data and the number of the second abnormal data; Determine, based on the number of first time intervals and the number of the first abnormal data within a preset time period, an abnormal probability of the first time interval, which is a test result of the first time interval; According to the number of second time intervals and the number of the second abnormal data within the preset time period, the abnormal probability of the second time interval is determined as the test result of the second time interval.
8. A vehicle domain controller testing device, characterized in that: The domain controller includes a microcontroller unit and a system on chip. The microcontroller unit is used to receive the test data of the vehicle and send the test data to the system on chip. The system on chip is used to receive the test data sent by the microcontroller unit, parse the test data, and send the parsed test data to a preset vehicle control node. The device includes: A log acquisition module is used to obtain a transmission log generated when the test data is transmitted in the domain controller; wherein the transmission log includes the time when the microcontroller sends the test data to the system on chip, the time when the system on chip receives the test data, the time when the system on chip sends the parsed test data to the vehicle control node, and the data identifier corresponding to the test data; an interval determination module, configured to determine a first time interval and a second time interval based on the transmission log; wherein the first time interval is used to represent the time difference between the time when the microcontroller unit sends the test data to the system on chip and the time when the system on chip receives the test data, and the second time interval is used to represent the time when the system on chip parses the test data; a report generating module, configured to generate and display a test report of the domain controller according to the first time interval and the second time interval; The log acquisition module is further used to obtain the maximum and minimum values of the data identifier from the transmission log, and determine the total batch size of the data to be tested based on the maximum and minimum values of the data identifier; determine the number of data identifiers present in the transmission log; The report generation module is further used to determine the packet loss rate of the data to be tested based on the number of data identifiers in the transmission log and the total number of batches of the data to be tested, and write the packet loss rate into the test report for display; Report generation module, including: A first result determination unit is configured to determine a test result of a first time interval based on at least two first time intervals within a preset time period; wherein the test result of the first time interval includes a maximum value, a minimum value, and an average value of first target data; and the first target data is a first time interval that is less than or equal to a first threshold value; a second result determination unit, configured to determine a test result of a second time interval based on at least two second time intervals within a preset time period; the test result of the second time interval includes a maximum value, a minimum value, and an average value of the second target data; the second target data is a first time interval that is less than or equal to a second threshold; The test report determining unit is configured to obtain a test report of the domain controller according to the test results of the first time interval and the test results of the second time interval.
9. An electronic device, characterized in that: include: a processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the vehicle domain controller testing method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the vehicle domain controller testing method according to any one of claims 1 to 7.
11. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the vehicle domain controller testing method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Method and device for testing data transmission
CN103856955A
Interface detection method, device and equipment of micro-control unit based on vehicle machine
CN109710525A
A method and a system for testing applet performance
CN109783345A