Data comparison analysis method and device, electronic equipment and storage medium

By extracting and generating comparison CAN message files, and using address definition algorithm for comparison and analysis, the problem of CAN message analysis in the prior art is solved, and the results of CAN message analysis are not intuitive, and fast and automated CAN message data comparison and analysis are achieved.

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

Patent Information

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

AI Technical Summary

Technical Problem

The manual analysis method of CAN messages in the prior art takes a long time, and the results are not intuitive, making it difficult to effectively process the huge amount of CAN messages in the vehicle network.

Method used

By extracting the comparison message data from the preset database according to the message attributes, generating different comparison message files, obtaining the target message file set, and determining the array address of the message data to be analyzed through the address definition algorithm, comparing and analyzing it in the target message file set to obtain the analysis results.

Benefits of technology

It realizes automated comparison and testing, which can quickly traverse the message database and perform comparison and analysis of multiple CAN message data to be analyzed, satisfying the rapid comparison processing of the huge amount of CAN message data, significantly shortening the analysis time and improving the intuitiveness of the analysis results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120034595A_ABST
    Figure CN120034595A_ABST
Patent Text Reader

Abstract

The invention provides a data comparison analysis method and device, electronic equipment and a storage medium, and the method comprises the steps: extracting corresponding message data for comparison from a preset database according to a message attribute, the message attribute being identification information used for determining the message data for comparison; based on the message data for comparison, different message files for comparison are generated, a target message file set is obtained, and the target message file set is a set of different message files for comparison; and determining an array address corresponding to the to-be-analyzed message data through an address definition algorithm, and performing comparative analysis in the target message file set based on the array address to obtain an analysis result. According to the embodiment of the invention, the message database can be quickly traversed and extracted while the automatic comparison test is realized, the comparison analysis of a plurality of to-be-analyzed CAN message data is carried out at the same time, the quick comparison processing analysis of a huge CAN message data volume is met, and the analysis of the CAN message data of the whole vehicle can be completed in a short time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] With the development of vehicle electronic technology and the improvement of vehicle performance requirements, the number of electronic control units (ECU) on vehicles is increasing. The interactive information between each ECU is realized through a network composed of buses such as CAN (Controller Area Network, CAN communication protocol). Therefore, the analysis of the CAN message of the whole vehicle network can effectively find problems and reduce cost losses. Among them, the CAN message is a hexadecimal message received on the CAN bus (vehicle internal CAN, vehicle CAN, vehicle charging CAN) using ECU and CAN bus analyzer.

[0003] However, the CAN message analysis method in the prior art generally needs to be tested through a single ECU, and after obtaining the vehicle message, it is manually analyzed and compared one by one. Since the number of ECUs integrated in the vehicle network doubles with the functions, up to dozens or even nearly a hundred, the number of CAN messages in the vehicle can reach thousands. The manual analysis method in the related technology is time-consuming. Summary of the invention

[0004] The present invention provides a method and device for data comparison and analysis, an electronic device and a storage medium, which are mainly intended to solve the problem that the manual analysis method for CAN messages in the related art is time-consuming and the results are not intuitive.

[0005] According to a first aspect of the present disclosure, a method for data comparison and analysis is provided, comprising:

[0006] Extracting corresponding message data for comparison from a preset database according to message attributes, wherein the message attributes are identification information used to determine the message data for comparison;

[0007] Based on the comparison message data, different comparison message files are generated to obtain a target message file set, where the target message file set is a collection of different comparison message files;

[0008] The array address corresponding to the message data to be analyzed is determined by an address definition algorithm, and a comparison analysis is performed in the target message file set based on the array address to obtain an analysis result.

[0009] Optionally, generating different comparison message files based on the comparison message data to obtain a target message file set includes:

[0010] Acquire the name of the electric control unit from the preset database, and number each electric control unit according to the electric control unit name to obtain an electric control unit number;

[0011] Combining the ECU number with the corresponding ECU name to generate an ECU file, wherein the ECU file is a file formed by combining the ECU number with the corresponding ECU name;

[0012] In combination with the electronic control unit file, the comparison message data is used to generate different comparison message files according to different bus channels to obtain the target message file set, wherein different bus channels correspond to different comparison message files.

[0013] Optionally, the determining the array address corresponding to the message data to be analyzed by the address definition algorithm, and performing comparison analysis in the target message file set based on the array address, to obtain the analysis result includes:

[0014] According to the first bus channel code and the first bus type code of the message data to be analyzed, a first hash value corresponding to the message data to be analyzed is calculated by a hash algorithm, and the first hash value is defined as the array address corresponding to the message data to be analyzed, wherein the first bus channel code and the first bus type code are binary value strings of the bus channel and the bus type in a computer language;

