Data testing method and device, electronic equipment and storage medium

By using a preset script algorithm to identify E2E messages and query the preset cyclic redundancy check code table to obtain the check code, the problem of low testing efficiency in the existing technology is solved and a more efficient testing process is achieved.

CN120034288APending Publication Date: 2025-05-23BEIJING CO WHEELS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311559344.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-21
Publication Date
2025-05-23

AI Technical Summary

Technical Problem

The existing E2E cyclic redundant check code testing methods are less efficient when filtering E2E messages and calculating cyclic redundant check codes, resulting in a long test time.

Method used

The E2E message is identified through the preset script algorithm through the vehicle communication matrix, and the cyclic redundant bit value is queried based on the preset cyclic redundant check code table to obtain the check code, reducing the need for multiple iterations of online calculations.

Benefits of technology

It improves the testing efficiency of E2E cyclic redundant verification code test, shortens the testing time, and improves the speed and accuracy of identification and calculation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120034288A_ABST
    Figure CN120034288A_ABST
Patent Text Reader

Abstract

The invention discloses a data testing method and device, electronic equipment and a storage medium, and relates to the technical field of vehicles, a whole vehicle communication matrix is traversed through a preset script algorithm, all E2E messages contained in the whole vehicle communication matrix are identified, and compared with manual analysis and screening of the messages one by one in the prior art, the data testing efficiency is improved. The effect of automatically traversing and identifying the E2E message based on the script algorithm is higher, and the time is shorter. Identification objects are all E2E messages contained in the whole vehicle communication matrix, the identification efficiency is high, and the whole vehicle globality is achieved. When the cyclic redundancy check code of the E2E message is obtained, the cyclic redundancy check code can be obtained only by looking up the cyclic redundancy bit value corresponding to the message data at the specified position in the E2E message in a manner of querying the preset cyclic redundancy check code table without performing repeated iteration online calculation on the characteristic value corresponding to the data in the E2E message. The efficiency of table look-up is much higher than that of online calculation. In conclusion, the test efficiency of the E2E cyclic redundancy check code test is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of vehicle technology, and in particular to a data testing method and device, an electronic device, and a storage medium. Background Art

[0002] The E2E (End-to-End) cyclic redundancy check code test method is a test method used to verify whether the entire process of a system or application works as expected.

[0003] The current E2E cyclic redundancy check code test method can only manually analyze and screen the E2E messages one by one when screening out the E2E messages from the whole vehicle messages. This method of screening out the E2E messages from a large number of whole vehicle messages is time-consuming and labor-intensive, resulting in low test efficiency. After the E2E messages are screened out, when performing the E2E cyclic redundancy check code test, it is necessary to perform multiple iterative online calculations on the characteristic values ​​corresponding to the data in the E2E messages to obtain the cyclic redundancy check code. The iterative online calculation takes a long time, resulting in a long time to obtain the cyclic redundancy check code, which makes the E2E cyclic redundancy check code test efficiency low. Summary of the invention

[0004] The present disclosure provides a data testing method, device, electronic device and storage medium, the main purpose of which is to improve the test efficiency of E2E cyclic redundancy check code testing.

[0005] According to a first aspect of the present disclosure, there is provided a data testing method, comprising:

[0006] Traversing the vehicle communication matrix through a preset script algorithm, identifying all E2E messages contained in the vehicle communication matrix, wherein the E2E messages carry a standard cyclic redundancy check code;

[0007] Based on a cyclic redundancy check algorithm and a method of querying a preset cyclic redundancy check code table, a cyclic redundancy check process is performed on a cyclic redundancy bit value corresponding to the message data at a specified position in the E2E message to obtain a first cyclic redundancy check code corresponding to the bit value at the specified position in the E2E message, wherein the preset cyclic redundancy check code table includes a correspondence between cyclic redundancy bit values ​​and cyclic redundancy check codes;

[0008] Searching the E2E message parameter table for a second cyclic redundancy check code corresponding to the E2E message ID according to the message ID of the E2E message; wherein the E2E message parameter table contains a correspondence between the message ID and the cyclic redundancy check code;

[0009] According to the cyclic redundancy check algorithm, the first cyclic redundancy check code and the second cyclic redundancy check code are calculated to obtain a cyclic redundancy target bit value;

[0010] According to the cyclic redundancy target bit value, the preset cyclic redundancy check code table is searched to determine the target cyclic redundancy check code corresponding to the target bit value;

[0011] The target cyclic redundancy check code is compared with the standard cyclic redundancy check code, and a test result table is generated according to the comparison result.

[0012] Optionally, the performing cyclic redundancy check processing on the cyclic redundancy bit value corresponding to the message data at the specified position in the E2E message based on the manner of querying a preset cyclic redundancy check code table to obtain the first cyclic redundancy check code corresponding to the E2E message includes:

[0013] In units of bytes and in byte order, the first byte of the message data at the specified position in the E2E message and the preset initial table lookup bit value are input into a cyclic redundancy check algorithm for calculation to obtain a first table lookup bit value;

[0014] According to the first table lookup bit value, the preset cyclic redundancy check code table is searched to obtain a second cyclic redundancy check code;

[0015] Input the second cyclic redundancy check code and the second byte of the message data at the specified position into the cyclic redundancy check algorithm for calculation to obtain a second table lookup bit value;

[0016] Repeat the above steps. After the number of executions of the above steps reaches a preset number threshold, end the iterative calculation and use the cyclic redundancy check code obtained by the last table lookup as the first cyclic redundancy check code corresponding to the E2E message; wherein the preset number threshold is determined according to the number of bytes of the message data at the specified position.

[0017] Optionally, before searching the preset cyclic redundancy check code table according to the cyclic redundancy target bit value to determine a target cyclic redundancy check code corresponding to the cyclic redundancy target bit value, the method further includes:

[0018] Performing a cyclic redundancy check calculation on cyclic redundancy bit values ​​within a preset numerical range to obtain a cyclic redundancy check code corresponding to each of the cyclic redundancy bit values;

