A method and system for checking multi-dimensional compliance of an ECU flashing file CBF format
By employing a multi-dimensional, layered compliance verification method and a full-process log recording system for verifying the CBF format of ECU flashing files, this approach solves the problems of single verification dimensions and unclear results in existing technologies. It enables systematic and automated verification of CBF files and rapid problem localization, ensuring the safety and efficiency of the ECU flashing process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- WUHAN JIANGXIA CHUNENG AUTOMOBILE TECHNOLOGY R&D CO LTD
- Filing Date
- 2026-05-29
- Publication Date
- 2026-07-10
Smart Images

Figure CN122365598A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automotive electronics technology, and more specifically, to a method and system for multi-dimensional compliance verification of ECU flashing files in CBF format. Background Technology
[0002] Currently, in the software flashing process of automotive electronic control units (ECUs), the software files to be flashed are typically packaged into a specific CBF format file. To ensure the safety and reliability of the flashing process, the CBF file must undergo strict compliance verification before being deployed to the vehicle ECU. This is to identify any potential anomalies in the file and prevent non-compliant or unsafe files from being used for flashing, thereby ensuring the normal functioning of the ECU and vehicle safety.
[0003] However, existing CBF file compliance verification technologies have significant shortcomings. On the one hand, their verification dimensions are relatively limited, typically only covering limited aspects such as signature and format length. They cannot systematically and comprehensively check multiple core dimensions of CBF files, including basic format, parameter format, special flashing rules, data integrity check values, and secure signatures. This incomplete verification may lead to the omission of some potential file anomalies, creating hidden dangers for subsequent ECU flashing.
[0004] On the other hand, the feedback from existing verification technologies is often unclear and lacks specificity, typically only providing a simple "pass" or "fail" conclusion without detailed descriptions of specific errors, specification requirements, and actual values. More importantly, the entire verification process lacks complete logging, making the verification operation untraceable. When verification fails, developers struggle to quickly and accurately pinpoint the root cause, relying instead on experience for manual troubleshooting. This increases the cost of problem location and resolution, and also impacts the efficiency and reliability of ECU software flashing. Summary of the Invention
[0005] This invention addresses the technical problems existing in the prior art by providing a method and system for multi-dimensional compliance verification of CBF format ECU flashing files. By sequentially performing multi-dimensional layered compliance verification and combining it with full-process log recording, it achieves systematic and automated verification of CBF files from format and parameters to security, effectively improving the comprehensiveness of verification and the efficiency of problem location, thereby ensuring the safety and reliability of ECU flashing.
[0006] According to a first aspect of the present invention, a method for multi-dimensional compliance verification of ECU flashing files in CBF format is provided, comprising: Receive the CBF file to be verified and related configuration information, and perform a preliminary legality check on the CBF file and configuration information; Based on the CBF file and configuration information that passed the initial inspection, the CBF file is parsed and then layered compliance checks covering multiple preset dimensions, including basic format, parameter format, special rules, check values, signature, and ABT, are performed in sequence. Output the results of the hierarchical compliance verification and record the entire verification process in a log.
[0007] Based on the above technical solution, the present invention can also be improved as follows.
[0008] Optionally, parsing the CBF file includes: performing a three-segment structure parsing on the CBF file to extract information from the version segment, header segment, and data segment.
[0009] Optionally, the basic format verification includes at least one of the following: Verify that the first byte of the CBF file is a preset identifier; Verify that the version section content conforms to the preset format specifications; Verify that specific symbols in the header section are in English half-width format; Verify the encoding of the version segment and header segment, as well as the byte order of the data segment.
[0010] Optionally, the parameter format validation includes: Perform compliance checks on the format and length of the software identifier, software version, and software type parameters extracted from the header segment; The encoding format of integer type parameters, the value of data format identifier parameters, and the length and format of signature and hash type parameters are verified.
[0011] Optionally, the special rule verification includes: Based on the value of the software type, verify whether the CBF file contains the corresponding entry point parameter or erase range parameter; Verify that the number of erase range parameters and the number of data blocks do not exceed the preset threshold, and verify the format of the erase range parameters.
[0012] Optionally, the verification value verification includes: Recalculate the CRC checksum for each data block and compare it with the parsed checksum; And / or, recalculate the CRC checksum of all contents of the CBF data segment and compare it with the file-level checksum obtained from the header segment.
[0013] Optionally, the signature and ABT verification include: The R&D public key is used to verify the R&D signature obtained from the header segment. Verify the format and length of the ABT hash, and verify whether the order of the data block definitions in the ABT is consistent with the list of data blocks in the data segment, and whether the hash values match.
[0014] Optionally, the preliminary legality check on the CBF file and configuration information includes at least one of the following: Verify the existence and path validity of the CBF file to be verified; Verify the integrity of the relevant configuration information; Verify the validity of the format of the R&D private key.
[0015] Optionally, the step of logging the entire verification process includes: Record input file information, parsing results, verification status of each verification dimension, overall verification results, and exception details; The log file and the CBF file to be verified are stored in the same path and named according to preset rules.
[0016] According to a second aspect of the present invention, a multi-dimensional compliance verification system for ECU flashing files in CBF format is provided, comprising: The input and initial inspection module is used to receive the CBF file to be verified and related configuration information, and to perform an initial legality check; The parsing and verification module is used to parse the CBF files that have passed the initial inspection and perform layered compliance verification in sequence, covering multiple preset dimensions including basic format, parameter format, special rules, check value, signature and ABT. The output and log module is used to output the verification results and record the entire verification process in a log.
[0017] According to a third aspect of the present invention, an electronic device is provided, including a memory and a processor, wherein the processor is configured to execute a computer management program stored in the memory to implement the steps of the above-described ECU flashing file CBF format multi-dimensional compliance verification method.
[0018] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, on which a computer management program is stored, wherein when the computer management program is executed by a processor, the steps of the above-described ECU flashing file CBF format multi-dimensional compliance verification method are implemented.
[0019] This invention provides a method, system, electronic device, and storage medium for multi-dimensional compliance verification of CBF format ECU flashing files. It performs an initial check on the received CBF file and related configuration information to ensure the legality and usability of the input file. Subsequently, it performs structured parsing on the input file that passes the initial check and sequentially executes multiple preset and logically progressive dimension checks, from the most superficial format specifications to the core security signature. This allows the verification operation to systematically cover all levels and key attributes of the file structure, thereby achieving in-depth investigation of potential anomalies and security risks. This invention improves the completeness and effectiveness of verification by integrating previously scattered or missing verification points into an automated, strictly ordered checking process. Furthermore, detailed logging ensures that the success or failure of any verification step is traceable, greatly facilitating developers to quickly trace and locate the specific problem when verification fails, thus ensuring the reliability of the flashing file itself and the security of the subsequent ECU flashing process. Attached Figure Description
[0020] Figure 1 A flowchart of a multi-dimensional compliance verification method for ECU flashing files in CBF format provided by this invention; Figure 2 A flowchart illustrating the multi-dimensional compliance verification method for ECU flashing files in CBF format under a specific implementation scenario; Figure 3 A block diagram of a multi-dimensional compliance verification system for ECU flashing files in CBF format provided by this invention; Figure 4 A schematic diagram of the hardware structure of a possible electronic device provided by the present invention; Figure 5 This is a schematic diagram of the hardware structure of a possible computer-readable storage medium provided by the present invention. Detailed Implementation
[0021] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples. The following examples are for illustrative purposes only and are not intended to limit the scope of the invention.
[0022] In this embodiment of the invention, when collecting, processing, and storing user personal information (such as images, behavioral characteristics, etc.), the implementation of the technical solution strictly adheres to the principles of legality, legitimacy, and necessity, as well as the core rule of "notification-consent." Specifically, before information collection, the system clearly informs the user of the purpose, method, scope, and usage rules of information collection through an interactive interface, and requires the user's active authorization and consent. The entire information processing process employs data encryption, access control, and other technical measures to ensure information security, and establishes mechanisms to facilitate users' exercise of their rights (such as querying, correcting, withdrawing consent, and deleting information). For exceptions stipulated by law (such as those necessary for fulfilling statutory duties or responding to public health emergencies), their application is strictly limited to the scope and limits authorized by law, ensuring that the technical solution does not contain any content that violates the law, social morality, or harms the public interest.
[0023] Figure 1 A flowchart of a multi-dimensional compliance verification method for ECU flashing files in CBF format provided by this invention is shown below. Figure 1 As shown, the method includes steps S1 to S3.
[0024] S1, receive the CBF file to be verified and related configuration information, and perform a preliminary legality check on the CBF file and configuration information.
[0025] This step involves receiving and initially checking the input files. It begins by receiving the user's input path to the CBF file to be verified and the paths to related configuration files. This step performs a preliminary validity check on the input files to ensure that subsequent processes can start normally. For example, this preliminary validity check includes confirming that the specified CBF file exists and the path is valid, verifying that the relevant configuration information is complete, and checking whether the format of the included R&D private key is valid. Only input files that pass the preliminary validity check will be allowed to proceed to the subsequent verification stages.
[0026] S2, based on the CBF file and configuration information that passed the initial inspection, after parsing the CBF file, perform layered compliance checks in sequence covering multiple preset dimensions including basic format, parameter format, special rules, check value, signature, and ABT.
[0027] This step involves parsing and layered compliance verification. For example, the CBF file that passes the initial legality check is first parsed in a three-segment structure, extracting specific information from the version segment, header segment, and data segment. Then, based on the parsed information, multiple preset dimensions of in-depth verification are executed sequentially, strictly following a logical order from the outside in and from format to content. These preset dimensions include format checks on the file's basic structure, verification of the length and format of key parameters, checks based on special rules triggered by specific parameters, calculation and comparison of data block and file-level checksums, and security verification of the R&D signature and ABT hash. The multi-dimensional verifications executed sequentially in this step constitute a systematic review of the file's compliance.
[0028] S3, output the results of the hierarchical compliance verification, and record the entire verification process in a log.
[0029] This step is responsible for outputting results and recording the process. After all verifications are completed, a clear overall verification result is generated and output. Simultaneously, detailed logging is automatically performed throughout the entire process, from the start of verification (initial legality check) to the end (layered compliance verification). The log content covers input file information, intermediate results obtained from parsing, the specific execution status and findings for each verification dimension, the final verification conclusion, and details of any anomalies. The generated log files are stored in the same directory as the original CBF file to be verified, following preset naming rules to ensure that every verification operation has a complete and traceable record.
[0030] Understandably, given the deficiencies in the background technology, this invention proposes a multi-dimensional compliance verification method for ECU flashing files in CBF format. This method begins with a basic initial legality check of the received CBF file and configuration information to filter out obvious problems such as invalid paths, missing files, or incorrect key formats, ensuring reliable input. Subsequently, the file is structurally parsed to extract key information from the version segment, header segment, and data segment. Based on this, a rigorous logic from basic to core, from format to security, is followed to perform in-depth verification across multiple preset dimensions. For example, this multi-dimensional layered compliance verification includes checking the file's outermost identifier and encoding, verifying the length and format of header parameters, triggering checks for specific flashing rules based on parameters such as software type, recalculating and verifying the checksums of data blocks and the entire file to ensure data integrity, and finally performing security verification on the R&D signature and ABT hash. This process integrates previously scattered or missing checkpoints into an ordered and automated in-depth verification process, achieving a systematic screening of CBF file compliance.
[0031] This invention improves the comprehensiveness and reliability of verification, enabling the discovery of deep-seated anomalies missed by previous single-dimensional verifications. Furthermore, due to the detailed logging of the entire verification process, the success or failure of any verification step has complete and traceable evidence. This allows developers to quickly and accurately pinpoint the specific rule in which dimension failed when encountering verification failures, greatly reducing the time and manpower costs of troubleshooting and ensuring the security and success rate of subsequent ECU software flashing processes.
[0032] Based on the above technical solutions, the embodiments of the present invention can be further improved as follows.
[0033] Example 1: refer to Figure 2 As shown in the figure, this embodiment illustrates a multi-dimensional compliance verification method for ECU flashing file CBF format in a specific implementation scenario.
[0034] This embodiment provides a multi-dimensional compliance verification method for ECU flashing files in CBF format, which mainly includes the following steps S1~S3: S1, Input file reception and initial legality check: Receive the CBF file to be verified and related configuration information, and perform an initial legality check on the CBF file and configuration information.
[0035] In specific implementation, such as Figure 2 As shown, the process first enters the input module, which receives external input, namely the CBF file to be verified and related configuration information. The related configuration information includes the S19 / Hex source file configuration corresponding to the CBF file and the R&D private key information, to ensure that the verification process has sufficient reference.
[0036] Upon receipt, an initial legitimacy check is immediately performed. The core dimensions of the initial check include: the existence and path validity of the CBF file to be verified, to avoid verification failure due to missing files or incorrect paths; the completeness of relevant configuration information, to ensure that the reference parameters required in subsequent verification processes are complete; and the legality of the development private key format, confirming that it is in PEM format and contains a valid PKCS#8 private key identifier, to provide reliable support for subsequent signature verification.
[0037] After the initial check passes, the CBF file to be verified and related configuration information are synchronously transmitted to the parsing module, and the subsequent parsing process begins. If any initial check item fails, the log module is immediately triggered to record detailed error information (including the error item and the reason for the exception), and the entire verification process is terminated to ensure that there are no fundamental anomalies in the input data. The process can only continue after the initial check passes.
[0038] S2, File parsing and hierarchical compliance verification in sequence: Based on the CBF file and configuration information that passed the initial inspection, after parsing the CBF file, perform hierarchical compliance verification in multiple preset dimensions including basic format, parameter format, special rules, check value, and signature and ABT in sequence.
[0039] First, parse the CBF file and configuration information that passed the initial inspection. As Figure 2 shown, after the parsing module receives the CBF file to be verified transmitted by the input module, perform hierarchical parsing according to the three-segment structure (version segment, header segment, data segment) of the CBF file to ensure comprehensive and non-missing parsing.
[0040] Specifically, for the version segment, extract its complete content for subsequent basic format verification; for the header segment, accurately extract all core parameters, including the three elements of ABT (AuthenticationBlockTail, authentication tail block) (abt_start, abt_length, abt_hash), dev_signature (R&D signature), prod_signature (production line signature placeholder), cbf_checksum (file-level checksum), and all compliance variables such as sw_id (software identifier), sw_version (software version), sw_type (software type) in the configuration file to provide data for parameter format, signature, and ABT verification; for the data segment, extract the list of DataBlock (data block) and the core information of each DataBlock (start address, original length, original binary data, CRC16-CCITT checksum) to provide data for check value verification and special rule verification. After parsing, organize all parsing results and synchronously transmit them to the subsequent verification module to ensure that the verification module can obtain a complete and accurate verification data source and avoid missed or false detections due to incomplete parsing.
[0041] Then, as Figure 2 shown, after the verification module receives the parsing results transmitted by the parsing module, perform full-dimensional compliance verification according to the hierarchical logic of basic format → parameter format → special rules → check value → signature and ABT. All verification items must pass to be determined as verification qualified, and any failed verification item is directly determined as unqualified. Specifically, the multi-dimensional compliance verification steps and logic are as follows: (1) Basic format verification Focusing on the basic format compliance of CBF files, the verification items include: whether the first byte of the CBF file is 0x43 (corresponding to the ASCII character "c") to ensure file identification compliance; whether the version section content is only cbf_version=1.0; whether there are any comments, blanks, or additional content to ensure version identification is standardized; whether the curly braces, semicolons, equal signs, and other symbols in the header section are English half-width characters to avoid file parsing errors caused by incorrect symbol formats; whether the version section and header section are ASCII encoded, and whether the data section is binary big-endian byte order to ensure no encoding confusion or conversion errors, and to adapt to the parsing requirements of ECU flashing devices.
[0042] (2) Parameter format verification For all parameters extracted from the header, their format and length are verified item by item according to the specifications. The core verification items include: whether sw_id is a number starting with 1, with a character length ≤ 20 and enclosed in English double quotes; whether sw_version consists only of uppercase AZ characters, with a length ≤ 2 and enclosed in English double quotes; whether sw_type is one of DATA / EXE / SBL / PBL / CERT / PWD / APP to ensure software type compliance; whether all integer type parameters are hexadecimal starting with 0x, conforming to the CBF file parameter encoding specification; whether data_format_id (data format identifier) is only 0x00 or 0x10 to ensure data format identifier compliance; and whether signature and hash type parameters such as dev_signature and abt_hash are hexadecimal strings starting with 0x, with dev_signature having a length of 256 bytes and abt_hash having a length of 32 bytes to ensure signature and hash parameter format compliance.
[0043] (3) Special rule verification Considering the specific requirements of ECU flashing scenarios, the compatibility and quantity of parameters are verified. The core verification items include: if sw_type=SBL (bootloader), it is necessary to verify whether the entry_point parameter is included and whether the erase_range parameter is missing; if sw_type≠SBL, it is necessary to verify whether the entry_point parameter (an optional parameter parsed from the header segment of the CBF file) is missing, and flash memory software must include the erase_range parameter; at the same time, it is verified that the number of erase_range parameter groups and the number of DataBlocks are both ≤20, and the erase_range parameter format is enclosed in {()}, with each group being (start address, length), and both the address and length are 4 bytes of hexadecimal, to ensure compliance with flashing rules and avoid ECU flashing failures due to parameter mismatch.
[0044] (4) Verification of check value Focusing on data integrity, dual verification is performed. The core verification items include: recalculating the CRC16-CCITT checksum of each DataBlock and comparing it with the parsed and extracted checksum to confirm that a single data block has not been tampered with or transmitted incorrectly; recalculating the CRC32 checksum of all contents of the CBF data segment and comparing it with the parsed and extracted cbf_checksum to confirm file-level data integrity; if the data segment has no DataBlock, verifying whether the cbf_checksum is 0xFFFFFFFF to ensure compliance of the checksum in special scenarios.
[0045] (5) Signature and ABT verification To ensure the authenticity and security of CBF files, core verification items include: whether the format and length of dev_signature conform to the specifications, and verifying the dev_signature using the R&D public key to confirm that the signature has not been tampered with and is consistent with the original ABT data; whether the format and length of abt_hash conform to the specifications to ensure the overall integrity of ABT; whether the ABT format variable is 0x0000 to ensure ABT format compliance; and whether the DataBlock definition field order is consistent with the DataBlock list and whether the hash value matches the calculation result of the corresponding DataBlock original data to ensure that the ABT data is consistent with the data segment data and has not been tampered with.
[0046] S3, Result Output and Log Recording: Output the results of the layered compliance verification and record the entire verification process in a log.
[0047] like Figure 2 As shown, the output module receives the verification result transmitted by the verification module and performs the corresponding output operation according to the verification result: If the verification is successful, it means that the CBF file fully complies with the specifications and can be directly used for ECU flashing. At this time, a compliant CBF file and a detailed verification report are output. The verification report includes all verification items, specification requirements, actual values, and verification results, serving as an important proof of the CBF file's compliance. If the verification fails, it indicates that the CBF file is abnormal. In this case, the CBF file will be rejected, and detailed error information will be output, including the error item, specification requirements, and actual value, to provide users with a clear direction for troubleshooting and reduce the cost of problem handling.
[0048] The logging module records the entire verification process. For example... Figure 2As shown, in specific implementation, the logging module works in conjunction with other modules to record the entire verification process information. The recorded content includes: input file information (file path, name, size), parsing results from the parsing module, verification status of each verification dimension from the verification module (verification item, actual value, verification result), overall verification result, exception details (error item, exception cause), and troubleshooting suggestions. The log format is TXT / CSV, UTF-8 encoded, and stored in the same path as the CBF file to be verified, with the naming convention as follows:<sw_id><sw_version> The _LOG_timestamp.txt file permanently stores log information, ensuring the verification process is traceable. This facilitates subsequent investigation of historical anomalies and tracing of responsibility, while also providing data support for system optimization.
[0049] Example 2; Figure 3 This invention provides a structural diagram of a multi-dimensional compliance verification system for ECU flashing files in CBF format, as shown in the embodiment of the invention. Figure 3 As shown, a multi-dimensional compliance verification system for ECU flashing files in CBF format includes an input and initial inspection module, a parsing and verification module, and an output and log module, wherein: The input and initial inspection module is used to receive the CBF file to be verified and related configuration information, and to perform an initial legality check; The parsing and verification module is used to parse the CBF files that have passed the initial inspection and perform layered compliance verification in sequence, covering multiple preset dimensions including basic format, parameter format, special rules, check value, signature and ABT. The output and log module is used to output the verification results and record the entire verification process in a log.
[0050] It is understood that the ECU flashing file CBF format multi-dimensional compliance verification system provided by the present invention corresponds to the ECU flashing file CBF format multi-dimensional compliance verification method provided in the foregoing embodiments. The relevant technical features of the ECU flashing file CBF format multi-dimensional compliance verification system can be referred to the relevant technical features of the ECU flashing file CBF format multi-dimensional compliance verification method, and will not be repeated here.
[0051] Please see Figure 4 , Figure 4 A schematic diagram illustrating an embodiment of the electronic device provided in this invention. For example... Figure 4 As shown, this embodiment of the invention provides an electronic device 400, including a memory 410, a processor 420, and a computer program 411 stored in the memory 410 and executable on the processor 420. When the processor 420 executes the computer program 411, it performs the following steps: Receive the CBF file to be verified and related configuration information, and perform a preliminary legality check on the CBF file and configuration information; Based on the CBF file and configuration information that passed the initial inspection, the CBF file is parsed and then layered compliance checks covering multiple preset dimensions, including basic format, parameter format, special rules, check values, signature, and ABT, are performed in sequence. Output the results of the hierarchical compliance verification and record the entire verification process in a log.
[0052] Please see Figure 5 , Figure 5 This is a schematic diagram illustrating an embodiment of a computer-readable storage medium provided by the present invention. (See diagram below.) Figure 5 As shown, this embodiment provides a computer-readable storage medium 500 on which a computer program 411 is stored. When the computer program 411 is executed by a processor, it performs the following steps: Receive the CBF file to be verified and related configuration information, and perform a preliminary legality check on the CBF file and configuration information; Based on the CBF file and configuration information that passed the initial inspection, the CBF file is parsed and then layered compliance checks covering multiple preset dimensions, including basic format, parameter format, special rules, check values, signature, and ABT, are performed in sequence. Output the results of the hierarchical compliance verification and record the entire verification process in a log.
[0053] This invention provides a method, system, electronic device, and storage medium for multi-dimensional compliance verification of ECU flashing files in CBF format. By constructing an automated process from initial input screening and file structure parsing to sequential execution of multi-dimensional, layered verification, this invention systematically addresses the inherent shortcomings of incomplete CBF file compliance checks and difficulty in tracing issues. In practice, invalid input is first filtered out. Then, all key parameters of the file are extracted according to the CBF format specification. Subsequently, a deep review of the file is conducted, strictly following a progressive order from surface format, parameter specifications, business logic rules, data integrity, to security. This invention integrates previously missing or isolated verification points into an interlocking verification chain, achieving comprehensive coverage of file compliance and effectively improving anomaly detection rate and verification reliability. Simultaneously, due to detailed logging throughout the verification process, the success or failure of any step is traceable, enabling developers to quickly pinpoint specific failure points, greatly reducing troubleshooting costs, and thus ensuring the overall security and efficiency of the ECU software flashing process.
[0054] It should be noted that the descriptions of each embodiment in the above embodiments have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0055] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0056] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0057] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0058] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0059] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.
[0060] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A method for multi-dimensional compliance verification of ECU flashing files in CBF format, characterized in that, include: Receive the CBF file to be verified and related configuration information, and perform a preliminary legality check on the CBF file and configuration information; Based on the CBF file and configuration information that passed the initial inspection, the CBF file is parsed and then layered compliance checks covering multiple preset dimensions, including basic format, parameter format, special rules, check values, signature, and ABT, are performed in sequence. Output the results of the hierarchical compliance verification and record the entire verification process in a log.
2. The method for multi-dimensional compliance verification of ECU flashing file CBF format according to claim 1, characterized in that, The parsing of the CBF file includes: performing a three-segment structure parsing on the CBF file to extract information from the version segment, header segment, and data segment.
3. A method for multi-dimensional compliance verification of ECU flashing file CBF format according to claim 1 or 2, characterized in that, The basic format validation includes at least one of the following: Verify that the first byte of the CBF file is a preset identifier; Verify that the version section content conforms to the preset format specifications; Verify that specific symbols in the header section are in English half-width format; Verify the encoding of the version segment and header segment, as well as the byte order of the data segment.
4. The method for multi-dimensional compliance verification of ECU flashing file CBF format according to claim 1, characterized in that, The parameter format validation includes: Perform compliance checks on the format and length of the software identifier, software version, and software type parameters extracted from the header segment; The encoding format of integer type parameters, the value of data format identifier parameters, and the length and format of signature and hash type parameters are verified.
5. The method for multi-dimensional compliance verification of ECU flashing file CBF format according to claim 4, characterized in that, The special rule verification includes: Based on the value of the software type, verify whether the CBF file contains the corresponding entry point parameter or erase range parameter; Verify that the number of erase range parameters and the number of data blocks do not exceed the preset threshold, and verify the format of the erase range parameters.
6. A method for multi-dimensional compliance verification of ECU flashing file CBF format according to claim 1 or 2, characterized in that, The verification value verification includes: Recalculate the CRC checksum for each data block and compare it with the parsed checksum; And / or, recalculate the CRC checksum of all contents of the CBF data segment and compare it with the file-level checksum obtained from the header segment.
7. A method for multi-dimensional compliance verification of ECU flashing file CBF format according to claim 1 or 2, characterized in that, The signature and ABT verification include: The R&D public key is used to verify the R&D signature obtained from the header segment. Verify the format and length of the ABT hash, and verify whether the order of the data block definitions in the ABT is consistent with the list of data blocks in the data segment, and whether the hash values match.
8. The method for multi-dimensional compliance verification of ECU flashing file CBF format according to claim 1, characterized in that, The preliminary legality check of the CBF file and configuration information includes at least one of the following: Verify the existence and path validity of the CBF file to be verified; Verify the integrity of the relevant configuration information; Verify the validity of the format of the R&D private key.
9. The method for multi-dimensional compliance verification of ECU flashing file CBF format according to claim 1, characterized in that, The process of logging the entire verification process includes: Record input file information, parsing results, verification status of each verification dimension, overall verification results, and exception details; The log file and the CBF file to be verified are stored in the same path and named according to preset rules.
10. A multi-dimensional compliance verification system for ECU flashing files in CBF format, characterized in that, include: The input and initial inspection module is used to receive the CBF file to be verified and related configuration information, and to perform an initial legality check; The parsing and verification module is used to parse the CBF files that have passed the initial inspection and perform layered compliance verification in sequence, covering multiple preset dimensions including basic format, parameter format, special rules, check value, signature and ABT. The output and log module is used to output the verification results and record the entire verification process in a log.