[0015] According to the array address, the corresponding comparison message file is searched from the target message file set for comparison and analysis to obtain the analysis result.

[0016] Optionally, searching the target message file set for the corresponding comparison message file according to the array address for comparison and analysis to obtain the analysis result includes:

[0017] Obtaining the second bus channel code and the second bus type code of each of the comparison message files in the target message file set, and numbering each of the comparison message files by a preset numbering method;

[0018] Calculating a second hash value corresponding to each of the comparison message files by using the hash algorithm according to the second bus channel code and the second bus type code, and recording the number of the comparison message file corresponding to each of the second hash values;

[0019] The corresponding second hash value is matched according to the array address, and the corresponding message file for comparison is searched in the target message file set through the number of the message file for comparison corresponding to the second hash value to obtain the analysis result.

[0020] Optionally, the determining the array address corresponding to the message data to be analyzed by the address definition algorithm, and performing comparison analysis in the target message file set based on the array address, to obtain the analysis result includes:

[0021] Determine whether the analysis parameter is a period parameter of the message data to be analyzed, wherein the analysis parameter is a parameter to be compared and analyzed in the message data to be analyzed;

[0022] When it is determined that the analysis parameter is a period parameter of the message data to be analyzed, a convergence value and a stable value of the period parameter are calculated, and a performance analysis is performed on the period parameter according to the convergence value and the stable value.

[0023] Optionally, when determining that the analysis parameter is a period parameter of the message data to be analyzed, calculating a convergence value and a stable value of the period parameter, and performing a performance analysis on the period parameter according to the convergence value and the stable value includes:

[0024] Acquire a comparison period parameter in the comparison message file corresponding to the message data to be analyzed, and calculate the convergence value of the period parameter by a convergence determination algorithm according to the comparison period parameter;

[0025] Calculating the stable value of the periodic parameter by a stability determination algorithm according to the convergence value and the amount of the message data to be analyzed;

[0026] If the product of the convergence value and the stable value is less than the convergence value, it is determined that the period parameter timing is correct;

[0027] If the product of the convergence value and the stable value is greater than or equal to the convergence value, it is determined that the cycle parameter timing is wrong.

[0028] Optionally, after searching the array address corresponding to the message data to be analyzed by using the address search algorithm, and performing a comparison analysis in the target message file set based on the array address to obtain the analysis result, the method further includes:

[0029] The analysis results are output according to a preset output format to obtain a standardized comparison analysis report.

[0030] According to a second aspect of the present disclosure, a device for data comparison and analysis is provided, comprising:

[0031] An extraction unit, used to extract corresponding message data for comparison from a preset database according to message attributes, wherein the message attributes are identification information used to determine the message data for comparison;

[0032] A generating unit, configured to generate different message files for comparison based on the message data for comparison, and obtain a target message file set, wherein the target message file set is a collection of different message files for comparison;

[0033] The analysis unit is used to determine the array address corresponding to the message data to be analyzed through an address definition algorithm, and perform comparison analysis in the target message file set based on the array address to obtain an analysis result.

[0034] Optionally, the generating unit includes:

[0035] An extraction module, used for acquiring the name of the electric control unit from the preset database, and numbering each electric control unit according to the electric control unit name to obtain an electric control unit number;

[0036] A generating module, used for combining the ECU number with the corresponding ECU name to generate an ECU file, wherein the ECU file is a file formed by combining the ECU number with the corresponding ECU name;

[0037] The generating module is further used to generate different comparison message files according to different bus channels based on the comparison message data in combination with the electronic control unit file to obtain the target message file set, wherein different bus channels correspond to different comparison message files.

[0038] Optionally, the analysis unit includes:

[0039] a definition module, configured to calculate a first hash value corresponding to the message data to be analyzed by a hash algorithm according to a first bus channel code and a first bus type code of the message data to be analyzed, and define the first hash value as the array address corresponding to the message data to be analyzed, wherein the first bus channel code and the first bus type code are binary value strings of the bus channel and the bus type in a computer language;

[0040] The analysis module is used to search the corresponding comparison message file from the target message file set according to the array address, perform comparison analysis, and obtain the analysis result.

[0041] Optionally, the analysis module includes:

[0042] An acquisition submodule, used for acquiring the second bus channel code and the second bus type code of each of the comparison message files in the target message file set, and numbering each of the comparison message files by a preset numbering method;

[0043] a calculation submodule, configured to calculate, according to the second bus channel code and the second bus type code, a second hash value corresponding to each of the comparison message files by using the hash algorithm, and record a number of the comparison message file corresponding to each of the second hash values;

