WO2022226938A1 - 软件升级方法和相关产品 - Google Patents
软件升级方法和相关产品 Download PDFInfo
- Publication number
- WO2022226938A1 WO2022226938A1 PCT/CN2021/091174 CN2021091174W WO2022226938A1 WO 2022226938 A1 WO2022226938 A1 WO 2022226938A1 CN 2021091174 W CN2021091174 W CN 2021091174W WO 2022226938 A1 WO2022226938 A1 WO 2022226938A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- target
- upgrade package
- upgrade
- version
- software
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 117
- 238000012545 processing Methods 0.000 claims description 22
- 238000012795 verification Methods 0.000 claims description 11
- 238000004590 computer program Methods 0.000 claims description 10
- 238000003860 storage Methods 0.000 claims description 8
- 239000000306 component Substances 0.000 description 90
- 230000002159 abnormal effect Effects 0.000 description 63
- 238000009434 installation Methods 0.000 description 24
- 230000006870 function Effects 0.000 description 17
- 230000008569 process Effects 0.000 description 16
- 230000005856 abnormality Effects 0.000 description 12
- 238000004891 communication Methods 0.000 description 11
- 238000010586 diagram Methods 0.000 description 8
- 238000005516 engineering process Methods 0.000 description 8
- 230000005540 biological transmission Effects 0.000 description 4
- 238000009826 distribution Methods 0.000 description 4
- 230000003993 interaction Effects 0.000 description 4
- 238000013461 design Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000011900 installation process Methods 0.000 description 2
- 230000002452 interceptive effect Effects 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 239000008358 core component Substances 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000037361 pathway Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
Definitions
- the present application relates to the field of software upgrade, and in particular, to a software upgrade method and related products.
- Over the air (OTA) technology is a technology for downloading data through a wireless network.
- OTA technology has been widely used to upgrade smart TVs, mobile phones, tablet computers, set-top boxes and other devices.
- the OTA online upgrade function (the function of upgrading software or firmware through OTA technology) has become an important function of the car.
- Original equipment manufacturers original equipment manufacturers, OEMs
- the embodiments of the present application provide a software upgrade method and related products, the upgrade package is verified before the upgrade package is installed, and the upgrade package that passes the verification is installed and activated, which can avoid abnormal upgrades.
- an embodiment of the present application provides a software upgrade method, the method includes: obtaining a target upgrade package; when a preset condition is met, using the target upgrade package to upgrade target software; for verifying the security of upgrading the target software by using the target upgrade package.
- the preset condition can be understood as a condition for ensuring the security of upgrading the target software by using the target upgrade package, that is, a condition for ensuring that upgrading the target software by using the target upgrade package will not cause an abnormal upgrade. That is to say, if the target upgrade package does not meet the preset conditions, upgrading the target software using the target upgrade package is likely to cause an upgrade exception; if the target upgrade package meets the preset conditions, using the target upgrade package to upgrade the target software will hardly cause an upgrade exception. .
- the target software when the preset conditions are met, the target software is upgraded by using the target upgrade package; the security of upgrading the target software by using the target upgrade package can be ensured, and the occurrence of upgrade exceptions can be reduced.
- the preset condition includes one or both of the following: the attribute information of the target upgrade package matches the attribute information of the target upgrade package contained in the upgrade package description file; the The version number of the target upgrade package matches the files included in the target upgrade package.
- the attribute information of the target upgrade package matches the attribute information of the target upgrade package contained in the upgrade package description file, which can ensure that the content of the target upgrade package is consistent with the version of the target upgrade package.
- the version number of the target upgrade package matches the files included in the target upgrade package, and it can also be ensured that the content of the target upgrade package is consistent with the version of the target upgrade package. Preset conditions can quickly and accurately verify whether the content of the target upgrade package is consistent with the version of the target upgrade package.
- matching the version number of the target upgrade package with the files included in the target upgrade package includes: the version number of the target software to the version number of the target upgrade package corresponds to a major version upgrade , and the target upgrade package includes files required to realize the major version upgrade of the target software; or, the version number of the target upgrade package matches the files included in the target upgrade package including: the target upgrade package The version number of the software to the version number of the target upgrade package corresponds to a minor version upgrade, and the target upgrade package does not include files required to implement the major version upgrade of the target software.
- the target upgrade package when the version number of the target software to the version number of the target upgrade package corresponds to the major version upgrade, and the target upgrade package includes the files required to realize the major version upgrade of the target software, it indicates that the version number of the target upgrade package is the same as the one required for the major version upgrade of the target software.
- the files included in the target upgrade package match.
- the version number of the target software to the version number of the target upgrade package corresponds to the minor version upgrade, and the target upgrade package does not include the files required to realize the major version upgrade of the target software, it indicates that the version number of the target upgrade package is the same as the target upgrade package. Included files match. In this implementation manner, it can be accurately and quickly verified whether the version number of the target upgrade package matches the files included in the target upgrade package.
- the preset condition further includes: the version number of the target upgrade package is greater than the version number of the target software, or the version number of the target upgrade package is smaller than the version number of the target software and the version number of the target upgrade package is the version number authorized by the user to install.
- the version number of the target upgrade package is greater than the version number of the target software, which can prevent the target upgrade package from being downloaded and stored locally before being replaced with an upgrade package of a lower version before being installed.
- the version number of the target upgrade package is smaller than the version number of the target software, and the version number of the target upgrade package is the version number authorized to be installed by the user, which can meet the user's requirement for installing an upgrade package of a lower version.
- the attribute information of the target upgrade package includes one or more of the following: the size of the target upgrade package, the number of files in the target upgrade package, and a hash value; the The hash value is obtained from the target upgrade package.
- the attribute information of the target upgrade package includes one or more of the size of the target upgrade package, the number of files in the target upgrade package, and a hash value, so as to quickly and accurately verify the target upgrade Whether the attribute information of the package matches the attribute information of the target upgrade package contained in the upgrade package description file.
- the method before using the target upgrade package to upgrade the target software, the method further includes: acquiring the upgrade package description file, and performing an integrity check on the upgrade package description file;
- the preset conditions include: the upgrade package description file passes the integrity check, and the attribute information of the target upgrade package matches the attribute information of the target upgrade package contained in the upgrade package description file.
- the integrity of the upgrade package description file can be checked to ensure the integrity of the upgrade package description file.
- the method before using the target upgrade package to upgrade the target software, the method further includes: querying whether the version of the target upgrade package is the latest version; when the version of the target upgrade package is In the case of the latest version, the operation of using the target upgrade package to upgrade the target software is performed under the condition that the preset condition is satisfied.
- the operation of using the target upgrade package to upgrade the target software under the condition that the preset condition is satisfied is performed, so as to upgrade the target software with the latest version of the upgrade package .
- the target software is an electronic map
- the target file is a non-dynamic library file
- the large version is upgraded to an update of the linked map version
- the small version is upgraded to a non-linked map version or
- the large version is upgraded to a basemap update
- the small version is upgraded to a non-basemap update.
- an embodiment of the present application provides a software upgrade apparatus, including: an obtaining unit, configured to obtain a target upgrade package; and a processing unit, configured to use the target upgrade package to upgrade a target when a preset condition is satisfied software; the preset condition is used to verify the security of upgrading the target software by using the target upgrade package.
- the processing unit uses the target upgrade package to upgrade the target software under the condition that the preset conditions are met; the security of the target software upgrade using the target upgrade package can be guaranteed, that is, it is guaranteed that the target software upgrade using the target upgrade package will not occur. Upgrade exceptions.
- the preset condition includes one or both of the following: the attribute information of the target upgrade package matches the attribute information of the target upgrade package contained in the upgrade package description file; the The version number of the target upgrade package matches the files included in the target upgrade package.
- matching the version number of the target upgrade package with the files included in the target upgrade package includes: the version number of the target software to the version number of the target upgrade package corresponds to a major version upgrade , and the target upgrade package includes files required to realize the major version upgrade of the target software; or, the version number of the target upgrade package matches the files included in the target upgrade package including: the target upgrade package The version number of the software to the version number of the target upgrade package corresponds to a minor version upgrade, and the target upgrade package does not include files required to implement the major version upgrade of the target software.
- the preset condition further includes: the version number of the target upgrade package is greater than the version number of the target software, or the version number of the target upgrade package is smaller than the version number of the target software and the version number of the target upgrade package is the version number authorized by the user to install.
- the attribute information of the target upgrade package includes one or more of the following: the size of the target upgrade package, the number of files in the target upgrade package, and a hash value; the The hash value is obtained from the target upgrade package.
- the obtaining unit is further configured to obtain the upgrade package description file; the processing unit is further configured to perform an integrity check on the upgrade package description file; the preset condition It includes: the upgrade package description file passes the integrity check, and the attribute information of the target upgrade package matches the attribute information of the target upgrade package contained in the upgrade package description file.
- the processing unit is further configured to query whether the version of the target upgrade package is the latest version; in the case that the version of the target upgrade package is the latest version, execute the execution when the predetermined version is satisfied. In the case of setting conditions, use the target upgrade package to upgrade the operation of the target software.
- the target software is an electronic map
- the target file is a non-dynamic library file
- the major version is upgraded to an update of the linked map version
- the small version is upgraded to a non-linked map version.
- Update, or, the large version is upgraded to an update of the basemap, and the small version is upgraded to an update of a non-basemap.
- an embodiment of the present application provides an electronic device, the electronic device includes: a processor and a memory, wherein the memory is used to store instructions, and the processor is used to execute the instructions stored in the memory, so that all The processor executes the method according to the above-mentioned first aspect and any possible implementation manner.
- an embodiment of the present application provides a chip, where the chip includes a data interface and a processor, wherein the processor is configured to execute the method in the first aspect or any possible implementation manner of the first aspect.
- the chip is any chip with software or firmware installed on the vehicle.
- the present application provides a chip system, the chip system includes at least one processor for supporting functions involved in implementing the first aspect or any possible implementation manner of the first aspect, for example, receiving or Process the data and/or information involved in the above methods.
- the chip system further includes a memory for storing program instructions and data, and the memory is located inside the processor or outside the processor.
- the chip system may be composed of chips, or may include chips and other discrete devices.
- an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored in the computer storage medium, and the computer program includes program instructions that, when executed by a processor, cause the processor to execute the above-mentioned first step.
- an embodiment of the present application provides a computer program product, where the computer program product includes program instructions, and when executed by a processor, the program instructions cause the processor to execute the above-mentioned first aspect and any possible possibility method of implementation.
- FIG. 1 provides an OTA vehicle upgrade architecture according to an embodiment of the present application
- FIG. 2 is a schematic diagram of a plurality of components involved in software upgrade on a vehicle end provided by an embodiment of the present application;
- FIG. 3 is a flowchart of an OTA vehicle upgrade provided by an embodiment of the present application.
- FIG. 4 is a flowchart of an upgrade method provided by an embodiment of the present application.
- FIG. 5 is a flowchart of another upgrade method provided by the embodiment of the present application.
- FIG. 6 is a flowchart of another upgrade method provided by an embodiment of the present application.
- FIG. 7 is a flowchart of another upgrade method provided by an embodiment of the present application.
- FIG. 8 is a flowchart of another upgrade method provided by an embodiment of the present application.
- FIG. 9 is a flowchart of another upgrade method provided by an embodiment of the present application.
- FIG. 10 is a flowchart of another upgrade method provided by the embodiment of the present application.
- FIG. 11 is a flowchart of another upgrade method provided by an embodiment of the present application.
- FIG. 12 is an interactive flowchart of an upgrade method provided by an embodiment of the present application.
- FIG. 13 is an interactive flowchart of another upgrade method provided by an embodiment of the present application.
- FIG. 14 is a schematic structural diagram of a software upgrade apparatus provided by an embodiment of the present application.
- FIG. 15 is a schematic structural diagram of another software upgrade apparatus 150 provided by an embodiment of the present application.
- FIG. 16 is a schematic structural diagram of another software upgrade apparatus 160 provided by an embodiment of the present application.
- At least one (item) refers to one or more
- “multiple” refers to two or more
- at least two (item) refers to two or three and three or more.
- At least one item(s) below” or similar expressions thereof refer to any combination of these items, including any combination of single item(s) or plural items(s).
- at least one (a) of a, b or c can mean: a, b, c, "a and b", “a and c", “b and c”, or "a and b and c” ", where a, b, c can be single or multiple.
- the abnormal software (or firmware) upgrade refers to the failure to upgrade the corresponding software (or firmware) using the upgrade package or the upgraded software (or firmware) is not a better version than before the upgrade.
- the version of the upgrade package obtained by the OTA main module (master) from the cloud does not match the content of the upgrade package.
- the upgrade package will fail to upgrade the software or firmware by using the upgrade package.
- the version of the upgrade package obtained by the OTA master module from the cloud is lower than the version of the installed software.
- the upgrade solution provided in this application is suitable for software (or firmware) upgrade scenarios, such as a vehicle OTA upgrade scenario, a terminal device software upgrade scenario, and the like.
- the following takes the OTA upgrade scenario of the whole vehicle and the software upgrade scenario on the terminal device as an example to introduce.
- Vehicle OTA upgrade scenario The cloud (such as a cloud server) sends an upgrade package to the vehicle (such as a car); the vehicle uses the upgrade package to upgrade the software or firmware installed on one or more components.
- a possible upgrade process is as follows: the cloud sends the upgrade package to the OTA master module on the vehicle; the OTA master module verifies the upgrade package and disassembles it and distributes it to the OTA slave module (slave) of the corresponding component; the OTA master module Instruct the OTA slave module corresponding to each component to install and activate the upgrade package according to certain dependencies and sequences.
- the OTA master module runs on a certain component of the car (such as network management, car box, etc.), and coordinates and controls the OTA slave module running on other components to complete the vehicle upgrade together.
- terminal devices such as mobile phones, tablet computers, laptops, or cars
- obtain the required upgrade package from the cloud server through the network the terminal device uses the upgrade package to upgrade its running software or firmware.
- a software upgrade device (such as a car or a terminal device) verifies whether the upgrade package is safe and effective (corresponding to whether the preset conditions are met) before using the upgrade package to upgrade the corresponding software or firmware, and only the verified safe and effective
- the upgrade package is only used to upgrade the software or firmware, which can avoid the situation of abnormal software upgrade.
- FIG. 1 provides an OTA vehicle upgrade architecture according to an embodiment of the present application.
- the OTA vehicle upgrade architecture includes: cloud and vehicle.
- the cloud can be a cloud server.
- the cloud ie OTA cloud
- the cloud can use OTA technology to deliver upgrade packages to the vehicle.
- the cloud sends an upgrade package to the car through any wireless network such as a 4G (or 5G) network, a satellite network, and a wireless fidelity (wifi) network.
- the car end can use the upgrade package received from the cloud to upgrade the corresponding software or firmware.
- the vehicle end refers to any vehicle such as unmanned vehicles, cars, automobiles, trucks, motorcycles, buses, trams, golf carts, trains, recreational vehicles, and amusement park vehicles.
- vehicle end can be replaced with a ship, an airplane, a mobile phone, a notebook computer, a tablet computer, a wearable device, a game console, and other devices that can use the upgrade package delivered by the cloud to perform software upgrades.
- the embodiments of the present application The methods involved also apply.
- the vehicle end can contain multiple parts, and the whole vehicle upgrade usually involves the upgrade of multiple parts.
- the dashed box in Figure 1 shows the various components that may be involved in a vehicle upgrade.
- the components involved in the vehicle upgrade include but are not limited to: gateway (GW), mobile data center (MDC), human-machine interaction (HMI), telematics control unit , TCU) / car box (telematics BOX, T-box) and electronic control unit (electronic control unit, ECU).
- Gateway also known as gateway controller
- Gateway controller is the core component in the electronic and electrical architecture of the vehicle.
- MDC controller area network
- HMI infotainment system of a car
- TCU also known as T-box
- ECU is a special-purpose microcomputer controller for automobiles. It should be understood that, in the whole vehicle upgrade, it may only involve the upgrade of some components in the dashed box, and may also involve the upgrade of the components not included in the dashed box, which is not limited in this application.
- the components involved in the whole vehicle upgrade may also include: a cockpit domain controller (CDC) and a vehicle domain controller (VDC).
- CDC cockpit domain controller
- VDC vehicle domain controller
- the vehicle end coordinates the upgrade of each component through a component running the OTA master module.
- the OTA master module runs on a certain part of the vehicle (such as gateway, car box, etc.), and coordinates and controls the upgrade module (OTA slave module) of other components to complete the vehicle upgrade together.
- the OTA master module may also be a separate module, which is not limited in this embodiment of the present application.
- FIG. 2 is a schematic diagram of a plurality of components involved in software upgrade on a vehicle end according to an embodiment of the present application.
- the GW receives the upgrade package from the cloud; the OTA master module running on the GW verifies the upgrade package and disassembles it and distributes it to the OTA slave module of the corresponding component; the OTA master module instructs each component to follow a certain Dependencies and order to install and activate upgrade packages.
- FIG. 2 is only an example of a vehicle end, and the OTA master module does not necessarily run on the GW, but can also run on the T-box or other components.
- Figure 1 introduces the OTA vehicle upgrade architecture
- Figure 2 introduces an example of multiple components involved in software upgrades on the vehicle side.
- An example of an OTA vehicle upgrade process is described below with reference to the accompanying drawings.
- FIG. 3 is a flowchart of an OTA vehicle upgrade provided by an embodiment of the present application.
- the OTA server such as the cloud
- the OTA master module and the OTA slave module jointly implement the OTA vehicle upgrade.
- the operations performed by the OTA server include: signing the upgrade package; and issuing the signed upgrade package through the transport layer security (TLS) channel.
- the cloud that is, the OTA server
- the operations performed by the OTA master module include: downloading the upgrade package through the TLS channel; verifying the upgrade package, such as verifying the signature of the upgrade package; disassembling and distributing the upgrade package to the OTA slave module of the corresponding component.
- the operations performed by the OTA slave module include: receiving the upgrade package distributed by the OTA master module; installing the upgrade package, that is, using the upgrade package to upgrade the corresponding software or firmware.
- the complete OTA vehicle upgrade process includes the production, release, download, distribution, and installation of the upgrade package.
- the OTA vehicle upgrade process in Figure 3 describes the download, distribution, and installation of the upgrade package.
- the following describes the operations performed to ensure the safety of the OTA vehicle upgrade process in the cloud, transmission, and vehicle end.
- the cloud Through the certificate, signature and encryption mechanism, the upgrade package will not be produced and released at will, and the content of the upgrade package will not be maliciously obtained. In this way, the cloud can ensure the security of the upgrade package during the production and distribution process.
- Car end After the car end downloads the upgrade package, verify whether the signature of the upgrade package is legal.
- the upgrade package is saved locally after being downloaded, and the upgrade package is replaced with an upgrade package of a lower version before it is installed.
- the signature of the upgrade package is legal, but the version of the upgrade package does not match the content of the upgrade package.
- the upgrade package will pass the verification.
- upgrading software or firmware with a certified upgrade package may cause abnormal upgrades.
- the main principle of the upgrade method provided by the present application is to optimize or increase the conditions for installing the upgrade package, and to verify the security of using the upgrade package to upgrade the corresponding software (or firmware) through these conditions. Further, the upgrade method provided by the present application also reduces security risks by performing security protection on the upgrade package description file.
- FIG. 4 is a flowchart of an upgrade method provided by an embodiment of the present application. As shown in Figure 4, the method includes:
- the software upgrade apparatus obtains a target upgrade package.
- the software upgrade device can be the GW, T-box, ECU and other components on the vehicle that are installed with software or firmware, or can be mobile phones, tablet computers, notebook computers, game consoles, wearable devices and other terminal equipment installed with software or firmware. , or other devices with software or firmware installed.
- step 401 is: the software upgrade apparatus downloads the target upgrade package from the cloud (eg, a cloud server). Or, the software upgrade apparatus downloads the general upgrade package from the cloud (eg, a cloud server); disassembles the general upgrade package to obtain the target upgrade package. The total upgrade package can be disassembled to obtain the target upgrade package and upgrade packages for upgrading software on other components.
- the cloud eg, a cloud server
- the software upgrade apparatus downloads the general upgrade package from the cloud (eg, a cloud server); disassembles the general upgrade package to obtain the target upgrade package.
- the total upgrade package can be disassembled to obtain the target upgrade package and upgrade packages for upgrading software on other components.
- step 401 the software upgrade apparatus receives the target upgrade package issued by the component (for example, GW, T-box, etc.) running the OTA master module on the vehicle (or terminal device).
- the software upgrade device can be a part of the OTA slave module running on the vehicle, such as ECU, MDC, HMI, etc.; it can also be a part of the OTA slave module on the terminal device, such as a graphics processing unit (graphics processing unit, GPU).
- the components on the vehicle running the OTA master module (such as GW, T-box, etc.) will be disassembled from the total upgrade package downloaded from the cloud and distributed to the OTA slave modules of the corresponding components.
- the total upgrade package can be disassembled to obtain the target upgrade package and upgrade packages for upgrading software on other components
- the software upgrade device can be understood as the component to which the target upgrade package is distributed.
- a component running an OTA master module on a terminal device such as a mobile phone
- a central processing unit CPI
- the software upgrade device is the GPU on the terminal device.
- the software upgrade apparatus uses the target upgrade package to upgrade the target software.
- the above preset conditions are used to verify the security of using the target upgrade package to upgrade the target software.
- the above-mentioned preset conditions include one or both of the following: the attribute information of the above-mentioned target upgrade package matches the attribute information of the above-mentioned target upgrade package contained in the upgrade package description file, and the version number of the above-mentioned target upgrade package and the above-mentioned target upgrade package include: file to match.
- the above-mentioned preset conditions further include: the version number of the above-mentioned target upgrade package is greater than the version number of the above-mentioned target software, or the version number of the above-mentioned target upgrade package is smaller than the version number of the above-mentioned target software and the above-mentioned target
- the version number of the upgrade package is the version number authorized by the user to install.
- the OTA Server (such as the cloud) has finished making the target upgrade package, it can generate the upgrade package description file.
- the upgrade package description file contains description information of the target upgrade package, such as the version number and download address of the target upgrade package.
- the software upgrade device can obtain the target upgrade package and the upgrade package description file respectively, or can simultaneously obtain the upgrade package description file and the target upgrade package. When the software upgrade device obtains the description file of the upgrade package, it can safely save the description file of the upgrade package to ensure the integrity of the description file of the upgrade package.
- the version number of the above-mentioned target upgrade package matches the files included in the above-mentioned target upgrade package may be: the version number of the above-mentioned target software to the version number of the above-mentioned target upgrade package corresponds to a major version upgrade, and the above-mentioned target upgrade package includes the realization of the above-mentioned target software. files required for major version upgrades.
- the version number of the target software to the version number of the target upgrade package corresponds to a minor version upgrade, and the target upgrade package does not include files required to implement a major version upgrade of the target software.
- both the version number of the target upgrade package and the version number of the target software include a major version number (or a major version number) and a subversion number (or a minor version number).
- the version number of the target upgrade package is 11.0, 11 represents the major version number, and 0 represents the subversion number.
- the version number of the target software is 10.1, 10 represents the major version number, and 1 represents the sub-version number.
- the version number of the target software to the version number of the target upgrade package corresponding to the major version upgrade may be: the main version number of the target software and the main version number of the target upgrade package are different.
- the version number of the target software is 10.1
- the version number of the target upgrade package is 11.0
- the version number of the target software to the version number of the target upgrade package corresponds to a major version upgrade.
- the version number of the target software to the version number of the target upgrade package corresponds to the minor version upgrade and can be: the main version number of the target software is the same as the main version number of the target upgrade package, and the subversion number of the target software and the subversion number of the target upgrade package different.
- the version number of the target software is 10.1
- the version number of the target upgrade package is 10.2
- the version number of the target software to the version number of the target upgrade package corresponds to a minor version upgrade.
- the format of the files included in the upgrade package for implementing a major version upgrade and the upgrade package for implementing a minor version upgrade are usually not exactly the same.
- the upgrade package for implementing a major version upgrade of the target software includes files in the first format
- the upgrade package for implementing a minor version upgrade of the target software does not include files in the first format.
- the target software is an electronic map
- a large version upgrade of the target software requires an upgrade package including files in the first format
- a small version upgrade of the target software requires an upgrade package that only includes files in the first format.
- the upgrade package for implementing a minor version upgrade of the target software includes files in the second format, and the upgrade package for implementing a major version upgrade of the target software does not include files in the second format.
- the present application does not limit the above-mentioned files in the first format and files in the second format.
- the files included in an upgrade package may indicate whether the upgrade package is used to implement a major version upgrade or a minor version upgrade of the software.
- the files included in the target upgrade package can indicate whether the target upgrade package is used to implement a major version upgrade or a minor version upgrade of the target software.
- the version number of the target software to the version number of the target upgrade package corresponds to a major version upgrade or a minor version upgrade.
- the files included in the target upgrade package indicate that the target upgrade package is used to implement a major version upgrade of the target software, and the version number of the target software to the version number of the target upgrade package corresponds to a minor version upgrade, it indicates that the target upgrade package contains The file does not match the version of the target upgrade package.
- the files included in the target upgrade package indicate that the target upgrade package is used to implement a minor version upgrade of the target software, and the version number of the target software to the version number of the target upgrade package corresponds to a major version upgrade, it indicates that the target upgrade package contains The file does not match the version of the target upgrade package.
- the software upgrade apparatus can determine whether to use the target upgrade package to upgrade the target by judging whether the version number of the target upgrade package matches the files included in the target upgrade package (that is, whether the version of the target upgrade package is consistent with its content) Whether the software will be abnormal.
- the software upgrade apparatus may also use other methods to determine whether the version number of the target upgrade package matches the files included in the target upgrade package, which is not limited in this application.
- the upgrade of the core modules of the software is a major version upgrade
- the upgrade of the non-core modules is a minor version upgrade.
- map update the update of the large version of the map (that is, the update of the large version) is the update of the base map or the update of the linked map version
- the update of the small version of the map (that is, the update of the small version) is the update of the non-base map or the update of the non-linked map.
- Edit map version updates (such as dynamic map updates).
- the attribute information of the above-mentioned target upgrade package includes one or more of the following: the size of the above-mentioned target upgrade package, the number of files in the above-mentioned target upgrade package, and a hash value; the above-mentioned hash value Obtained from the above target upgrade package.
- the hash value obtained by the target upgrade package may be a hash value, or may be a set of hash values, such as one hash value obtained from each file included in the target upgrade package.
- the attribute information of the target upgrade package may include a hash value obtained by using each file in the target upgrade package.
- the attribute information of the target upgrade package may include a plurality of hash values obtained by using each file in the target upgrade package, wherein each file corresponds to a hash value.
- the attribute information of the target upgrade package may further include a version number, a download address, and the like of the target upgrade package.
- the software upgrade apparatus may acquire attribute information of the target upgrade package according to the target upgrade package, such as querying the number of files in the target upgrade package, the size of the target upgrade package, and the calculation of The hash value corresponding to the target upgrade package; obtain the attribute information of the target upgrade package from the upgrade package description file; determine the attribute information of the target upgrade package obtained according to the target upgrade package and the target upgrade package obtained from the upgrade package description file Whether the attribute information of the package matches.
- the target software when the preset conditions are met, the target software is upgraded by using the target upgrade package; the security of upgrading the target software by using the target upgrade package can be ensured, and the occurrence of upgrade exceptions can be reduced.
- FIG. 5 is a flowchart of another upgrade method provided by an embodiment of the present application. As shown in Figure 5, the method includes:
- the software upgrade apparatus obtains a target upgrade package.
- step 501 may be the same as that of step 401, and will not be described in detail here.
- the software upgrade apparatus verifies the signature of the target upgrade package.
- the signature of the verification target upgrade package by the software upgrade apparatus may be a digital signature for verification of the target upgrade package.
- the software upgrade apparatus ends the upgrade process, for example, records an event that the signature of the target upgrade package fails to pass the verification.
- a digital signature also known as a public key digital signature
- a digital string is a digital string that can only be generated by the sender of the information and cannot be forged by others. This digital string is also an effective proof of the authenticity of the information sent by the sender of the information. It is a method similar to the ordinary physical signature written on paper, but implemented using technology in the field of public key encryption, for authenticating digital information.
- a set of digital signatures usually defines two complementary operations, one for signing and the other for verification.
- Digital signature is the application of asymmetric key encryption technology and digital digest technology.
- the signature process can be as follows: When sending a message (such as a target upgrade package), the sender uses a hash function to generate a message digest from the message text, and then uses the sender's private key to perform a signature on the digest (ie, the message digest). Encryption, the encrypted digest will be sent to the receiver (corresponding to the software upgrade device) together with the message as the digital signature of the message. The receiver first uses the same hash function as the sender to calculate the message digest from the received original message, and then uses the public key to decrypt the digital signature attached to the message. If the two digests are the same, the receiver can confirm that the message is from the sender.
- Digital signatures have two functions: one is to be sure that the message is indeed signed and sent by the sender, because others cannot fake the sender's signature. Second, the digital signature can determine the integrity of the message. Because the characteristic of the digital signature is that it represents the characteristic of the file, if the file changes, the value of the digital digest will also change. Different files will get different digital summaries.
- a digital signature involves a hash function, the recipient's public key, and the sender's private key. The software upgrade device verifies the signature of the target upgrade package, which can not only determine the integrity of the target upgrade package, but also determine that the target upgrade package is signed and sent by the sender.
- step 504 is performed; if not, step 506 is performed.
- the version number of the target upgrade package is larger than that of the target software, indicating that the version of the target upgrade package is newer than the version of the target software.
- Step 503 is optional, but not required.
- the attribute information of the target upgrade package may include one or more of the size of the target upgrade package, the number of files in the target upgrade package, and a hash value; and may also include the version number, download address, and the like of the target upgrade package.
- the software upgrade device can obtain the target upgrade package and the upgrade package description file respectively, or can simultaneously obtain the upgrade package description file and the target upgrade package.
- the sequence of step 503 and step 504 is not limited.
- the software upgrade apparatus may perform step 503 first, and then perform step 504; or may perform step 504 first, and then perform step 503; and may also perform step 503 and step 504 at the same time.
- the software upgrade device uses the target upgrade package only after judging that the version number of the target upgrade package is larger than the version number of the target software, and the attribute information of the target upgrade package matches the attribute information of the target upgrade package contained in the upgrade package description file.
- the upgrade package upgrades the target software. In this way, an abnormal upgrade occurs when the target software is upgraded by using the target upgrade package.
- the software upgrade device uses the target upgrade package to upgrade the target software.
- the software upgrade apparatus records the first abnormal event.
- the first abnormal event may be an event that the version number of the target upgrade package is smaller than the version number of the target software.
- the software upgrade apparatus can record the first abnormal event in the log, so that the user can find the place where the abnormality occurs more quickly and handle the abnormality by analyzing the abnormal event.
- the software upgrade apparatus records the second abnormal event.
- the second abnormal event may be an event in which the version number of the target upgrade package does not match the file included in the target upgrade package.
- the software upgrade device can record the second abnormal event in the log, so that the user can find the place where the abnormality occurs more quickly and handle the abnormality by analyzing the abnormal event.
- the target upgrade package by verifying the signature of the target upgrade package, it can not only determine the integrity of the target upgrade package, but also determine that the target upgrade package is signed and sent by the sender. By judging whether the version number of the target upgrade package is larger than the version number of the target software, it is possible to avoid using an upgrade package with a lower version to upgrade the target software. Further, by judging whether the attribute information of the target upgrade package matches the attribute information of the target upgrade package contained in the upgrade package description file, an abnormal upgrade situation can be avoided.
- FIG. 6 is a flowchart of another upgrade method provided by an embodiment of the present application. As shown in Figure 6, the method includes:
- the software upgrade apparatus obtains a target upgrade package.
- the software upgrade apparatus verifies the signature of the target upgrade package.
- step 604 If yes, go to step 604; if not, go to step 606.
- step 605 If yes, go to step 605; if no, go to step 608.
- the software upgrade device uses the target upgrade package to upgrade the target software.
- steps 601 to 605 may be the same as the implementation of steps 501 to 505 .
- the software upgrade apparatus outputs the upgrade package installation inquiry information through the output device.
- the output device may be a display, an audio device, or the like.
- the upgrade package installation inquiry information is used to inquire the user whether to update the target software by using the target upgrade package of the lower version.
- the upgrade package installation query information is "whether to use the target upgrade package with the version number of 11.0 to update the target software with the version number of 10.2".
- the software upgrade device is the GW on the car, and the output device is the display screen on the car.
- the software upgrade apparatus receives an installation approval instruction through the input device.
- the input device can be a touch screen, audio device, keyboard, mouse, etc.
- the software upgrade device is the GW on the car, and the input device is the touch screen on the car.
- the agree to install instruction instructs the user to agree to update the target software with a lower version of the target upgrade package.
- the upgrade package installation query information output by the software upgrade device through the display includes the option to agree to the installation and the option to disagree to the installation; when the software upgrade device receives the operation of selecting the option to agree to the installation through the input device, it means that the installation consent instruction is received, and the software When the upgrade device receives the operation of selecting the disapproval installation option through the input device, it means that the disapproval installation instruction is received.
- Disagree to the installation instruction indicates that the user does not agree to update the target software with a target upgrade package of a lower version.
- Step 604 the software upgrade apparatus executes step 604 after receiving the installation approval instruction through the input device.
- Step 607 may be replaced by: after the software upgrade apparatus receives the disapproval installation instruction through the input device, it records the first abnormal event.
- the first abnormal event may be an event that the version number of the target upgrade package is smaller than the version number of the target software.
- the software upgrade apparatus records the second abnormal event.
- the second abnormal event may be an event in which the version number of the target upgrade package does not match the file included in the target upgrade package.
- the upgrade method flow in FIG. 6 is compared with the upgrade method flow in FIG. 5 , in the case that the user agrees to update the target software with a target upgrade package of a lower version, the subsequent upgrade flow can be continued.
- the user can update the target software to the required version according to his own needs, and can avoid the abnormal upgrade of the target software by using the target upgrade package to upgrade the target software.
- FIG. 7 is a flowchart of another upgrade method provided by an embodiment of the present application. As shown in Figure 7, the method includes:
- the software upgrade apparatus obtains a target upgrade package.
- Step 702 is optional, but not required.
- step 704 If yes, go to step 704; if not, go to step 706.
- step 705 If no, go to step 705; if yes, go to step 707.
- the software upgrade device uses the target upgrade package to upgrade the target software.
- step 705 If no, go to step 705; if yes, go to step 707.
- the target upgrade package contains only the files required to realize the minor version upgrade of the target software, which is equivalent to the target upgrade package not including the files required to realize the major version upgrade of the target software.
- the software upgrade apparatus records the third abnormal event.
- the third abnormal event may be that the version number of the target upgrade package does not match the files included in the target upgrade package.
- the software upgrade device can record the third abnormal event in the log, so that the user can find the place where the abnormality occurs more quickly and handle the abnormality by analyzing the abnormal event.
- the software upgrade apparatus records the fourth abnormal event.
- the fourth abnormal event may be an event that the version number of the target upgrade package is smaller than the version number of the target software.
- the version number of the target upgrade package is larger than the version number of the target software, it is possible to avoid using an upgrade package with a lower version to upgrade the target software. Further, by judging whether the version number of the target upgrade package matches the files included in the target upgrade package, an abnormal upgrade situation can be avoided.
- the software upgrade apparatus uses the target upgrade package to upgrade the target software after judging that the version number of the target upgrade package is larger than that of the target software and the version number of the target upgrade package matches the files included in the target upgrade package.
- FIG. 7 is only an example of judging whether the version number of the target upgrade package is larger than the version number of the target software, and whether the version number of the target upgrade package matches the files included in the target upgrade package.
- the software upgrade apparatus may also use other methods to determine whether the version number of the target upgrade package is larger than that of the target software, and whether the version number of the target upgrade package matches the files included in the target upgrade package. Another example of judging whether the version number of the target upgrade package is larger than the version number of the target software and whether the version number of the target upgrade package matches the files included in the target upgrade package is described below.
- FIG. 8 is a flowchart of another upgrade method provided by an embodiment of the present application. As shown in Figure 8, the method includes:
- the software upgrade device obtains a target upgrade package.
- Step 802 is optional, but not required.
- step 804 If yes, go to step 804; if not, go to step 806.
- step 805 If yes, go to step 805; if not, go to step 807.
- the software upgrade device uses the target upgrade package to upgrade the target software.
- step 805 If yes, go to step 805; if not, go to step 807.
- the target upgrade package contains only the files required to realize the minor version upgrade of the target software, which is equivalent to the target upgrade package not including the files required to realize the major version upgrade of the target software.
- the software upgrade apparatus records the third abnormal event.
- the third abnormal event may be that the version number of the target upgrade package does not match the files included in the target upgrade package.
- the software upgrade device can record the third abnormal event in the log, so that the user can find the place where the abnormality occurs more quickly and handle the abnormality by analyzing the abnormal event.
- the software upgrade apparatus records the fourth abnormal event.
- the third abnormal event may be an event that the version number of the target upgrade package is smaller than the version number of the target software.
- the method flow in FIG. 8 can be regarded as a modification of the method flow in FIG. 7 .
- the version number of the target upgrade package is larger than the version number of the target software, it is possible to avoid using an upgrade package with a lower version to upgrade the target software. Further, by judging whether the version number of the target upgrade package matches the files included in the target upgrade package, an abnormal upgrade situation can be avoided.
- FIG. 9 is a flowchart of another upgrade method provided by an embodiment of the present application. As shown in Figure 9, the method includes:
- the software upgrade apparatus obtains a target upgrade package.
- step 903 If yes, go to step 903; if not, go to step 908.
- step 904 If yes, go to step 904; if no, go to step 906.
- step 905 If no, go to step 905; if yes, go to step 907.
- the software upgrade device uses the target upgrade package to upgrade the target software.
- step 905 If no, go to step 905; if yes, go to step 907.
- the target upgrade package contains only the files required to realize the minor version upgrade of the target software, which is equivalent to the target upgrade package not including the files required to realize the major version upgrade of the target software.
- the software upgrade apparatus records the third abnormal event.
- the third abnormal event may be that the version number of the target upgrade package does not match the files included in the target upgrade package.
- the software upgrade device can record the third abnormal event in the log, so that the user can find the place where the abnormality occurs more quickly and handle the abnormality by analyzing the abnormal event.
- the software upgrade apparatus outputs the upgrade package installation inquiry information through the output device.
- step 908 may be the same as that of step 606 .
- the software upgrade apparatus receives an installation approval instruction through the input device.
- Step 909 may be replaced by: after the software upgrade apparatus receives the disapproval installation instruction through the input device, the fourth abnormal event is recorded.
- the fourth abnormal event may be an event that the version number of the target upgrade package is smaller than the version number of the target software.
- the upgrade method flow in FIG. 9 is compared with the upgrade method flow in FIG. 7 , in the case that the user agrees to update the target software with a target upgrade package of a lower version, the subsequent upgrade flow can be continued.
- the user can update the target software to the required version according to his own needs, and can avoid the abnormal upgrade of the target software by using the target upgrade package to upgrade the target software.
- FIG. 10 is a flowchart of another upgrade method provided by an embodiment of the present application. As shown in Figure 10, the method includes:
- the software upgrade apparatus obtains a target upgrade package.
- step 1003 If yes, go to step 1003; if not, go to step 1008.
- step 1004 If yes, go to step 1004; if not, go to step 1006.
- step 1005 If yes, go to step 1005; if no, go to step 1007.
- the software upgrade apparatus uses the target upgrade package to upgrade the target software.
- step 1005 If yes, go to step 1005; if no, go to step 1007.
- the target upgrade package contains only the files required to realize the minor version upgrade of the target software, which is equivalent to the target upgrade package not including the files required to realize the major version upgrade of the target software.
- the software upgrade apparatus records the third abnormal event.
- the third abnormal event may be that the version number of the target upgrade package does not match the files included in the target upgrade package.
- the software upgrade device can record the third abnormal event in the log, so that the user can find the place where the abnormality occurs more quickly and handle the abnormality by analyzing the abnormal event.
- the software upgrade apparatus outputs the upgrade package installation inquiry information through the output device.
- step 1008 may be the same as that of step 606 .
- the software upgrade apparatus receives an installation approval instruction through the input device.
- Step 1009 may be replaced by: after the software upgrade apparatus receives the disapproval installation instruction through the input device, the fourth abnormal event is recorded.
- the fourth abnormal event may be an event that the version number of the target upgrade package is smaller than the version number of the target software.
- the version number of the target upgrade package is larger than the version number of the target software, it is possible to avoid using an upgrade package with a lower version to upgrade the target software. Further, by judging whether the version number of the target upgrade package matches the files included in the target upgrade package, an abnormal upgrade situation can be avoided.
- FIG. 5 to FIG. 10 are merely examples of several more refined and complete upgrade method flows than the upgrade method flows in FIG. 4 enumerated in the present application, rather than all embodiments.
- the software upgrade device avoids using a target whose version number is smaller than that of the target software by comparing whether the version number of the target upgrade package is larger than that of the target software.
- the upgrade package upgrades the target software.
- the following problems may exist: if the version number of the target software is 5.1, the version number of the downloaded upgrade package is 5.2, and the upgrade package with the version number 5.3 can be obtained at present. .
- the software upgrade device uses the upgrade package with version number 5.2 to upgrade the software, and the version number of the upgraded software is also larger than the current version number of the software, the software upgrade device can use the upgrade package with version number 5.2 to upgrade the software.
- a step of querying whether the version of the target upgrade package is the latest version may be added to the method flow of FIG. 5 , FIG. 7 and FIG. 9 .
- the software upgrade apparatus may first query whether the version of the target upgrade package is the latest version; The process after the upgrade package; otherwise, an exception event is logged.
- the abnormal event may be an event that the version of the target upgrade package is not the latest version.
- the operation of judging whether the version number of the target upgrade package is larger than the version number of the target software in the method flow of FIG. 5, FIG. 7 or FIG. 9 may be replaced by: judging whether the version number of the target upgrade package is satisfied It is a condition that the version number of the target software is larger than that of the target software and the version of the target upgrade package is the latest version.
- step 504 after judging whether the version number of the target upgrade package is larger than the version number of the target software, it is queried whether the version of the target upgrade package is the latest version. If it is found that the version of the target upgrade package is the latest version, other judgment steps are performed, such as step 504, step 703 and step 903; if the version of the target upgrade package is not the latest version, an abnormal event is recorded.
- the software upgrade apparatus is a component running the OTA master module on a terminal device or a vehicle (or terminal device); the software upgrade apparatus may send a version query request to the server; then, according to the query sent by the server for the version query request As a result, it is determined whether the version of the target upgrade package is the latest version.
- the software upgrade device is a component running the OTA slave module on the vehicle (or terminal device); the software upgrade device may send a version query request to the component running the OTA master module on the vehicle (or terminal device); then, According to the query result sent by the component running the OTA master module for the version query request, it is determined whether the version of the target upgrade package is the latest version.
- the component running the OTA master module can judge whether the version of the target upgrade package is the latest version, and send the corresponding query result. For example, a component running the OTA master module can send a query request to the server to inquire whether the version of the target upgrade package is the latest version.
- the component running the OTA master module stores or obtains information about the latest version of the target software, such as the version number of the latest version of the target software.
- information about the latest version of the target software such as the version number of the latest version of the target software.
- FIG. 11 is a flowchart of another upgrade method provided by an embodiment of the present application. As shown in Figure 11, the method includes:
- the software upgrade apparatus sends a version query request to the target component.
- the version query request is used to query whether the version of the target upgrade package is the latest version.
- the software upgrade device is the component running the OTA slave module on the vehicle (or the terminal device), and the target component is the component running the OTA master module on the vehicle (or the terminal device).
- the software upgrade apparatus receives the query result from the target component.
- the software upgrade apparatus continues to execute the installation process when the query result indicates that the version of the target upgrade package is the latest version.
- the software upgrade apparatus executes the process after acquiring the target upgrade package in the method flow of FIG. 5 , FIG. 7 or FIG. 9 .
- the software upgrade apparatus stops the installation process when the query result indicates that the version of the target upgrade package is not the latest version.
- the target upgrade package before using the target upgrade package to upgrade the target software, it is queried whether the version of the target upgrade package is the latest version, which can solve the problem that the target software cannot be directly upgraded to the latest version.
- the upgrade solution provided in this application is suitable for software upgrade scenarios, such as vehicle OTA upgrade scenarios, and terminal equipment software upgrade scenarios.
- the following introduces some examples of the application of the upgrade solution provided by the present application in the OTA upgrade scenario of a vehicle with reference to the accompanying drawings.
- FIG. 12 is an interaction flowchart of an upgrade method provided by an embodiment of the present application. As shown in Figure 12, the method includes:
- the cloud signs the vehicle upgrade package, and generates a first upgrade package description file.
- the cloud digitally signs the vehicle upgrade package.
- the whole vehicle upgrade package (corresponding to the above-mentioned general upgrade package) can be disassembled to obtain a plurality of upgrade packages for upgrading components on the vehicle end.
- the first upgrade package description file contains attribute information of the vehicle upgrade package.
- the attribute information of the vehicle upgrade package may include: the size of the vehicle upgrade package, the number of files in the vehicle upgrade package, and one or more hash values corresponding to the vehicle upgrade package; the above one or more hash values Obtained from the above vehicle upgrade package.
- the cloud delivers the signed vehicle upgrade package and the first upgrade package description file to the first component on the vehicle end.
- the cloud issues a signed vehicle upgrade package through a TLS channel.
- the first component corresponding to the software upgrade device
- the first component verifies the signature of the vehicle upgrade package.
- step 1304 is performed; if not, an abnormal event is recorded.
- the first component disassembles the whole vehicle upgrade package, and distributes it to a plurality of second components.
- the above-mentioned plurality of second components may be components that run the OTA slave module on the vehicle end (for example, a car).
- the first part disassembles the whole vehicle upgrade package to obtain 5 sub-upgrade packages, each sub-upgrade package is used to upgrade a second part running the OTA slave module; the first part distributes the 5 sub-upgrade packages to the corresponding second part.
- the first condition (corresponding to the preset condition) may include one or both of the following: the attribute information of the whole vehicle upgrade package matches the attribute information of the whole vehicle upgrade package contained in the first upgrade package description file; The version number of the vehicle upgrade package matches the files included in the vehicle upgrade package above.
- the method of judging whether the attribute information of the whole vehicle upgrade package matches the attribute information of the whole vehicle upgrade package contained in the first upgrade package description file can be compared with the method of judging whether the attribute information of the target upgrade package and the target upgrade package contained in the upgrade package description file match. It is similar to whether the attribute information matches, and will not be described in detail here.
- the method of judging whether the version number of the vehicle upgrade package matches the files included in the vehicle upgrade package may be similar to the method of determining whether the version number of the target upgrade package matches the files included in the target upgrade package, and will not be described in detail here.
- the above first condition may further include: the version number of the vehicle upgrade package is greater than the version number of the software to be upgraded, or the version number of the vehicle upgrade package is smaller than the version number of the software to be upgraded and the version number of the vehicle upgrade package is authorized by the user. Installed version number.
- the software to be upgraded is the software to be upgraded by using the vehicle upgrade package.
- the first component records an abnormal event if the first condition is met.
- the first component instructs a plurality of second components to install and activate the upgrade package according to a certain dependency relationship and order.
- FIG. 13 is an interaction flowchart of another upgrade method provided by an embodiment of the present application. As shown in Figure 13, the method includes:
- the cloud signs the vehicle upgrade package, and generates a second upgrade package description file.
- the whole vehicle upgrade package (corresponding to the above-mentioned general upgrade package) can be disassembled to obtain a plurality of sub-upgrade packages, and each sub-upgrade package is used to upgrade a component on the vehicle end.
- the second upgrade package description file may include attribute information of multiple sub-upgrade packages, and the multiple sub-upgrade packages are included in the vehicle upgrade package, that is, the multiple sub-upgrade packages can be obtained by disassembling the vehicle upgrade package.
- the attribute information of each sub-upgrade package included in the second upgrade package description file may include: the size of the sub-upgrade package, the number of files in the sub-upgrade package, and one or more hash values corresponding to the sub-upgrade package; one or more of the above Multiple hashes are obtained from sub-upgrade packages.
- the cloud delivers the signed vehicle upgrade package and the second upgrade package description file to the first component on the vehicle end.
- the cloud (for example, a cloud server) issues a signed vehicle upgrade package through a TLS channel.
- the first component may be a component running the OTA master module on the vehicle end (eg, a car).
- the first component verifies the signature of the vehicle upgrade package.
- step 1304 is performed; if not, the abnormal event is recorded.
- the first component distributes multiple sub-upgrade packages obtained by disassembling the whole vehicle upgrade package to multiple second components, and distributes multiple sub-upgrade package description files generated according to the second upgrade package description file to multiple second components .
- the sub-upgrade package description file includes attribute information of a sub-upgrade package.
- the first part disassembles the whole vehicle upgrade package to obtain 8 sub-upgrade packages, and each sub-upgrade package is used to upgrade a second part running the OTA slave module; the first part generates 8 sub-upgrade packages according to the description file of the second upgrade package.
- Upgrade package description files, the 8 sub-upgrade package description files correspond to the 8 sub-upgrade packages one-to-one; the first component distributes the 8 sub-upgrade package description files and the 8 sub-upgrade package description files to the corresponding second components.
- step 1301 in the method flow of FIG. 13 can be replaced with: the cloud signs the vehicle upgrade package, and generates multiple sub-upgrade package description files; each sub-upgrade package description file contains attribute information of a sub-upgrade package . That is to say, the multiple sub-upgrade package description files generated by the cloud correspond to sub-upgrade packages included in the vehicle upgrade package.
- step 1304 in the method flow of FIG. 13 can be replaced by: the first component distributes multiple sub-upgrade packages obtained by disassembling the vehicle upgrade package to multiple second components, and describes the multiple sub-upgrade packages generated by the cloud The file is distributed to multiple second components.
- the second component is upgraded by using the obtained sub-upgrade package under the command of the first component.
- the sub-upgrade package obtained by the sub-upgrade package is used for upgrading.
- the sub-upgrade package obtained by each second component satisfies the second condition
- it feeds back to the first component a piece of information indicating that the sub-upgrade package obtained by the second component satisfies the second condition, and in this Under the command of the first component, the upgrade package is installed and activated according to certain dependencies and sequences.
- each second component installs and activates the upgrade package according to a certain dependency relationship and sequence under the command of the first component. If one or more sub-upgrade packages obtained by the second component do not meet the second condition, an abnormal event is recorded.
- the second condition (corresponding to the preset condition) that the obtained sub-upgrade package needs to meet can be one or both of the following: the attribute information of the sub-upgrade package and the sub-upgrade package description file contain The attribute information of the sub-upgrade package matches, and the version number of the sub-upgrade package matches the files included in the sub-upgrade package.
- the way of judging whether the attribute information of the sub-upgrade package matches the attribute information of the sub-upgrade package contained in the sub-upgrade package description file can be compared with the way of judging the attribute information of the target upgrade package and the attribute information of the target upgrade package contained in the upgrade package description file. Whether it matches is similar, and will not be described in detail here.
- the manner of judging whether the version number of the sub-upgrade package matches the files included in the sub-upgrade package may be similar to the manner of judging whether the version number of the target upgrade package matches the files included in the target upgrade package, and will not be described in detail here.
- Any second component can verify the sub-upgrade package obtained by it in a manner similar to the verification of the target upgrade package in FIG. 4 to FIG. 10 .
- the second component may record an abnormal event when the sub-upgrade package obtained by the second component does not satisfy the second condition.
- the second component installs the sub-upgrade package under the condition that the second condition is satisfied, which can reduce abnormal upgrade situations.
- FIG. 14 is a schematic structural diagram of a software upgrade apparatus according to an embodiment of the present application. As shown in Figure 14, the software upgrade device includes:
- an obtaining unit 1401, configured to obtain a target upgrade package
- the processing unit 1402 is configured to upgrade the target software by using the target upgrade package when a preset condition is satisfied; the preset condition is used to verify the security of using the target upgrade package to upgrade the target software.
- the processing unit uses the target upgrade package to upgrade the target software under the condition that the preset conditions are met; the security of the target software upgrade using the target upgrade package can be guaranteed, that is, it is guaranteed that the target software upgrade using the target upgrade package will not occur. Upgrade exceptions.
- the above-mentioned preset conditions include one or both of the following: the attribute information of the above-mentioned target upgrade package matches the attribute information of the above-mentioned target upgrade package contained in the upgrade package description file, and the attribute information of the above-mentioned target upgrade package is matched.
- the version numbers match the files included in the target upgrade package above.
- the matching of the version number of the above-mentioned target upgrade package with the files included in the above-mentioned target upgrade package includes: the version number of the above-mentioned target software to the version number of the above-mentioned target upgrade package corresponds to a major version upgrade, and the above-mentioned target
- the upgrade package includes the files required to realize the above-mentioned major version upgrade of the above-mentioned target software; or, the version number of the above-mentioned target upgrade package matches the files included in the above-mentioned target upgrade package, including: the version number of the above-mentioned target software to the above-mentioned target upgrade package.
- the version number corresponds to the minor version upgrade, and the above-mentioned target upgrade package does not include the files required to realize the above-mentioned major version upgrade of the above-mentioned target software.
- the above-mentioned preset conditions further include: the version number of the above-mentioned target upgrade package is greater than the version number of the above-mentioned target software, or the version number of the above-mentioned target upgrade package is smaller than the version number of the above-mentioned target software and the above-mentioned target upgrade
- the version number of the package is the version number authorized by the user to install.
- the attribute information of the above-mentioned target upgrade package includes one or more of the following: the size of the above-mentioned target upgrade package, the number of files in the above-mentioned target upgrade package, and a hash value; the above-mentioned hash value is determined by The above target upgrade package is obtained.
- the obtaining unit 1401 is further configured to obtain the above-mentioned upgrade package description file;
- the processing unit 1402 is further configured to perform an integrity check on the above-mentioned upgrade package description file;
- the above-mentioned preset conditions include: the above-mentioned upgrade package The description file passes the integrity check, and the attribute information of the above-mentioned target upgrade package matches the above-mentioned attribute information of the above-mentioned target upgrade package contained in the above-mentioned upgrade package description file.
- the processing unit 1402 is further configured to query whether the version of the above-mentioned target upgrade package is the latest version; if the version of the above-mentioned target upgrade package is the latest version, execute the execution when the preset condition is satisfied. In this case, use the above-mentioned target upgrade package to upgrade the target software.
- the above-mentioned target software is an electronic map
- the above-mentioned target file is a non-dynamic library file
- the major version is upgraded to the update of the linked map version
- the above-mentioned small version is upgraded to the update of the non-linked map version
- the above-mentioned large version is upgraded to the update of the basemap
- the above-mentioned small version is upgraded to the update of the non-basemap.
- FIG. 15 is a schematic structural diagram of another software upgrade apparatus 150 provided by an embodiment of the present application.
- the software upgrade apparatus shown in FIG. 15 includes a logic circuit 1501 and an interface 1502 .
- the processing unit in FIG. 14 can be implemented by the logic circuit 1501
- the acquisition unit in FIG. 14 can be implemented by the interface 1502 .
- the logic circuit 1501 can be a chip, a processing circuit, an integrated circuit or a system on chip (SoC) chip, etc.
- the interface 1502 can be a communication interface, an input and output interface, and the like.
- the logic circuit and the interface may also be coupled to each other.
- the specific connection manner of the logic circuit and the interface is not limited in the embodiment of the present application.
- the logic circuit and interface may be used to perform the functions or operations performed by the above-mentioned software upgrade apparatus.
- FIG. 16 is a schematic structural diagram of another software upgrade apparatus 160 provided by an embodiment of the present application.
- the software upgrade apparatus 160 includes a processor 1601 , a memory 1602 and a communication interface 1603 .
- the processor 1601 , the memory 1602 and the communication interface 1603 are connected to each other through a bus 1604 .
- the software upgrade apparatus 160 in FIG. 16 may be the software upgrade apparatus in the foregoing embodiments, such as a mobile phone, a tablet computer, a notebook computer, a car, and the like.
- the memory 1602 may be read only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM).
- the memory 1602 may store a program. When the program stored in the memory 1602 is executed by the processor 1601, the processor 1601 and the communication interface 1603 are used to implement the software upgrade method of the embodiment of the present application.
- the processor 1601 may adopt a general-purpose central processing unit (CPU), a microprocessor, an application specific integrated circuit (ASIC), a graphics processor (graphics processing unit, GPU), a digital signal processor (digital signal processing, DSP), off-the-shelf programmable gate array (field programmable gate array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or one or more integrated circuits, etc., for Relevant programs are executed to implement the functions required to be performed by the units in the software upgrade apparatus of the embodiments of the present application, or to execute the software upgrade methods of the method embodiments of the present application.
- the processor 1601 implements the functions of the processing unit 1402 .
- the processor 1601 may also be an integrated circuit chip with signal processing capability.
- each step of the software upgrade method of the present application may be completed by an integrated logic circuit of hardware in the processor 1601 or an instruction in the form of software.
- the communication interface 1603 uses a transceiver such as but not limited to a transceiver to implement communication between the software upgrade device and other devices or a communication network.
- the communication interface 1603 can realize the function of the acquisition unit 1401 .
- the software upgrade apparatus 160 can obtain the upgrade package through the communication interface 1603 .
- the bus 1604 may include a pathway for communicating information between the various components of the software upgrade apparatus 160 (eg, the memory 1602, the processor 1601, the communication interface 1603).
- the software upgrade apparatus shown in FIG. 16 only shows a memory, a processor, and a communication interface.
- the software upgrade apparatus 160 also includes other components necessary for normal operation.
- the software upgrade apparatus 160 may also include hardware devices that implement other additional functions.
- the software upgrade apparatus 160 may also only include the necessary components for implementing the embodiments of the present application, rather than all the components shown in FIG. 16 .
- the present application also provides a computer-readable storage medium, where computer code is stored in the computer-readable storage medium, and when the computer code is executed on the processor, the processor is made to execute the method of the above embodiment.
- the present application also provides a computer program product, the computer program product includes computer code or a computer program, when the computer code or computer program is run on a computer, the method in the above embodiment is executed.
- the present application also provides a chip, the chip includes a data interface and a processor, wherein the processor is configured to execute the method involved in any of the foregoing embodiments.
- the chip is any chip with software or firmware installed on the vehicle.
- the present application also provides a chip system, the chip system includes at least one processor, which is used to support implementing the functions involved in any of the above embodiments, for example, for example, receiving or processing data and/or information involved in the above method .
- the chip system further includes a memory for storing program instructions and data, and the memory is located inside the processor or outside the processor.
- the chip system may be composed of chips, or may include chips and other discrete devices.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
Description
Claims (18)
- 一种软件升级方法,其特征在于,获取目标升级包;在满足预设条件的情况下,利用所述目标升级包升级目标软件;所述预设条件用于校验利用所述目标升级包升级所述目标软件的安全性。
- 根据权利要求1所述的方法,其特征在于,所述预设条件包括以下一项或两项:所述目标升级包的属性信息与升级包描述文件中包含的所述目标升级包的属性信息相匹配、所述目标升级包的版本号与所述目标升级包包括的文件相匹配。
- 根据权利要求2所述的方法,其特征在于,所述目标升级包的版本号与所述目标升级包包括的文件相匹配包括:所述目标软件的版本号至所述目标升级包的版本号对应于大版本升级,以及所述目标升级包包括实现所述目标软件的所述大版本升级所需的文件;或者,所述目标升级包的版本号与所述目标升级包包括的文件相匹配包括:所述目标软件的版本号至所述目标升级包的版本号对应于小版本升级,以及所述目标升级包未包括实现所述目标软件的所述大版本升级所需的文件。
- 根据权利要求2或3所述的方法,其特征在于,所述预设条件还包括:所述目标升级包的版本号大于所述目标软件的版本号,或者,所述目标升级包的版本号小于所述目标软件的版本号且所述目标升级包的版本号为用户授权安装的版本号。
- 根据权利要求2至4任一项所述的方法,其特征在于,所述目标升级包的属性信息包括以下一项或多项:所述目标升级包的大小、所述目标升级包中的文件的个数、哈希值;所述哈希值由所述目标升级包得到。
- 根据权利要求2至5任一项所述的方法,其特征在于,所述利用所述目标升级包升级目标软件之前,所述方法还包括:获取所述升级包描述文件,并对所述升级包描述文件进行完整性校验;所述预设条件包括:所述升级包描述文件通过完整性校验,以及所述目标升级包的属性信息与所述升级包描述文件中包含的所述目标升级包的属性信息相匹配。
- 根据权利要求1至6任一项所述的方法,其特征在于,所述利用所述目标升级包升级目标软件之前,所述方法还包括:查询所述目标升级包的版本是否为最新的版本;在所述目标升级包的版本为最新的版本的情况下,执行在满足预设条件的情况下,利用所述目标升级包升级目标软件的操作。
- 根据权利要求1至7任一项所述的方法,其特征在于,所述目标软件为电子地图,所述目标文件为非动态库文件,所述大版本升级为联编地图版本的更新,所述小版本升级为非联编地图版本的更新,或者,所述大版本升级为底图的更新,所述小版本升级为非底图的更新。
- 一种软件升级装置,其特征在于,包括:获取单元,用于获取目标升级包;处理单元,用于在满足预设条件的情况下,利用所述目标升级包升级目标软件;所述预设条件用于校验利用所述目标升级包升级所述目标软件的安全性。
- 根据权利要求9所述的装置,其特征在于,所述预设条件包括以下一项或两项:所述目标升级包的属性信息与升级包描述文件中包含的所述目标升级包的属性信息相匹配、所述目标升级包的版本号与所述目标升级包包括的文件相匹配。
- 根据权利要求9或10所述的装置,其特征在于,所述目标升级包的版本号与所述目标升级包包括的文件相匹配包括:所述目标软件的版本号至所述目标升级包的版本号对应于大版本升级,以及所述目标升级包包括实现所述目标软件的所述大版本升级所需的文件;或者,所述目标升级包的版本号与所述目标升级包包括的文件相匹配包括:所述目标软件的版本号至所述目标升级包的版本号对应于小版本升级,以及所述目标升级包未包括实现所述目标软件的所述大版本升级所需的文件。
- 根据权利要求10或11所述的装置,其特征在于,所述预设条件还包括:所述目标升级包的版本号大于所述目标软件的版本号,或者,所述目标升级包的版本号小于所述目标软件的版本号且所述目标升级包的版本号为用户授权安装的版本号。
- 根据权利要求10至12任一项所述的装置,其特征在于,所述目标升级包的属性信息包括以下一项或多项:所述目标升级包的大小、所述目标升级包中的文件的个数、哈希值;所述哈希值由所述目标升级包得到。
- 根据权利要求10至13任一项所述的装置,其特征在于,所述获取单元,还用于获取所述升级包描述文件;所述处理单元,还用于对所述升级包描述文件进行完整性校验;所述预设条件包括:所述升级包描述文件通过完整性校验,以及所述目标升级包的属性信息与所述升级包描述文件中包含的所述目标升级包的属性信息相匹配。
- 根据权利要求9至14任一项所述的装置,其特征在于,所述处理单元,还用于查询所述目标升级包的版本是否为最新的版本;在所述目标升级包的版本为最新的版本的情况下,执行在满足预设条件的情况下,利用所述目标升级包 升级目标软件的操作。
- 根据权利要求9至15任一项所述的装置,其特征在于,所述目标软件为电子地图,所述目标文件为非动态库文件,所述第一类版本升级为联编地图版本的更新,所述第二类版本升级为非联编地图版本的更新,或者,所述第一类版本升级为底图的更新,所述第二类版本升级为非底图的更新。
- 一种计算机可读存储介质,其特征在于,所述计算机存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令当被处理器执行时使所述处理器执行如权利要求1-8任一项所述的方法。
- 一种芯片,所述芯片包括处理器与数据接口,所述处理器用于执行如权利要求1-8任一项所述的方法。
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP21938417.9A EP4325354A4 (en) | 2021-04-29 | 2021-04-29 | SOFTWARE UPGRADE METHOD AND RELATED PRODUCT |
CN202180097613.XA CN117242428A (zh) | 2021-04-29 | 2021-04-29 | 软件升级方法和相关产品 |
PCT/CN2021/091174 WO2022226938A1 (zh) | 2021-04-29 | 2021-04-29 | 软件升级方法和相关产品 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2021/091174 WO2022226938A1 (zh) | 2021-04-29 | 2021-04-29 | 软件升级方法和相关产品 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2022226938A1 true WO2022226938A1 (zh) | 2022-11-03 |
Family
ID=83846608
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2021/091174 WO2022226938A1 (zh) | 2021-04-29 | 2021-04-29 | 软件升级方法和相关产品 |
Country Status (3)
Country | Link |
---|---|
EP (1) | EP4325354A4 (zh) |
CN (1) | CN117242428A (zh) |
WO (1) | WO2022226938A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116996866A (zh) * | 2023-09-27 | 2023-11-03 | 上海艾拉比智能科技有限公司 | 一种基于阈值的可熔断车端ota升级方法 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050055686A1 (en) * | 2003-09-08 | 2005-03-10 | Microsoft Corporation | Method and system for servicing software |
US20050149920A1 (en) * | 2003-12-29 | 2005-07-07 | Patrizi Jonathan P. | Software documentation generation using differential upgrade documentation |
CN104866341A (zh) * | 2015-05-07 | 2015-08-26 | 北京金山安全软件有限公司 | 一种组件升级方法、装置及终端 |
CN108182075A (zh) * | 2017-12-29 | 2018-06-19 | 成都三零凯天通信实业有限公司 | 一种通过socket通信方式自动升级目标软件的程序 |
CN108241517A (zh) * | 2018-02-23 | 2018-07-03 | 武汉斗鱼网络科技有限公司 | 一种软件升级方法、客户端及电子设备 |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110351314B (zh) * | 2018-04-03 | 2023-11-21 | 厦门雅迅网络股份有限公司 | 汽车控制器的远程升级方法及计算机可读存储介质 |
CN111163179A (zh) * | 2020-01-15 | 2020-05-15 | 江铃汽车股份有限公司 | 汽车终端电控模块软件远程升级的系统及方法 |
CN112612490A (zh) * | 2020-12-17 | 2021-04-06 | 华人运通(上海)云计算科技有限公司 | 车辆升级方法、车辆及存储介质 |
-
2021
- 2021-04-29 CN CN202180097613.XA patent/CN117242428A/zh active Pending
- 2021-04-29 EP EP21938417.9A patent/EP4325354A4/en active Pending
- 2021-04-29 WO PCT/CN2021/091174 patent/WO2022226938A1/zh active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050055686A1 (en) * | 2003-09-08 | 2005-03-10 | Microsoft Corporation | Method and system for servicing software |
US20050149920A1 (en) * | 2003-12-29 | 2005-07-07 | Patrizi Jonathan P. | Software documentation generation using differential upgrade documentation |
CN104866341A (zh) * | 2015-05-07 | 2015-08-26 | 北京金山安全软件有限公司 | 一种组件升级方法、装置及终端 |
CN108182075A (zh) * | 2017-12-29 | 2018-06-19 | 成都三零凯天通信实业有限公司 | 一种通过socket通信方式自动升级目标软件的程序 |
CN108241517A (zh) * | 2018-02-23 | 2018-07-03 | 武汉斗鱼网络科技有限公司 | 一种软件升级方法、客户端及电子设备 |
Non-Patent Citations (1)
Title |
---|
See also references of EP4325354A4 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116996866A (zh) * | 2023-09-27 | 2023-11-03 | 上海艾拉比智能科技有限公司 | 一种基于阈值的可熔断车端ota升级方法 |
CN116996866B (zh) * | 2023-09-27 | 2024-02-02 | 上海艾拉比智能科技有限公司 | 一种基于阈值的可熔断车端ota升级方法 |
Also Published As
Publication number | Publication date |
---|---|
CN117242428A (zh) | 2023-12-15 |
EP4325354A4 (en) | 2024-04-24 |
EP4325354A1 (en) | 2024-02-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11163549B2 (en) | Vehicle information communication system | |
US9916151B2 (en) | Multiple-stage secure vehicle software updating | |
US20200050442A1 (en) | Vehicle information communication system | |
CN111263352A (zh) | 车载设备的ota升级方法、系统、存储介质及车载设备 | |
US20140121891A1 (en) | Automobile data abstraction and communication | |
CN113176902B (zh) | 车辆ecu的ota升级方法、电子设备、车辆及可读存储介质 | |
US20130111212A1 (en) | Methods to provide digital signature to secure flash programming function | |
WO2021129065A1 (zh) | 升级方法及装置 | |
JP7357796B2 (ja) | ソフトウェアのアップグレード方法および装置 | |
US11579865B2 (en) | Vehicle information communication system | |
JP7485106B2 (ja) | 車両、車載制御装置、情報処理装置、車両用ネットワークシステム、アプリケーションプログラムの提供方法、及びプログラム | |
WO2022226938A1 (zh) | 软件升级方法和相关产品 | |
US20230336356A1 (en) | Data storage device, data storage method, and non-transitory computer readable storage medium | |
US20220391192A1 (en) | Ota master, center, system, method, non-transitory storage medium, and vehicle | |
US20220283799A1 (en) | Center, update management method, and non-transitory storage medium | |
US20220413831A1 (en) | Center, ota master, method, non-transitory storage medium, and vehicle | |
CN116366275A (zh) | 基于车辆控制器的安全校验方法、装置、设备及存储介质 | |
US20240111519A1 (en) | Onboard communication system, center device, vehicle-side system, and method for verifying update data of onboard communication | |
US11972248B2 (en) | Controlling software update of electronic control units mounted on a vehicle | |
CN114879980B (zh) | 车载应用安装方法、装置、计算机设备、存储介质 | |
US20220284743A1 (en) | Center device and in-vehicle electronic control device | |
US20220303139A1 (en) | Method for installing a computing component and associated electronic device | |
US12041182B2 (en) | Non-reputable vehicle change history | |
JP7484814B2 (ja) | 車両用電子制御装置及び更新プログラム | |
JP7419287B2 (ja) | 車両プログラム更新管理システム、及び車両プログラム更新管理方法 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 21938417 Country of ref document: EP Kind code of ref document: A1 |
|
WWE | Wipo information: entry into national phase |
Ref document number: 202180097613.X Country of ref document: CN |
|
WWE | Wipo information: entry into national phase |
Ref document number: 2021938417 Country of ref document: EP |
|
ENP | Entry into the national phase |
Ref document number: 2021938417 Country of ref document: EP Effective date: 20231113 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |