A vehicle-mounted bus program updating method and system based on local offline updating

By using a local offline update method, the system performs stability and integrity checks on the vehicle's instrument panel using a programmer before directly writing the update information, thus solving the network dependency problem and achieving stable and secure updates in special scenarios.

CN121541909BActive Publication Date: 2026-04-17NINGBO HAISHU XUELIMAN ELECTRONIC CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NINGBO HAISHU XUELIMAN ELECTRONIC CO LTD
Filing Date
2026-01-19
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing automotive instrument cluster updates are highly dependent on the network environment and cannot be performed in special usage scenarios such as production lines.

Method used

The vehicle bus program update method based on local offline updates is adopted. After collecting external media signals through a programmer and performing stability and integrity verification, the update information is directly written into the vehicle instrument panel, including steps such as stability verification, integrity verification, and protocol matching.

Benefits of technology

It enables stable and secure updates to automotive instrument cluster programs without relying on a network environment, avoiding network fluctuations and security risks, and ensuring the integrity and reliability of the updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121541909B_ABST
    Figure CN121541909B_ABST
Patent Text Reader

Abstract

This invention relates to a method and system for updating vehicle bus programs based on local offline updates, belonging to the technical field of offline updates. The method includes: controlling a preset programmer to acquire external insertion signals from an external medium and performing stability verification based on the external insertion signals; after the stability verification passes, reading update information from the external medium and saving it to a preset storage module, and performing integrity verification on the update information; after the integrity verification passes, writing the update information into a preset application area; sending a preset handshake command to the vehicle instrument cluster and performing protocol matching; after the protocol matching passes, writing the update information from the application area into the vehicle instrument cluster. This application enables vehicle instrument clusters to be updated without relying on a network in special usage scenarios such as production lines.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of offline updates, and in particular to a method and system for updating vehicle bus programs based on local offline updates. Background Technology

[0002] As the core carrier of information interaction between the driver and the vehicle, the intelligent vehicle instrument panel not only needs to display basic driving data such as vehicle speed, engine speed, and fuel level in real time, but also needs to support complex functions such as navigation guidance, multimedia control, vehicle fault diagnosis, and feedback from driver assistance systems. To ensure the stability, safety, and continuous optimization of the user experience of these functions, the updating and upgrading of the vehicle instrument panel program has become an indispensable and important part of the entire life cycle service of the vehicle.

[0003] Currently, the mainstream method for updating automotive instrument cluster programs mainly relies on cloud-based update technology. This involves establishing a communication connection between the vehicle's connected car module and a remote cloud server, automatically downloading and completing the program upgrade upon detecting an update package.

[0004] However, the above update methods are highly dependent on the network environment. In the special use case of the production line, network limitations make cloud updates impossible. Summary of the Invention

[0005] To enable automotive instrument panels to be updated without relying on the network in special usage scenarios such as production lines, this invention provides a method and system for updating vehicle bus programs based on local offline updates.

[0006] In a first aspect, the present invention provides a method for updating vehicle bus programs based on local offline updates, employing the following technical solution:

[0007] A method for updating vehicle bus software based on local offline updates includes:

[0008] The preset programmer is controlled to acquire external insertion signals from external media and to perform stability verification based on the external insertion signals.

[0009] After the stability check passes, the update information is read from the external medium and saved to the preset storage module, and the integrity of the update information is checked.

[0010] After the integrity verification passes, the updated information will be written to the preset application area;

[0011] Send a preset handshake command to the car's instrument panel and perform protocol matching;

[0012] Once the protocol is successfully matched, the updated information will be written from the application area to the car's instrument panel.

[0013] By adopting the above technical solution, the updated information is stored on an external medium and directly written into the vehicle's instrument panel via a programmer. Compared to network-based updates, this method is unaffected by network fluctuations and network security issues, offers more stable transmission, reduces data loss, and can meet the update requirements of special usage scenarios on production lines.

[0014] Optional methods for stability verification include:

[0015] The system reads the starting data segment of the preset update information based on the external insertion signal and stores it in the first area of ​​the preset storage module. After storage is completed, reading the update information is paused.

[0016] Based on the preset number of data segments, the starting data segment of the update information in the first area is analyzed to determine whether there are duplicate data segments;

[0017] When duplicate data segments exist, the stability check is defined as failing, the stability type is marked as 0, and the transmission stability is repaired using a preset stability repair method.

[0018] When there are no duplicate data segments, extract all character segment data from the starting data segment and extract the address number of the preset character segment data;

[0019] Generate a data address table based on the character field data and address number;

[0020] The data address table is compared and analyzed with the preset file reference address table to determine whether the starting data segment is a continuous data segment in the update information;

[0021] If the data segment is a continuous segment in the update information, the stability check passes, the stability type is marked as 1, and an indicator light is issued to indicate this.

[0022] Optionally, methods for saving update information to a preset storage module include:

[0023] Analyze the stability type to determine whether the stability check passed;

[0024] When the stability check fails, the stability of the external medium is repaired, and the updated information is stored in the second area of ​​the preset storage module.

[0025] Delete the starting data segment in the first region of the storage module;

[0026] When the stability check passes, continue reading the remaining data segments in the update information, excluding the initial data segment;

[0027] The remaining data segment is stored in the first area of ​​the storage module, forming update information together with the initial data segment.

[0028] Optional integrity verification methods include:

[0029] Extract all character segment data from the update information and determine the address number of the character segment data;

[0030] Calculate the CRC value based on the character segment data;

[0031] The CRC value is compared sequentially with the CRC standard value pre-stored in the non-volatile memory cell of the storage module to determine whether the two are consistent;

[0032] When the two are inconsistent, the address numbers are reorganized according to the CRC standard value to fill the address numbers of the missing data, and the update information is transferred to the cache area of ​​the non-volatile storage unit.

[0033] Reread the updated information, compare the CRC values ​​of all character segments with the CRC standard values, and record the number of times the information is reread.

[0034] The integrity check passes if and only if the number of rereads does not exceed the preset number of consecutive reads, and the CRC value of all character segment data is consistent with the CRC standard value.

[0035] Optional, also includes:

[0036] When the number of rereads exceeds the number of consecutive reads, the address number of the character segment data that is inconsistent with the CRC standard value during each repeated read is recorded to obtain the error address number;

[0037] Compare all the error address numbers to determine if they match;

[0038] If all error address numbers are inconsistent, perform stability verification again;

[0039] When all error address numbers are consistent, it indicates that the update package in the external media is corrupt, and the output indicator light will indicate this.

[0040] Optionally, the handling methods for power outages during integrity verification include:

[0041] Extract cache update information from the cache region of non-volatile memory units;

[0042] Analyze the cache update information and extract all address numbers;

[0043] Remove duplicate address numbers and their corresponding character field data;

[0044] The remaining character segment data is rearranged and reorganized according to address number to obtain the reorganized update information;

[0045] Determine whether the CRC value of the recombined and updated information is consistent with the standard CRC value;

[0046] If they match, the reorganized update information will be used as the update information to be written.

[0047] If there is a discrepancy, the updated information is read again from the external medium and used as the update information to be written.

[0048] Optional stability improvement methods include:

[0049] Adjust the connection between the external medium and the programmer, press the external medium firmly into the programmer with the preset insertion pressure, and enter the debugging mode. The indicator light will light up at the preset flashing frequency.

[0050] Continuously read the starting data segment of the update information and perform stability checks;

[0051] When the stability check passes, record the number of consecutive checks.

[0052] If the stability check fails, reset the consecutive check count.

[0053] If the number of consecutive verifications does not exceed the preset baseline number of verifications within the preset verification time, the indicator light will turn off, and the connection between the external media and the programmer will be readjusted.

[0054] If the number of consecutive checks exceeds the preset baseline number of checks within the preset check time, the flashing frequency additional value is matched according to the number of consecutive checks.

[0055] The correction frequency is obtained by accelerating the correction of the flicker frequency based on the flicker frequency addition value;

[0056] The correction frequency control indicator flashes, and it is determined whether the number of consecutive checks exceeds the preset number of qualified checks;

[0057] When the number of consecutive verifications exceeds the number of qualified verifications, the stability repair is complete, the indicator light stays on, and the clamping mechanism on the programmer is controlled by the preset clamping force to clamp and fix the external medium.

[0058] Optionally, protocol matching methods include:

[0059] The handshake command is analyzed to obtain the protocol version number and the CRC sum value of the update information;

[0060] The protocol version number is compared with the preset baseline version number to determine whether the update information meets the writing requirements;

[0061] If and only if the protocol version number of the update information meets the requirements, the CRC sum of the update information and the preset encryption number are encrypted using the preset encryption algorithm to obtain the key number.

[0062] The key number is sent to the programmer, which combines the key number with the CRC sum of the update information and controls the programmer to restore the key number to the decoded and encrypted number, and then sends it to the car's instrument panel.

[0063] When the decoded encrypted number matches the encrypted number, the protocol is successfully matched.

[0064] Optionally, preventative measures to avoid power loss during the update process from the application area to the vehicle's instrument cluster include:

[0065] The memory area of ​​the car instrument panel is divided into a first running partition, a second running partition, and an update partition. The original instrument panel program is stored in the first running partition and runs in the first running partition.

[0066] The update information is written from the application area to the update partition, and the integrity is checked again.

[0067] After the integrity verification is passed, disconnect the programmer from the car instrument panel and supply power to the car instrument panel with a preset stable power supply.

[0068] The update partition will overwrite the second running partition at a preset read / write rate;

[0069] Switch the car's instrument panel to operate in the second operating zone.

[0070] Secondly, this application provides a vehicle bus program update system based on local offline updates, which adopts the following technical solution:

[0071] A vehicle bus program update system based on local offline updates, including the vehicle bus program update method based on local offline updates as described in any one of the above claims, comprising:

[0072] The external acquisition module is used to acquire data input from external media.

[0073] The storage module stores the data collected by the external acquisition module;

[0074] The communication output module outputs the data stored in the storage module.

[0075] The main control module stores the data collected by the external acquisition module into the storage module, processes the data in the storage module, and outputs it through the communication output module.

[0076] The power supply module is used to supply power to the main control module;

[0077] The status indicator module is used to indicate the status of the main control module.

[0078] In summary, this application includes at least one of the following beneficial technical effects:

[0079] The updated information is stored on an external medium and then directly written into the car's instrument panel via a programmer. Compared to network-based updates, this method is unaffected by network fluctuations and network security issues, offers more stable transmission, reduces data loss, and meets the update requirements of specific production line scenarios.

[0080] When verifying the connection stability between the external medium and the programmer, the update information is partially read and verified directly. When the verification passes, the remaining data of the update information is read directly and merged with the data read during the verification to form complete update information. This allows the stability verification process to also be used as a data reading process, improving efficiency.

[0081] During the integrity verification process, incomplete error update information is saved to a non-volatile storage unit. When a power outage occurs, the data in the non-volatile storage unit will not be lost. At this time, the multiple segments of error update information data in the non-volatile storage unit are extracted and reassembled to generate complete update data, without the need to read the update information from the external medium again after a power outage. Attached Figure Description

[0082] Figure 1 This is a flowchart of a method for updating a vehicle bus program based on local offline updates, according to an embodiment of the present invention.

[0083] Figure 2 This is a flowchart of the stability verification method according to an embodiment of the present invention;

[0084] Figure 3 This is a flowchart of the integrity verification method according to an embodiment of the present invention;

[0085] Figure 4 This is a flowchart of the protocol matching method according to an embodiment of the present invention. Detailed Implementation

[0086] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0087] This application discloses a method for updating vehicle bus programs based on local offline updates.

[0088] In this embodiment, the update information is stored on an external medium such as a USB flash drive. This external medium is then connected to a programmer, which in turn is connected to the vehicle's instrument cluster. The programmer writes the update information from the external medium into the vehicle's instrument cluster in real time. This method is suitable for offline updates on production lines and during 4S shop repairs, and is unaffected by network conditions.

[0089] Reference Figure 1 A method for updating vehicle bus programs based on local offline updates includes the following steps:

[0090] Step S1: Control the preset programmer to acquire the external insertion signal of the external medium, and perform stability verification based on the external insertion signal.

[0091] The external insertion signal refers to the signal generated when an external medium such as a USB flash drive is inserted into the programmer. It indicates that the external medium has been inserted into the programmer and is connected to the programmer's signal. The external insertion signal is acquired by the programmer's main control module through the acquisition of signals from the insertion port.

[0092] Stability verification refers to the process of testing whether the signal connection between the external medium and the programmer is normal and stable. Stability is essential to ensure normal communication between the two. If the environment in which the programmer and the external medium are located vibrates or the connection is unstable, it will lead to abnormal communication and failure to transmit data normally. Therefore, stability verification needs to be performed before inserting the external medium into the programmer. The method of stability verification will not be described in detail here, but will be introduced in detail in subsequent embodiments.

[0093] Step S2: After the stability verification is passed, the update information is read from the external medium and saved to the preset storage module, and the integrity of the update information is verified.

[0094] The stability check passed, indicating that stable data transmission is possible between the external medium and the programmer. At this point, the system controls the programmer to read the update information from the external medium and store it in the programmer's storage module. The update information refers to the update program file used to update the old program in the car's instrument panel.

[0095] Because errors may occur during the transmission of updated information or the updated information itself may contain errors on the external medium, it is necessary to perform integrity verification on the updated information. Integrity verification refers to verifying the entire character data content of the updated information to ensure that the updated information is the data file to be written to the vehicle's instrument panel. The methods for integrity verification will not be elaborated here, but will be described in detail in subsequent embodiments.

[0096] Step S3: After the integrity verification passes, the update information is written to the preset application area.

[0097] The integrity check passed, indicating that the updated information read from the external medium is correct and can be used to update the old program of the vehicle's instrument cluster. At this point, the updated information is first written to the application area in the programmer. The application area is a partition in the programmer's Flash memory specifically used to store the core running program of the instrument cluster and has strict write and execution rules.

[0098] After the integrity verification of the updated information passes, the updated information is first written to the application area, and then transferred to the vehicle's instrument panel through the application area to ensure safety and reliability.

[0099] Step S4: Send a preset handshake command to the car's instrument panel and perform protocol matching.

[0100] To ensure reliable communication and version compatibility, protocol matching is required before update information is finally written from the application area to the car's instrument panel. Only after successful matching can the writing operation proceed.

[0101] The handshake instruction is a request sent by the programmer to the car's instrument panel, requesting data transmission and writing. It is a program instruction that is pre-set in the programmer by the technician.

[0102] The method of protocol matching will not be elaborated here, but will be described in detail in subsequent embodiments.

[0103] Step S5: After the protocol matching is successful, the update information will be written from the application area to the car's instrument panel.

[0104] Once the protocol is successfully matched, data can be written. At this point, the system will write the update information from the programmer's application area to the car's instrument cluster. After the program is written to the instrument cluster, the instrument cluster can update and replace the old program according to the new program, thus completing the update of the instrument cluster.

[0105] Reference Figure 2 The stability verification method includes the following steps:

[0106] Step S100: Read the starting data segment of the preset update information according to the external insertion signal and store it in the first area of ​​the preset storage module. After storage is completed, pause reading the update information.

[0107] The starting data segment refers to the initial data within the update information. The system reads the starting data segment first when reading the update information. The length of the starting data segment is set by technical personnel and will not be elaborated here.

[0108] In this embodiment, the programmer's storage module has multiple areas for writing different data. When the system receives an external insertion signal, it first reads the starting data segment of the update information instead of directly reading the complete update information. Then, it saves the read starting data segment in the first area of ​​the storage module so that the starting data segment can be analyzed and processed in the first area.

[0109] After transferring the initial data segment to the first partition, the system pauses reading the update information, first analyzes the initial data segment, and then decides whether to continue reading.

[0110] Step S101: Based on the preset number of data segments, analyze the starting data segment of the update information of the first area to determine whether there are duplicate data segments.

[0111] In this embodiment, if the connection between the external medium and the programmer is interrupted during data transmission, the system will reread the update information from the beginning, and duplicate data segments will appear in the read data.

[0112] The data segment number is the shortest data segment length that technicians must use to analyze the initial data segment. This avoids increasing the probability of valid repetition due to excessively short data lengths, meaning that even if the same characters appear in a data segment, the data segment is still considered valid.

[0113] A data repetition segment refers to a data segment that appears repeatedly in the initial data segment being read. When a data repetition segment appears, it indicates that the connection between the external media and the programmer is unstable and has been interrupted. The system automatically starts reading the initial data segment from the beginning, thus resulting in a data repetition segment.

[0114] By determining whether there are duplicate data segments, it can be determined whether the connection between the external medium and the programmer is prone to interruption.

[0115] Step S1020: When there is a data duplication segment, the stability check is defined as failing, the stability type is marked as 0, and the transmission stability is repaired using a preset stability repair method.

[0116] Stability type refers to two types: stability check fails and stability check passes.

[0117] If duplicate data segments exist, it indicates that the stability check has failed, the connection between the two is unstable, and data transmission is not possible. In this case, the system will use a stability repair method to handle the connection stability between the two, which will not be elaborated here.

[0118] Step S1030: When there is no duplicate data segment, extract all character segment data in the starting data segment and extract the address number of the preset character segment data.

[0119] The character field data is the smallest data unit in the starting data segment. The address number refers to the position of each data unit in the starting data segment according to its sequential arrangement. Both the character field data and the address number are obtained by the system from analyzing the starting data segment.

[0120] Step S1031: Generate a data address table based on the character segment data and address number.

[0121] The data address table is a program table that organizes all the character segment data in the starting data segment and their corresponding address numbers, containing a one-to-one correspondence between the character segment data and their corresponding address numbers.

[0122] Step S1032: Compare and analyze the data address table with the preset file reference address table to determine whether the starting data segment is a continuous data segment in the update information.

[0123] The file lookup address table is a program table prepared in advance by technicians, which organizes all character segment data and their address numbers in the starting data segment of the update information to be written. It is the standard table for the entire update information. The file lookup address table is pre-stored in the system's Flash memory. Flash memory is a specific form of non-volatile storage unit, and the data is not easily lost when the power is off.

[0124] Compare the data address table with the file address table. If they match, it means the starting data segment read is a normal, continuous data segment with no data loss. If they don't match, it means there is data loss in the starting data segment, causing the character segment data to not correctly correspond to the address number, thus resulting in a mismatch with the file address table.

[0125] Step S1033: If the data segment is continuous in the update information, the stability check passes, the stability type is marked as 1, and an indicator light is issued.

[0126] When the comparison confirms that the starting data segment is a continuous data segment in the update information, the stability check passes, indicating that there is no disconnection or interference during the transmission between the programmer and the external system that could cause data loss. At this point, the update information can be read normally, and the indicator light will illuminate to indicate that data reading can proceed.

[0127] The method for saving update information to a preset storage module includes the following steps:

[0128] Step S200: Analyze the stability type to determine whether the stability check passes.

[0129] As mentioned above, the stability type includes 0 and 1, where 0 represents that the stability check failed and 1 represents that the stability check passed. Therefore, by analyzing the stability type, it is possible to determine whether the stability check passed or failed.

[0130] Step S2010: When the stability check fails, the stability of the external medium is repaired, and the updated information is stored in the second area of ​​the preset storage module.

[0131] If the stability check fails and the connection stability returns to normal after repair, the updated information will be stored in the second area of ​​the storage module. Since the first area stores the incorrect starting data segment read during the stability check, mixing the two together can easily cause data corruption.

[0132] The second area is one of the storage areas of the programmer's storage module, and it can independently read and write data.

[0133] Step S2011: Delete the starting data segment in the first area of ​​the storage module.

[0134] Once the updated information is saved to the second area, all data in the first area is deleted so that subsequent read and write operations can continue.

[0135] Step S2020: When the stability check passes, continue reading the remaining data segments in the update information, excluding the initial data segment.

[0136] If the stability check passes directly when the reader is connected to the external medium, it indicates that the starting data segment of the update information stored in the first area is also usable data. At this time, the system can resume the paused steps in step 100, and can continue reading the remaining data segment at the end of the starting data segment. The remaining data segment consists of the data in the update information excluding the starting data segment.

[0137] Step S2021: Store the remaining data segment in the first area of ​​the storage module, which together with the starting data segment constitutes the update information.

[0138] In this embodiment, although the starting data segment stored in the first area is data collected during stability verification, since the starting data segment is normal and usable data, it does not need to be discarded. The remaining data segment that will continue to be read is also stored in the first area. The complete update information can be read by combining the starting data segment and the remaining data segment.

[0139] Reference Figure 3 The integrity verification method includes the following steps:

[0140] Step S210: Extract all character segment data from the update information and determine the address number of the character segment data.

[0141] The procedure flow is the same as that of step S1030, and will not be repeated here.

[0142] Step S211: Calculate the CRC value based on the character segment data.

[0143] The CRC value is a parameter used to verify data integrity. The CRC value is obtained by logically operating on the character segment data. The CRC value is equivalent to the unique identification of the character segment data.

[0144] Step S212: Compare the CRC value with the CRC standard value pre-stored in the non-volatile memory cell of the storage module to determine whether the two are consistent.

[0145] The CRC standard value is the CRC value of each character segment of data obtained by technicians in advance by processing the updated information data, and it is stored in a non-volatile storage unit for comparative analysis.

[0146] Each CRC value is compared sequentially with the standard CRC value. By comparing their consistency, it is determined whether the updated information is complete. Only when they match is it considered that the update information read by the programmer is complete.

[0147] Step S213: When the two are inconsistent, the address number is reorganized according to the CRC standard value to fill the address number of the missing data, and the update information is transferred to the cache area of ​​the non-volatile storage unit.

[0148] If the two are inconsistent, it indicates that the update information read by the programmer is incorrect. In this case, the erroneous update information is not discarded, but is first stored in the cache area of ​​the non-volatile memory unit. The cache area is one of the storage areas in the non-volatile memory unit, and the data is not lost when power is off.

[0149] Before storing the updated information in the cache area of ​​the non-volatile memory unit, the address numbers of the character segment data are first rearranged in the correct order, and the address numbers of missing character segment data are left blank. The rearrangement method is as follows: the CRC value of each character segment data is compared with the standard CRC value in turn. If the two match, it means that the address number of that character segment data is correct. If they do not match, the address number of that character segment data and all subsequent address numbers are incremented by one, and the CRC value is compared with the standard CRC value again until they match, and a new address number is obtained.