[0044] A search submodule is used to match the corresponding second hash value according to the array address, and to search for the corresponding comparison message file in the target message file set through the number of the comparison message file corresponding to the second hash value to perform comparison analysis and obtain the analysis result.

[0045] Optionally, the analysis unit further includes:

[0046] A determination module, used to determine whether an analysis parameter is a period parameter of the message data to be analyzed, wherein the analysis parameter is a parameter to be compared and analyzed in the message data to be analyzed;

[0047] The calculation module is used to calculate the convergence value and the stability value of the cycle parameter when it is determined that the analysis parameter is the cycle parameter of the message data to be analyzed, and perform performance analysis on the cycle parameter according to the convergence value and the stability value.

[0048] Optionally, the calculation module includes:

[0049] A calculation submodule, used for obtaining a comparison period parameter in the comparison message file corresponding to the message data to be analyzed, and calculating the convergence value of the period parameter through a convergence determination algorithm according to the comparison period parameter;

[0050] The calculation submodule is further used to calculate the stable value of the period parameter through a stability determination algorithm according to the convergence value and the amount of the message data to be analyzed;

[0051] A determination submodule, configured to determine that the timing of the periodic parameter is correct when the product of the convergence value and the stable value is less than the convergence value;

[0052] The determination submodule is further configured to determine that the period parameter timing error occurs when the product of the convergence value and the stable value is greater than or equal to the convergence value.

[0053] Optionally, the device further comprises:

[0054] The output unit is used to output the analysis results according to a preset output format to obtain a standardized comparison analysis report.

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

[0056] at least one processor; and

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

[0058] 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.

[0059] 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.

[0060] 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.

[0061] The data comparison and analysis method and device, electronic device and storage medium provided by the present disclosure extract corresponding comparison message data from a preset database according to message attributes, wherein the message attributes are identification information for determining the comparison message data; based on the comparison message data, different comparison message files are generated to obtain a target message file set, wherein the target message file set is a collection of different comparison message files; the array address corresponding to the message data to be analyzed is determined by an address definition algorithm, and comparison and analysis are performed in the target message file set based on the array address to obtain an analysis result. Compared with the related art, the embodiment of the present disclosure generates a file set by extracting the comparison CAN message data from the message database, and then searches for the corresponding comparison CAN message data from the file set according to the CAN message data to be analyzed for comparison and analysis. While realizing the automated comparison test, the message database can be quickly traversed and extracted, and comparison and analysis of multiple CAN message data to be analyzed can be performed at the same time, which satisfies the rapid comparison and processing analysis of a large amount of CAN message data, and can complete the analysis of the CAN message data of the whole vehicle in a relatively short time.

[0062] 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

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

[0064] Figure 1 A flowchart of a data comparison and analysis method provided by an embodiment of the present disclosure;

[0065] Figure 2 A schematic diagram of a target message file set provided by an embodiment of the present disclosure;

[0066] Figure 3 A schematic diagram of a flow chart of searching a message file for comparison provided by an embodiment of the present disclosure;

[0067] Figure 4 A schematic diagram of a search process for array addresses with the same hash value provided by an embodiment of the present disclosure;

[0068] Figure 5 A schematic diagram of a comparison analysis report provided by an embodiment of the present disclosure;

[0069] Figure 6 A schematic diagram of the structure of a data comparison and analysis device provided in an embodiment of the present disclosure;

[0070] Figure 7 A schematic diagram of the structure of another data comparison and analysis device provided in an embodiment of the present disclosure;

[0071] Figure 8 A schematic block diagram of an electronic device provided in accordance with an embodiment of the present disclosure. DETAILED DESCRIPTION

[0072] 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.

[0073] The following describes the data comparison and analysis method and device, electronic device, and storage medium of the embodiments of the present disclosure with reference to the accompanying drawings.

[0074] Figure 1 A flowchart of a data comparison and analysis method provided in an embodiment of the present disclosure.

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

[0076] Step 101: extract corresponding message data for comparison from a preset database according to message attributes, where the message attributes are identification information used to determine the message data for comparison.

[0077] The present disclosure can be applied to any message comparison test of the bus communication protocol of the whole vehicle (for example: message comparison test of CAN, CANFD, LIN, Ethernet bus communication protocol, etc.), and specifically, the embodiments of the present disclosure are not limited.

[0078] In the embodiment of the present disclosure, the preset database is an existing standard message database, for example: a database of all CAN messages of vehicles, etc. When extracting the message data for comparison, an extraction algorithm can be customized to perform traversal extraction. The writing method of the traversal extraction algorithm includes but is not limited to: Python programming language, etc. Specifically, the embodiment of the present disclosure does not limit it.

