Update Package Verification Method, Device, Equipment and Storage Medium Based on In-Vehicle Applications

By utilizing the verification mechanism of electronic control units and executable programs in the bus development environment, the data loss and tampering of the on-board operating system update packets during transmission is solved, the verification accuracy and efficiency are improved, and the application software is correct updated.

CN115834558BActive Publication Date: 2025-07-04AUTOMOTIVE INTELLIGENCE & CONTROL OF CHINA CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211447471.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-18
Publication Date
2025-07-04
Estimated Expiration
2042-11-18

AI Technical Summary

Technical Problem

In the prior art, the update packets of the on-board operating system are prone to data loss or tampering during transmission, and the traditional verification method has low computing efficiency due to the large amount of data, which affects the accuracy and efficiency of the update.

Method used

The update package is obtained through the bus development environment, and the verification value is calculated by the electronic control unit. The verification value is calculated in the bus development environment in combination with the executable program to compare to ensure that the update package passes the verification when the verification values ​​are consistent.

Benefits of technology

Improve the verification accuracy and efficiency of the update package, avoid data loss or tampering, and ensure that the application software is updated correctly.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115834558B_ABST
    Figure CN115834558B_ABST
Patent Text Reader

Abstract

The present application provides a method, device, equipment and storage medium for verifying update packages based on in-vehicle applications. This method is applied to an electronic device in which a bus development environment is deployed, and includes: based on the bus development environment, obtaining an update package to be transmitted and transmitting the update package to be transmitted to an electronic control unit; the electronic control unit determines the verification value of the received update package and sends the verification value of the received update package to the bus development environment; calling a preset executable program, and determining the verification value corresponding to the update package to be transmitted according to the executable program; if the verification value corresponding to the update package to be transmitted is consistent with the verification value of the received update package, it is determined that the update package to be transmitted passes the verification. In the present application, the verification value is calculated by the executable program and then compared in the bus development environment, which reduces the operation pressure of the self-program in the bus development environment and improves the verification efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to communication technologies, and in particular, to an update package verification method, apparatus, device, and storage medium based on vehicle-mounted applications. Background Art

[0002] With the development of vehicle intelligence, the distributed traditional vehicle-mounted bus can no longer meet the communication requirements between in-vehicle ECUs (Electronic Control Units). Ethernet technology has been introduced into the vehicle-mounted network. The change in the vehicle-mounted network architecture has driven the overall development of domain controllers and vehicle-mounted operating systems.

[0003] The development of vehicle-mounted operating systems will accelerate the update frequency of vehicle-mounted application software. The traditional software update method is to refresh the driver and application data through the bus, and the amount of updated data is relatively small. However, for the current ECUs with vehicle-mounted operating systems, the amount of updated data for application software has increased exponentially. A large amount of data is prone to errors or loss during transmission. Therefore, it is necessary to verify the updated data during the software update process. Summary of the Invention

[0004] This application provides an update package verification method, apparatus, device, and storage medium based on vehicle-mounted applications to improve the verification accuracy and efficiency of update packages.

[0005] In a first aspect, this application provides an update package verification method based on vehicle-mounted applications. The method is applied to an electronic device in which a bus development environment is deployed, and the method includes:

[0006] Based on the bus development environment, obtain an update package to be transmitted, and transmit the update package to be transmitted to the electronic control unit of the vehicle; wherein, the electronic control unit is configured to determine a verification value of the received update package and send the verification value of the received update package to the bus development environment; the verification value is used to represent the calculation result of the update data in the update package;

[0007] Call a preset executable program, and determine the verification value corresponding to the update package to be transmitted according to the executable program; wherein, the executable program is configured to determine the verification value according to the update data;

[0008] If the verification value corresponding to the update package to be transmitted is consistent with the verification value of the received update package received from the electronic control unit, it is determined that the update package to be transmitted passes the verification.

[0009] In a second aspect, this application provides an update package verification apparatus based on vehicle-mounted applications. The apparatus is applied to an electronic device in which a bus development environment is deployed, and the apparatus includes:

[0010] An update package acquisition module, configured to acquire an update package to be transmitted based on the bus development environment, and transmit the update package to be transmitted to an electronic control unit of a vehicle; wherein, the electronic control unit is configured to determine a check value of the received update package, and send the check value of the received update package to the bus development environment; the check value is used to represent the calculation result of the update data in the update package.

[0011] A check value determination module, configured to call a preset executable program, and determine a check value corresponding to the update package to be transmitted according to the executable program; wherein, the executable program is configured to determine a check value according to update data.

[0012] An update package verification module, configured to determine that the update package to be transmitted passes the verification if the check value corresponding to the update package to be transmitted is consistent with the check value of the received update package received from the electronic control unit.

[0013] In a third aspect, the present application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;

[0014] The memory stores computer-executable instructions;

[0015] The processor executes the computer-executable instructions stored in the memory to implement the update package verification method based on in-vehicle applications as described in the first aspect of the present application.

[0016] In a fourth aspect, the present application provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, they are used to implement the update package verification method based on in-vehicle applications as described in the first aspect of the present application.

[0017] In a fifth aspect, the present application provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the update package verification method based on in-vehicle applications as described in the first aspect of the present application.