[0150] Step S214: Reread the update information, compare the CRC values ​​of all character segment data with the CRC standard values, and record the number of times the information is reread.

[0151] If the complete update information is not read, the update information is read repeatedly, and the CRC value of the update information is compared each time. The number of rereads is the cumulative number of times the system has repeatedly read the update information.

[0152] Step S215: The integrity check passes if and only if the number of rereads does not exceed the preset number of consecutive reads, and the CRC value of all character segment data is consistent with the CRC standard value.

[0153] The consecutive read count is a parameter preset by the technician, representing the upper limit for the number of rereads. If the update information is obtained within this consecutive read count, the error in reading the update information is considered an isolated incident. After obtaining the complete update information, the integrity verification passes, and the complete update information can then be written to the application area of ​​the programmer.

[0154] The integrity verification method also includes the following steps:

[0155] Step S2160: When the number of rereads exceeds the number of consecutive reads, record the address number of the character segment data that is inconsistent with the CRC standard value during each repeated read to obtain the error address number.

[0156] When the number of rereads exceeds the consecutive read limit, it indicates that the erroneous update information read is not an isolated incident. This situation needs to be investigated and addressed to ensure the normal operation of the offline update program.

[0157] The error address number is the address number corresponding to the missing character segment data in each error update message read. The error address number can be obtained by comparing the CRC value of each update message read with the standard CRC value; the address number corresponding to the character segment data where the two differ is the error address number.

[0158] Step S2161: Compare all the error address numbers to determine if they are consistent.

[0159] By checking if the error address numbers are consistent across updates, the cause of the error can be determined. There are two possible causes: one is stability issues, where data loss occurs with each update read, but the location of the lost data varies. The other is a problem with the external media itself, where a faulty external media causes data loss at a fixed location in each update read.

[0160] Step S2162: If all the error address numbers are inconsistent, perform the stability check again.

[0161] When the analysis reveals that the error address number of each read update information is inconsistent, it indicates that there is an abnormality in the connection between the programmer and the external medium. In this case, the stability should be re-verified to restore the stability of the connection between the two.

[0162] Step S2163: When all error address numbers are consistent, it indicates that the update package in the external media is corrupt, and the output indicator light will indicate this.

[0163] When the analysis finds that the error address number of each read update information is consistent, it indicates that there is a data error in the external medium itself, which makes the update information stored in the external medium originally corrupt. At this time, the system will give an error prompt through the indicator light, prompting the staff to replace the external medium or replace the update information in the external medium.

[0164] The handling method for a power outage during integrity verification includes the following steps:

[0165] Step S220: Extract cache update information from the cache area of ​​the non-volatile memory cell.

[0166] The cache update information refers to the update information of the cache area of ​​the non-volatile storage unit that was transferred to the non-volatile storage unit when the integrity check failed in step S213. Since the data in the non-volatile storage unit is not lost when the power is off, the cache update information in it can be read back.

[0167] Step S221: Analyze the cache update information and extract all address numbers.

[0168] The cache area of ​​a non-volatile memory cell may contain multiple cache update messages. The address number of each cache update message is extracted.

[0169] Step S222: Remove duplicate address numbers and their corresponding character field data.

[0170] Since each cache update message only loses a portion of the data, when comparing two cache update messages, there will be a large number of duplicate address numbers. At this time, based on the duplicate address numbers, the corresponding character field data in one of the cache update messages is removed, and the remaining character field data is the non-duplicate data.

[0171] Step S223: Arrange and reorganize all remaining character segment data according to address number to obtain reorganized update information.

[0172] All remaining character segments are unique and can be rearranged into a single data segment based on their corresponding address numbers. This reassembled update information may match the complete update data or may still be missing some data, requiring further integrity verification.

[0173] Step S224: Determine whether the CRC value of the recombined update information is consistent with the CRC standard value.

[0174] The integrity of the recombined update information is verified by comparing the CRC values ​​to determine whether the recombined update information is complete and whether it can be retrieved and used again after a power outage.

[0175] Step S2250: If they match, the reorganized update information is used as the update information to be written.

[0176] If the CRC value of the reconstructed update information matches the standard CRC value, it means the reconstructed update information can be reused. In this case, the reconstructed update information in the cache area of ​​the non-volatile storage unit is used as the update information to be written, without needing to read the update information from the external medium again. The update information to be written refers to the data prepared to be written to the application area.

[0177] Step S2260: If inconsistent, read the update information again from the external medium and use it as the update information to be written.

[0178] If the CRC value of the reconstructed update information is inconsistent with the standard CRC value, it means that the reconstructed update information is useless, and the update information needs to be read again from the external medium.

[0179] The stability repair method includes the following steps:

[0180] Step S110: Adjust the connection between the external medium and the programmer, press the external medium into the programmer with the preset insertion pressure, and enter the debugging mode. The indicator light will light up at the preset flashing frequency.

[0181] When the stability check fails, the connection between the external medium and the programmer needs to be readjusted. The adjustment methods include re-plugging, angle adjustment, and insertion depth adjustment.

[0182] Insertion pressure is the pressure set by the technician to be applied when inserting external media into the programmer to ensure stability. It is a manually set reference value and will not be elaborated here.

[0183] The debug mode is a feature of the programmer. When entered, the system can adjust and verify the stability of data communication between the external media and the programmer. At the beginning of the repair process, the indicator lights on the programmer will flash at a specific frequency to indicate the progress. The flashing frequency is a parameter set by technicians to control the indicator lights, and will not be elaborated upon here.