[0019] The cyclic redundancy bit value and the cyclic redundancy check code corresponding to the cyclic redundancy bit value are respectively saved in the preset cyclic redundancy check code table.

[0020] Optionally, the method further includes:

[0021] When the vehicle communication matrix is ​​traversed by a preset script algorithm and all E2E messages contained in the vehicle communication matrix are identified, a rolling counter value of each E2E message is obtained respectively;

[0022] According to the rolling counter value of each of the E2E messages, obtain the E2E DataIDList corresponding to the E2E messages from the E2E specification respectively;

[0023] The message ID, name, and E2E DataIDList of each of the E2E messages are combined into E2E message parameters;

[0024] The composed E2E message parameters are stored in the E2E message parameter table.

[0025] Optionally, after storing the composed E2E message parameters into the E2E message parameter table, the method further includes:

[0026] Each E2E message parameter in the E2E message parameter table is numbered and linked list processed using a hash algorithm, so that the E2E message parameter can be quickly queried and acquired through the hash algorithm.

[0027] Optionally, the method further includes:

[0028] When it is detected that an E2E message is received, based on a HASH algorithm, the E2E message parameter table is queried according to the ID of the E2E message to obtain the E2E DataIDList of the received E2E message.

[0029] According to a second aspect of the present disclosure, there is provided a data testing device, comprising:

[0030] A first acquisition unit is used to traverse the vehicle communication matrix through a preset script algorithm to identify all E2E messages contained in the vehicle communication matrix, wherein the E2E messages carry a standard cyclic redundancy check code;

[0031] a check unit, configured to perform a cyclic redundancy check on a cyclic redundancy bit value corresponding to the message data at a specified position in the E2E message by querying a preset cyclic redundancy check code table to obtain a first cyclic redundancy check code corresponding to the E2E message, wherein the preset cyclic redundancy check code table includes a correspondence between cyclic redundancy bit values ​​and cyclic redundancy check codes;

[0032] A search unit, configured to search the E2E message parameter table for a second cyclic redundancy check code corresponding to the E2E message ID according to the message ID of the E2E message; wherein the E2E message parameter table contains a correspondence between the message ID and the second cyclic redundancy check code;

[0033] A first calculation unit, configured to calculate the first cyclic redundancy check code and the second cyclic redundancy check code according to the cyclic redundancy check algorithm to obtain a target bit value;

[0034] a determining unit, configured to calculate the first cyclic redundancy check code and the second cyclic redundancy check code according to the cyclic redundancy check algorithm to obtain a target cyclic redundancy bit value;

[0035] The generating unit is used to query the preset cyclic redundancy check code table according to the cyclic redundancy target bit value to determine the target cyclic redundancy check code corresponding to the target cyclic redundancy bit value.

[0036] Optionally, the verification unit is further used for:

[0037] In units of bytes and in byte order, the first byte of the message data at the specified position in the E2E message and the preset initial table lookup bit value are input into a cyclic redundancy check algorithm for calculation to obtain a first table lookup bit value;

[0038] Query the preset cyclic redundancy check code table according to the first table lookup bit value to obtain a second cyclic redundancy check code;

[0039] Input the second cyclic redundancy check code and the second byte of the message data at the specified position into the cyclic redundancy check algorithm for calculation to obtain a second table lookup bit value;

[0040] Repeat the above steps. After the number of executions of the above steps reaches a preset number threshold, end the iterative calculation and use the cyclic redundancy check code obtained by the last table lookup as the first cyclic redundancy check code corresponding to the E2E message; wherein the preset number threshold is determined according to the number of bytes of the message data at the specified position.

[0041] Optionally, the device further comprises:

[0042] A second calculation unit is used for performing cyclic redundancy check calculation on cyclic redundancy bit values ​​in a preset numerical range to obtain cyclic redundancy check codes corresponding to each of the cyclic redundancy bit values ​​before the first calculation unit queries the preset cyclic redundancy check code table according to the cyclic redundancy target bit value to determine a target cyclic redundancy check code corresponding to the cyclic redundancy target bit value;

[0043] The storage unit is used to store the cyclic redundancy bit value and the cyclic redundancy check code corresponding to the cyclic redundancy bit value in the preset cyclic redundancy check code table respectively.

[0044] Optionally, the device further comprises:

[0045] A second acquisition unit is used to respectively acquire a rolling counter value of each E2E message when acquiring the E2E message from the vehicle communication matrix information;

[0046] An extraction unit, configured to obtain, from the E2E specification, the E2E DataIDList corresponding to each of the E2E messages according to the rolling counter value of each of the E2E messages;

[0047] An assembling unit, used for assembling the message ID, name, and E2E DataIDList of each of the E2E messages into E2E message parameters;

[0048] The storage unit is used to store the composed E2E message parameters into the E2E message parameter table.

[0049] Optionally, the device further comprises:

[0050] The numbering unit is used to number each E2E message parameter in the E2E message parameter table and use a hash algorithm to perform linked list processing so as to quickly query and obtain the E2E message parameters through the hash algorithm.

[0051] Optionally, the device further comprises:

[0052] The third acquisition unit is configured to, when detecting that an E2E message is received, query the E2E message parameter table according to the ID of the E2E message based on a HASH algorithm to acquire the E2E DataIDList of the received E2E message.

[0053] According to a third aspect of the present disclosure, there is provided an electronic device, including:

[0054] at least one processor; and

[0055] a memory communicatively connected to the at least one processor; wherein,

[0056] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the first aspect.

[0057] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method described in the first aspect.

[0058] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method as described in the first aspect above.

[0059] The present disclosure provides a data testing method, device, electronic device and storage medium, the main technical scheme of which includes: traversing a vehicle communication matrix through a preset script algorithm to identify all E2E messages contained in the vehicle communication matrix, wherein the E2E messages carry a standard cyclic redundancy check code; performing cyclic redundancy check processing on the cyclic redundancy bit value corresponding to the message data at a specified position in the E2E message by querying a preset cyclic redundancy check code table to obtain a first cyclic redundancy check code corresponding to the E2E message, wherein the preset cyclic redundancy check code table contains a correspondence between cyclic redundancy bit values ​​and cyclic redundancy check codes; and determining the corresponding relationship between the cyclic redundancy bit value and the cyclic redundancy check code according to the E2E message. The message ID searches the E2E message parameter table for the second cyclic redundancy check code corresponding to the E2E message ID; wherein the E2E message parameter table contains the correspondence between the message ID and the cyclic redundancy check code; according to the cyclic redundancy check algorithm, the first cyclic redundancy check code and the second cyclic redundancy check code are calculated to obtain the target cyclic redundancy bit value; according to the cyclic redundancy target bit value, the preset cyclic redundancy check code table is queried to determine the target cyclic redundancy check code corresponding to the target cyclic redundancy bit value; the target cyclic redundancy check code is compared with the standard cyclic redundancy check code, and a test result table is generated according to the comparison result. Compared with the related art, the embodiment of the present application traverses the whole vehicle communication matrix through a preset script algorithm to identify all E2E messages contained in the whole vehicle communication matrix. Compared with the manual analysis and screening of messages one by one in the prior art, the automatic traversal and identification of E2E messages based on the script algorithm is more effective and takes less time. Moreover, the object of recognition is not a message, or a message of an ECU, but all E2E messages contained in the vehicle communication matrix. It not only has high recognition efficiency, but also has the global nature of the entire vehicle. In addition, when obtaining the cyclic redundancy check code of the E2E message, the corresponding cyclic redundancy check code is obtained by querying the preset cyclic redundancy check code table. There is no need to perform multiple iterations of online calculations on the characteristic values ​​corresponding to the data in the E2E message. It is only necessary to look up the cyclic redundancy bit value corresponding to the message data at the specified position in the E2E message to obtain the cyclic redundancy check code. The table lookup is much faster than the online calculation. In summary, the present application greatly improves the test efficiency of the E2E cyclic redundancy check code test.

[0060] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0062] Figure 1A flowchart of a data testing method provided by an embodiment of the present disclosure;

[0063] Figure 2 A flowchart of another data testing method provided by an embodiment of the present disclosure;

[0064] Figure 3 A schematic diagram of the structure of a data testing device provided in an embodiment of the present disclosure;

[0065] Figure 4 A schematic diagram of the structure of another data testing device provided by an embodiment of the present disclosure;

[0066] Figure 5 A schematic block diagram of an exemplary electronic device provided for an embodiment of the present disclosure. DETAILED DESCRIPTION

[0067] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0068] The data testing method, device, electronic device, and storage medium of the embodiments of the present disclosure are described below with reference to the accompanying drawings.

[0069] Figure 1 A flowchart of a data testing method provided in an embodiment of the present disclosure.

[0070] like Figure 1 As shown, the method comprises the following steps:

[0071] Step 101, traverse the vehicle communication matrix through a preset script algorithm to identify all E2E messages contained in the vehicle communication matrix, wherein the E2E messages carry a standard cyclic redundancy check code.

[0072] It should be noted here in the embodiments of the present disclosure that when obtaining E2E messages, in order to quickly obtain E2E messages from the vehicle communication matrix information, a script file can be set for automatic query and acquisition, such as using a Python script to automatically extract E2E messages from the CAN communication matrix, or using his script to implement it. Specifically, the embodiments of the present disclosure are not limited to this.

[0073] Among them, the E2E messages obtained in the embodiments of the present disclosure all carry a calculated cyclic redundancy check code, namely a standard cyclic redundancy check code, which is used to check the target cyclic redundancy check code obtained in this embodiment, so as to determine whether there is an error in the transmission process of the E2E message.

[0074] Step 102, based on the method of querying a preset cyclic redundancy check code table, a cyclic redundancy check is performed on the cyclic redundancy bit value corresponding to the message data at the specified position in the E2E message to obtain a first cyclic redundancy check code corresponding to the E2E message, and the preset cyclic redundancy check code table contains the correspondence between cyclic redundancy bit values ​​and cyclic redundancy check codes.

[0075] In one implementable manner of an embodiment of the present application, the bit value to be calculated is set in advance, and the bit value at a specified position in E2E can be set as the bit value to be calculated. Specifically, it can be set according to actual needs, and the embodiment of the present application does not limit this.

[0076] The cyclic redundancy check algorithm is a checksum algorithm used to detect errors in data transmission. It generates a checksum by performing an XOR operation on the data and a predefined polynomial. In this method, we use the cyclic redundancy check algorithm to check the target E2E message. According to the bit value at the specified position of the message, it is input into the cyclic redundancy check algorithm and an XOR operation is performed. By gradually processing each bit in the message, the final cyclic redundancy check code is calculated.

[0077] Step 103: search the E2E message parameter table for the second cyclic redundancy check code corresponding to the E2E message ID according to the message ID of the E2E message; wherein the E2E message parameter table contains the correspondence between the message ID and the cyclic redundancy check code.

[0078] Since different E2E messages correspond to different E2E message parameters, the required parameters can be uniquely determined by the message ID; after finding the corresponding E2E message parameters, the second cyclic redundancy check code can be obtained from the parameters. This value is pre-defined and is used to verify whether an error or data corruption occurs during the transmission of the E2E message; find the corresponding E2E message parameters according to the message ID, and then extract the second cyclic redundancy check code from the parameters to get the required result.

[0079] Step 104: Calculate the first cyclic redundancy check code and the second cyclic redundancy check code according to the cyclic redundancy check algorithm to obtain a target cyclic redundancy bit value.

[0080] The first cyclic redundancy check code and the second cyclic redundancy check code are input into the CRC algorithm for calculation. The CRC algorithm generates a check code by performing an XOR operation on the first cyclic redundancy check code and the second cyclic redundancy check code. According to the calculation result of the CRC algorithm, the check code is compared with a preset cyclic redundancy check code table. By looking up the table, the target cyclic redundancy check code can be determined.

[0081] Step 105: query the preset cyclic redundancy check code table according to the cyclic redundancy target bit value to determine a target cyclic redundancy check code corresponding to the target cyclic redundancy bit value.

[0082] By inputting the first cyclic redundancy check code and the second cyclic redundancy check code into the CRC algorithm for calculation, and looking up the code in the preset cyclic redundancy check code table, a target cyclic redundancy check code can be obtained. This target cyclic redundancy check code can be used to verify whether an error or data corruption occurs during the transmission of the E2E message. The preset cyclic redundancy check code table is a table containing the correspondence between bit values ​​and cyclic redundancy check codes, which records the cyclic redundancy check code corresponding to each bit value; the preset cyclic redundancy check code table is calculated in advance, which is convenient for reducing the time required for calculation in actual use.

[0083] Step 106: compare the target cyclic redundancy check code with the standard cyclic redundancy check code, and generate a test result table according to the comparison result.

[0084] In one implementable method of the embodiment of the present application, the standard cyclic redundancy check code is extracted from the E2E message, and the target cyclic redundancy check code is compared with the standard cyclic redundancy check code. If the two check codes are the same, it means that there is no error in the data transmission; if the two check codes are different, it means that there is an error in the data transmission.

[0085] When comparing the first cyclic redundancy check code with the second cyclic redundancy check code, it is necessary to ensure that the data type of the second cyclic redundancy check code obtained matches that of the first cyclic redundancy check code; such as binary or decimal; according to the result of the comparison, it can be determined whether the check passes or fails, and a test result table is generated according to the result of the comparison. The test result table can be a two-dimensional array, each element of which represents a bit value, a first cyclic redundancy check code, a second cyclic redundancy check code, and a test result. According to the comparison result, the corresponding value is filled into the test result table. The test result can be represented by a Boolean value, a number, or other data type. Specifically, the embodiment of the present application does not limit this.

[0086] The present disclosure provides a data testing method, the main technical scheme of which includes: traversing a vehicle communication matrix through a preset script algorithm to identify all E2E messages contained in the vehicle communication matrix, wherein the E2E messages carry a standard cyclic redundancy check code; performing cyclic redundancy check processing on the cyclic redundancy bit value corresponding to the message data at a specified position in the E2E message by querying a preset cyclic redundancy check code table to obtain a first cyclic redundancy check code corresponding to the E2E message, wherein the preset cyclic redundancy check code table contains a correspondence between cyclic redundancy bit values ​​and cyclic redundancy check codes; and performing a cyclic redundancy check on the E2E message according to the message ID of the E2E message. The E2E message parameter table searches for the second cyclic redundancy check code corresponding to the E2E message ID; wherein the E2E message parameter table contains the correspondence between the message ID and the cyclic redundancy check code; according to the cyclic redundancy check algorithm, the first cyclic redundancy check code and the second cyclic redundancy check code are calculated to obtain the target cyclic redundancy bit value; according to the cyclic redundancy target bit value, the preset cyclic redundancy check code table is queried to determine the target cyclic redundancy check code corresponding to the target cyclic redundancy bit value; the target cyclic redundancy check code is compared with the standard cyclic redundancy check code, and a test result table is generated according to the comparison result. Compared with the related art, the embodiment of the present application traverses the whole vehicle communication matrix through a preset script algorithm to identify all E2E messages contained in the whole vehicle communication matrix. Compared with the manual analysis and screening of messages one by one in the prior art, the automatic traversal based on the script algorithm to identify the E2E message is more effective and takes less time. Moreover, the identification object is not a message, or a message of an ECU, but all E2E messages contained in the whole vehicle communication matrix, which not only has high recognition efficiency, but also has the globality of the whole vehicle. In addition, when obtaining the cyclic redundancy check code of the E2E message, the corresponding cyclic redundancy check code is obtained by querying the preset cyclic redundancy check code table. There is no need to perform multiple iterations of online calculations on the characteristic values ​​corresponding to the data in the E2E message. It is only necessary to look up the cyclic redundancy bit value corresponding to the message data at the specified position in the E2E message to obtain the cyclic redundancy check code. The table lookup is much more efficient than online calculation. In summary, this application greatly improves the test efficiency of the E2E cyclic redundancy check code test.

[0087] In an implementable manner of the embodiment of the present application, in executing step 102, a cyclic redundancy check is performed on the bit value at the specified position in the E2E message based on a cyclic redundancy check algorithm and by querying a preset cyclic redundancy check code table to obtain a first cyclic redundancy check code corresponding to the bit value at the specified position in the E2E message. When the preset cyclic redundancy check code table contains a correspondence between a bit value and a cyclic redundancy check code, the following steps may be specifically referred to:

[0088] In units of bytes and in byte order, the first byte of the message data at the specified position in the E2E message and the preset initial table lookup bit value are input into a cyclic redundancy check algorithm for calculation to obtain a first table lookup bit value;

[0089] Query the preset cyclic redundancy check code table according to the first table lookup bit value to obtain a second cyclic redundancy check code;

[0090] Input the second cyclic redundancy check code and the second byte of the message data at the specified position into the cyclic redundancy check algorithm for calculation to obtain a second table lookup bit value;

[0091] Repeat the above steps. After the number of executions of the above steps reaches a preset number threshold, end the iterative calculation and use the cyclic redundancy check code obtained by the last table lookup as the first cyclic redundancy check code corresponding to the E2E message; wherein the preset number threshold is determined according to the number of bytes of the message data at the specified position.

[0092] For example, the first byte (CRCn, n=8) of the message data is subjected to CRC calculation to obtain a first table lookup bit value, the first table lookup bit value is subjected to table lookup in the "preset cyclic redundancy check code table" to obtain cyclic redundancy check code 1 (i.e., the third cyclic redundancy check code), and cyclic redundancy check code 1 is subjected to CRC calculation to obtain a second table lookup bit value, the second table lookup bit value is subjected to table lookup in the "preset cyclic redundancy check code table" to obtain cyclic redundancy check code 2, and the last CRC characteristic value CRCn-1 is obtained by cyclic iteration, the E2E input parameter table is searched for the nth CRC characteristic value CRCn and CRC calculation is performed, and then the "preset cyclic redundancy check code table" is looked up to obtain the final first cyclic redundancy check code.