[0018] A method, device, equipment and storage medium for verifying update packages based on in-vehicle applications provided by this application obtain the update packages to be transmitted through a bus development environment, send the update packages to be transmitted to the electronic control unit of the vehicle, calculate the verification value corresponding to the received update packages by the electronic control unit, and send the verification value back to the bus development environment. The bus development environment calls an executable program to calculate the verification value of the update packages to be transmitted, and compares the calculated verification value with the verification value received from the electronic control unit. If the two are consistent, it is determined that the update package verification is passed and the update can continue. By verifying the update packages, the problems of data loss or tampering during the transmission of the update packages to the electronic control unit in the prior art are solved, ensuring the correct update of the application. By calling the executable program, the calculation pressure on the bus development environment is reduced, avoiding calculation errors of the verification value corresponding to the update packages to be transmitted, and improving the verification accuracy and efficiency of the update packages. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The accompanying drawings herein are incorporated into and constitute a part of this specification, showing embodiments consistent with this application, and are used together with the specification to explain the principles of this application.

[0020] Figure 1 It is a schematic flowchart of a method for verifying update packages based on in-vehicle applications provided by an embodiment of this application;

[0021] Figure 2 It is a schematic flowchart of a method for verifying update packages based on in-vehicle applications provided by an embodiment of this application;

[0022] Figure 3 It is a schematic diagram of data interaction provided by an embodiment of this application;

[0023] Figure 4 It is a structural block diagram of a device for verifying update packages based on in-vehicle applications provided by an embodiment of this application;

[0024] Figure 5 It is a structural block diagram of a device for verifying update packages based on in-vehicle applications provided by an embodiment of this application;

[0025] Figure 6 It is a structural block diagram of an electronic device provided by an embodiment of this application;

[0026] Figure 7 It is a structural block diagram of an electronic device provided by an embodiment of this application.

[0027] Through the above accompanying drawings, the clear embodiments of this application have been shown, and there will be more detailed descriptions hereinafter. These drawings and text descriptions are not intended to limit the scope of the concept of this application in any way, but to illustrate the concept of this application to those skilled in the art by referring to specific embodiments. Detailed implementation manners

[0028] To make the objectives, technical solutions and advantages of the present application clearer, the following will further describe in detail the embodiments of the present application with reference to the accompanying drawings.

[0029] It should be clear that the described embodiments are only a part of the embodiments of the present application, rather than all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.

[0030] When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0031] In the description of the present application, it should be understood that the terms "first", "second", "third", etc. are only used to distinguish similar objects and do not have to be used to describe a specific order or sequence, nor can they be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to specific circumstances. In addition, in the description of the present application, unless otherwise specified, "a plurality of" means two or more. "And / or" describes the association relationship of associated objects and indicates that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after.

[0032] It should be noted that due to space limitations, the present application specification does not exhaust all optional implementation manners. After reading the present application specification, those skilled in the art should be able to think that as long as the technical features do not conflict with each other, any combination of technical features can constitute an optional implementation manner. The following will describe each embodiment in detail.

[0033] The process of automotive intelligence is accelerating. Distributed traditional in-vehicle buses, such as CAN (Controller Area Network) buses and LIN (Local Interconnect Network) buses, etc., can no longer meet the communication requirements between in-vehicle ECUs. Ethernet technology has been introduced into the in-vehicle network, and the change of the in-vehicle network architecture has driven the overall development of domain controllers and in-vehicle operating systems.

[0034] In-vehicle operating systems and integrated in-vehicle controllers are booming, and the software update frequency is gradually accelerating. The traditional ECU software update method is to update the driver and application data through the bus, and the amount of updated data is relatively small. For the current ECU with an in-vehicle operating system, the update of the application software is carried out on the operating system, and the update package data is transmitted into the operating system through the bus, and the amount of updated data has also increased exponentially, reaching hundreds of megabytes or even gigabytes. During the update process of the application software, it is necessary to verify the consistency of the data in the update package.

[0035] The update tool used during application update is CANoe (CAN Open Environment, a bus development environment), and the update program is written using the CAPL (Communication Application Programming Language) development environment of CANoe. The current method for verifying the data in the update package can be to calculate the verification value of the update data using the CAPL program itself, and then compare the calculated verification value with the preset standard verification value. However, due to the large amount of data in the update package and the limited computing power of CANoe, it is easy to get stuck or make errors during the calculation process, which affects the subsequent update process and results in low efficiency and accuracy of application update.

[0036] A method, device, equipment, and storage medium for verifying an update package based on an in-vehicle application provided by this application aims to solve the above technical problems in the prior art.

[0037] The following uses specific embodiments to elaborate in detail on the technical solution of this application and how the technical solution of this application solves the above technical problems. These several specific embodiments below can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.

[0038] Figure 1 It is a schematic flowchart of a method for verifying an update package based on an in-vehicle application provided by an embodiment of this application. This method is applied to an electronic device, and a bus development environment is deployed in the electronic device. This method can be executed by a device for verifying an update package based on an in-vehicle application. As Figure 1 shown, this method includes the following steps:

[0039] S101. Based on the bus development environment, obtain the update package to be transmitted, and transmit the update package to be transmitted to the electronic control unit of the vehicle; wherein, the electronic control unit is used to determine the verification value of the received update package and send the verification value of the received update package to the bus development environment; the verification value is used to represent the calculation result of the update data in the update package.