[0184] Step S111: Continuously read the starting data segment of the update information and perform stability verification.

[0185] In this embodiment, after adjusting the connection between the external medium and the programmer, the starting data segment of the update information is read repeatedly. After each stability check of the read data, the stability result of the read data is determined.

[0186] Step S1110: When the stability check passes, record the number of consecutive checks.

[0187] Consecutive check counts refer to the number of consecutive times that the stability of the initial data segment read each time is checked and the result is satisfactory.

[0188] Each time the read data is validated for stability and the result is satisfactory, the consecutive validation count is incremented by one.

[0189] Step S1111: If the stability check fails, reset the number of consecutive checks.

[0190] If a stability check fails, the accumulated consecutive check count will be reset to zero and the count will start from the beginning.

[0191] Step S1120: If the number of consecutive verifications does not exceed the preset baseline verification number within the preset verification time, the indicator light will turn off, and the connection between the external medium and the programmer will be readjusted.

[0192] The verification time is a reference time set by the technicians, representing the maximum threshold duration for each verification. If stability repair is not completed within the verification time, it indicates a problem with the connection between the external media and the programmer. Therefore, further verification is unnecessary; instead, the connection between the external media and the programmer should be readjusted.

[0193] If the number of consecutive checks does not exceed the baseline number within the verification period, it indicates unstable communication transmission and multiple resets of the consecutive check count. In such cases, the system will turn off the indicator light to prompt a readjustment of the connection between the external media and the programmer.

[0194] The baseline verification count is a reference value set by the technical personnel. It is the minimum threshold for the number of consecutive successes of the read update information in the stability verification.

[0195] Step S1130: If the number of consecutive checks exceeds the preset baseline number of checks within the preset check time, match the flashing frequency additional value according to the number of consecutive checks.

[0196] If the number of consecutive verifications exceeds the baseline number of verifications within the verification time, it indicates that the stability of the programmer's data reading process from the external medium is appropriate, and data communication is possible. Furthermore, the higher the number of consecutive verifications, the higher the communication stability.

[0197] In this embodiment, the flashing frequency of the indicator light will increase with the number of consecutive verifications to indicate the stability repair process to the debugging personnel. The faster the flashing frequency, the closer it is to the completion of stability repair.

[0198] The flicker frequency enhancement refers to the increase in flicker frequency. The flicker frequency enhancement is directly proportional to the number of consecutive checks; the more consecutive checks, the greater the flicker frequency enhancement.

[0199] Step S1131: Accelerate the correction frequency by adjusting the flicker frequency based on the flicker frequency addition value to obtain the correction frequency.

[0200] After determining the additional value of the flicker frequency based on the number of consecutive checks, the flicker frequency is corrected so that the corrected frequency conforms to the number of consecutive checks. The corrected frequency refers to the frequency after the flicker frequency has been corrected.

[0201] Step S1132: Control the indicator light to flash with the correction frequency and determine whether the number of consecutive checks exceeds the preset number of qualified checks.

[0202] The number of qualified checks is a threshold number of consecutive checks that technicians set after stability repair is completed. By comparing the number of consecutive checks with the number of qualified checks, it can be determined whether the stability repair is complete.

[0203] Step S1133: When the number of consecutive verifications exceeds the number of qualified verifications, the stability repair is completed, the indicator light stays on, and the clamping mechanism preset on the programmer is controlled by the preset clamping force to clamp and fix the external medium.

[0204] If the number of consecutive checks exceeds the number of qualified checks, it indicates that the stability repair is complete and the connection between the external media and the programmer has returned to normal. In this case, the system control indicator light will remain constantly lit, indicating to the technician that the stability repair process is complete. Furthermore, the system control clamping mechanism on the programmer will clamp and secure the external media, making the connection between the programmer and the external media more stable. The clamping force is the force required by the clamping mechanism set by the technician to firmly clamp the programmer and the external media.

[0205] Reference Figure 4 The protocol matching method includes the following steps:

[0206] Step S400: Analyze the handshake command to obtain the protocol version number and the sum of the CRC values ​​for update information.

[0207] The protocol version number is a version number specified by technical personnel for this update information during its development. The update information CRC sum value refers to the sum obtained by accumulating the CRC values ​​of the update information.

[0208] The protocol version number and the CRC sum of the update information are both stored in the handshake command and sent to the vehicle's instrument cluster simultaneously. Therefore, the vehicle's instrument cluster system can parse the handshake command to obtain the protocol version number and the CRC sum of the update information.

[0209] Step S401: Compare the protocol version number with the preset baseline version number to determine whether the update information meets the writing requirements.

[0210] The base version number is the version number of the current system program pre-stored in the vehicle's instrument panel by technicians, and will not be elaborated upon here. The writing requirement is that the protocol version number must be higher than the base version number.

[0211] By comparing the protocol version number with the baseline version number, it can be determined whether the version of the updated information being written meets the writing requirements.

[0212] Step S402: If and only if the protocol version number of the update information meets the requirements, the CRC sum of the update information and the preset encryption number are encrypted using the preset encryption algorithm to obtain the key number.

[0213] If the protocol version number of the update information does not meet the requirements, it means that the version of the update information is too low and cannot be used to update the car's instrument panel. A new, higher version of the update information needs to be rewritten in the programmer.

[0214] Only when the protocol version number of the updated information meets the requirements will the next step of key security authentication proceed.

[0215] The encrypted data is fixed data that technicians pre-store in the car's instrument system, and this data can only be accessed by the car's instrument manufacturer and authorized parties.