[0093] In order to clearly illustrate the cyclic redundancy check algorithm in the embodiment of the present application, the embodiment of the present application is illustrated by an example, but it should be noted that this description method is not limited to a specific data sequence.

[0094] Assume that we have a data sequence: [0x01, 0x02, 0x03, 0x04], and we use the CRC algorithm to perform a cyclic redundancy check; then we can determine that the preset number threshold of the cyclic redundancy check is 4.

[0095] The CRC algorithm is used to iteratively calculate the data sequence, and each step is based on the calculation result of the previous step. Therefore, in the first calculation, the calculation result of the previous step is missing, so the initial value (that is, the preset initial lookup table bit value) needs to be introduced, and the setting of the initial value cannot affect the subsequent calculation results, so the initial value is set to 0x00.

[0096] In the first step, we perform an XOR operation on the initial value 0x00 and the first data byte 0x01 to obtain the first table lookup bit value 0x05. Then, we perform a table lookup in the preset cyclic redundancy check code table based on the first table lookup bit value 0x05 to obtain the cyclic redundancy check code 0x06. This cyclic redundancy check code 0x06 will be used as the input for the next step.

[0097] In the second step, we perform an XOR operation on the cyclic redundancy check code 0x06 from the previous step and the second data byte 0x02 to obtain the second table lookup bit value 0x07. Then, we perform a table lookup in the preset cyclic redundancy check code table based on the second table lookup bit value 0x07 to obtain the cyclic redundancy check code 0x08. This cyclic redundancy check code 0x08 will be used as the input for the next step.

[0098] In the third step, we perform an XOR operation on the cyclic redundancy check code 0x08 from the previous step and the third data byte 0x03 to obtain the third table lookup bit value 0x09. Then, we perform a table lookup in the preset cyclic redundancy check code table based on the third table lookup bit value 0x09 to obtain the cyclic redundancy check code 0x10. This cyclic redundancy check code 0x10 will be used as the input for the next step.

[0099] In the fourth step, we perform an XOR operation on the result 0x10 of the previous step and the fourth data byte 0x04 to obtain the fourth table lookup bit value 0x11. Then, we perform a table lookup in the preset cyclic redundancy check code table according to the fourth table lookup bit value 0x11 to obtain the cyclic redundancy check code 0x12. At this point, the number of cycles reaches the preset number threshold 4, and the result 0x12 will be used as the final first cyclic redundancy check code.

[0100] In one possible implementation of the embodiment of the present application, before executing step 101, it is first necessary to calculate the corresponding relationship between the bit value in the preset cyclic redundancy check code table and the first cyclic redundancy check code, see Figure 2 , Figure 2 A flowchart of another data testing method provided by an embodiment of the present disclosure includes:

[0101] Step 201, performing cyclic redundancy check calculation on cyclic redundancy bit values ​​within a preset numerical range to obtain a cyclic redundancy check code corresponding to each of the cyclic redundancy bit values.

[0102] In one implementable manner of an embodiment of the present application, when calculating in advance to generate a preset cyclic redundancy check code table, calculation is performed according to the required bit value range. Specifically, the embodiment of the present application does not limit the bit value range; the table can be a two-dimensional array, each element of which represents a bit value and a corresponding first cyclic redundancy check code; the bit value can be an integer or a binary representation, and the first cyclic redundancy check code can be an integer or other data type. In actual use, it can be determined according to actual needs, and the embodiment of the present application does not limit this.

[0103] In one implementable method of an embodiment of the present application, when calculating the correspondence between the bit value and the first cyclic redundancy check code, it can be completed by manual calculation, algorithm generation or other methods to ensure that each bit value has a unique corresponding first cyclic redundancy check code. The embodiment of the present application does not limit the calculation method.

[0104] In one possible implementation of the present application, the cyclic redundancy check algorithm to be used is first determined. Common cyclic redundancy check algorithms include CRC-8, CRC-16, CRC-32, etc. Specifically, it can be determined according to actual needs, and the present application embodiment does not limit this.

[0105] According to the preset numerical range of the bit value, create a preset cyclic redundancy check code table. The table can be a two-dimensional array, each element of which represents a bit value and a corresponding cyclic redundancy check code; in the embodiment of the present application, the preset numerical range of the bit value is 0x00-0xFF as an example for explanation, but it should be noted that this narrative method is not a specific limitation on the bit value range. For each preset bit value, the selected cyclic redundancy check algorithm is used for calculation. According to the calculation method and parameters of the algorithm, the bit value is used as input to obtain the corresponding cyclic redundancy check code; after the calculation is completed, the calculated cyclic redundancy check code is filled into the preset cyclic redundancy check code table and associated with the corresponding bit value. Ensure that each bit value has a unique corresponding cyclic redundancy check code.

[0106] Step 202: Save the cyclic redundancy bit value and the cyclic redundancy check code corresponding to the cyclic redundancy bit value into the preset cyclic redundancy check code table respectively.

[0107] The bit value and the corresponding first cyclic redundancy check code and the second cyclic redundancy check code are saved in a preset cyclic redundancy check code table. The preset cyclic redundancy check code table calculates and stores the corresponding relationship between the bit value and the cyclic redundancy check code in advance, and the cyclic redundancy check code can be quickly searched and obtained in the program. In this way, data verification and validation operations can be conveniently performed, and the results can be recorded for subsequent analysis and processing.

[0108] In an implementable manner of the embodiment of the present application, the target E2E message is an E2E message, the vehicle CAN communication matrix contains thousands of messages, and non-E2E messages are also included therein. Optionally, before looking up a preset cyclic redundancy check code table according to a bit value in the target E2E message and determining a first cyclic redundancy check code corresponding to the bit value, the method further includes:

[0109] Respectively saving the cyclic redundancy bit value and the cyclic redundancy check code corresponding to the cyclic redundancy bit value into the preset cyclic redundancy check code table;