[0040] Exemplarily, update packages of various in-vehicle applications are stored in the electronic device. When updating an in-vehicle application, it is necessary to transfer the update package in the electronic device to the vehicle's ECU for application update. For example, the user can select the update package to be transferred on the electronic device and send the update package to be transferred to the ECU.

[0041] CANoe is deployed on the electronic device. As a refresh tool for applications, CANoe can perform bus transmission of the update package. CANoe obtains the update package to be transferred, determines the storage path of the update package to be transferred in the electronic device, and places the storage path in a preset database. The storage path of the update package can be a variable to be stored in the database. That is, each time an application is updated, the storage path of the update package needs to be stored as a variable in the preset database.

[0042] CANoe transfers the update package to be transferred to the vehicle's ECU through the bus. After receiving the update package, the ECU parses the update package to determine the update data in the update package received by the ECU. A calculation method for the check value is preset in the ECU. The check value is the data obtained by calculating the update data in the update package and can be used to verify the update package received by the ECU. The ECU determines the check value corresponding to the received update package according to the preset check value calculation method and can determine this check value as the check value to be verified. For example, the preset check value calculation method can be to perform a hash calculation on the update data in the received update package and use the obtained hash value as the check value to be verified. After obtaining the check value to be verified, the ECU can send the check value to be verified to CANoe.

[0043] S102. Call a preset executable program and determine the check value corresponding to the update package to be transferred according to the executable program; wherein, the executable program is used to determine the check value according to the update data.

[0044] Exemplarily, after obtaining the update package to be transmitted, in addition to sending the update package to be transmitted to the ECU, CANoe also needs to calculate the check value for the update data in the update package to be transmitted. An exe (executable program) can be pre-written in the electronic device. The executable program can be an exe program developed based on the C# language and can be called by CANoe. When CANoe sends the update package to be transmitted to the ECU, it can call the exe program. The exe program obtains the update package to be transmitted and calculates the update data in the update package to be transmitted to obtain the check value corresponding to the update package to be transmitted, and this check value can be determined as the standard check value. The update package obtained by the exe program is an update package that has not been tampered with or lost data, and the update data in this update package is correct and complete update data. Therefore, the standard check value obtained by the exe program is the correct check value.

[0045] CANoe stores the storage path of the update package to be transmitted in a preset database. The exe program can obtain the storage path from the database and obtain the update package to be transmitted according to the storage path, so as to calculate the check value for the update data in the update package. An interactive program with the database can be defined in the exe program for reading and writing data.

[0046] Writing the exe program based on C# can open a separate process for calculating the check value, making full use of the computing power of the computer, significantly improving the computing efficiency, and solving the problem that CANoe cannot calculate due to the excessive data volume of the update package. When the data volume is too large, the calculation time of CANoe is long, and the calculation process may freeze, easily resulting in the interruption of the update process.

[0047] S103. If the check value corresponding to the update package to be transmitted is consistent with the check value of the received update package received from the electronic control unit, it is determined that the update package to be transmitted passes the check.

[0048] Exemplarily, CANoe obtains the check value to be verified transmitted by the ECU and the standard check value calculated by the exe program. The check value to be verified is the check value corresponding to the update package received by the ECU, and the standard check value is the check value corresponding to the update package to be transmitted.

[0049] Compare the check value to be verified with the standard check value to determine whether they are consistent. If the check value to be verified is consistent with the standard check value, it is determined that the update package to be transmitted passes the check. That is, the update package received by the ECU is the update package to be transmitted obtained by CANoe. During the process of transmitting the update package to the ECU, the update data is not lost or tampered with, and the ECU can update the application according to the received update package.

[0050] If the verification check value to be verified is inconsistent with the standard check value, a prompt message can be sent on the electronic device to remind the user to re-transmit the update package.

[0051] In this embodiment, if the check value corresponding to the update package to be transmitted is consistent with the check value of the received update package received from the electronic control unit, it is determined that the update package passes the verification, including: according to the preset check value comparison rule, determining the character at the preset position in the check value of the received update package as the first character, and the character at the preset position in the check value corresponding to the update package to be transmitted as the second character; if the first character and the second character are consistent, it is determined that the update package to be transmitted passes the verification.

[0052] Specifically, the check value comparison rule can be preset in advance. After obtaining the verification check value and the standard check value, it is determined whether the update package passes the verification according to the preset check value comparison rule. For example, the check value is a string composed of multiple characters. In the check value comparison rule, it can be specified to obtain the character at the preset position in the check value. For example, obtain the last two characters from the check value. Obtain the character at the preset position from the verification check value as the first character, and obtain the character at the preset position from the standard check value as the second character. Compare the first character with the second character to determine whether the first character and the second character are consistent. If so, it is considered that the verification check value and the standard check value are consistent, that is, the update package to be transmitted passes the verification; if not, it is considered that the verification check value and the standard check value are inconsistent, and the update package to be transmitted fails the verification, and the application update can be re-performed.

[0053] The beneficial effect of such a setting is that when comparing the check values, only part of the characters in the two check values need to be compared, rather than comparing each character in the check value one by one, effectively improving the verification efficiency.