[0216] The key number is encrypted data used for authentication. It is obtained by performing specific encryption operations on the CRC sum of the update information and the encrypted key. The encryption operation refers to performing logical operations on the CRC sum of the update information and the encrypted key. The encryption algorithm is pre-set in the vehicle's instrument cluster system by technicians and is only known to the vehicle's instrument cluster manufacturer and authorized parties.

[0217] Step S403: Send the key number to the programmer, combine the key number and the CRC sum value of the update information, and control the programmer to restore the key number to the decoded encrypted number, and send it to the car instrument panel.

[0218] After the car's instrument cluster system generates a key number, it sends the key number back to the programmer.

[0219] The decoded encrypted number is the encrypted number obtained by the programmer system after decrypting and restoring the encrypted key based on the updated information. The restoration algorithm depends on the encryption algorithm and can only be known to the automotive instrument manufacturer and authorized parties. Without knowing the corresponding restoration algorithm, the correct decoded encrypted number cannot be generated.

[0220] After obtaining the decoded encrypted number, the programmer system then sends the decoded encrypted number to the car's instrument panel for matching.

[0221] Step S404: When the decoded encrypted number matches the encrypted number, the protocol match is successful.

[0222] To prevent power loss during the update process of writing information from the application area to the vehicle's instrument cluster, the following steps are recommended:

[0223] If the decoded encrypted number and the encrypted number do not match, the protocol match fails, and the update information cannot be written to the vehicle's instrument panel. Only when the two match can the protocol match succeed, and only then can data be written.

[0224] To prevent power loss during the update process of writing information from the application area to the vehicle's instrument cluster, the following steps are recommended:

[0225] Step S500: Divide the memory area of ​​the car instrument panel into a first running partition, a second running partition, and an update partition. The original instrument panel program is stored in the first running partition and runs in the first running partition.

[0226] In this embodiment, the memory area of ​​the vehicle instrument cluster is divided into three independent areas: a first operating partition, a second operating partition, and an update partition. Furthermore, the memory area of ​​the vehicle instrument cluster is a non-volatile storage unit, meaning that data is not lost when power is off.

[0227] The three operating partitions serve different purposes. Both the first and second operating partitions can be used to store the running program. The instrument's original program is stored in one of these partitions, which is the first operating partition in this case. The update partition is used as the area where update information is written.

[0228] Step S501: Write the update information from the application area to the update partition, and perform integrity verification again.

[0229] Because the programmer communicates with the car's instrument panel, data loss may occur during the data writing process. Therefore, when update information is written from the application area to the update partition, the integrity of the update information needs to be verified again.

[0230] Step S502: After the integrity verification is passed, disconnect the programmer from the car instrument panel and supply power to the car instrument panel with a preset stable power supply.

[0231] In this embodiment, when writing data to the update partition of the vehicle's instrument cluster, the instrument cluster is temporarily powered by the programmer, and both share the same power supply. When the update partition completes the data writing, the power connection between the vehicle's instrument cluster and the programmer is disconnected, and a fixed, stable power supply is provided to ensure safe and stable data overwriting from the update partition to other partitions.

[0232] Step S503: Overwrite the second running partition with the update partition at a preset read / write rate.

[0233] The read / write rate is a parameter used by the vehicle's instrument system itself for reading and writing, and will not be elaborated upon here.

[0234] In this embodiment, after the update information is written to the update partition, it is then written from the update partition to the second running partition, without directly overwriting the currently running first running partition. Even in the event of a power outage or other unforeseen circumstances, the data in the first running partition will not be affected. If data in the second running partition becomes corrupted after a power outage, it can be directly rewritten from the update partition.

[0235] Step S504: Switch the vehicle's instrument panel to operate in the second operating zone.

[0236] Once the updated information is transferred to the second operating partition, the system of the car's instrument panel is switched to the second operating partition for operation, and then the car's instrument panel is restarted, thus completing the offline update of the device.

[0237] Based on the same inventive concept, embodiments of the present invention provide a vehicle bus program update system based on local offline updates.

[0238] A vehicle bus program update system based on local offline updates includes:

[0239] The external acquisition module is used to acquire data input from external media.

[0240] The storage module stores the data collected by the external acquisition module;

[0241] The communication output module outputs the data stored in the storage module.

[0242] The main control module stores the data collected by the external acquisition module into the storage module, processes the data in the storage module, and outputs it through the communication output module.

[0243] The power supply module is used to supply power to the main control module;

[0244] The status indicator module is used to indicate the status of the main control module.

[0245] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should also be considered within the scope of protection of the present invention.

Claims

1. A method for updating an on-board bus program based on local offline updates, characterized in that include: The preset programmer is controlled to acquire external insertion signals from external media and to perform stability verification based on the external insertion signals. After the stability check passes, the update information is read from the external medium and saved to the preset storage module, and the integrity of the update information is checked. After the integrity verification passes, the updated information will be written to the preset application area; Send a preset handshake command to the car's instrument panel and perform protocol matching; Once the protocol is successfully matched, the updated information will be written from the application area to the car's instrument panel. Stability verification methods include: The system reads the starting data segment of the preset update information based on the external insertion signal and stores it in the first area of ​​the preset storage module. After storage is completed, reading the update information is paused. Based on the preset number of data segments, the starting data segment of the update information in the first area is analyzed to determine whether there are duplicate data segments; When duplicate data segments exist, the stability check is defined as failing, the stability type is marked as 0, and the transmission stability is repaired using a preset stability repair method. When there are no duplicate data segments, extract all character segment data from the starting data segment and extract the address number of the preset character segment data; Generate a data address table based on the character field data and address number; The data address table is compared and analyzed with the preset file reference address table to determine whether the starting data segment is a continuous data segment in the update information; If the data segment is a continuous segment in the update information, the stability check passes, the stability type is marked as 1, and an indicator light is issued to indicate this.