[0110] According to the rolling counter value of each of the E2E messages, obtain the E2E DataIDList corresponding to the E2E messages from the E2E specification respectively;

[0111] The message ID, name, and E2E DataIDList of each of the E2E messages are combined into E2E message parameters;

[0112] The composed E2E message parameters are stored in the E2E message parameter table.

[0113] In one implementable manner of an embodiment of the present application, the vehicle communication matrix information includes an information table or database of the vehicle's communication messages and related data; in one implementable manner of an embodiment of the present application, when extracting target E2E message information, the extraction can be performed based on characteristic information of the target E2E message, specifically, it varies according to the type of message, and the embodiment of the present application is not limited here.

[0114] In one possible implementation of an embodiment of the present application, an E2E message generally includes information such as a message ID, data length, and data content, which is not limited in the specific embodiment of the present application.

[0115] Obtaining the message ID, bus type and bus channel of each message in a preset data information table, and assembling the message ID, bus type and bus channel into a data feature value according to the message ID, bus type and bus channel; wherein different messages correspond to different data feature values, and the preset data information table is configured in advance and contains at least one of the message ID, bus type and bus channel of all messages;

[0116] In one implementable method of an embodiment of the present application, the preset data information table may be E2E DataIDList, where DataIDList refers to the Data ID List in the E2E communication protocol. E2E is a communication protocol for data integrity protection, which is commonly used in automotive electronic systems. Data ID List is an important part of the E2E protocol, which is used to define and manage data verification rules; Data ID List is an array containing 16 elements, which is used to store data IDs and corresponding verification rules. Each element contains a data ID and corresponding verification rules, which are used to verify and protect data.

[0117] The target E2E message file includes the target E2E message, but the parameter information of the target E2E message is unknown. Therefore, the message ID, bus type and bus channel in the preset data information table are assembled into a data feature value, and the target E2E message existing in the target E2E message file is determined using the data feature value.

[0118] In one implementable method of an embodiment of the present application, the calculation process of the second cyclic redundancy check code may refer to the following process: according to the preset data information table and the target E2E message, the second cyclic redundancy check code of the target E2E message is calculated; wherein, the preset data information table includes an encryption protocol for each of the target E2E messages, and the encryption protocol is used to calculate the second cyclic redundancy check code.

[0119] In one implementable method of the embodiment of the present application, the corresponding encryption protocol can be searched in the preset data information table according to the characteristic value message ID, bus type and bus channel of the target E2E message, and the target E2E message can be calculated using the corresponding algorithm according to the obtained encryption protocol to obtain a second cyclic redundancy check code.

[0120] In one possible implementation of the embodiment of the present application, when assembling the E2E message parameter table, the following steps are also included:

[0121] Each E2E message parameter in the E2E message parameter table is numbered and linked list processed using a hash algorithm, so that the E2E message parameter can be quickly queried and acquired through the hash algorithm.

[0122] In one implementable manner of the embodiment of the present application, when it is detected that an E2E message is received, based on a HASH algorithm, the E2E message parameter table is queried according to the ID of the E2E message to obtain the E2EDataIDList of the received E2E message.

[0123] Corresponding to the above data testing method, the present invention also provides a data testing device. Since the device embodiment of the present invention corresponds to the above method embodiment, details not disclosed in the device embodiment can be referred to the above method embodiment, and will not be described in detail in the present invention.

[0124] Figure 3 A schematic diagram of a data testing device provided in an embodiment of the present disclosure is shown in FIG. Figure 3 As shown, including:

[0125] A first acquisition unit 31 is used to traverse the vehicle communication matrix through a preset script algorithm to identify all E2E messages contained in the vehicle communication matrix, wherein the E2E messages carry a standard cyclic redundancy check code;

[0126] A check unit 32 is configured to perform a cyclic redundancy check on a cyclic redundancy bit value corresponding to the message data at a specified position in the E2E message by querying a preset cyclic redundancy check code table to obtain a first cyclic redundancy check code corresponding to the E2E message, wherein the preset cyclic redundancy check code table includes a correspondence between cyclic redundancy bit values ​​and cyclic redundancy check codes;

[0127] A search unit 33, configured to search the E2E message parameter table for the second cyclic redundancy check code corresponding to the E2E message ID according to the message ID of the E2E message; wherein the E2E message parameter table contains a correspondence between the message ID and the second cyclic redundancy check code;

[0128] A first calculation unit 34 is used to calculate the first cyclic redundancy check code and the second cyclic redundancy check code according to the cyclic redundancy check algorithm to obtain a target cyclic redundancy bit value;

[0129] A determination unit 35 is configured to query the preset cyclic redundancy check code table according to the cyclic redundancy target bit value to determine a target cyclic redundancy check code corresponding to the target cyclic redundancy bit value;

[0130] The generating unit 36 ​​is used to compare the target cyclic redundancy check code with the standard cyclic redundancy check code, and generate a test result table according to the comparison result.