[0054] In this embodiment, after determining that the update package to be transmitted passes the verification, it further includes: based on the bus development environment, sending the information that the verification passes to the electronic control unit of the vehicle to prompt the electronic control unit to update the in-vehicle application.

[0055] Specifically, if it is determined that the update package to be transmitted passes the verification, CANoe can send the information that the verification passes to the ECU through the bus. After receiving the information that the verification passes, the ECU can use the update data in the received update package to update the in-vehicle application and complete the application update process.

[0056] The beneficial effect of such a setting is that only when the verification passes, the ECU will perform the update, avoiding the ECU from updating the wrong update package and improving the correctness of the update.

[0057] An update package verification method based on in-vehicle applications provided by an embodiment of the present application obtains an update package to be transmitted through a bus development environment, sends the update package to be transmitted to an electronic control unit of a vehicle, calculates a verification value corresponding to the received update package by the electronic control unit, and sends the verification value back to the bus development environment. The bus development environment calls an executable program to calculate the verification value of the update package to be transmitted, and compares the calculated verification value with the verification value received from the electronic control unit. If the two are consistent, it is determined that the update package verification passes and the update can continue. By verifying the update package, the problem of data loss or tampering during the transmission of the update package to the electronic control unit in the prior art is solved, ensuring the correct update of the application. By calling the executable program, the calculation pressure on the bus development environment is reduced, avoiding calculation errors of the verification value corresponding to the update package to be transmitted, and improving the verification accuracy and efficiency of the update package.

[0058] Figure 2 FIG. is a schematic flowchart of an update package verification method based on in-vehicle applications provided by an embodiment of the present application. This embodiment is an optional embodiment based on the above embodiment.

[0059] In this embodiment, determining the verification value corresponding to the update package to be transmitted according to the executable program can be refined as: obtaining the existing update data from the update package to be transmitted, and determining the verification value corresponding to the update package to be transmitted based on the verification value determination algorithm preset in the executable program; storing the verification value corresponding to the update package to be transmitted in a preset database; wherein, the database is deployed in the bus development environment.

[0060] As Figure 2 shown, the method includes the following steps:

[0061] S201. Based on the bus development environment, obtain the update package to be transmitted, and transmit the update package to be transmitted to the electronic control unit of the vehicle; wherein, the electronic control unit is used to determine the verification value of the received update package and send the verification value of the received update package to the bus development environment; the verification value is used to represent the calculation of the update data in the update package.

[0062] Exemplarily, this step can refer to the above step S101 and will not be elaborated.

[0063] S202. Call a preset executable program, obtain the existing update data from the update package to be transmitted, and determine the verification value corresponding to the update package to be transmitted based on the verification value determination algorithm preset in the executable program.

[0064] Exemplarily, CANoe stores the storage path of the update package to be transmitted in a preset database and calls the exe program. The exe program reads the variable value of the storage path from the preset database and obtains the update package to be transmitted from the electronic device according to the storage path. An update package may include multiple update data. There is a preset check value determination algorithm in the executable program. According to the check value determination algorithm, the update data existing in the update package to be transmitted is obtained from the update package to be transmitted, and the update data in the update package to be transmitted is calculated to obtain the check value corresponding to the update package to be transmitted as the standard check value. The check value determination algorithm can be consistent with the check value calculation method in the ECU to ensure that under the condition of the same update data, the check value calculated by the exe program is the same as the check value calculated by the ECU.

[0065] S203. Store the check value corresponding to the update package to be transmitted in a preset database.

[0066] Exemplarily, after obtaining the standard check value corresponding to the update package to be transmitted, the standard check value can be stored in the preset database. That is, there are at least two variables in the preset database, namely the storage path of the update package and the standard check value. The storage path can be determined as the first variable, and the standard check value can be determined as the second variable. CANoe can obtain the standard check value from the database at any time, which is convenient for comparing the standard check value with the check value to be verified.

[0067] The check value to be verified transmitted by the ECU to CANoe can also be stored in the preset database as the third variable.

[0068] In this embodiment, a preset initial check value is stored in the database. Storing the check value corresponding to the update package to be transmitted in the preset database includes: replacing the preset initial check value with the check value corresponding to the update package to be transmitted and storing it in the preset database.

[0069] Specifically, an initial check value can be stored in the database, and the initial check value can be 0. After obtaining the standard check value, the standard check value can replace the initial check value. That is, the initial check value is deleted from the database and the standard check value is stored in the database. That is to say, before obtaining the standard check value, the second variable in the database is the initial check value, and after obtaining the standard check value, the second variable in the database is the standard check value.

[0070] When the exe program calculates the check value, the calculated standard check value must not be the initial check value. For example, if the initial check value is 0, as long as there is updated data in the update package to be transmitted, the corresponding check value will not be 0. Therefore, by setting the initial check value, it is possible to determine whether there is updated data in the update package to be transmitted. If the calculated standard check value is not the initial check value, the standard check value is used to replace the preset initial check value and stored in the preset database, waiting for CANoe to obtain it; if the calculated standard check value is the initial check value, a prompt message can be popped up on the electronic device to remind the user to check whether there is a problem with the update package in the storage path.