[0079] Step 102: generating different message files for comparison based on the message data for comparison, and obtaining a target message file set, wherein the target message file set is a collection of different message files for comparison.

[0080] In the embodiment of the present disclosure, the target message file set includes but is not limited to: an electronic control unit file and a comparison message file, the electronic control unit file includes but is not limited to: the names and numbers of all ECUs of the vehicle for comparison extracted from the CAN database file, and the comparison message file includes but is not limited to: the CAN data link layer message ID (Identity document, unique code), ECU number, ECU name, message name, DLC (Data Length Code, data length code), cycle, whether CAN FD (CAN with Flexible Data rate, CAN communication protocol with flexible data rate), CAN FD-FDF (FD Format Indicator, FD format indicator) bit and BRS (Bit Rate Switch, bit rate conversion switch) bit, etc. The file name of the electronic control unit file includes but is not limited to: Senderliste.txt, etc., and the file name of the comparison message file includes but is not limited to: CAN-XX.txt. Specifically, the embodiment of the present disclosure does not limit the file name of the electronic control unit file and the file name of the comparison message file.

[0081] In order to more intuitively understand the target message file set, the embodiment of the present disclosure provides a schematic diagram of a target message file set, such as Figure 2 As shown, the CAN-XX file is the message file for comparison, and the Senderliste file is the electronic control unit file.

[0082] Step 103, determining the array address corresponding to the message data to be analyzed through an address definition algorithm, and performing a comparison analysis in the target message file set based on the array address to obtain an analysis result.

[0083] In the embodiment of the present disclosure, the address definition algorithm is a user-selected algorithm, such as a hash algorithm, etc., wherein the search and comparison analysis of the array address are performed in a user-written analysis main program, and the name of the program can be user-defined, such as Analyse.can. Specifically, the embodiment of the present disclosure does not limit the address definition algorithm and the name of the program.

[0084] It should be noted here that the main analysis program is written in a manner including but not limited to: written in CAPL programming language, which is a programming language that comes with Vector CANoe software.

[0085] The data comparison and analysis method provided by the present disclosure is to extract the corresponding comparison message data from a preset database according to the message attribute, wherein the message attribute is identification information for determining the comparison message data; based on the comparison message data, different comparison message files are generated to obtain a target message file set, wherein the target message file set is a collection of different comparison message files; the array address corresponding to the message data to be analyzed is determined by an address definition algorithm, and comparison and analysis are performed in the target message file set based on the array address to obtain an analysis result. Compared with the related art, the embodiment of the present disclosure generates a file set by extracting the comparison CAN message data from the message database, and then searches for the corresponding comparison CAN message data from the file set according to the CAN message data to be analyzed for comparison and analysis. While realizing the automated comparison test, the message database can be quickly traversed and extracted, and comparison and analysis of multiple CAN message data to be analyzed can be performed at the same time, which satisfies the rapid comparison and processing analysis of a large amount of CAN message data, and can complete the analysis of the CAN message data of the whole vehicle in a relatively short time.

[0086] In one implementable manner of the embodiment of the present disclosure, as a refinement of the above-mentioned step 101, when different comparison message files are generated based on the comparison message data to obtain the target message file set, it is necessary to first obtain parameters from the preset database, and then generate corresponding files to complete the construction of the target message file set. Therefore, in order to complete the construction of the target message file set, it can be implemented in but not limited to the following manner: traverse and extract the preset database through the traversal extraction algorithm to obtain the comparison message data and the electric control unit name; obtain the electric control unit name from the preset database, and number each electric control unit according to the electric control unit name to obtain the electric control unit number; combine the electric control unit number with the corresponding electric control unit name to generate an electric control unit file, and the electric control unit file is a file composed of the electric control unit number and the corresponding electric control unit name; combine the electric control unit file, generate different comparison message files according to different bus channels based on the comparison message data to obtain the target message file set, wherein different bus channels correspond to different comparison message files.

[0087] In the embodiment of the present disclosure, the number of the electronic control unit is custom-edited, and at the same time, combined with the electronic control unit file, it can be determined which electronic control unit generates the comparison message file, and the numbered electronic control unit and the corresponding electronic control unit name can be added to the comparison message file, and the target message file set is a collection of different comparison message files.

[0088] In one implementable manner of the embodiment of the present disclosure, as a refinement of the above-mentioned step 103, it is necessary to accurately determine the array address in order to complete the comparative analysis of the message data to be analyzed. Therefore, in order to complete the search of the array address, it can be implemented in but not limited to the following manner: according to the first bus channel code and the first bus type code of the message data to be analyzed, the first hash value corresponding to the message data to be analyzed is calculated by a hash algorithm, and the first hash value is defined as the array address corresponding to the message data to be analyzed, and the first bus channel code and the first bus type code are binary value strings of the bus channel and the bus type in computer language; according to the array address, the corresponding message file for comparison is searched from the target message file set for comparative analysis to obtain the analysis result.