[0131] The present disclosure provides a data testing device, the main technical scheme of which includes: traversing a vehicle communication matrix through a preset script algorithm to identify all E2E messages contained in the vehicle communication matrix, wherein the E2E messages carry a standard cyclic redundancy check code; performing cyclic redundancy check processing on the cyclic redundancy bit value corresponding to the message data at a specified position in the E2E message by querying a preset cyclic redundancy check code table to obtain a first cyclic redundancy check code corresponding to the E2E message, wherein the preset cyclic redundancy check code table includes a correspondence between cyclic redundancy bit values ​​and cyclic redundancy check codes; and performing a cyclic redundancy check on the E2E message according to the message ID of the E2E message. The E2E message parameter table searches for the second cyclic redundancy check code corresponding to the E2E message ID; wherein the E2E message parameter table contains the correspondence between the message ID and the cyclic redundancy check code; according to the cyclic redundancy check algorithm, the first cyclic redundancy check code and the second cyclic redundancy check code are calculated to obtain the target cyclic redundancy bit value; according to the cyclic redundancy target bit value, the preset cyclic redundancy check code table is queried to determine the target cyclic redundancy check code corresponding to the target cyclic redundancy bit value; the target cyclic redundancy check code is compared with the standard cyclic redundancy check code, and a test result table is generated according to the comparison result. Compared with the related art, the embodiment of the present application traverses the whole vehicle communication matrix through a preset script algorithm to identify all E2E messages contained in the whole vehicle communication matrix. Compared with the manual analysis and screening of messages one by one in the prior art, the automatic traversal based on the script algorithm to identify the E2E message is more effective and takes less time. Moreover, the identification object is not a message, or a message of an ECU, but all E2E messages contained in the whole vehicle communication matrix, which not only has high recognition efficiency, but also has the globality of the whole vehicle. In addition, when obtaining the cyclic redundancy check code of the E2E message, the corresponding cyclic redundancy check code is obtained by querying the preset cyclic redundancy check code table. There is no need to perform multiple iterations of online calculations on the characteristic values ​​corresponding to the data in the E2E message. It is only necessary to look up the cyclic redundancy bit value corresponding to the message data at the specified position in the E2E message to obtain the cyclic redundancy check code. The table lookup is much more efficient than online calculation. In summary, this application greatly improves the test efficiency of the E2E cyclic redundancy check code test.

[0132] Furthermore, in a possible implementation of this embodiment, as Figure 4 As shown, the verification unit 32 is also used for:

[0133] In units of bytes and in byte order, the first byte of the message data at the specified position in the E2E message and the preset initial table lookup bit value are input into a cyclic redundancy check algorithm for calculation to obtain a first table lookup bit value;

[0134] Query the preset cyclic redundancy check code table according to the first table lookup bit value to obtain a second cyclic redundancy check code;

[0135] Input the second cyclic redundancy check code and the second byte of the message data at the specified position into the cyclic redundancy check algorithm for calculation to obtain a second table lookup bit value;

[0136] Repeat the above steps. After the number of executions of the above steps reaches a preset number threshold, end the iterative calculation and use the cyclic redundancy check code obtained by the last table lookup as the first cyclic redundancy check code corresponding to the E2E message; wherein the preset number threshold is determined according to the number of bytes of the message data at the specified position.

[0137] Furthermore, in a possible implementation of this embodiment, as Figure 4 As shown, the device also includes:

[0138] The second calculation unit 37 is used for performing cyclic redundancy check calculation on cyclic redundancy bit values ​​in a preset numerical range to obtain cyclic redundancy check codes corresponding to the cyclic redundancy target bit values ​​before the first calculation unit 34 queries the preset cyclic redundancy check code table according to the cyclic redundancy target bit value and determines the target cyclic redundancy check code corresponding to the cyclic redundancy target bit value;

[0139] The storage unit 38 is used to store the bit value and the cyclic redundancy check code corresponding to the bit value into the preset cyclic redundancy check code table respectively.

[0140] Furthermore, in a possible implementation of this embodiment, as Figure 4 As shown, the device also includes:

[0141] The second acquisition unit 39 is used to respectively acquire the rolling counter value of each E2E message when acquiring the E2E message from the vehicle communication matrix information;

[0142] The extracting unit 310 is used to obtain the E2E DataIDList corresponding to each of the E2E messages from the E2E specification according to the rolling counter value of each of the E2E messages;

[0143] An assembling unit 311, configured to combine the message ID, name, and E2E DataIDList of each of the E2E messages into E2E message parameters;

[0144] The storage unit 312 is used to store the composed E2E message parameters into the E2E message parameter table.

[0145] Furthermore, in a possible implementation of this embodiment, as Figure 4The device also includes:

[0146] The numbering unit 313 is used to number each E2E message parameter in the E2E message parameter table and use a hash algorithm to perform linked list processing, so as to quickly query and obtain the E2E message parameter through the hash algorithm.

[0147] Furthermore, in a possible implementation of this embodiment, as Figure 4 The device also includes:

[0148] The third acquisition unit 314 is configured to, when detecting that an E2E message is received, query the E2E message parameter table according to the ID of the E2E message based on a HASH algorithm to acquire the E2E DataIDList of the received E2E message.

[0149] It should be noted that the above explanation of the method embodiment is also applicable to the device of this embodiment, and the principle is the same, which is not limited in this embodiment.

[0150] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0151] Figure 5 A schematic block diagram of an example electronic device 400 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0152] like Figure 5 As shown, the device 400 includes a computing unit 401, which can perform various appropriate actions and processes according to a computer program stored in a ROM (Read-Only Memory) 402 or a computer program loaded from a storage unit 408 to a RAM (Random Access Memory) 403. In the RAM 403, various programs and data required for the operation of the device 400 can also be stored. The computing unit 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An I / O (Input / Output) interface 405 is also connected to the bus 404.

[0153] A number of components in the device 400 are connected to the I / O interface 405, including: an input unit 406, such as a keyboard, a mouse, etc.; an output unit 407, such as various types of displays, speakers, etc.; a storage unit 408, such as a disk, an optical disk, etc.; and a communication unit 409, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 409 allows the device 400 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0154] The computing unit 401 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a CPU (Central Processing Unit), a GPU (Graphic Processing Units), various dedicated AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, a DSP (Digital Signal Processor), and any appropriate processor, controller, microcontroller, etc. The computing unit 401 performs the various methods and processes described above, such as a data testing method. For example, in some embodiments, the data testing method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 408. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 400 via the ROM 402 and / or the communication unit 409. When the computer program is loaded into the RAM 403 and executed by the computing unit 401, one or more steps of the method described above may be performed. Alternatively, in other embodiments, the computing unit 401 may be configured to execute the aforementioned data testing method in any other appropriate manner (for example, by means of firmware).

[0155] Various embodiments of the systems and techniques described above herein may be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application Specific Standard Products), SOCs (System On Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that may be executed and / or interpreted on a programmable system including at least one programmable processor that may be a dedicated or general-purpose programmable processor that may 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.

[0156] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0157] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a RAM, a ROM, an EPROM (Electrically Programmable Read-Only-Memory) or a flash memory, an optical fiber, a CD-ROM (Compact Dis sc Read-Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0158] 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 a 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).