[0071] The beneficial effect of this setting is that by setting the initial check value, it is possible to ensure that there is a variable of the check value in the database, so that the standard check value can be stored at the position where the initial check value is located, which is convenient for CANoe to obtain the standard check value. And by setting the initial check value, it can be determined that the update package to be transmitted is not empty, further improving the check accuracy.

[0072] S204. If the check value corresponding to the update package to be transmitted is consistent with the check value of the received update package received from the electronic control unit, it is determined that the update package to be transmitted passes the check.

[0073] Exemplarily, CANoe can obtain the standard check value from the database at any time, or can obtain the standard check value from the database after receiving the check value to be verified. For example, when CANoe receives the check value to be verified, it obtains the currently stored check value in the database and determines the currently stored check value in the database as the standard check value calculated by the exe.

[0074] It is also possible to obtain the check value from the database regularly. If two check values are obtained from the database, it is determined that a standard check value and a check value to be verified are obtained, and the standard check value and the check value to be verified are compared to complete the check of the update package.

[0075] In this embodiment, before the check value corresponding to the update package to be transmitted is consistent with the check value of the received update package received from the electronic control unit, it further includes: obtaining the currently stored check value in the database according to the preset check value monitoring period; if the currently stored check value in the database is not the initial check value, it is determined that the currently stored check value in the database is the check value corresponding to the update package to be transmitted, and the check value corresponding to the update package to be transmitted is compared with the check value of the received update package received from the electronic control unit for consistency.

[0076] Specifically, a check value monitoring period is preset. CANoe obtains the currently stored check value in the database at regular intervals according to the check value monitoring period. The currently stored check value in the database may be the initial check value or the standard check value calculated by the exe.

[0077] Determine whether the value of the currently stored check value in the database is the value of the initial check value. If not, determine that the currently stored check value in the database is the standard check value corresponding to the update packet to be transmitted, that is, the initial check value has been replaced. The currently stored check value in the database, that is, the standard check value, can be compared with the check value to be verified sent by the ECU. The check value to be verified can be stored as a third variable at a preset position in the database. When CANoe obtains the currently stored check value in the database, it obtains the check value represented by the second variable and does not obtain the third variable at the preset position in the database.

[0078] It is also possible to obtain the currently stored check value in the database after receiving the check value to be verified sent by the ECU, and determine whether the currently stored check value is the initial check value. If not, compare the currently stored check value with the check value to be verified for consistency.

[0079] The beneficial effect of such a setting is that by comparing the currently stored check value in the database with the initial check value, it can be determined whether the exe program has calculated the standard check value. If so, a consistency comparison is performed, avoiding comparing the initial check value with the check value to be verified, improving the comparison accuracy, and thus improving the verification accuracy.

[0080] In this embodiment, after obtaining the currently stored check value in the database according to the preset check value monitoring period, it further includes: if the currently stored check value in the database is the initial check value, continue to execute obtaining the currently stored check value in the database according to the preset check value monitoring period.

[0081] Specifically, compare the currently stored check value in the database with the initial check value. If the currently stored check value in the database is the initial check value, it is determined that the exe program has not calculated the standard check value, and the currently stored check value in the database can continue to be obtained according to the preset check value monitoring period until the currently stored check value in the database is not the initial check value, and then the consistency comparison between the check value to be verified and the standard check value is started. Figure 3It is a schematic diagram of data interaction. The exe program calculates the update data in the update package to be transmitted, stores the calculated standard check value in the database. The ECU calculates the update data in the received update package and sends the calculated check value to be verified to CANoe. CANoe regularly obtains the currently stored check value from the database and determines whether the check value is the initial check value. If so, it continues to obtain the currently stored check value from the database and performs cyclic reading; if not, it jumps out of the loop, closes the exe program, and compares the standard check value with the check value to be verified.

[0082] The beneficial effect of this setting is that CANoe can continuously read the value of the check value from the database and cyclically judge the initial check value, which is convenient for timely discovering the standard check value obtained by the exe program and improving the verification accuracy and efficiency of the update package.

[0083] In this embodiment, after it is determined that the currently stored check value in the database is the initial check value, it further includes: determining the current time length from the time when the update package to be transmitted is obtained to the current moment; if the current time length exceeds the preset time length threshold, it is determined that the update package verification fails, and a prompt message for checking the executable program is sent to prompt the user to view.

[0084] Specifically, CANoe can perform timing during the verification process of the update package. For example, it can start timing from the time when the update package to be transmitted is obtained. After CANoe determines that the currently stored check value in the database is the initial check value each time, it determines the timed time length, that is, determines the time length from the time when the update package to be transmitted is obtained to the current moment as the current time length.

[0085] A time length threshold is preset and the current time length is compared with the time length threshold. If the current time length does not exceed the preset time length threshold, it continues to obtain the currently stored check value from the database according to the preset check value monitoring period; if the current time length exceeds the preset time length threshold, it means that CANoe has cycled for a long time and the exe program still has not obtained the standard check value. It can be determined that the update package verification fails, and a prompt message for checking the executable program is sent to prompt the user to view the exe program.