[0089] Related to the above embodiment, when searching through the array address, it is necessary to obtain the ID_low (CAN ID, bus type) encoding and ID_high (bus channel) encoding of the message data to be analyzed through a hash algorithm. Therefore, in order to accurately search for the corresponding comparison message file according to the array address, the embodiment of the present disclosure provides a flow chart of searching for the comparison message file, as shown in FIG. Figure 4 As shown, the process includes the following steps:

[0090] Step 301: Obtain the second bus channel code and the second bus type code of each of the comparison message files in the target message file set, and number each of the comparison message files by a preset numbering method.

[0091] In the embodiment of the present disclosure, the preset numbering method is a numbering method of user-defined selection, wherein the numbering method is automatically numbered by a hash algorithm. In order to facilitate understanding of the implementation process of the embodiment of the present disclosure, an example is provided for illustration: a v_sa_message{} structure is defined to represent all parameters of the comparison message file, and an array v_sa_message[] composed of the structure represents all comparison message files. A HashMSG[] array with a first hash value (Hash value) as the address is defined, each comparison message file is read from the target message file set, and a serial number is defined for each comparison message file, and this serial number starts from 0 and increases by 1.

[0092] Step 302: Calculate the second hash value corresponding to each of the comparison message files by using the hash algorithm according to the second bus channel code and the second bus type code, and record the number of the comparison message file corresponding to each of the second hash values.

[0093] In the disclosed embodiment, the hash value is determined based on the ID_low (CAN ID, bus type code) and ID_high (bus channel code) of the message, which is obtained through a hash algorithm. However, different ID_low and ID_high may obtain the same value through the hash algorithm. In order to solve the problem that the unique address cannot be determined due to the non-unique hash value, it is necessary to record the number of the comparison message file corresponding to the second hash value.

[0094] Step 303, matching the corresponding second hash value according to the array address, and searching the corresponding comparison message file in the target message file set for comparison analysis according to the number of the comparison message file corresponding to the second hash value to obtain the analysis result.

[0095] In the embodiment of the present disclosure, in order to solve the problem that the unique address cannot be determined due to the hash value being non-unique, it is necessary to search for the corresponding hash value through the message data to be analyzed, so that the array address can be quickly found according to the hash value. At the same time, in order to facilitate understanding of the implementation process of the embodiment of the present disclosure, an example is provided for illustration: HashMSG{} is a structure variable, and a variable first_index is defined in the structure. This variable records the number of the first comparison message file that calculates the same hash value. The variable next_index is defined in the v_sa_message{} structure. This variable points to the number of the next comparison message file that calculates the same hash value. For comparison message files with the same hash value, the corresponding comparison message file can be found by following the next_index variable. Because the number of comparison message files with the same hash value is small, the search speed of the array address is greatly improved. Figure 4 As shown, Figure 4 A schematic diagram of a search process for array addresses with the same hash value is provided for an embodiment of the present disclosure.

[0096] In one implementable method of the embodiment of the present disclosure, when analyzing and comparing the message data to be analyzed, it is necessary to adopt a numerical unified analysis method for the periodic parameters. Therefore, in order to accurately analyze the periodic parameters, it can be implemented by but not limited to the following methods: determining whether the analysis parameter is the periodic parameter of the message data to be analyzed, the analysis parameter is the parameter that needs to be compared and analyzed in the message data to be analyzed; when it is determined that the analysis parameter is the periodic parameter of the message data to be analyzed, calculating the convergence value and the stable value of the periodic parameter, and performing performance analysis on the periodic parameter based on the convergence value and the stable value.

[0097] Related to the above-mentioned embodiment, when the performance analysis of the cycle parameters is performed through a preset calculation algorithm, it can be implemented in the following manner but is not limited to: obtaining the comparison cycle parameters in the comparison message file corresponding to the message data to be analyzed, and calculating the convergence value of the cycle parameters through a convergence judgment algorithm based on the comparison cycle parameters; calculating the stable value of the cycle parameters through a stability judgment algorithm based on the convergence value and the number of message data to be analyzed; if the product of the convergence value and the stable value is less than a preset threshold, it is determined that the cycle parameter timing is correct; if the product of the convergence value and the stable value is greater than or equal to the preset threshold, it is determined that the cycle parameter timing is wrong.