2. The vehicle-mounted bus program updating method based on local offline updating according to claim 1, characterized in that, Methods for saving update information to a preset storage module include: Analyze the stability type to determine whether the stability check passed; When the stability check fails, the stability of the external medium is repaired, and the updated information is stored in the second area of ​​the preset storage module. Delete the starting data segment in the first region of the storage module; When the stability check passes, continue reading the remaining data segments in the update information, excluding the initial data segment; The remaining data segment is stored in the first area of ​​the storage module, forming update information together with the initial data segment.

3. The method for updating vehicle bus programs based on local offline updates according to claim 1, characterized in that, Integrity verification methods include: Extract all character segment data from the update information and determine the address number of the character segment data; Calculate the CRC value based on the character segment data; The CRC value is compared sequentially with the CRC standard value pre-stored in the non-volatile memory cell of the storage module to determine whether the two are consistent; When the two are inconsistent, the address numbers are reorganized according to the CRC standard value to fill the address numbers of the missing data, and the update information is transferred to the cache area of ​​the non-volatile storage unit. Reread the updated information, compare the CRC values ​​of all character segments with the CRC standard values, and record the number of times the information is reread. The integrity check passes if and only if the number of rereads does not exceed the preset number of consecutive reads, and the CRC value of all character segment data is consistent with the CRC standard value.

4. The method for updating vehicle bus programs based on local offline updates according to claim 3, characterized in that, Also includes: When the number of rereads exceeds the number of consecutive reads, the address number of the character segment data that is inconsistent with the CRC standard value during each repeated read is recorded to obtain the error address number; Compare all the error address numbers to determine if they match; If all error address numbers are inconsistent, perform stability verification again; When all error address numbers are consistent, it indicates that the update package in the external media is corrupt, and the output indicator light will indicate this.

5. The method for updating vehicle bus programs based on local offline updates according to claim 3, characterized in that, The handling methods for power outages during integrity verification include: Extract cache update information from the cache region of non-volatile memory units; Analyze the cache update information and extract all address numbers; Remove duplicate address numbers and their corresponding character field data; The remaining character segment data is rearranged and reorganized according to address number to obtain the reorganized update information; Determine whether the CRC value of the recombined and updated information is consistent with the standard CRC value; If they match, the reorganized update information will be used as the update information to be written. If there is a discrepancy, the updated information is read again from the external medium and used as the update information to be written.

6. The method for updating vehicle bus programs based on local offline updates according to claim 1, characterized in that, Stability repair methods include: Adjust the connection between the external medium and the programmer, press the external medium firmly into the programmer with the preset insertion pressure, and enter the debugging mode. The indicator light will light up at the preset flashing frequency. Continuously read the starting data segment of the update information and perform stability checks; When the stability check passes, record the number of consecutive checks. If the stability check fails, reset the consecutive check count. If the number of consecutive verifications does not exceed the preset baseline number of verifications within the preset verification time, the indicator light will turn off, and the connection between the external media and the programmer will be readjusted. If the number of consecutive checks exceeds the preset baseline number of checks within the preset check time, the flashing frequency additional value is matched according to the number of consecutive checks. The correction frequency is obtained by accelerating the correction of the flicker frequency based on the flicker frequency addition value; The correction frequency control indicator flashes, and it is determined whether the number of consecutive checks exceeds the preset number of qualified checks; When the number of consecutive verifications exceeds the number of qualified verifications, the stability repair is complete, the indicator light stays on, and the clamping mechanism on the programmer is controlled by the preset clamping force to clamp and fix the external medium.

7. The method for updating vehicle bus programs based on local offline updates according to claim 1, characterized in that, Protocol matching methods include: The handshake command is analyzed to obtain the protocol version number and the CRC sum value of the update information; The protocol version number is compared with the preset baseline version number to determine whether the update information meets the writing requirements; If and only if the protocol version number of the update information meets the requirements, the CRC sum of the update information and the preset encryption number are encrypted using the preset encryption algorithm to obtain the key number. The key number is sent to the programmer, which combines the key number with the CRC sum of the update information and controls the programmer to restore the key number to the decoded and encrypted number, and then sends it to the car's instrument panel. When the decoded encrypted number matches the encrypted number, the protocol is successfully matched.

8. The method for updating vehicle bus programs based on local offline updates according to claim 1, characterized in that, Methods to prevent power loss during the update process of writing information from the application area to the vehicle's instrument cluster include: The memory area of ​​the car instrument panel is divided into a first running partition, a second running partition, and an update partition. The original instrument panel program is stored in the first running partition and runs in the first running partition. The update information is written from the application area to the update partition, and the integrity is checked again. After the integrity verification is passed, disconnect the programmer from the car instrument panel and supply power to the car instrument panel with a preset stable power supply. The update partition will overwrite the second running partition at a preset read / write rate; Switch the car's instrument panel to operate in the second operating zone.

9. A vehicle bus program update system based on local offline updates, comprising a vehicle bus program update method based on local offline updates as described in any one of claims 1 to 8, characterized in that, include: The external acquisition module is used to acquire data input from external media. The storage module stores the data collected by the external acquisition module; The communication output module outputs the data stored in the storage module. The main control module stores the data collected by the external acquisition module into the storage module, processes the data in the storage module, and outputs it through the communication output module. The power supply module is used to supply power to the main control module; The status indicator module is used to indicate the status of the main control module.

Citation Information

Patent Citations

  • Method for upgrading firmware based on chip usbhid, terminal equipment and computer readable storage medium

    CN112947978A

  • One-to-many automobile instrument program downloader based on CAN bus

    CN115714768A

  • Software off-line downloading method and off-line downloader

    CN121334133A