[0086] After obtaining the verification value stored in the CANoe database, the number of times of obtaining the verification value stored in the CANoe database can also be recorded as the current acquisition times. A threshold for the acquisition times is preset, and the current acquisition times is compared with the threshold for the acquisition times. If the current acquisition times does not exceed the preset threshold for the acquisition times, the verification value currently stored in the database is continuously obtained according to the preset verification value monitoring period. If the current acquisition times exceeds the preset threshold for the acquisition times, it indicates that CANoe has looped for a long time and the exe program still has not obtained the standard verification value. It can be determined that the verification of the update package fails, and a prompt message for checking the executable program is sent to prompt the user to view the exe program.

[0087] The beneficial effect of such a setting is that it can prevent CANoe from continuously looping to obtain the verification value in the database. When the exe cannot obtain the standard verification value, it can jump out of the loop in time to remind the user to view, thereby improving the verification efficiency of the update package.

[0088] An update package verification method based on in-vehicle applications provided by an embodiment of the present application obtains an update package to be transmitted through a bus development environment, sends the update package to be transmitted to an electronic control unit of a vehicle, and the electronic control unit calculates a verification value corresponding to the received update package and sends the verification value back to the bus development environment. The bus development environment calls an executable program to calculate the verification value of the update package to be transmitted, and compares the calculated verification value with the verification value received from the electronic control unit. If the two are consistent, it is determined that the update package verification passes and the update can continue. By verifying the update package, the problems of data loss or tampering in the prior art during the transmission of the update package to the electronic control unit are solved, ensuring the correct update of the application. By calling the executable program, the computing pressure on the bus development environment is reduced, the calculation error of the verification value corresponding to the update package to be transmitted is avoided, and the verification accuracy and efficiency of the update package are improved.

[0089] Figure 4 This is a structural block diagram of an update package verification device provided by an embodiment of the present application. For ease of description, only parts related to the embodiments of the present disclosure are shown. The device is applied to an electronic device in which a bus development environment is deployed. Referring to Figure 4 the device includes: an update package acquisition module 401, a verification value determination module 402, and an update package verification module 403.

[0090] An update package acquisition module 401, configured to acquire an update package to be transmitted based on the bus development environment, and transmit the update package to be transmitted to an electronic control unit of a vehicle; wherein, the electronic control unit is configured to determine a check value of the received update package, and send the check value of the received update package to the bus development environment; the check value is used to represent the result of calculating the update data in the update package.

[0091] A check value determination module 402, configured to call a preset executable program, and determine a check value corresponding to the update package to be transmitted according to the executable program; wherein, the executable program is configured to determine a check value according to update data.

[0092] An update package verification module 403, configured to determine that the update package to be transmitted passes the verification if the check value corresponding to the update package to be transmitted is consistent with the check value of the received update package received from the electronic control unit.

[0093] Figure 5 This is a structural block diagram of an update package verification device based on in-vehicle applications provided by an embodiment of the present application. On the basis of the embodiment shown in Figure 4 as shown, the check value determination module 402 includes a check value calculation unit 4021 and a check value storage unit 4022. Figure 5 as shown, the check value determination module 402 includes a check value calculation unit 4021 and a check value storage unit 4022.

[0094] The check value calculation unit 4021 is configured to obtain the existing update data from the update package to be transmitted, and determine the check value corresponding to the update package to be transmitted based on the check value determination algorithm preset in the executable program.

[0095] The check value storage unit 4022 is configured to store the check value corresponding to the update package to be transmitted in a preset database.

[0096] In one example, a preset initial check value is stored in the database.

[0097] The check value storage unit 4022 is specifically configured to:

[0098] replace the preset initial check value with the check value corresponding to the update package to be transmitted, and store it in a preset database.

[0099] In one example, the device further includes:

[0100] A check value acquisition module, configured to acquire the currently stored check value in the database according to a preset check value monitoring period before the check value corresponding to the update package to be transmitted is consistent with the check value of the received update package received from the electronic control unit.

[0101] The check value comparison module is used to determine that the currently stored check value in the database is the check value corresponding to the update package to be transmitted if the currently stored check value in the database is not the initial check value, and compare the check value corresponding to the update package to be transmitted with the check value of the received update package received from the electronic control unit for consistency.

[0102] In one example, the device further includes:

[0103] The loop execution module is used to, after obtaining the currently stored check value in the database according to a preset check value monitoring period, if the currently stored check value in the database is the initial check value, continue to execute the operation of obtaining the currently stored check value in the database according to the preset check value monitoring period.

[0104] In one example, the device further includes:

[0105] The current time length determination module is used to determine the current time length from the time when the update package to be transmitted is obtained to the current moment after it is determined that the currently stored check value in the database is the initial check value;

[0106] The time comparison module is used to determine that the update package check fails and send a prompt message to check the executable program to prompt the user to view it if the current time length exceeds a preset time length threshold.

[0107] In one example, the update package check module 403 is specifically used for:

[0108] According to a preset check value comparison rule, determine that the character at a preset position in the check value of the received update package is the first character, and the character at the preset position in the check value corresponding to the update package to be transmitted is the second character;

[0109] If the first character and the second character are the same, determine that the update package to be transmitted passes the check.

[0110] In one example, the device further includes:

[0111] The check passed module is used to, after determining that the update package to be transmitted passes the check, based on the bus development environment, send the information that the check has passed to the electronic control unit of the vehicle to prompt the electronic control unit to update the in-vehicle application.