[0098] In the embodiment of the present disclosure, the convergence value determination algorithm and the stability value determination algorithm are user-defined, and the definition convergence determination method of the periodic parameter and the definition stability determination method of the periodic parameter are specifically not limited by the embodiment of the present disclosure.

[0099] The calculation method of the convergence value and the stable value can be adopted but is not limited to the following methods: Define the convergence value S determination method: define t1 as the message period in the actual log, t2 as the message period defined in the database, and calculate the convergence value S by formula (1):

[0100]

[0101] Define the method for determining the stable value L: define n as the total number of received message data to be analyzed, and calculate the stable value L using formula (2):

[0102]

[0103] Regarding the judgment of the cycle timing of the cycle parameters, for example: when the deviation of all cycle messages is 25%, the calculated convergence value is 0.5 as the demarcation point, and the cycle timing is judged to be correct only when the product of the stable value and the convergence value is less than 0.5.

[0104] In one possible implementation of the embodiment of the present disclosure, a standardized test report needs to be generated for different tested vehicle models or different vehicle testing stages to facilitate later traceability. Therefore, in order to output a standardized test report, the following method may also be used but is not limited to: the analysis results are output in a preset output format to obtain a standardized comparison analysis report.

[0105] In the embodiment of the present disclosure, the preset output format is a custom selected output format, for example: output to an Excel document format, etc. At the same time, in order to more intuitively understand the comparison analysis report, such as Figure 5 As shown, Figure 5 A schematic diagram of a comparison analysis report provided by an embodiment of the present disclosure. By outputting a standardized and visual (eg, EXCEL) test report, the professional threshold of testers is lowered, the test effect is improved, and the test results are made more intuitive.

[0106] In summary, the embodiments of the present disclosure can achieve the following effects:

[0107] 1. After the embodiment of the present disclosure generates a file set by extracting the comparison CAN message data from the message database, the corresponding comparison CAN message data is searched from the file set according to the CAN message data to be analyzed for comparison and analysis. While realizing the automated comparison test, the message database can be quickly traversed and extracted, and comparison and analysis of multiple CAN message data to be analyzed can be performed at the same time, which meets the needs of rapid comparison, processing and analysis of a large amount of CAN message data, and the analysis of the CAN message data of the entire vehicle can be completed in a relatively short time.

[0108] 2. The disclosed embodiment combines the advantages of python in processing text and CAPL in processing messages. The CAN communication matrix is ​​extracted using a python script and output in a defined format, and CAPL is used to parse the message data to be analyzed, thereby realizing rapid analysis of the message data to be analyzed.

[0109] 3. The disclosed embodiment combines bus type and bus channel definition into data feature values, designs the structure and array framework and uses the Hash algorithm for fast traversal to meet the needs of fast comparison, processing and analysis of huge CAN message data. The comparison test can be directly performed on all the message data to be analyzed for the whole vehicle. The message data to be analyzed can be obtained through local collection or cloud data. The message data to be analyzed in any dynamic scene and working condition can be analyzed, which improves the test coverage and greatly improves the test efficiency.

[0110] 4. The disclosed embodiment can output standardized and visible test reports for different tested vehicle models or different vehicle test stages, thereby lowering the professional threshold for testers and improving the test effect.

[0111] Corresponding to the above-mentioned data comparison and analysis method, the present invention also provides a data comparison and analysis device. Since the device embodiment of the present invention corresponds to the above-mentioned method embodiment, details not disclosed in the device embodiment can be referred to the above-mentioned method embodiment, and will not be repeated in the present invention.

[0112] Figure 6 A schematic diagram of a data comparison and analysis device provided in an embodiment of the present disclosure, such as Figure 6 As shown, including:

[0113] An extraction unit 61 is used to extract corresponding message data for comparison from a preset database according to message attributes, where the message attributes are identification information used to determine the message data for comparison;

[0114] A generating unit 62, configured to generate different message files for comparison based on the message data for comparison, and obtain a target message file set, wherein the target message file set is a collection of different message files for comparison;

[0115] The analysis unit 63 is used to determine the array address corresponding to the message data to be analyzed through an address definition algorithm, and perform comparison analysis in the target message file set based on the array address to obtain an analysis result.

[0116] The data comparison and analysis device provided by the present disclosure extracts the corresponding comparison message data from a preset database according to the message attribute, wherein the message attribute is identification information for determining the comparison message data; based on the comparison message data, generates different comparison message files to obtain a target message file set, wherein the target message file set is a collection of different comparison message files; determines the array address corresponding to the message data to be analyzed by an address definition algorithm, and performs comparison and analysis in the target message file set based on the array address to obtain an analysis result. Compared with the related art, the embodiment of the present disclosure generates a file set by extracting the comparison CAN message data from the message database, and then searches for the corresponding comparison CAN message data from the file set according to the CAN message data to be analyzed for comparison and analysis. While realizing the automated comparison test, the message database can be quickly traversed and extracted, and comparison and analysis of multiple CAN message data to be analyzed can be performed at the same time, which satisfies the rapid comparison, processing and analysis of a large amount of CAN message data, and can complete the analysis of the CAN message data of the whole vehicle in a relatively short time.