[0159] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with 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 backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: LAN (Local Area Network), WAN (Wide Area Network), the Internet, and blockchain networks.

[0160] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server combined with a blockchain.

[0161] It should be noted that artificial intelligence is a discipline that studies how computers can simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.), and includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, as well as machine learning / deep learning, big data processing technology, knowledge graph technology, and other major directions.

[0162] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0163] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A data testing method, It is characterized in that include: Traversing the vehicle communication matrix through a preset script algorithm, identifying all E2E messages contained in the vehicle communication matrix, wherein the E2E messages carry a standard cyclic redundancy check code; Performing cyclic redundancy check processing on the cyclic redundancy bit value corresponding to the message data at the specified position in the E2E message based on a query of a preset cyclic redundancy check code table, to obtain a first cyclic redundancy check code corresponding to the E2E message, wherein the preset cyclic redundancy check code table includes a correspondence between cyclic redundancy bit values ​​and cyclic redundancy check codes; Searching the E2E message parameter table for a second cyclic redundancy check code corresponding to the E2E message ID according to the message ID of the E2E message; wherein the E2E message parameter table contains a correspondence between the message ID and the cyclic redundancy check code; Calculating the first cyclic redundancy check code and the second cyclic redundancy check code according to the cyclic redundancy check algorithm to obtain a target cyclic redundancy bit value; According to the cyclic redundancy target bit value, the preset cyclic redundancy check code table is searched to determine the target cyclic redundancy check code corresponding to the target cyclic redundancy bit value; The target cyclic redundancy check code is compared with the standard cyclic redundancy check code, and a test result table is generated according to the comparison result.

2. The method according to claim 1, It is characterized in that The method of performing cyclic redundancy check processing on the cyclic redundancy bit value corresponding to the message data at the specified position in the E2E message based on querying a preset cyclic redundancy check code table to obtain the first cyclic redundancy check code corresponding to the E2E message includes: In units of bytes and in byte order, the first byte of the message data at the specified position in the E2E message and the preset initial table lookup bit value are input into a cyclic redundancy check algorithm for calculation to obtain a first table lookup bit value; Query the preset cyclic redundancy check code table according to the first table lookup bit value to obtain a second cyclic redundancy check code; Input the second cyclic redundancy check code and the second byte of the message data at the specified position into the cyclic redundancy check algorithm for calculation to obtain a second table lookup bit value; Repeat the above steps. After the number of executions of the above steps reaches a preset number threshold, end the iterative calculation and use the cyclic redundancy check code obtained by the last table lookup as the first cyclic redundancy check code corresponding to the E2E message; wherein the preset number threshold is determined according to the number of bytes of the message data at the specified position.

3. The method according to claim 1, It is characterized in that Before searching the preset cyclic redundancy check code table according to the cyclic redundancy target bit value to determine the target cyclic redundancy check code corresponding to the cyclic redundancy target bit value, the method further includes: Performing a cyclic redundancy check calculation on cyclic redundancy bit values ​​within a preset numerical range to obtain a cyclic redundancy check code corresponding to each of the cyclic redundancy bit values; The cyclic redundancy bit value and the cyclic redundancy check code corresponding to the cyclic redundancy bit value are respectively saved in the preset cyclic redundancy check code table.

4. The method according to any one of claims 1 to 3, It is characterized in that The method further comprises: When obtaining E2E messages from vehicle communication matrix information through a preset script algorithm, respectively obtain the rolling counter value of each E2E message; According to the rolling counter value of each of the E2E messages, obtain the E2EDataIDList corresponding to the E2E messages from the E2E specification respectively; The message ID, name, and E2E DataIDList of each of the E2E messages are combined into E2E message parameters; The composed E2E message parameters are stored in the E2E message parameter table.

5. The method according to claim 4, It is characterized in that After storing the composed E2E message parameters into the E2E message parameter table, the method further includes: Each E2E message parameter in the E2E message parameter table is numbered and linked list processed using a hash algorithm, so that the E2E message parameter can be quickly queried and acquired through the hash algorithm.

6. The method according to claim 5, It is characterized in that The method further comprises: When it is detected that an E2E message is received, based on a HASH algorithm, the E2E message parameter table is queried according to the ID of the E2E message to obtain the E2E DataIDList of the received E2E message.

7. A data testing device, It is characterized in that include: A first acquisition unit is used to traverse the vehicle communication matrix through a preset script algorithm to identify all E2E messages contained in the vehicle communication matrix, wherein the E2E messages carry a standard cyclic redundancy check code; a check unit, configured to perform a cyclic redundancy check on a cyclic redundancy bit value corresponding to the message data at a specified position in the E2E message by querying a preset cyclic redundancy check code table to obtain a first cyclic redundancy check code corresponding to the E2E message, wherein the preset cyclic redundancy check code table includes a correspondence between cyclic redundancy bit values ​​and cyclic redundancy check codes; A search unit, configured to search the E2E message parameter table for a second cyclic redundancy check code corresponding to the E2E message ID according to the message ID of the E2E message; wherein the E2E message parameter table contains a correspondence between the message ID and the second cyclic redundancy check code; A first calculation unit, configured to calculate the first cyclic redundancy check code and the second cyclic redundancy check code according to the cyclic redundancy check algorithm to obtain a target cyclic redundancy bit value; A determination unit, configured to query the preset cyclic redundancy check code table according to the cyclic redundancy target bit value, and determine a target cyclic redundancy check code corresponding to the target cyclic redundancy bit value; A generating unit is used to compare the target cyclic redundancy check code with the standard cyclic redundancy check code, and generate a test result table according to the comparison result.

8. An electronic device, It is characterized in that include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium storing computer instructions, It is characterized in that The computer instructions are used to cause the computer to execute the method according to any one of claims 1-6.

10. A computer program product, It is characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 6.