[0112] Figure 6 The structural block diagram of an electronic device provided by an embodiment of the present application is as Figure 6 shown. The electronic device includes: a memory 61, a processor 62; the memory 61; a memory for storing executable instructions of the processor 62.

[0113] Among them, the processor 62 is configured to execute the method provided in the above embodiments.

[0114] The electronic device further includes a receiver 63 and a transmitter 64. The receiver 63 is used to receive instructions and data sent by other devices, and the transmitter 64 is used to send instructions and data to external devices.

[0115] Figure 7 is a block diagram of an electronic device shown according to an exemplary embodiment. The device can be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0116] The device 700 may include one or more of the following components: a processing component 702, a memory 704, a power component 706, a multimedia component 708, an audio component 710, an input / output (I / O) interface 712, a sensor component 714, and a communication component 716.

[0117] The processing component 702 generally controls the overall operation of the device 700, such as operations associated with display, telephone calls, data communication, camera operations, and recording operations. The processing component 702 may include one or more processors 720 to execute instructions to complete all or part of the steps of the above method. In addition, the processing component 702 may include one or more modules to facilitate the interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate the interaction between the multimedia component 708 and the processing component 702.

[0118] The memory 704 is configured to store various types of data to support the operation of the device 700. Examples of such data include instructions for any application or method operating on the device 700, contact data, phone book data, messages, pictures, videos, etc. The memory 704 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, a magnetic disk, or an optical disk.

[0119] The power component 706 provides power to various components of the device 700. The power component 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 700.

[0120] The multimedia component 708 includes a screen that provides an output interface between the device 700 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can sense not only the boundaries of touch or swipe actions, but also detect the duration and pressure associated with the touch or swipe operation. In some embodiments, the multimedia component 708 includes a front camera and / or a rear camera. When the device 700 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each of the front camera and the rear camera can be a fixed optical lens system or have a focal length and optical zoom capabilities.

[0121] The audio component 710 is configured to output and / or input audio signals. For example, the audio component 710 includes a microphone (MIC) that is configured to receive external audio signals when the device 700 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals can be further stored in the memory 704 or transmitted via the communication component 716. In some embodiments, the audio component 710 further includes a speaker for outputting audio signals.

[0122] The I / O interface 712 provides an interface between the processing component 702 and a peripheral interface module, which can be a keyboard, a click wheel, buttons, etc. These buttons can include, but are not limited to: a home button, a volume button, a power button, and a lock button.

[0123] The sensor component 714 includes one or more sensors for providing status assessments of various aspects of the device 700. For example, the sensor component 714 can detect the on / off state of the device 700, the relative positioning of components, such as the display and keypad of the device 700. The sensor component 714 can also detect a change in the position of the device 700 or a component of the device 700, the presence or absence of user contact with the device 700, the orientation or acceleration / deceleration of the device 700, and the temperature change of the device 700. The sensor component 714 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor component 714 can also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor component 714 can further include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0124] The communication component 716 is configured to facilitate communication, either wired or wirelessly, between the device 700 and other devices. The device 700 may access a wireless network based on a communication standard, such as WiFi, 2G, or 3G, or a combination thereof. In an exemplary embodiment, the communication component 716 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 716 further includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0125] In an exemplary embodiment, the device 700 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the above method.

[0126] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 704 including instructions, which can be executed by a processor 720 of the device 700 to complete the above method. For example, the non-transitory computer-readable storage medium may be a ROM, Random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0127] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a terminal device, enables the terminal device to execute the above update package verification method for the in-vehicle application of the terminal device.

[0128] This application also discloses a computer program product, including a computer program, which when executed by a processor implements the method as described in this embodiment.

[0129] The various embodiments of the systems and techniques described above in this application can be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGA), application specific integrated circuits (ASIC), application specific standard products (ASSP), systems on a chip (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special or general-purpose programmable processor, receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting the data and instructions to the storage system, the at least one input device, and the at least one output device.

[0130] The program code for implementing the methods of this application can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the program codes are executed by the processor or controller, the functions / operations specified in the flowchart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, executed partially on the machine as an independent software package and partially on a remote machine, or executed entirely on a remote machine or electronic device.

[0131] In the context of this application, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media would include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0132] To provide for interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can also be used to provide for interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0133] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data electronic device), or a computing system that includes middleware components (e.g., an application electronic device), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), and the Internet.

[0134] A computer system can include a client and an electronic device. The client and the electronic device are generally remote from each other and typically interact through a communication network. The relationship between the client and the electronic device is created by computer programs that run on respective computers and have a client-server relationship to each other. The electronic device can be a cloud electronic device, also known as a cloud computing electronic device or a cloud host, which is a host product in the cloud computing service system, solving the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or simply "VPS"). The electronic device can also be an electronic device of a distributed system, or an electronic device combined with a blockchain. It should be understood that the various forms of processes shown above can be reordered, added, or deleted. For example, the steps recited in this application can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this application can be achieved, and no limitation is made herein.

[0135] Those skilled in the art will readily conceive of other embodiments of the present application after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application, which follow the general principles of the present application and include known common general knowledge or conventional technical means in the technical field not disclosed in the present application. The specification and examples are only regarded as exemplary, and the true scope and spirit of the present application are pointed out by the following claims.