[0117] Furthermore, in a possible implementation of the embodiment of the present disclosure, as Figure 7 As shown, the generating unit 62 includes:

[0118] An extraction module 621 is used to obtain the name of the electric control unit from the preset database, and number each electric control unit according to the electric control unit name to obtain an electric control unit number;

[0119] A generating module 622, configured to combine the ECU number with the corresponding ECU name to generate an ECU file, wherein the ECU file is a file formed by combining the ECU number with the corresponding ECU name;

[0120] The generating module 622 is further used to generate different comparison message files according to different bus channels from the comparison message data in combination with the ECU file to obtain the target message file set, wherein different bus channels correspond to different comparison message files.

[0121] Furthermore, in a possible implementation of the embodiment of the present disclosure, as Figure 7 As shown, the analysis unit 63 includes:

[0122] A definition module 631 is used to calculate a first hash value corresponding to the message data to be analyzed by a hash algorithm according to a first bus channel code and a first bus type code of the message data to be analyzed, and define the first hash value as the array address corresponding to the message data to be analyzed, wherein the first bus channel code and the first bus type code are binary value strings of the bus channel and the bus type in a computer language;

[0123] The analysis module 632 is used to search the corresponding comparison message file from the target message file set according to the array address, perform comparison analysis, and obtain the analysis result.

[0124] Furthermore, in a possible implementation of the embodiment of the present disclosure, as Figure 7 As shown, the analysis module 632 includes:

[0125] The acquisition submodule 6321 is used to acquire the second bus channel code and the second bus type code of each of the comparison message files in the target message file set, and to number each of the comparison message files by a preset numbering method;

[0126] a calculation submodule 6322, configured to calculate, according to the second bus channel code and the second bus type code, a second hash value corresponding to each of the comparison message files by using the hash algorithm, and record the number of the comparison message file corresponding to each of the second hash values;

[0127] The search submodule 6323 is used to match the corresponding second hash value according to the array address, and search for the corresponding comparison message file in the target message file set through the number of the comparison message file corresponding to the second hash value to perform comparison analysis and obtain the analysis result.

[0128] Furthermore, in a possible implementation of the embodiment of the present disclosure, as Figure 7 As shown, the analysis unit 63 includes:

[0129] A determination module 633 is used to determine whether an analysis parameter is a period parameter of the message data to be analyzed, wherein the analysis parameter is a parameter to be compared and analyzed in the message data to be analyzed;

[0130] The calculation module 634 is used to calculate the convergence value and the stability value of the periodic parameter when it is determined that the analysis parameter is the periodic parameter of the message data to be analyzed, and perform performance analysis on the periodic parameter according to the convergence value and the stability value.

[0131] Furthermore, in a possible implementation of the embodiment of the present disclosure, as Figure 7As shown, the calculation module 624 includes:

[0132] The calculation submodule 6341 is used to obtain the comparison period parameter in the comparison message file corresponding to the message data to be analyzed, and calculate the convergence value of the period parameter through a convergence determination algorithm according to the comparison period parameter;

[0133] The calculation submodule 6341 is further used to calculate the stable value of the period parameter through a stability determination algorithm according to the convergence value and the amount of the message data to be analyzed;

[0134] A determination submodule 6342, configured to determine that the period parameter timing is correct when the product of the convergence value and the stable value is less than the convergence value;

[0135] The determination submodule 6342 is further configured to determine that the period parameter timing error occurs when the product of the convergence value and the stable value is greater than or equal to the convergence value.

[0136] Furthermore, in a possible implementation of the embodiment of the present disclosure, as Figure 7 As shown, the device also includes:

[0137] The output unit 64 is used to output the analysis result according to a preset output format to obtain a standardized comparison analysis report.

[0138] It should be noted that the above explanation of the method embodiment is also applicable to the device of the embodiment of the present disclosure, and the principle is the same, which is no longer limited in the embodiment of the present disclosure.

[0139] 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.

[0140] Figure 8 A schematic block diagram of an example electronic device 800 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.

[0141] like Figure 8As shown, the device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a ROM (Read-Only Memory) 802 or a computer program loaded from a storage unit 808 to a RAM (Random Access Memory) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An I / O (Input / Output) interface 805 is also connected to the bus 804.

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

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

[0144] 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.

[0145] 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.

[0146] 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.

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

[0148] 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.

[0149] 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.

[0150] 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.

[0151] 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.

[0152] 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 method for data comparison and analysis, It is characterized in that include: Extracting corresponding message data for comparison from a preset database according to message attributes, wherein the message attributes are identification information used to determine the message data for comparison; Based on the comparison message data, different comparison message files are generated to obtain a target message file set, where the target message file set is a collection of different comparison message files; The array address corresponding to the message data to be analyzed is determined by an address definition algorithm, and a comparison analysis is performed in the target message file set based on the array address to obtain an analysis result.

2. The method according to claim 1, It is characterized in that The generating different comparison message files based on the comparison message data to obtain a target message file set includes: Acquire the name of the electric control unit from the preset database, and number each electric control unit according to the electric control unit name to obtain an electric control unit number; Combining the ECU number with the corresponding ECU name to generate an ECU file, wherein the ECU file is a file formed by combining the ECU number with the corresponding ECU name; In combination with the electronic control unit file, the comparison message data is used to generate different comparison message files according to different bus channels to obtain the target message file set, wherein different bus channels correspond to different comparison message files.

3. The method according to claim 2, It is characterized in that The array address corresponding to the message data to be analyzed is determined by the address definition algorithm, and a comparison analysis is performed in the target message file set based on the array address to obtain the analysis result, including: According to the first bus channel code and the first bus type code of the message data to be analyzed, a first hash value corresponding to the message data to be analyzed is calculated by a hash algorithm, and the first hash value is defined as the array address corresponding to the message data to be analyzed, wherein the first bus channel code and the first bus type code are binary value strings of the bus channel and the bus type in a computer language; According to the array address, the corresponding comparison message file is searched from the target message file set for comparison and analysis to obtain the analysis result.

4. The method according to claim 3, It is characterized in that The step of searching the target message file set for the corresponding comparison message file according to the array address for comparison and analysis to obtain the analysis result includes: Obtaining the second bus channel code and the second bus type code of each of the comparison message files in the target message file set, and numbering each of the comparison message files by a preset numbering method; Calculating a second hash value corresponding to each of the comparison message files by using the hash algorithm according to the second bus channel code and the second bus type code, and recording the number of the comparison message file corresponding to each of the second hash values; The corresponding second hash value is matched according to the array address, and the corresponding message file for comparison is searched in the target message file set through the number of the message file for comparison corresponding to the second hash value to obtain the analysis result.

5. The method according to claim 4, It is characterized in that The array address corresponding to the message data to be analyzed is determined by the address definition algorithm, and a comparison analysis is performed in the target message file set based on the array address to obtain the analysis result, including: Determine whether the analysis parameter is a period parameter of the message data to be analyzed, wherein the analysis parameter is a parameter to be compared and analyzed in the message data to be analyzed; When it is determined that the analysis parameter is a period parameter of the message data to be analyzed, a convergence value and a stable value of the period parameter are calculated, and a performance analysis is performed on the period parameter according to the convergence value and the stable value.

6. The method according to claim 5, It is characterized in that In the case where it is determined that the analysis parameter is a period parameter of the message data to be analyzed, calculating a convergence value and a stable value of the period parameter, and performing a performance analysis on the period parameter according to the convergence value and the stable value includes: Acquire a comparison period parameter in the comparison message file corresponding to the message data to be analyzed, and calculate the convergence value of the period parameter by a convergence determination algorithm according to the comparison period parameter; Calculating the stable value of the periodic parameter by a stability determination algorithm according to the convergence value and the amount of the message data to be analyzed; If the product of the convergence value and the stable value is less than the convergence value, it is determined that the period parameter timing is correct; If the product of the convergence value and the stable value is greater than or equal to the convergence value, it is determined that the cycle parameter timing is wrong.

7. The method according to claim 1, It is characterized in that After searching the array address corresponding to the message data to be analyzed by an address search algorithm, and performing a comparison analysis in the target message file set based on the array address to obtain the analysis result, the method includes: The analysis results are output according to a preset output format to obtain a standardized comparison analysis report.

8. A device for data comparison and analysis, It is characterized in that include: An extraction unit, used to extract corresponding message data for comparison from a preset database according to message attributes, wherein the message attributes are identification information used to determine the message data for comparison; A generating unit, configured to generate different message files for comparison based on the message data for comparison, and obtain a target message file set, wherein the target message file set is a collection of different message files for comparison; The analysis unit is used to determine the array address corresponding to the message data to be analyzed through an address definition algorithm, and perform comparison analysis in the target message file set based on the array address to obtain an analysis result.

9. 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 7.

10. 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-7.