[0136] It should be understood that the present application is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present application is only limited by the appended claims.

Claims

1. A method for verifying an update package based on in-vehicle applications, characterized in that, The method is applied to an electronic device in which a bus development environment is deployed. The method includes: Based on the bus development environment, obtain an update package to be transmitted, and transmit the update package to be transmitted to an electronic control unit of a vehicle. Wherein, the electronic control unit is configured to determine a check value of the received update package, and send the check value of the received update package to the bus development environment. The check value is used to represent the result of calculating the update data in the update package. Call a preset executable program, and determine the check value corresponding to the update package to be transmitted according to the executable program, including: Obtain the existing update data from the update package to be transmitted, and determine the check value corresponding to the update package to be transmitted based on the check value determination algorithm preset in the executable program. Wherein, the executable program is used to determine the check value according to the update data, and the executable program is specifically configured to open a process for calculating the check value. Store the check value corresponding to the update package to be transmitted in a preset database, including: Replace the preset initial check value with the check value corresponding to the update package to be transmitted, and store it in the preset database. Wherein, the database is deployed in the bus development environment, and the preset initial check value is stored in the database. If the check value corresponding to the update package to be transmitted is consistent with the check value of the received update package received from the electronic control unit, it is determined that the update package to be transmitted passes the check.

2. The method according to claim 1, characterized in that, Before if the check value corresponding to the update package to be transmitted is consistent with the check value of the received update package received from the electronic control unit, it further includes: Obtain the currently stored check value in the database according to a preset check value monitoring period. If the currently stored check value in the database is not the initial check value, determine that the currently stored check value in the database is the check value corresponding to the update package to be transmitted, and compare the check value corresponding to the update package to be transmitted with the check value of the received update package received from the electronic control unit for consistency.

3. The method according to claim 2, wherein After obtaining the currently stored check value in the database according to a preset check value monitoring period, it further includes: If the currently stored check value in the database is the initial check value, continue to execute the step of obtaining the currently stored check value in the database according to the preset check value monitoring period.

4. The method according to claim 3, wherein After if the currently stored check value in the database is the initial check value, it further includes: Determine the current time length from the time when the update package to be transmitted is obtained to the current moment. If the current time length exceeds a preset time length threshold, it is determined that the update package fails the check, and a prompt message for checking the executable program is sent to prompt the user to view.

5. The method according to claim 1, wherein If the check value corresponding to the update package to be transmitted is consistent with the check value of the received update package received from the electronic control unit, it is determined that the update package to be transmitted passes the check, including: According to a preset verification value comparison rule, determine the character at a preset position in the verification value of the received update package as the first character, and the character at the preset position in the verification value corresponding to the update package to be transmitted as the second character; If the first character and the second character are the same, it is determined that the update package to be transmitted passes the verification.

6. The method according to any one of claims 1-5, characterized in that After determining that the update package to be transmitted passes the verification, it further includes: Based on the bus development environment, send the information that the verification is passed to the electronic control unit of the vehicle, and prompt the electronic control unit to update the in-vehicle application.

7. An update package verification device based on in-vehicle applications, characterized in that, The device is applied to an electronic device, and a bus development environment is deployed in the electronic device. The device includes: An update package acquisition module, configured to acquire an update package to be transmitted based on the bus development environment, and transmit the update package to be transmitted to the electronic control unit of the vehicle; wherein, the electronic control unit is configured to determine the verification value of the received update package, and send the verification value of the received update package to the bus development environment; the verification value is used to represent the result of calculating the update data in the update package; A verification value determination module, configured to call a preset executable program, and determine the verification value corresponding to the update package to be transmitted according to the executable program; wherein, the executable program is used to determine the verification value according to the update data, and the executable program is specifically used to open a process for calculating the verification value; The verification value determination module includes a verification value calculation unit and a verification value storage unit; The verification value calculation unit is configured to obtain the existing update data from the update package to be transmitted, and determine the verification value corresponding to the update package to be transmitted based on the verification value determination algorithm preset in the executable program; The verification value storage unit is configured to store the verification value corresponding to the update package to be transmitted into a preset database; wherein, the database is deployed in the bus development environment; and an initial verification value is preset and stored in the database; The verification value storage unit is specifically configured to replace the preset initial verification value with the verification value corresponding to the update package to be transmitted, and store it in the preset database; An update package verification module, configured to determine that the update package to be transmitted passes the verification if the verification value corresponding to the update package to be transmitted is the same as the verification value of the received update package received from the electronic control unit.

8. An electronic device, characterized in that, It includes: A processor and a memory communicatively connected to the processor; The memory stores computer execution instructions; The processor executes the computer execution instructions stored in the memory to implement the update package verification method for in-vehicle applications according to any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, Computer execution instructions are stored in the computer-readable storage medium, and when the computer execution instructions are executed by the processor, they are used to implement the update package verification method for in-vehicle applications according to any one of claims 1-6.

10. A computer program product, characterized in that, It includes a computer program, and when the computer program is executed by the processor, it implements the update package verification method for in-vehicle applications according to any one of claims 1-6.

Citation Information

Patent Citations

  • ECU data flashing method and system

    CN110109690A