WO2021168840A1 - 一种软件版本回滚方法、装置及*** - Google Patents

一种软件版本回滚方法、装置及*** Download PDF

Info

Publication number
WO2021168840A1
WO2021168840A1 PCT/CN2020/077294 CN2020077294W WO2021168840A1 WO 2021168840 A1 WO2021168840 A1 WO 2021168840A1 CN 2020077294 W CN2020077294 W CN 2020077294W WO 2021168840 A1 WO2021168840 A1 WO 2021168840A1
Authority
WO
WIPO (PCT)
Prior art keywords
differential
software
version
rollback
target software
Prior art date
Application number
PCT/CN2020/077294
Other languages
English (en)
French (fr)
Inventor
马涛
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN202080002270.XA priority Critical patent/CN113574839B/zh
Priority to JP2022551726A priority patent/JP7419557B2/ja
Priority to PCT/CN2020/077294 priority patent/WO2021168840A1/zh
Priority to EP20920851.1A priority patent/EP4099655A4/en
Publication of WO2021168840A1 publication Critical patent/WO2021168840A1/zh
Priority to US17/896,677 priority patent/US20230004381A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1433Saving, restoring, recovering or retrying at system level during software upgrading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/658Incremental updates; Differential updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • H04W4/40Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P]

Definitions

  • This application relates to the field of computer technology, and in particular to a software version rollback method, device and system.
  • OTA car software upgrades-over the air
  • the installation failure or the abnormal operation of the new version of the software may occur.
  • the software-related functions will be unavailable, and some functions of the car will be unavailable after the upgrade.
  • the car will back up the old version of the software package.
  • the vehicle will reinstall the old version of the software to achieve rollback. Due to the limited storage space in the car, backing up the old version of the software will take up a large amount of storage space. In order to meet the storage requirements, it is necessary to increase the storage space of the car, which increases the storage cost of the car.
  • the present application provides a software version rollback method, device, and system, which realizes that the driving system can be rolled back to run based on the old version of the software on the basis of reducing the storage space of the car, so as to ensure the safety of terminal operation (sercurity).
  • an embodiment of the present application provides a software version rollback method.
  • the method can be implemented by a terminal device (for example, a car), or can be implemented by a component of the terminal device, such as a processing device, a circuit, a chip, and other components in the terminal device.
  • the method includes: the terminal device obtains a differential upgrade package of the target software, and uses the differential upgrade package to upgrade the current version of the target software, the current version of the target software is upgraded from the first version to the second version; if the target is detected When the software has a rollback requirement, the differential upgrade package is used to perform rollback on the target software, so that the current version of the target software is rolled back to the first version.
  • the differential upgrade package includes at least one differential operation instruction, and the differential operation instruction is used to indicate the difference between the current first version of the target software and the second version to be upgraded.
  • the terminal device rolls back the software version of the target software, it does not need to download the complete installation file of the old version of the target software from the upgrade server, nor does it need to back up the complete installation file of the old version.
  • the upgraded differential upgrade package rolls back the target software to roll back to the old version to run, thereby realizing the timely rollback of the software on the basis of reducing the storage space occupied by the car.
  • the differential upgrade package contains at least one differential operation instruction, the differential operation instruction contains an instruction type and differential data; the differential data contains the first address space and/or the first address space in the first version. The first data stored in an address space, and the second data and/or the second address space in the second version.
  • the method further includes: generating a differential rollback package according to the differential upgrade package; wherein the differential rollback package is to arrange the at least one differential operation in the differential upgrade package
  • the instructions are rearranged in a preset order. For example, when the differential operation instructions in the differential upgrade package are arranged in the order of execution from front to back, the preset order may be from back to front. For another example, the differential operation instructions in the differential upgrade package are arranged in the order of execution from back to front, and the preset order may be from front to back.
  • the package performing rollback on the target software includes: using the differential rollback package to perform rollback on the target software.
  • the differential upgrade package of the target software can be used to generate a differential rollback package, and the differential rollback package can be used to roll back the target software in time to roll back to the old one.
  • the version operation can shorten the rollback time and reduce the storage space used for software upgrades and software rollbacks, and the method of generating the differential rollback package according to the differential upgrade package in the embodiment of the present application is simpler and faster, and has low computational overhead.
  • the instruction type includes, but is not limited to, ignore, shift, insert, delete, or replace.
  • the differential operation instruction is used to instruct to move the first data out of the first address space to the second address space; the second address space is the first address space.
  • An address space other than the first address space in a system; the inverse differential operation instruction corresponding to the differential operation instruction is to move the first data in the second address space back to the first address space .
  • the differential operation instruction is used to instruct to add a second address space in the first system, and add the second data contained in the differential operation instruction to the The second address space; the inverse differential operation instruction corresponding to the differential operation instruction is to delete the second address space.
  • the differential operation instruction when the instruction type of the differential operation instruction is delete, the differential operation instruction is used to instruct to delete the first address space and the first data stored in the first address space; the differential operation instruction corresponds to The inverse differential operation instruction is to add a first address space and add the first data to the first address space.
  • the differential operation instruction is used to instruct to replace the first data in the first address space with the second data; the inverse differential operation instruction corresponding to the differential operation instruction To replace the second data in the first address space with the first data.
  • the embodiment of the present application provides a software version rollback method.
  • the method can be implemented by an upgrade server, or can be implemented by components of a software upgrade server, for example, by components such as processing chips and circuits in the software upgrade server.
  • the method includes: receiving a download instruction from a software version rollback device.
  • the download instruction includes information about the target software, such as the name of the target software and the version number of the target software to be upgraded; and the device for rolling back the software version Send a differential upgrade package.
  • the upgrade server uses the differential upgrade package to generate a differential rollback package; and sends the differential rollback package to the software version rollback device.
  • embodiments of the present application provide a communication device that has the function of implementing the method described in the first aspect.
  • the function can be implemented by hardware, or by software, or by hardware executing corresponding software.
  • the device includes one or more modules corresponding to the above-mentioned functions, such as a transceiver unit and a processing unit.
  • the device can be a chip or an integrated circuit.
  • the device includes a memory, a processor, and a transceiver.
  • the transceiver is used to receive and send data
  • the memory is used to store programs or instructions executed by the processor.
  • the device can execute the above-mentioned first aspect and the methods involved in various possible designs in the first aspect.
  • the device may be a terminal device.
  • the embodiments of the present application provide an upgrade server.
  • the device has the function of realizing the method described in the first aspect.
  • the function can be realized by hardware, or by software, or by hardware to execute corresponding software.
  • the device includes one or more modules corresponding to the above-mentioned functions, such as a transceiver unit and a processing unit.
  • the device can be a chip or an integrated circuit.
  • the device includes a memory, a processor, and a transceiver.
  • the transceiver is used to receive and send data
  • the memory is used to store programs or instructions executed by the processor.
  • the device can execute the above-mentioned first aspect and the methods involved in various possible designs in the first aspect.
  • the device can be an OTA server.
  • an embodiment of the present application provides a device that includes a processor, a memory, and a communication interface, the communication interface is used to receive signals or send signals; the memory is used to store programs or instruction codes; The processor is configured to call the program or instruction code from the memory to execute the method described in the first aspect or execute the method related to the second aspect and various possible designs in the second aspect.
  • an embodiment of the present application provides a device.
  • the communication device includes a processor and an interface circuit.
  • the interface circuit is configured to receive a program or instruction code and transmit it to the processor;
  • the program or instruction code is used to execute the methods related to the various possible designs in the first aspect and the first aspect or to execute the methods related to the various possible designs in the second aspect and the second aspect.
  • an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium is used to store a program or instruction, and when the program or instruction is executed, the first aspect and the first aspect thereof The methods involved in the various possible designs in or the second aspect and the methods involved in the various possible designs in the second aspect are implemented.
  • embodiments of the present application provide a computer program product including instructions, which when executed, enable the methods involved in the first aspect and various possible designs in the first aspect, or the second aspect And the methods involved in the various possible designs in the second aspect are implemented.
  • an embodiment of the present application also provides a software version rollback system, including: an upgrade server and a software version rollback device, the software version rollback device can execute the first aspect or any one of the first aspects above
  • the upgrade server can perform the corresponding functions in the above-mentioned second aspect or any one of the possible implementation manners of the second aspect.
  • Figure 1 is a schematic diagram of a system architecture provided by this application.
  • FIG. 2 is a schematic diagram of a software upgrade process provided by this application.
  • FIG. 3 is a schematic flowchart of a software rollback method provided by an embodiment of this application.
  • FIG. 4 is a diagram of an example of generating a differential file provided by an embodiment of the application.
  • FIG. 5 is a schematic diagram of a scenario for generating a differential rollback package provided by an embodiment of the application
  • FIGS 6-7 are schematic diagrams of a system architecture including automobiles provided by this application.
  • FIGS 8-10 are schematic diagrams of the structure of the software version rollback device provided by the embodiments of the application.
  • the software on automobiles is generally installed on an electronic control unit (ECU).
  • ECU electronice control unit
  • the anti-lock braking system, automatic transmission system, multimedia system, brake assist system, cruise control system, air conditioning system, drive system, suspension system, safety system, etc. in the car all contain their own ECUs.
  • Various complex and diverse control logic and calculation functions in the system can be run on the ECU in each system in the form of software, forming the basis for the normal operation of the car.
  • part or all of the systems contained in the car can be integrated on the same ECU, or can be separately deployed on different ECUs, which is not limited in the embodiment of the present application.
  • OTA upgrade refers to the interaction with the cloud through wireless communication interfaces such as wifi, LTE, or satellite to complete the update or upgrade of the car software.
  • the car can update the software anytime and anywhere, which is more flexible and convenient.
  • automotive software may include, but is not limited to, one or more of the following types: advanced driver assistance system (ADAS) related software, infotainment (IVI) related software, and in-vehicle information system (telematics) Related software, information security (information security) related software, on-board diagnostic system (OBD) related software, operating system (OS), map (map) software, etc.
  • ADAS advanced driver assistance system
  • IVI infotainment
  • telematics in-vehicle information system
  • OBD on-board diagnostic system
  • OS operating system
  • map maps
  • FIG. 1 it is a schematic diagram of a system architecture to which the embodiments of this application are applicable.
  • the system includes terminal equipment, upgrade servers, software development equipment, and so on.
  • Software development equipment which can be application software used by software designers to develop applications, and equipment used to develop software upgrade packages for the application software.
  • the software upgrade package can be a complete installation file of a new version of the application software, or it can be a differential upgrade package of the application software.
  • the software development equipment can also be used to generate a differential rollback package of the application software based on the software upgrade package of the application software. Roll back to the old version.
  • the software upgrade package and differential rollback package in the embodiments of the present application may also carry a version number, which is used to describe the version of the application software.
  • the terminal device can select the corresponding software upgrade package or differential rollback package to download according to the version number.
  • the version number may be a character or character string with special meaning, such as the current version number of the application software v.2.0, and the version number of the new version application software is v.2.1.
  • the software development equipment may belong to an application supplier or a terminal equipment supplier capable of installing application software, which is not limited in this application.
  • the software development equipment may be equipment such as a computer or a server.
  • the upgrade server can be a third-party device that can store software upgrade packages and differential rollback packages of application software, and provide file (including software upgrade packages and differential rollback packages) download services for terminal devices.
  • the upgrade server may be an OTA server or the like.
  • the upgrade server can establish a connection with the software development device, thereby obtaining the software upgrade package and the differential rollback package of the new version of the application software newly developed by the software development device, and store the software upgrade package and the differential rollback package. It should be noted that the above is only for convenience.
  • the upgrade server may not obtain the software upgrade package and the differential rollback package at the same time.
  • the upgrade server only obtains the software upgrade package, which is not limited in this application.
  • the upgrade server can also establish a connection with the terminal device to obtain the terminal device's upgrade requirements for application software, so as to select the software upgrade package of the application software corresponding to the version number according to the upgrade requirement, and send the selected software upgrade package To the terminal equipment so that the public terminal equipment can upgrade the application software.
  • the software development device and the upgrade server can be integrated into the same device, that is, the device has both the functions of the software development device and the upgrade server.
  • Application which can provide users with corresponding service functions.
  • the terminal device can run the application by installing the application software of the application to realize the service function of the application.
  • the terminal device can install and run the map navigation software to provide users with positioning and navigation service functions.
  • the application software is simply referred to as software below.
  • the software in the embodiments of the present application may also refer to the operating system of the terminal device, for example, the Android system.
  • a terminal device can be a device that can provide users with various service functions such as voice, video, shooting, and data connectivity by installing and running software.
  • the terminal device can use the software upgrade package downloaded from the upgrade server to upgrade the software, and obtain the new version from the currently running old version, or use the differential rollback package to roll back the software, and the new version is rolled back. To the old version.
  • the appearance of the terminal device is also different, as shown in FIG. 1.
  • the terminal device may be a mobile phone, a tablet computer, etc.
  • terminal devices can be mobile Internet devices, wearable devices, various wireless terminals in industry or smart homes.
  • terminal devices can be vehicles, on-board units (OBU), roadside units (RSU), and roadside units in the Internet of Vehicles. Side equipment (road side equipment, RSE), on-board electronic control unit (ECU), etc.
  • the terminal device can establish a communication connection with the upgrade server through a mobile communication network (including an access network and a core network) to perform communication interaction.
  • a mobile communication network including an access network and a core network
  • the terminal device can download the software upgrade package and/or the differential rollback package from the upgrade server.
  • the terminal device may also establish a communication connection with the upgrade server through the mobile communication network through at least one relay device to perform communication interaction.
  • the terminal device is an electronic control unit in a V2X communication scenario, as shown in FIG. 1, the electronic control unit can pass through the following relay devices in sequence: domain controller (DC), T-Box , And finally connect to the upgrade server.
  • DC domain controller
  • T-Box T-Box
  • the upgrade server may establish a communication connection with the software development equipment through a traditional Internet Protocol (IP) network to perform communication interaction.
  • IP Internet Protocol
  • the architecture shown in Figure 1 can be applied to a variety of communication scenarios, for example, the fifth generation (5G) communication system, the future sixth generation communication system and other evolved communication systems, the fourth generation (the 4th generation) communication system, vehicle to everything (V2X), long-term evolution-Internet of Vehicles (LTE-vehicle, LTE-V), vehicle to vehicle (V2V), Internet of Vehicles, machine communication (machine type communications, MTC), Internet of things (IoT), long-term evolution-machine to machine (LTE-machine to machine, LTE-M), machine to machine (machine to machine, M2M) and other communication scenarios ,
  • V2X vehicle to everything
  • LTE-vehicle LTE-V
  • V2V vehicle to vehicle
  • MTC machine communication
  • IoT Internet of things
  • LTE-machine to machine LTE-M
  • machine to machine machine to machine
  • M2M machine to machine
  • FIG. 2 is a schematic flowchart of an OTA upgrade method for automotive software. The process may include:
  • Step 1 Make a software upgrade package. Specifically, software designers use software development equipment to develop and generate a software upgrade package for a new version of the target software, and send the new version of the software upgrade package to the OTA cloud server, which will be sent by the OTA cloud server Store it.
  • Step 2 The ECU in the car downloads the software upgrade package of the new version of the target software from the OTA cloud server. Specifically, after the ECU detects that the OTA cloud server has the software upgrade package of the new version of the target software, it downloads the software upgrade package from the OTA cloud server.
  • Software upgrade package can be the ECU that installs the target software, or the ECU that serves as the upgrade master node. It should be understood that the ECU that serves as the upgrade master node can manage the software upgrade of other ECUs on the car , Other ECUs are slave nodes of the ECU that serves as the upgrade master node. The relationship between the ECU as the master node and the slave node ECU will be described in detail below.
  • Step 3 The ECU installs the software upgrade package of the new version, and upgrades the target software from the current version to the new version.
  • the above OTA upgrade methods can be divided into whole package upgrades and differential upgrades.
  • the new version of the software upgrade package may contain the complete installation file of the new version of the target software.
  • the new version of the software upgrade package may be a differential upgrade package of the new version of the target software relative to the version currently running on the ECU (or called the old version).
  • the differential upgrade package may include the difference between the target software of the new version and the target software of the old version.
  • the difference may be that the new version deletes a certain part of data or adds a certain part compared to the old version. Data etc.
  • the ECU adjusts the target software of the old version according to the difference indicated by the differential upgrade package to obtain the target software of the new version.
  • the target software After the target software is upgraded, the new version will be obtained from the old version.
  • the target software may still have a rollback requirement after the upgrade is completed, for example, the user still wants to use the old version of the software.
  • there may be bugs in the new version of the software causing the new version of the software to run abnormally.
  • the ECU After the ECU detects that the target software has a rollback requirement, it can roll back the target software to obtain the old version of the target software.
  • the common rollback method is that the ECU re-downloads the complete installation file of the old version of the target software from the OTA cloud server, or the ECU installs the complete installation file of the old version of the target software before upgrading the old version of the target software Make a backup.
  • the ECU reinstalls the complete installation file of the old version of the target software, so that the target software is rolled back from the currently running version to the old version.
  • the old version means that the target software is in use
  • the new version of the software upgrade package is the version that was running normally before the upgrade.
  • the rollback method of re-downloading the complete installation file of the old version takes a relatively long time, which may lead to untimely rollback, thereby hindering the normal operation of the car.
  • the storage space of the car is often limited, and the rollback method of backing up the complete installation file of the old version occupies a large storage space, which may cause the problem of insufficient storage space.
  • this application provides a software rollback method. After the terminal device in the embodiment of this application uses a differential upgrade package to upgrade the target software, if the target software has a rollback requirement, the target software can be rolled back through the differential upgrade package. roll.
  • the terminal device is an ECU, that is, when there is a rollback requirement for the target software in the ECU, the ECU does not need to download the complete installation file of the old version of the target software from the OTA cloud server, nor does it need to back up the complete installation file of the old version, you can directly Use the differential upgrade package that upgrades the target software to roll back the target software, so as to roll back to the old version to run, so as to realize the timely rollback of the software on the basis of reducing the storage space of the car.
  • FIG. 3 is a schematic flowchart of a software version rollback method provided by an embodiment of the application. The method can be applied to the system architecture shown in FIG. 1. The method includes the following steps:
  • Step S301 The terminal device downloads the differential upgrade package of the target software from the upgrade server;
  • the differential upgrade package is composed of at least one differential file, and the differential file records the difference between the current first version of the target software and the second version to be upgraded.
  • the difference file may also include a file header, which may be used to indicate target software.
  • the file header may also include information such as a version number corresponding to the difference file.
  • the software design developer has developed the differential upgrade package of the target software through the software development equipment, and sent the differential upgrade package to the upgrade server for storage.
  • Step S302 The terminal device uses the differential upgrade package to upgrade the current version of the target software, and obtains the second version of the target software from the first version of the target software.
  • step S303 when the terminal device detects that the target software has a rollback requirement, it uses the differential upgrade package to perform a rollback on the target software, so that the target software is rolled back from the current second version to the first version.
  • the differential upgrade package is described in detail.
  • the first version of the target software is referred to as the old version
  • the second version of the target software is referred to as the new version.
  • the differential upgrade package in the embodiment of the present application includes at least one differential file, and the at least one differential file records the difference between the new version of the target software and the old version of the target software.
  • differential file in the differential upgrade package of the new version of the target software in the embodiment of the present application is generated by the software development device based on the software code of the old version of the target software.
  • the difference file is composed of at least one difference operation instruction, and each difference operation instruction may contain instruction type and difference data.
  • the difference data is the data difference between the new version and the old version
  • the instruction type is used to indicate The data difference is the difference of the specific instruction type.
  • the differential data also includes address space information and data.
  • the instruction type is insert, and the differential data includes a new address space and the data to be inserted (ie, new data) is aaa, that is, the position where the new data is inserted is the new address space ,
  • the differential operation instruction is to insert data aaa in the new address space of the old version.
  • the address space refers to the address range of data storage.
  • the address space in the embodiment of the present application can have multiple representation methods.
  • the address space can be the code segment identifier or the code line identifier of the software code of the target software.
  • the code segment is used to identify a piece of code.
  • the code segment may include one line of code or multiple lines of code, and each line of code includes a line number and code content.
  • Each code segment has a code segment identifier, and each line of code has a code line identifier, for example, a line number. It should be noted that if the code segment includes a line of code, the code segment is identified as the line number of the line of code.
  • the code segment of the differential file in the embodiment of this application contains a line of code, that is, the line number of the code line is also the code segment identifier, so it is assumed that the first address space in the embodiment of this application is the old version of the target software The line number of the software code, and the second address space is the line number of the software code of the new version of the target software.
  • Fig. 4 The following takes Fig. 4 as an example to describe the generation process of the difference file. Assume that the file name of the target software is APP1.
  • the software development equipment When the software development equipment needs to insert (or add, as indicated by the "+” sign in Figure 4) line between the 2nd and 3rd lines on the basis of the target software with the version number of V1 (corresponding software code) : Xxxx, when the target software with the version number is V2 is generated, the software development equipment can generate the differential file P1 with the version number V2, so that the terminal device installed with the target software of the version number V1 can download and install the differential file File P1, upgrade the target software to V2 (as shown in Figure 4).
  • the software development equipment When the software development equipment needs to be based on the target software with the version number of V2, delete (represented by the "-" sign in Figure 4) the second line, and insert the line: yyyy between the fourth and fifth lines,
  • the software development equipment can generate the differential file P2 with the version number V3, so that the terminal device installed with the target software with the version number V2 can download and install the differential file P2, Upgrade the target software to V3 (as shown in Figure 4).
  • the software development equipment When the software development equipment needs to delete the second line on the basis of the target software with the version number V3 to generate the target software with the version number V4, the software development equipment can generate the difference file P3 with the version number V4, In this way, the terminal device installed with the target software of the version number V3 can upgrade the target software to V4 by downloading and installing the differential file P3 (as shown in FIG. 4).
  • the address space in the embodiment of the present application is not limited to the code segment identifier or the line number of the code line.
  • the address space in the embodiment of the present application can also be represented by the addressing range of the storage unit in the computer.
  • a certain address space can be from the X-th byte storage unit to the Y-th byte storage unit, specifically such as 0x0000 address to 0x0009 address, that is, the address space is from the 1st byte storage unit to the 9th byte storage unit, and each storage unit stores 1 byte of data.
  • the difference file is composed of a series of difference operation instructions, and each difference operation instruction can be arranged from front to back in the order of execution.
  • the differential operation instructions in the embodiments of the present application include instruction types and differential data. As shown in Figure 4 above, "Add” and "Delete” also belong to a type of instruction. Next, the differential data and instruction types will be introduced in detail:
  • First address space information second address space information, first data or second data.
  • the first address space information is used to indicate the address space in the old version of the target software
  • the second address space information is used to indicate the address space in the new version of the target software
  • the first data is data in the old version of the target software.
  • the second data is the data in the new version of the target software.
  • the address space in the first version of the target software indicated by the first address space information is referred to as the old address space
  • the address space in the new version of the target software indicated by the second address space information is referred to as the new address.
  • Space the first data is simply referred to as old data
  • the second data is simply referred to as new data.
  • the first address space included in the first version is referred to as the old address space
  • the second address space included in the second version is referred to as the new address space
  • the data stored in the first address space Ie, the first data of this application
  • the data stored in the second address space ie, the second data of this application
  • Ignore instructions which are used to indicate the same data part of the new version of the target software relative to the old version, wherein the same data part is indicated by differential data. It can be understood that for the ignore instruction, the address space part contained in the corresponding differential data, the new version and the old version are the same. It should be understood that, since the new version and the old version are the same for this part of the address space, this part of the address space can be called the old address space or the new address space.
  • the shift instruction is used to instruct to transfer the data in the old address space (that is, the old data) to the new address space.
  • An instruction is added to indicate the insertion of a new address space in the old version and the new data stored in the new address space.
  • the addition instruction is used to instruct to add or insert a new address space on the basis of the old version of the target software (corresponding software code), for example, insert a new line of code and new data, exemplary Specifically, the new data is the program code edited in the newly inserted address space.
  • the delete instruction is used to instruct to delete the old address space of the old version. It should be understood that deleting the old address space refers to deleting the old data stored in the old address space. As shown in Figure 4, when the target software of version number V2 is generated from the target software of version number V3, the second line of code is deleted. It should be understood that after the deletion is completed, the third line of the original version becomes the second Row.
  • the replacement instruction is used to instruct to replace the old data stored in the old address space of the old version with new data.
  • the above is an introduction to the difference operation instructions.
  • the terminal device uses the difference file to upgrade the target software, it executes the corresponding difference operation according to the difference data and the instruction type contained in each difference operation instruction, thereby obtaining a new version of the target software.
  • Table 1 a specific example of each differential operation instruction included in a differential upgrade package provided in this embodiment of the application.
  • the row sequence in Table 1 indicates the execution sequence of the differential operation instructions included in the differential upgrade package.
  • Table 1 is only an example.
  • the embodiment of the application does not limit the types of instructions contained in the differential operation instructions in the differential upgrade package. For example, it only includes ignore instructions, shift instructions, add instructions, delete instructions, and replace instructions.
  • the old address space is 1-100 code lines, which means that the target software of the new version is relative to the first 100th of the target software of the old version.
  • the code lines have not changed, that is, the first to 100 code lines in the software code of the new version of the target software and the old version of the target software are the same.
  • the old address space is 101-102 code lines
  • the new address space is 201-202 code lines
  • the terminal device is performing the differential operation
  • the difference operation corresponding to the instruction is to transfer the 101st to 102th code lines (the 101st to 102th code lines) of the software code in the old version of the target software to the 201st to 220th code lines.
  • the new address space is 300 code lines
  • the differential operation corresponding to the differential operation instruction executed by the terminal device is, the software in the target software Insert a new code line with a line position of 300 into the code, and the data of the code line is yyyy. It is understandable that after inserting a new code line, the 300th line in the old version becomes the 301st line in the new version.
  • the old address space is 400 code lines
  • the terminal device executes the differential operation corresponding to the differential operation instruction as follows:
  • the 400th code line is deleted, and the specific data to be deleted is that the data stored in the 400th code line is cccc.
  • the terminal device sequentially executes the differential operations corresponding to the differential operation instructions 1 to 5 shown in Table 1 above to obtain a new version of the target software, that is, to upgrade the target software from the current old version to the new version.
  • the process of terminal equipment using the differential upgrade package shown in Table 1 to upgrade the target software is as follows:
  • Step 1 Transfer the 101st ⁇ 102th code line (program code) to the 201st ⁇ 202th code line;
  • Step 2 Insert a new code line in the 300th code line, the data of the code line is yyyy;
  • Step 3 Delete the 400th code line. It should be understood that deleting the 400th code line means deleting the data cccc of the 400th code line;
  • Step 4 Replace the data bbbb of the 500th code line of the current version of the target software with the data aaaaa.
  • FIG. 5 is a schematic diagram of a scenario in which a differential rollback package is generated based on the differential upgrade package according to an embodiment of the application.
  • the scenario shown in 5 introduces the process of the terminal device generating the differential rollback package based on the differential upgrade package:
  • the inverse differential operation instruction corresponding to the differential operation instruction means that after the first differential operation corresponding to the differential operation instruction is executed, and then the second differential operation corresponding to the inverse differential operation instruction is executed, it can roll back to the unexecuted first differential operation.
  • the differential operation instruction is to transfer data in the first address space to the second address space
  • the inverse instruction corresponding to the differential operation instruction is to transfer the data in the second address space to the first address space.
  • the ignored instruction since the ignored instruction has no effect on the rollback, and the inverse differential operation instruction corresponding to the ignored instruction is also an ignored instruction, the ignored instruction can be executed in any order in the differential upgrade package and/or differential rollback package. Alternatively, the differential operation instruction may not be reflected in the differential upgrade package and the differential rollback package, which is not limited in the embodiment of the present application.
  • each differential rollback package contains 5 differential operation instructions.
  • Each row in Table 2 is used to represent a differential operation instruction. Similar to the differential upgrade package, each differential operation instruction can include instruction type and differential data. It should be noted that the row sequence in Table 2 indicates the execution sequence of the differential operation instructions included in the differential rollback packet.
  • Step 1 Replace the data (program code) aaaaa of the 500th code line of the current version of the target software with the data bbbb;
  • Step 2 Insert a new code line in the 400th code line, the data of this code line is xxxx;
  • Step 3 Delete the 300th code line. It should be understood that deleting the 300th code line means deleting the data yyyy of the 300th code line;
  • Step 4 Transfer the 201st to 202th code lines to the 101st to 102nd code lines;
  • the terminal device uses the differential rollback package to roll back the target software, it can roll back the target software from the new version to the old version.
  • Generation method 1 Generated by software development equipment
  • the software development equipment uses the differential upgrade package to generate the differential rollback package based on the above-mentioned method, and sends the differential rollback package to the upgrade server for storage.
  • the terminal device can download the differential rollback package when downloading the differential upgrade package.
  • the target software is upgraded using the differential upgrade package, if there is a rollback requirement, it will directly use the downloaded differential rollback package. Roll package rolls back the target software. This method can more promptly and quickly respond to the rollback requirements of the target software, and shorten the time required for the rollback of the target software to the old version.
  • the terminal device may also download the differential rollback package of the target software from the upgrade server when detecting that the target software has a rollback requirement. This method can prevent the differential rollback package from occupying the storage space of the terminal device for a long time.
  • Type 1 The rollback requirement of the terminal device for the target software
  • the terminal device can trigger the rollback of the target software.
  • the target software generates a rollback instruction, which instructs the target software to perform a rollback operation.
  • the rollback instruction carries the identifier of the target software, such as the application program name, and the version number of the version to which the target software needs to be rolled back.
  • the version number and the differential rollback package of the target software may be the same or determined by a preset correspondence relationship.
  • Type 2 The rollback needs of users for the target software
  • the user can trigger the terminal device to roll back, for example, the user controls the terminal device to install the complete installation file of the old version of the target software, or the terminal device has a rollback function button, which can select the rollback function button.
  • the user triggers the terminal device to roll back the target software by operating the function button.
  • Generation method 2 Generated by terminal equipment
  • the terminal device downloads the differential upgrade package from the upgrade server, and generates a differential rollback package based on the differential upgrade package.
  • An achievable way is that the terminal device uses the differential upgrade package to generate a differential rollback package before using the differential upgrade package to upgrade the target software, and stores the differential rollback package, and then uses the differential upgrade package to upgrade the target software. Later, if it is detected that the target software has a rollback requirement, the differential rollback package can be used to roll back the target software.
  • the terminal device backs up the differential upgrade package. After the target software is upgraded using the differential upgrade package, if it detects that the target software has a rollback requirement, the backup differential upgrade package is used to generate the differential Roll back the package and use the generated differential rollback package to roll back the target software.
  • the terminal device may not back up the differential upgrade package, and may download the differential upgrade package from the upgrade server when detecting that the target software has a rollback requirement.
  • Form 1 Differential data includes old address space, old data, new address space and new data
  • the differential data of the differential upgrade package includes the address space of the old version, the old data, and the address space and new data of the new version.
  • the terminal device can directly generate a differential rollback package based on the differential upgrade package.
  • a differential rollback package based on the differential upgrade package.
  • the data contained in the differential upgrade package shown in Table 1 is complete.
  • the differential of the differential upgrade package may not contain the old data.
  • the data contained in Table 1 The differential upgrade package shown does not contain the old data format.
  • Table 3 is only an example. When the differential upgrade package does not contain old data, the column of old data can also be deleted in Table 3.
  • the differential upgrade package shown in Table 3 does not affect the differential operation of upgrading the target software, but because the data contained in this form of differential upgrade package is incomplete, the terminal device cannot directly generate the differential based on the differential upgrade package.
  • Rollback package therefore, in order to be able to complete the differential upgrade package, the terminal device can obtain the differential data stored in the old address space indicated by the differential data corresponding to the differential instruction other than the ignore command to perform the differential upgrade package or Table 3. Supplement, and use the supplemented differential upgrade package or Table 3 to generate a differential rollback package.
  • FIG. 6 is a schematic diagram of a system architecture for software upgrade and software version rollback of an automobile provided by an embodiment of the application.
  • the system includes software development equipment, OTA cloud server and ECU.
  • the process of Embodiment 1 may include:
  • Step 1 The software development equipment generates a differential upgrade package of the target software
  • the process of generating the differential upgrade package by the software development equipment includes: comparing the new version and the old version of the target software, and generating a differential upgrade package based on the embodiment of the present application.
  • the differential data in the differential upgrade package except for the new address In addition to space, old address space, and old data, old data can also be included.
  • the differential upgrade package contains a differential operation instruction whose instruction type is delete
  • the differential operation instruction may include data stored in the old address space, that is, old data, in addition to the old address space to be deleted.
  • the process of generating the differential upgrade package by the software development equipment includes: comparing the new version and the old version of the target software, and generating the differential upgrade package using the existing mechanism.
  • the differential upgrade package generated by the existing mechanism does not include old data, that is, the form of the differential upgrade package is form 2. Therefore, the software development equipment can also add old data to the differential upgrade package to obtain form one. Differential upgrade package, so that the terminal device can directly generate a differential rollback package based on the differential upgrade package.
  • Step 2 The software development equipment sends the differential upgrade package to the OTA server;
  • the software development equipment can also be integrated on the OTA server. If the software development equipment is integrated on the OTA server, step 2 is an optional step and not a necessary step.
  • Step 3 ECU downloads the differential upgrade package of the target software from the OTA server;
  • Step 4 ECU generates a differential rollback package according to the differential upgrade package
  • Step 5 The ECU uses the differential upgrade package to upgrade the target software to obtain a new version of the software
  • Step 6 When detecting that the target software has a rollback requirement, the ECU uses a differential rollback package to roll back the target software to obtain the old version of the software.
  • Step 7 ECU installs the old version of the software and replaces the new version of the software.
  • step 4 is only an example, and the differential rollback package can also be generated after the ECU detects that the target software has a rollback requirement.
  • the flow of this method will be introduced in the following embodiment 2.
  • the process of this embodiment 2 may include:
  • Step 1 The software development equipment generates a differential upgrade package of the target software
  • Step 2 The software development equipment sends the differential upgrade package to the OTA server;
  • Step 3 ECU downloads the differential upgrade package of the target software from the OTA server;
  • Step 4 The ECU judges whether the differential upgrade package contains old data (that is, whether the format of the differential upgrade package is the first form described above), if it does, it will back up the differential upgrade package; if it does not, the ECU will base it on the target
  • the current running version of the software obtains the old data corresponding to the differential operation instructions contained in the differential upgrade package and adds it to the differential upgrade package, and backs up the differential upgrade package after adding the old data.
  • the specific method of adding old data please refer to the relevant description above, which will not be repeated here.
  • Step 5 The ECU uses the differential upgrade package to upgrade the target software to obtain a new version of the software
  • Step 6 When detecting that the target software has a rollback requirement, the ECU generates a differential rollback package according to the backup differential upgrade package, and uses the differential rollback package to roll back the target software to obtain the old version of the software.
  • Step 7 ECU installs the old version of the software and replaces the new version of the software.
  • the differential rollback package is generated by the ECU.
  • the differential rollback package can also be generated by the software development equipment.
  • the ECU is used to generate the differential rollback package by the software development equipment through the third embodiment.
  • the software version rollback process of the target software is introduced:
  • the process of this embodiment 3 may include:
  • Step 1 The software development equipment generates the differential upgrade package and differential rollback package of the target software
  • Step 2 The software development equipment sends the differential upgrade package and differential rollback package to the OTA server;
  • Step 3 ECU downloads the differential upgrade package and differential rollback package of the target software from the OTA server;
  • Step 4 The ECU uses the differential upgrade package to upgrade the target software to obtain a new version of the software
  • Step 5 When detecting that the target software has a rollback requirement, the ECU uses a differential rollback package to roll back the target software to obtain the old version of the software.
  • the ECU in Embodiment 1 to Embodiment 3 may be an ECU installed with target software, or other ECUs.
  • the ECU installed with the target software has the ability to communicate and interact with the OTA upgrade server
  • the ECU can directly download the differential upgrade package and differential rollback package of the target software from the OTA server;
  • the server's communication interaction capability download the differential upgrade package and differential rollback package of the target software, they send them to the ECU that has the target software installed, which is not limited in the embodiment of the present application.
  • FIG. 7 is a schematic diagram of another system architecture for software upgrade and software version rollback of another automobile provided by an embodiment of the application.
  • the system includes software development equipment, OTA cloud server and ECU master and ECU slave (slave nodes).
  • ECU master refers to the ECU as the master control node, which is used to monitor and centrally control the ECU slave upgrade. It is mainly responsible for centralized control of the upgrade of the entire vehicle.
  • the ECU master downloads what is required for the upgrade of the entire vehicle from the OTA Vehicle software upgrade package, the vehicle software upgrade package contains the ECU master and the differential upgrade package corresponding to each ECU slave.
  • the ECU master can split the vehicle software upgrade package, and the differential upgrade packages obtained after the split Send to the corresponding ECU slave.
  • ECU slave is a slave node of the ECU master. It can communicate and interact with the OTA cloud server. For example, when a certain software on the ECU slave needs to be upgraded, if the ECU slave has the ability to communicate and interact with the OTA cloud server , Then the ECU slave can download the differential upgrade package of the software from the OTA server to upgrade the software.
  • the ECU master can also control and manage its own software upgrades. For example, after the ECU master detects that the OTA cloud server has released a new version of the software upgrade package for the software installed on an ECU slave, it downloads the new version of the software upgrade package from the OTA cloud server and sends it to the ECU slave.
  • both the ECU master and the ECU slave can generate a differential rollback package based on the differential upgrade package, and both the ECU master and ECU slave can communicate with the OTA for file download, or the ECU master is responsible for the ECU slave.
  • the ECU master downloads the differential upgrade package and/or differential rollback package of the target software installed on the ECU slave from the OTA and sends it to the ECU slave.
  • the process of this embodiment 4 may include:
  • Step 1 The software development equipment generates a differential upgrade package of the target software
  • Step 2 The software development equipment sends the differential upgrade package to the OTA server;
  • Step 3 The ECU master downloads the entire vehicle software upgrade package from the OTA server;
  • Step 4 The ECU master splits the vehicle software upgrade package, generates a differential rollback package based on each differential upgrade package obtained from the split, and sends the differential upgrade package and differential rollback package of the same software to the corresponding ECU slave.
  • Step 5 ECU slaves respectively use their respective differential upgrade packages to upgrade their respective target software to obtain a new version of the software and replace the old version of the software.
  • Step 6 When the ECU slave detects that the target software has a rollback requirement, it uses the differential rollback package to roll back the target software to obtain the old version of the software.
  • the process of this embodiment 5 may include:
  • Step 1 The software development equipment generates a differential upgrade package of the target software
  • Step 2 The software development equipment sends the differential upgrade package to the OTA server;
  • Step 3 The ECU master downloads the entire vehicle software upgrade package from the OTA server;
  • Step 4 The ECU master splits the vehicle software upgrade package, and sends each differential upgrade package obtained from the split to the corresponding ECU slave.
  • Step 5 The ECU slave receives the differential upgrade package from the ECU master, and uses the differential upgrade package to generate a differential rollback package;
  • Step 6 ECU slaves respectively use their respective differential upgrade packages to upgrade their respective target software to obtain a new version of the software and replace the old version of the software.
  • Step 6 When the ECU slave detects that the target software has a rollback requirement, it uses the differential rollback package to roll back the target software to obtain the old version of the software.
  • the process of this embodiment 5 may include:
  • Step 1 The software development equipment generates a differential upgrade package of the target software
  • Step 2 The software development equipment sends the differential upgrade package to the OTA server;
  • Step 3 The ECU master downloads the entire vehicle software upgrade package from the OTA server;
  • Step 4 The ECU master splits the vehicle software upgrade package, and sends each differential upgrade package obtained from the split to the corresponding ECU slave.
  • Step 5 The ECU slave receives the differential upgrade package from the ECU master, and judges whether the differential upgrade package contains old data, if it does, then the differential upgrade package is backed up; if not, the differential upgrade package is backed up , Add old data to the backup differential upgrade package;
  • step 5 is only an example.
  • the ECU slave can also back up the differential upgrade package before judging whether the differential upgrade package contains old data. That is, the ECU slave can perform the judgment operation and the backup operation separately through two processes. In order to reduce the backup delay, the embodiment of the present application does not limit the judgment operation and the backup operation.
  • Step 6 ECU slaves respectively use their respective differential upgrade packages to upgrade their respective target software to obtain a new version of the software and replace the old version of the software.
  • Step 6 When the ECU slave detects that the target software has a rollback requirement, it uses the backup differential upgrade package to generate a differential rollback package, and uses the differential rollback package to roll back the target software to obtain the old version of the software.
  • Embodiment 4 is only an example, and when the entire vehicle is upgraded, the methods shown in Embodiment 1 to Embodiment 3 above can also be applied.
  • the software development equipment can generate the entire vehicle software rollback package.
  • the software development equipment generates the differential rollback package according to the differential upgrade package of each software that needs to be upgraded by the entire vehicle, and returns the differential of each software.
  • the rolling package is packaged as a complete vehicle software rollback package and stored on the OTA server.
  • the ECU master can also back up the differential upgrade package of each software or the whole vehicle software upgrade package.
  • the ECU slave After detecting that the ECU slave has a software version rollback requirement, it uses the backup differential upgrade package of the software to generate a differential rollback package, and then The differential rollback packet is sent to the ECU slave.
  • the ECU slave After detecting that the ECU slave has a software version rollback requirement, it uses the backup differential upgrade package of the software to generate a differential rollback package, and then The differential rollback packet is sent to the ECU slave.
  • the software version rollback method introduced in the above embodiments does not need to back up the complete installation file of the old version of the software in the car, but only needs to store a differential upgrade package that is much smaller than the complete installation file of the old version of the software, saving storage space.
  • the target software has a rollback requirement
  • the method of generating differential rollback packets is simpler and faster, and the computational overhead is small.
  • an embodiment of the present application further provides an apparatus 800 for implementing the function of the terminal device in the above-mentioned method.
  • the device may be a software module or a chip system.
  • the chip system may be composed of chips, or may include chips and other discrete devices.
  • the device 800 may include: a processing module 801 and a communication module 802.
  • the division of modules in the embodiments of the present application is illustrative, and is only a logical function division, and there may be other division methods in actual implementation.
  • the functional modules in the various embodiments of the present application may be integrated in one processor, or may exist alone physically, or two or more modules may be integrated in one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or software functional modules.
  • the communication module 802 is used to obtain a differential upgrade package of the target software; wherein, the differential upgrade package contains at least one differential operation instruction, The difference operation instruction is used to indicate the difference between the first version of the target software and the second version to be upgraded.
  • the processing module 801 is configured to use the differential upgrade package to upgrade the current version of the target software, and the current version of the target software is upgraded from the first version to the second version; and is also used to detect that the target software exists When a rollback is required, the differential upgrade package is used to perform a rollback on the target software, so that the current version of the target software is rolled back to the first version.
  • the differential upgrade package contains at least one differential operation instruction, the differential operation instruction contains an instruction type and differential data; the differential data contains the first address space and/or the first address space in the first version. The first data stored in an address space, and the second data and/or the second address space in the second version.
  • the processing module 801 is further configured to generate a differential rollback package according to the differential upgrade package;
  • the differential rollback package is to rearrange the at least one differential operation instruction arranged in the differential upgrade package according to a preset order, and replace the rearranged differential operation instructions with the differential operation
  • the inverse differential operation instruction corresponding to the instruction is obtained; wherein, the inverse differential operation instruction corresponding to the differential operation instruction refers to, after the first differential operation is performed according to the differential operation instruction, and then according to the inverse differential operation instruction Executing the second differential operation can roll back the version of the target software to the state before the first differential operation is executed;
  • the processing module 801 is specifically configured to use the differential rollback package to perform rollback on the target software.
  • the instruction type includes one or more of the following instructions: ignore, shift, insert, delete, or replace.
  • the differential operation instruction when the instruction type of the differential operation instruction is shift, the differential operation instruction is used to instruct to move the first data out of the first address space to the second address space; the second address The space is the address space other than the first address space in the first system; the inverse differential operation instruction corresponding to the differential operation instruction is to move the first data in the second address space back to all The first address space.
  • the differential operation instruction when the instruction type of the differential operation instruction is insert, the differential operation instruction is used to instruct to add a second address space in the first system, and to add the second data contained in the differential operation instruction Add to the second address space; the inverse differential operation instruction corresponding to the differential operation instruction is to delete the second address space.
  • the differential operation instruction when the instruction type of the differential operation instruction is delete, the differential operation instruction is used to instruct to delete the first address space and the first data stored in the first address space; the difference The inverse differential operation instruction corresponding to the operation instruction is to add a first address space and add the first data to the first address space.
  • the differential operation instruction when the instruction type of the differential operation instruction is replacement, the differential operation instruction is used to instruct to replace the first data in the first address space with the second data; the differential operation instruction corresponds to The inverse differential operation instruction is to replace the second data in the first address space with the first data.
  • the terminal device is a vehicle-mounted terminal device.
  • FIG. 9 shows a device 900 provided by an embodiment of the application, and the device shown in FIG. 9 may be a hardware circuit implementation of the device shown in FIG. 9.
  • the communication device can be adapted to implement the function of the terminal device in the above method embodiment in the flowchart shown in FIG. 2.
  • FIG. 9 only shows the main components of the communication device.
  • the apparatus 900 shown in FIG. 9 includes at least one processor 920, configured to implement the function of the terminal device in the method provided in the embodiment of the present application.
  • the device 900 may also include at least one memory 930 for storing program instructions and/or data.
  • the memory 930 and the processor 920 are coupled.
  • the coupling in the embodiments of the present application is an indirect coupling or communication connection between devices, units or modules, and may be in electrical, mechanical or other forms, and is used for information exchange between devices, units or modules.
  • the processor 920 may cooperate with the memory 930 to operate.
  • the processor 920 may execute program instructions stored in the memory 930. At least one of the at least one memory may be included in the processor.
  • the apparatus 900 may further include a communication interface 910 for communicating with other devices through a transmission medium, so that the apparatus used in the apparatus 900 can communicate with other devices.
  • the communication interface may be a transceiver, circuit, bus, module, or other type of communication interface.
  • the transceiver may be an independent receiver, an independent transmitter, a transceiver with integrated transceiver functions, or an interface circuit.
  • the processor 920 uses the communication interface 910 to send and receive data, and is used to implement the method executed by the terminal device in the embodiment corresponding to FIG. 2.
  • the communication interface 910 is used to obtain a differential upgrade package of the target software; wherein, the differential upgrade package contains at least one differential operation instruction, The differential operation instruction is used to indicate the difference between the first version of the target software and the second version to be upgraded; as an example, the communication interface 910 can directly exchange data with the upgrade server, such as downloading a differential upgrade package and /Differential rollback package.
  • the device 900 may obtain data through other equipment.
  • the device 900 is an ECU, and the ECU includes a communication interface 910. The ECU may obtain data through a T-BOX.
  • T-BOX downloads the differential upgrade package and/differential rollback package from the upgrade server
  • the ECU can obtain the differential upgrade package and/differential rollback package downloaded in the T-BOX through the communication interface 910
  • This embodiment of the application does not limit this.
  • the processor 920 is configured to use the differential upgrade package to upgrade the current version of the target software, and obtain the second version from the first version; when it is detected that the target software has a rollback requirement, use The differential upgrade package performs a rollback on the target software, so that the current version of the target software is rolled back to the first version.
  • the embodiments of the present application also provide a physical device of a software version rollback device, which is a vehicle-mounted terminal device, and the device is used to implement the software version rollback methods in the above figures.
  • the device 1000 includes: a communication unit 1001, an ECU 1002, and a memory 1003. Wherein, the communication unit 1001, the ECU 1002, and the memory 1003 are connected to each other.
  • the communication unit 1001, the ECU 1002, and the memory 1003 are connected to each other through a bus 1004.
  • the bus 1004 may be a CAN (controller area network) bus or an Ethernet bus.
  • the bus can be divided into an address bus, a data bus, a control bus, and so on. For ease of representation, only one thick line is used to represent in FIG. 10, but it does not mean that there is only one bus or one type of bus.
  • the communication unit 1001 is used to communicate with other devices through a transmission medium.
  • the device ECU 1002 used in the device 1000 can communicate with other devices.
  • the communication unit 1001 may be a T-BOX (telematics BOX, telematics processor).
  • the memory 1003 is used to store program instructions and data.
  • the program instructions may include program code, and the program code includes computer operation instructions.
  • the data may include a differential upgrade package and/or a differential rollback package of the target software.
  • the memory 1003 may include a random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
  • ECU1002 can be applied to specific components or systems in vehicle-mounted terminal equipment. On different components or systems, ECU can have different names, for example, VCU for electric motors, TCU for gearboxes, EMS for engines, and bodywork.
  • the control of BCM can be realized by ECU.
  • different components or systems in the vehicle terminal equipment can also be integrated into the same ECU.
  • the ECU 1002 executes the program instructions and data stored in the memory 1003 to realize the above-mentioned functions, thereby realizing the software version rollback method provided in the above-mentioned embodiment. For other methods executed by the communication unit 1001, the ECU 1002, and the memory 1003, reference may be made to the description in the method flow shown in FIG. 2, which will not be repeated here.
  • the processor may be a general-purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware
  • the components can implement or execute the methods, steps, and logical block diagrams disclosed in the embodiments of the present application.
  • the general-purpose processor may be a microprocessor or any conventional processor or the like.
  • the steps of the method disclosed in combination with the embodiments of the present application may be directly embodied as being executed and completed by a hardware processor, or executed and completed by a combination of hardware and software modules in the processor.
  • At least one item (a) of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple .
  • “plurality" means two or more.
  • the term "exemplary” is used to mean serving as an example, illustration, or illustration. Any embodiment or design solution described as an "example” in this application should not be construed as being more preferable or advantageous than other embodiments or design solutions. Rather, the term example is used to present the concept in a concrete way.
  • the ordinal numbers such as "first” and “second” mentioned in the embodiments of the present application can be used to distinguish multiple objects, and are not used to limit the order, timing, priority, or importance of multiple objects.
  • the first information and the second information are only for distinguishing different signaling, but do not indicate the difference in content, priority, sending order, or importance of the two types of information.
  • the memory may be a non-volatile memory, such as a hard disk drive (HDD) or a solid-state drive (SSD), etc., or a volatile memory (volatile memory), for example Random-access memory (random-access memory, RAM).
  • the memory is any other medium that can be used to carry or store desired program codes in the form of instructions or data structures and that can be accessed by a computer, but is not limited to this.
  • the memory in the embodiments of the present application may also be a circuit or any other device capable of realizing a storage function for storing program instructions and/or data.
  • the methods provided in the embodiments of the present application may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
  • software When implemented by software, it can be implemented in the form of a computer program product in whole or in part.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, network equipment, user equipment, or other programmable devices.
  • the computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website, computer, server, or data center.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or a data center integrated with one or more available media.
  • the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, and a magnetic tape), an optical medium (for example, a digital video disc (digital video disc, DVD for short)), or a semiconductor medium (for example, SSD).
  • the embodiments can be mutually cited.
  • the methods and/or terms between the method embodiments can be mutually cited, such as the functions and/or functions between the device embodiments.
  • Or terms may refer to each other, for example, functions and/or terms between the device embodiment and the method embodiment may refer to each other.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Quality & Reliability (AREA)
  • Stored Programmes (AREA)

Abstract

一种软件版本回滚方法、装置及***,可以应用于智能车领域,其中方法包括:获取目标软件的差分升级包(S301);使用该差分升级包对该目标软件的当前版本进行升级,该目标软件的当前版本由第一版本升级至第二版本(S302);当存在回滚需求时,使用该差分升级包对该目标软件执行回滚,令该目标软件的当前版本回滚为该第一版本(S303)。对目标软件进行软件版本回滚时,不需要从升级服务器重新下载目标软件的旧版本的完整安装文件,也不需要备份旧版本的完整安装文件,可以直接利用目标软件的差分升级包对目标软件进行回滚,以回滚到旧版本运行,从而在降低占用汽车的存储空间的基础上实现软件的及时回滚。

Description

一种软件版本回滚方法、装置及*** 技术领域
本申请涉及计算机技术领域,尤其涉及一种软件版本回滚方法、装置及***。
背景技术
随着智能网联汽车的发展,越来越多的汽车具备了联网的功能,也出现了新的汽车软件升级方式——空中下载(over the air,OTA),OTA是指通过WiFi、长期演进(long term evolution,LTE)、卫星等空中通讯接口完成对汽车软件的更新或升级,汽车通过OTA获取新版本软件,以进行***升级操作。
在安装新版本软件过程中,可能出现安装失败或新版本软件运行不正常的情况,此时将导致软件相关的功能不可用,进而造成汽车部分功能在升级后不可用。为了保证汽车功能的正常和安全运行,此时需要能够及时回滚到升级前的旧版本软件。
目前,为了实现回滚,在安装新版本软件之前,车端会备份旧版本软件包。当发生升级异常后,车端重新安装旧版本软件,以实现回滚。由于车内的存储空间有限,备份旧版本软件将占用较大的存储空间,为了满足存储需求,需要增大汽车的存储空间,增加了汽车的存储成本。
发明内容
本申请提供一种软件版本回滚方法、装置及***,在降低占用汽车的存储空间的基础上实现驾驶***可以回滚到基于旧版本软件运行,以保障终端运行安全(sercurity)。
第一方面,本申请实施例提供了一种软件版本回滚方法。该方法可以由终端设备(例如,汽车)实现,也可以由终端设备的部件实现,如由终端设备中的处理装置、电路、芯片等部件实现。该方法包括:终端设备获取目标软件的差分升级包,并使用该差分升级包对目标软件的当前版本进行升级,所述目标软件的当前版本由第一版本升级至第二版本;若检测到目标软件存在回滚需求时,使用该差分升级包对该目标软件执行回滚,令所述目标软件的当前版本回滚为所述第一版本。
其中,所述差分升级包包含至少一个差分操作指令,所述差分操作指令用于指示目标软件当前的第一版本和待升级的第二版本之间的差异。
通过上述方法,终端设备对目标软件进行软件版本回滚时,不需要从升级服务器下载目标软件的旧版本的完整安装文件,也不需要备份旧版本的完整安装文件,可以直接利用对目标软件进行升级的差分升级包对目标软件进行回滚,以回滚到旧版本运行,从而在降低占用汽车的存储空间的基础上实现软件的及时回滚。
在一种可能的设计中,所述差分升级包包含至少一个差分操作指令,所述差分操作指令包含指令类型以及差分数据;所述差分数据包含第一版本中的第一地址空间和/或第一地址空间内存储的第一数据,以及第二版本中的第二数据和/或第二地址空间。
在一种可能的设计中,该方法还包括:根据所述差分升级包生成差分回滚包;其中,所述差分回滚包是,将所述差分升级包内排列的所述至少一个差分操作指令,按照预设顺 序重新排列,例如,将差分升级包内的差分操作指令按照执行顺序由前至后的顺序进行排列时,该预设顺序可以是由后至前的顺序。又例如,将差分升级包内的差分操作指令按照执行顺序由后至前的顺序进行排列,该预设顺序可以是由前至后的顺序。并将重新排列后的各差分操作指令替换为所述差分操作指令对应的逆差分操作指令后得到的;其中,所述差分操作指令对应的逆差分操作指令是指,在根据所述差分操作指令执行第一差分操作后,再根据所述逆差分操作指令执行第二差分操作能够使所述目标软件的版本回滚至未执行所述第一差分操作前的状态;所述使用所述差分升级包对所述目标软件执行回滚,包括:使用所述差分回滚包对所述目标软件执行回滚。
通过上述方法,终端设备对目标软件进行软件版本回滚时,可以利用目标软件的差分升级包生成差分回滚包,便可以使用差分回滚包对目标软件进行及时回滚,以回滚到旧版本运行,可以缩短回滚时间,降低用于软件升级以及软件回滚的存储空间,并且本申请实施例根据差分升级包生成为差分回滚包的方式更加简单快速,计算开销小。
在一种可能的设计中,所述指令类型包括但不限于为忽略、移位、***、删除或替换。
比如,当所述差分操作指令的指令类型为移位时,所述差分操作指令用于指示将第一数据由第一地址空间移出至第二地址空间;所述第二地址空间为所述第一***中除第一地址空间之外的其他地址空间;所述差分操作指令对应的逆差分操作指令为,将所述第二地址空间的所述第一数据移回至所述第一地址空间。
再比如,当所述差分操作指令的指令类型为***时,所述差分操作指令用于指示在第一***中增加第二地址空间,将所述差分操作指令包含的第二数据添加至所述第二地址空间;所述差分操作指令对应的逆差分操作指令为,删除所述第二地址空间。
再比如,当所述差分操作指令的指令类型为删除时,所述差分操作指令用于指示删除第一地址空间以及所述第一地址空间内存储的第一数据;所述差分操作指令对应的逆差分操作指令为,增加第一地址空间,并将所述第一数据添加至所述第一地址空间。
又比如,当所述差分操作指令的指令类型为替换时,所述差分操作指令用于指示将第一地址空间的第一数据替换为第二数据;所述差分操作指令对应的逆差分操作指令为,将所述第一地址空间的所述第二数据替换为所述第一数据。
第二方面,本申请实施例提供了一种软件版本回滚方法。该方法可以由升级服务器实现,也可以由软件升级服务器的部件实现,如由软件升级服务器中的处理芯片、电路等部件实现。该方法包括:接收来自软件版本回滚装置的下载指令,示例性地,所述下载指令包含目标软件的信息,例如目标软件的名称、目标软件待升级的版本号;向该软件版本回滚装置发送差分升级包。
在一种可能的设计中,该升级服务器利用差分升级包生成差分回滚包;向软件版本回滚装置发送差分回滚包。
第三方面,本申请实施例提供一种通信装置,该装置具有实现第一方面所述的方法的功能,所述功能可以通过硬件实现,也可以通过软件实现,或者通过硬件执行相应的软件实现。所述装置包括一个或多个与上述功能相对应的模块,比如包括收发单元和处理单元。
在一个可能的设计中,该装置可以是芯片或者集成电路。
在一个可能的设计中,该装置包括存储器、处理器和收发器,收发器用于接收和发送数据,存储器用于存储所述处理器执行的程序或指令,当程序或指令被处理器执行时,所述装置可以执行上述第一方面及其第一方面中的各种可能设计所涉及的方法。
在一个可能的设计中,该装置可以为终端设备。
第四方面,本申请实施例提供了一种升级服务器,该装置具有实现第一方面所述的方法的功能,所述功能可以通过硬件实现,也可以通过软件实现,或者通过硬件执行相应的软件实现。所述装置包括一个或多个与上述功能相对应的模块,比如包括收发单元和处理单元。
在一个可能的设计中,该装置可以是芯片或者集成电路。
在一个可能的设计中,该装置包括存储器、处理器和收发器,收发器用于接收和发送数据,存储器用于存储所述处理器执行的程序或指令,当程序或指令被处理器执行时,所述装置可以执行上述第一方面及其第一方面中的各种可能设计所涉及的方法。
在一个可能的设计中,该装置可以为OTA服务器。
第五方面,本申请实施例提供一种装置,所述装置包括处理器、存储器和通信接口,所述通信接口,用于接收信号或者发送信号;所述存储器,用于存储程序或指令代码;所述处理器,用于从所述存储器调用所述程序或指令代码执行如第一方面所述的方法或执行如第二方面及其第二方面中的各种可能设计所涉及的方法。
第六方面,本申请实施例提供一种装置,所述通信装置包括处理器和接口电路,所述接口电路,用于接收程序或指令代码并传输至所述处理器;所述处理器运行所述程序或指令代码以执行如第一方面及其第一方面中的各种可能设计所涉及的方法或执行如第二方面及其第二方面中的各种可能设计所涉及的方法。
第七方面,本申请实施例提供一种计算机可读存储介质,所述计算机可读存储介质用于存储程序或指令,当所述程序或指令被执行时,使得第一方面及其第一方面中的各种可能设计所涉及的方法,或第二方面及其第二方面中的各种可能设计所涉及的方法被实现。
第八方面,本申请实施例提供一种包括指令的计算机程序产品,当所述指令被执行时,使得第一方面及其第一方面中的各种可能设计所涉及的方法,或第二方面及其第二方面中的各种可能设计所涉及的方法被实现。
第九方面,本申请实施例还提供了一种软件版本回滚***,包括:升级服务器和软件版本回滚装置,所述软件版本回滚装置可以执行上述第一方面或第一方面任一种可能实现方式中的相应功能,所述升级服务器可以执行上述第二方面或第二方面任一种可能实现方式中的相应功能,具体参见方法示例中的详细描述,此处不做赘述。
附图说明
图1为本申请提供的一种***架构示意图;
图2为本申请提供的一种软件升级的流程示意图;
图3为本申请实施例提供的一种软件回滚方法的流程示意图;
图4为本申请实施例提供的一种差分文件的生成示例图;
图5为本申请实施例提供的生成差分回滚包的场景示意图;
图6-图7为本申请提供的一种包含汽车的***架构示意图;
图8-图10为本申请实施例提供的软件版本回滚装置结构示意图。
具体实施方式
为了使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请作进一步地详细描述。方法实施例中的具体操作方法也可以应用于设备实施例或***实施例中。
随着汽车产业的不断发展,汽车上安装的软件也越来越多,具体的,汽车上的软件一般安装在电子控制单元(electronic control unit,ECU)上。例如,汽车内的防抱死制动***、自动变速***、多媒体***、刹车辅助***、巡航定速***、空调***、驱动***、悬架***、安全***等等都包含有各自的ECU,各***内的各种复杂多样的控制逻辑和计算功能,可以以软件的形式运行在各***内的ECU上,构成汽车正常运行的基础。
需要说明的是,汽车内包含的部分或全部***可以集成到同一个ECU上,也可以分离部署到不同的ECU上,本申请实施例对此不作限定。
应理解的是,本申请实施例提供的方法、装置可以有应用于智能汽车(smart/intelligent car)、数字汽车(digital car)、无人汽车(unmaned car/driverless car)、自动汽车(self-driving car)等类型的汽车中。
目前,汽车软件的升级方式包括两种,一种是通过专用设备以有线方式进行升级。另一种是OTA(over the air,空中下载)升级,OTA升级是指通过wifi、LTE或卫星等无线通信接口与云端交互,完成对汽车软件的更新或升级。OTA升级方式下汽车可以随时随地更新软件,更加灵活便利。
应理解,汽车软件可以包括但不限于下列类型中的一种或多种:高级辅助驾驶***(advanced driver assistance system,ADAS)相关软件、信息娱乐(infotainment IVI)相关软件、车载信息***(telematics)相关软件、信息安全(information security)相关软件、车载诊断***(on board diagnostic,OBD)相关软件、操作***(operating system,OS)、地图(map)软件等。
如图1所示,为本申请实施例所适用的一种***架构示意图。参阅图1所示,该***中包含终端设备、升级服务器、软件开发设备等。
以下,对本申请中的部分用语进行解释说明,以便于本领域技术人员理解。
1)软件开发设备,可以是软件设计人员用于开发应用的应用软件,以及开发该应用软件的软件升级包的设备。如前所述,该软件升级包可以是应用软件的新版本的完整安装文件,也可以是应用软件的差分升级包。可选的,软件开发设备还可以用于基于应用软件的软件升级包生成应用软件的差分回滚包,该差分回滚包用于对升级后的应用软件进行回滚,令应用软件由新版本回滚为旧版本。
具体的,本申请实施例中的软件升级包和差分回滚包还可以携带版本号,用于说明应用软件的版本,终端设备可以根据版本号选择对应的软件升级包或差分回滚包进行下载。示例性地,该版本号可以是具有特殊含义的字符或字符串,如该应用软件当前的版本号v.2.0,新版本应用软件的版本号为v.2.1。
可选的,所述软件开发设备可以属于应用供应商或能够安装应用软件的终端设备供应商,本申请对此不作限定。例如,所述软件开发设备可以为计算机、服务器等设备。
2)升级服务器,可以是能够存储应用软件的软件升级包和差分回滚包,并为终端设备提供文件(包括软件升级包和差分回滚包)下载服务的第三方设备。可选的,所述升级服务器可以为OTA服务器等。
所述升级服务器可以与软件开发设备建立连接,从而获取软件开发设备新开发的应用 软件的新版本的软件升级包和差分回滚包,并对软件升级包和差分回滚包进行存储。需要说明的是,上述仅为方便介绍,升级服务器可以不同时获取软件升级包和差分回滚包,例如,升级服务器仅获取软件升级包,本申请对此不作限定。另外,所述升级服务器还可以与终端设备建立连接,从而获取终端设备对应用软件的升级需求,从而根据该升级需求选择对应版本号的应用软件的软件升级包,并将选择的软件升级包发送给终端设备,以使公该终端设备可以进行应用软件的升级。
可选的,软件开发设备和升级服务器可以集成到同一设备中,即该设备兼具有软件开发设备和升级服务器的功能。
3)应用,可以是能够为用户提供对应的服务功能。具体的,终端设备可以通过安装该应用的应用软件,从而运行该应用,实现该应用的服务功能。
例如,具有GPS定位功能和地图信息的地图导航软件,终端设备可以安装并运行该地图导航软件,以向用户提供定位以及导航的服务功能。为了方便描述,下文将应用软件简称为软件。
由于之前软件设计人员考虑不全面或程序功能不完善,或者是随着用户对应用的服务需求的不断增加,软件设计人员通常在软件发行后,还需要开发软件的软件升级包以对软件进行升级,从而修补软件的漏洞或扩展应用功能。
需要说明的是,本申请实施例中的软件还可以指终端设备的操作***,例如,安卓***。
4)终端设备,可以是一种能够通过安装并运行软件,为用户提供相应的语音、视频、拍摄、数据连通性等各种服务功能的设备。本申请实施例中,终端设备可以使用从升级服务器下载的软件升级包对软件进行升级,由当前运行的旧版本得到新版本,或者使用差分回滚包对软件进行回滚,由新版本回滚到旧版本。
在不同的应用场景中,所述终端设备的表现形式也不同,如图1所示。示例性的,在传统的移动通信场景中,终端设备可以是手机、平板电脑等。在物联网(internet of things,IoT)通信场景中,终端设备可以是移动互联网设备、可穿戴设备、工业中或智能家居中的各种无线终端。在车联网或车到万物(vehicle to everything,V2X)通信场景中,终端设备可以是车辆、车联网中的车载单元(on board unit,OBU)、路侧单元(road side unit,RSU)、路侧设备(road side equipment,RSE)、车载电控制单元(electronic control unit,ECU)等。
需要说明的是,在本申请提供的***中,终端设备可以通过移动通信网络(包括接入网和核心网)与所述升级服务器建立通信连接,进行通信交互。示例性地,终端设备与升级服务器建立连接后,终端设备可以从升级服务器下载软件升级包和/或差分回滚包。所述终端设备也可以通过至少一个中继设备,在通过所述移动通信网络与所述升级服务器建立通信连接,进行通信交互。例如,当所述终端设备为V2X通信场景中的电子控制单元时,如图1中所示,该电子控制单元可以依次通过以下中继设备:域控制器(domain controller,DC),T-Box,最终连接升级服务器。
所述升级服务器可以通过传统的互联网协议(internet protocol,IP)网络与软件开发设备建立通信连接,进行通信交互。
另外,图1所示的架构可以应用到多种通信场景中,例如,第五代(the 5th generation,5G)通信***、未来的第六代通信***和演进的其他通信***、***(the 4th generation)通信***、车到万物(vehicle to everything,V2X)、长期演进-车联网(LTE-vehicle,LTE-V)、 车到车(vehicle to vehicle,V2V)、车联网、机器类通信(machine type communications,MTC)、物联网(internet of things,IoT)、长期演进-机器到机器(LTE-machine to machine,LTE-M)、机器到机器(machine to machine,M2M)等通信场景中,本申请对此不作限定。
接下来介绍一种汽车软件的OTA升级方法,该方法可以由终端设备实现,也可以由终端设备的部件实现,例如ECU,这里以ECU为例,介绍汽车软件的OTA升级方法,该方法可应用于图1所示的***架构中,请参阅图2,图2为一种汽车软件的OTA升级方法的流程示意图,该流程可以包括:
步骤1,制作软件升级包,具体的,软件设计人员使用软件开发设备开发并生成目标软件的新版本的软件升级包,并将该新版本的软件升级包发送给OTA云端服务器,由OTA云端服务器进行存储。
步骤2,汽车内ECU从OTA云端服务器下载目标软件的新版本的软件升级包,具体的可以是,ECU检测到OTA云端服务器有目标软件的新版本的软件升级包后,从OTA云端服务器下载该软件升级包。其中,执行下载操作的ECU可以是安装该目标软件的ECU,也可以是作为升级主控节点的ECU,应理解的是,作为升级主控节点的ECU可以管理该汽车上的其它ECU的软件升级,其他ECU是作为升级主控节点的ECU的从属节点。下文会详细介绍作为主控节点的ECU和从属节点ECU的关系。
步骤3,ECU安装该新版本的软件升级包,将目标软件由当前版本升级为新版本。
其中,针对软件升级包的不同形式又可以将上述OTA升级方式分为整包升级和差分升级。整包升级中,新版本的软件升级包可以包含新版本的目标软件的完整安装文件。差分升级中,新版本的软件升级包可以是新版本的目标软件相对于ECU上当前运行的版本(或称为旧版本)的目标软件的差分升级包。其中,差分升级包可包括新版本的目标软件相对于旧版本的目标软件之间的差异,示例性地,该差异可以是新版本相较于旧版本删除了某部分数据,或增加了某部分数据等。ECU根据差分升级包指示的差异对旧版本的目标软件进行调整,以得到新版本的目标软件。
上述介绍了汽车内的目标软件的升级过程,目标软件在升级完成后,将由旧版本得到新版本。然而在一种可能的场景中,目标软件在升级完成后可能还具有回滚需求,例如,用户仍想使用旧版本的软件。又例如,新版本的软件可能存在bug,导致新版本软件运行不正常。ECU检测到目标软件具有回滚需求后,可以对目标软件进行回滚,以得到旧版本的目标软件。目前,常见的回滚方式为,ECU从OTA云端服务器重新下载该目标软件的旧版本的完整安装文件,或者ECU在对旧版本的目标软件进行升级之前,将目标软件的旧版本的完整安装文件进行备份,当该目标软件存在回滚需求时,ECU重新安装该目标软件的旧版本的完整安装文件,令目标软件由当前运行的版本回滚到旧版本,该旧版本是指目标软件在使用新版本的软件升级包进行升级之前运行正常的版本。
应理解的是,重新下载旧版本的完整安装文件的回滚方式耗时相对较长,可能导致回滚不及时,从而妨害汽车的正常运行。另外,汽车的存储空间往往比较有限,采用备份旧版本的完整安装文件的回滚方式占用的存储空间较大,有可能导致存储空间不足的问题。
鉴于此,本申请提供了一种软件回滚方法,本申请实施例终端设备使用差分升级包对目标软件进行升级后,若目标软件存在回滚需求,则可以通过差分升级包对目标软件进行回滚。若该终端设备为ECU时,即ECU中目标软件存在回滚需求时,ECU不需要从OTA云端服务器下载目标软件的旧版本的完整安装文件,也不需要备份旧版本的完整安装文件, 可以直接利用对目标软件进行升级的差分升级包对目标软件进行回滚,以回滚到旧版本运行,从而在降低占用汽车的存储空间的基础上实现软件的及时回滚。
接下来对本申请提供的软件版本回滚方法的技术方案进行具体说明。
请参阅图3,图3为本申请实施例提供的一种软件版本回滚方法的流程示意图,该方法可以适用于如图1所示的***架构中,该方法包括如下步骤:
步骤S301:终端设备从升级服务器下载目标软件的差分升级包;
其中,该差分升级包由至少一个差分文件组成,差分文件中记录有目标软件的当前的第一版本和待升级的第二版本之间的差异。
可选的,差分文件中还可以包含文件头部,该文件头部可用于指示目标软件,可选的,所述文件头部还可以包含所述差分文件对应的版本号等信息。
应理解的是,在该步骤之前,软件设计开发人员已通过软件开发设备开发该目标软件的差分升级包,并将该差分升级包发送至升级服务器中进行存储。
步骤S302:终端设备使用差分升级包对目标软件的当前版本进行升级,由目标软件的第一版本得到目标软件的第二版本。
步骤S303,终端设备检测到该目标软件存在回滚需求时,使用该差分升级包对目标软件执行回滚,令目标软件由当前的第二版本回滚为第一版本。
下面结合具体实施例,对图3所示的实施例的方案进行具体描述。
首先对差分升级包进行详细说明,为了便于理解区分,下文将目标软件的第一版本称为旧版本,将目标软件的第二版本称为新版本。
本申请实施例中的差分升级包包含至少一个差分文件,所述至少一个差分文件记录有新版本的目标软件相对于旧版本的目标软件之间的差异。
下面结合具体实施例对目标软件的新版本的差分升级包进行介绍:
假设,本申请实施例中新版本的目标软件的差分升级包中的差分文件是软件开发设备基于旧版本的目标软件的软件代码生成的。
示例性地,差分文件由至少一个差分操作指令组成,每个差分操作指令可包含有指令类型和差分数据,可以理解为,差分数据为新版本相对于旧版本的数据差异,指令类型用于指示该数据差异具体的指令类型的差异。具体的,差分数据还包括地址空间信息和数据,例如,指令类型为***,差分数据包含新地址空间和待***的数据(即新数据)为aaa,即该新数据***的位置为新地址空间,则该差分操作指令为在旧版本的新地址空间处***数据aaa。
其中,地址空间是指数据存储的地址范围,本申请实施例中的地址空间可以有多种表示方式,例如,地址空间可以是目标软件的软件代码的代码段标识或代码行标识。其中,代码段,用于标识一段代码。所述代码段中可以包含一行代码,也可以包含多行代码,每行代码中包含行号和代码内容。每个代码段具有代码段标识,每行代码具有代码行标识,例如,行号。需要注意的是,若代码段包为一行代码时,该代码段标识为该行代码的行号。
为了便于理解,假设本申请实施例中差分文件的代码段包含一行代码,即代码行的行号也是代码段的标识,从而假设,本申请实施例中的第一地址空间为旧版本的目标软件的软件代码的行号,第二地址空间为新版本的目标软件的软件代码的行号。
下面以图4为例,对差分文件的生成过程进行说明。假设目标软件的文件名为APP1。
当软件开发设备需要在版本号为V1的目标软件(对应的软件代码)的基础上,在第2 行和第3行之间***(或增加,由图4中的“+”号表示)行:xxxx,以生成版本号为V2的目标软件时,则所述软件开发设备可以生成版本号为V2的差分文件P1,这样,安装有版本号V1的目标软件的终端设备可以通过下载并安装差分文件P1,将目标软件升级到V2(如图4中所示)。
当软件开发设备需要在版本号为V2的目标软件的基础上,删除(由图4中的“-”号表示)第2行,并在第4行和第5行之间***行:yyyy,以生成版本号为V3的目标软件时,则所述软件开发设备可以生成版本号为V3的差分文件P2,这样,安装有版本号V2的目标软件的终端设备可以通过下载并安装差分文件P2,将目标软件升级到V3(如图4中所示)。
当软件开发设备需要在版本号为V3的目标软件的基础上,删除第2行,以生成版本号为V4的目标软件时,则所述软件开发设备可以生成版本号为V4的差分文件P3,这样,安装有版本号V3的目标软件的终端设备可以通过下载并安装差分文件P3,将目标软件升级到V4(如图4中所示)。
需要说明的是,上述仅为举例,本申请实施例中地址空间不限定于代码段标识或代码行的行号。例如,本申请实施例中的地址空间还可以用计算机中存储单元的编址范围来表示,例如某地址空间可以是第X字节存储单元到第Y字节存储单元,具体的如0x0000地址到0x0009地址,也就是该地址空间为从第1字节存储单元至第9字节存储单元,每个存储单元存储1字节数据。
上述介绍的为差分文件的生成过程,可以看出,差分文件由一系列差分操作指令组成,各差分操作指令可以按照执行顺序由前至后进行排列。如前所述,本申请实施例中的差分操作指令包含指令类型和差分数据。如上文图4所示的“增加”和“删除”也属于一种指令类型,接下来对差分数据和指令类型进行具体介绍:
本申请实施例中的差分数据包括但不限于下列中的一项或多项:
第一地址空间信息、第二地址空间信息、第一数据或第二数据。
其中,第一地址空间信息用于指示旧版本的目标软件中的地址空间,第二地址空间信息用于指示新版本的目标软件中的地址空间,第一数据为旧版本的目标软件中的数据,第二数据为新版本的目标软件中的数据。为了方便描述,下文将第一地址空间信息指示的第一版本的目标软件中的地址空间简称为旧地址空间,将第二地址空间信息指示的新版本的目标软件中的地址空间简称为新地址空间,将第一数据简称为旧数据,将第二数据简称为新数据。
为了方便理解和描述,下文将第一版本所包含的第一地址空间称为旧地址空间,将第二版本所包含的第二地址空间称为新地址空间,将第一地址空间内存储的数据(即本申请的第一数据)称为旧数据,将第二地址空间内存储的数据(即本申请的第二数据)称为新数据。
本申请实施例中的指令类型包括但不限于下列类型中的一种或多种:
忽略指令、移位指令、增加指令、删除指令、替换指令。
接下来对上述各指令类型进行详细介绍:
1)忽略指令,用于指示该目标软件的新版本相对于旧版本相同的数据部分,其中,相同的数据部分由差分数据指示。可以理解为,对于忽略指令,对应的差分数据中包含的地址空间部分,新版本和旧版本是相同的。应理解的是,由于新版本和旧版本对于该部分 地址空间是相同的,因此,该部分地址空间可以称为旧地址空间,也可以称为新地址空间。
2)移位指令,用于指示将旧地址空间内的数据(即旧数据)转移至新地址空间。
3)增加指令,用于指示在旧版本中***新地址空间,以及该新地址空间存储的新数据。如前图4所示,增加指令用于指示在旧版本的目标软件(对应的软件代码)的基础上,增加或者说***新的地址空间,例如,***新的代码行以及新数据,示例性地,该新数据为在新***的地址空间所编辑的程序代码。
4)删除指令,用于指示将旧版本的旧地址空间删除,应理解的是,将旧地址空间删除是指删除该旧地址空间存储的旧数据。如前图4所示,由版本号V2的目标软件生成版本号V3的目标软件时,删除第2行的代码,应理解的是,删除完成后,原旧版本的第3行变为第2行。
5)替换指令,用于指示将旧版本的旧地址空间内存储的旧数据替换为新数据。
上述为对差分操作指令的介绍,终端设备使用差分文件对目标软件进行升级时,按照各差分操作指令包含的差分数据和指令类型执行对应的差分操作,由此得到新版本的目标软件。
举例来说,如下表1所示,为本申请实施例提供的一差分升级包包含的各差分操作指令的具体示例。其中,表1中的行顺序表示该差分升级包包含的各差分操作指令的执行顺序。
表1
Figure PCTCN2020077294-appb-000001
需要说明的是,表1仅为举例,本申请实施例对于差分升级包内的差分操作指令包含的指令类型不作限定,例如,仅包含忽略指令、移位指令、增加指令、删除指令、替换指令中的一个,或包含上述指令中的部分,例如包含忽略指令和移位指令,或包含删除指令和替换指令,还可以包含上述指令中的全部,例如包含忽略指令、移位指令、增加指令、删除指令和替换指令。
由表1第一行可知,差分操作指令1中忽略指令对应的差分数据中,旧地址空间为1~100代码行,意味着新版本的目标软件相对于旧版本的目标软件的第1~100代码行没有变化,也就是,新版本的目标软件与旧版本的目标软件的软件代码中第1~100代码行是相同的。
由表1第二行可知,差分操作指令2中移位指令对应的差分数据中,旧地址空间为101~102代码行,新地址空间为201~202代码行,则终端设备在执行该差分操作指令对应的差分操作为,将旧版本的目标软件中的软件代码的第101~102代码行(第101~102代码行的程序代码)转移至第201~220代码行。
由表1第三行可知,差分操作指令3中增加指令对应的差分数据中,新地址空间为300代码行,则终端设备在执行该差分操作指令对应的差分操作为,在目标软件中的软件代码中***行位为300的新的代码行,该代码行的数据为yyyy。可以理解的是***新的代码行后,旧版本中的第300行变为新版本的第301行。
由表1第四行可知,差分操作指令4中删除指令对应的差分数据中,旧地址空间为400代码行,则终端设备在执行该差分操作指令对应的差分操作为,将旧地址空间的第400代码行删除,删除的具体数据为该第400代码行存储的数据为cccc。
由表1第五行可知,差分操作指令5中替换指令对应的差分数据中,旧地址空间为500代码行,则终端设备在执行该差分操作指令对应的差分操作为,将旧地址空间的第500代码行的程序代码由aaaaa替换为bbbb。
终端设备依次执行上述表1所示的差分操作指令1~5对应的差分操作,便得到新版本的目标软件,即将目标软件由当前的旧版本升级为新版本。综上,终端设备使用表1所示的差分升级包对目标软件进行升级的过程为:
步骤1:将第101~102代码行(程序代码)转移至第201~202代码行;
步骤2:在第300代码行***一新的代码行,该代码行的数据为yyyy;
步骤3:删除第400代码行,应理解的是,删除第400代码行是指删除该第400代码行的数据cccc;
步骤4:将当前版本的目标软件的第500代码行的数据bbbb,替换为数据aaaaa。
其中,对于忽略指令,可以理解为对目标软件不进行修改,因此在上述步骤中未体现。
如上介绍了差分升级包,以及终端设备使用差分升级包对目标软件进行升级的过程,图5为本申请实施例提供的根据差分升级包生成差分回滚包的一种场景示意图,接下来结合图5所示的场景,介绍终端设备根据差分升级包生成差分回滚包的过程:
首先对差分升级包的内容进行解析,得到如表1所示的按执行顺序由前至后排列的各差分操作指令,之后按照由后至前的顺序对各差分操作指令进行重新排列,并将各差分操作指令替换为该差分操作指令对应的逆差分操作指令,以生成差分回滚包。使用该差分回滚包对新版本的目标软件进行回滚,可以回滚到该目标软件的旧版本。
其中,差分操作指令对应的逆差分操作指令是指执行完该差分操作指令对应的第一差分操作后,再执行该逆差分操作指令对应的第二差分操作,则可以回滚到未执行第一差分操作时目标软件(对应的软件代码)的状态。
举例来说,假设,差分操作指令为将第一地址空间的数据转移至第二地址空间,则该差分操作指令对应的逆指令为将第二地址空间的数据转移至第一地址空间。
需要说明的是,由于忽略指令对回滚没有影响,并且忽略指令对应的逆差分操作指令也为忽略指令,因此,忽略指令在差分升级包和/或差分回滚包中可以为任意执行次序,或者,在差分升级包以及差分回滚包中也可以不体现该差分操作指令,本申请实施例对此不作限定。
如表2所示,为表1所示的差分升级包对应的差分回滚包的具体示例。该差分回滚包包含5个差分操作指令,表2中的每一行用于表示一个差分操作指令,与差分升级包类似,各差分操作指令可包含指令类型和差分数据。需说明的是,表2中的行顺序表示该差分回滚包包含的各差分操作指令的执行顺序。
表2
Figure PCTCN2020077294-appb-000002
本申请实施例中终端设备使用表2所示的差分回滚包对目标软件进行回滚的过程为:
步骤1:将当前版本的目标软件的第500代码行的数据(程序代码)aaaaa,替换为数据bbbb;
步骤2:在第400代码行***一新的代码行,该代码行的数据为xxxx;
步骤3:删除第300代码行,应理解的是,删除第300代码行是指删除该第300代码行的数据yyyy;
步骤4:将第201~202代码行转移至第101~102代码行;
如前所述,对于忽略指令,可以理解为对目标软件不进行修改,因此在上述步骤中未体现。
如上,终端设备使用差分回滚包对目标软件进行回滚后,便可将目标软件由新版本回滚为旧版本。
需要说明的是,本申请实施例的***中,可生成差分回滚包的设备有多种,生成差分回滚包的方式也有多种,下面举例说明:
生成方式一:由软件开发设备生成;
软件开发设备基于上文所述方式使用差分升级包生成差分回滚包,并将差分回滚包发送至升级服务器,由升级服务器存储。
示例性地,终端设备可以在下载差分升级包时,将差分回滚包也进行下载,当使用差分升级包对目标软件进行升级后,若存在回滚需求,则直接使用已下载好的差分回滚包对目标软件进行回滚。该方式能够更加及时、快速的响应目标软件的回滚需求,缩短响目标软件回滚到旧版本所需的时间。
作为另一种示例,终端设备也可以在检测到目标软件具有到回滚需求时,再从升级服务器下载目标软件的差分回滚包。该方式能够避免差分回滚包长时间占用终端设备的存储空间。
具体地,对于目标软件的回滚需求,在不同场景有不同的类型,下面列举两种:
类型一:终端设备对目标软件存在的回滚需求;
示例地的,可以是目标软件在升级完成后,若终端设备检测到目标软件存在回滚需求,例如目标软件运行不正常,例如无法启动目标软件,或目标软件存在闪退情况,或目标软件存在bug,比如目标软件不能响应用户操作等等,则终端设备可以触发对目标软件进行回滚,例如,目标软件生成回滚指令,该回滚指令指示对目标软件进行回滚操作,示例性 地,该回滚指令携带目标软件的标识例如应用程序名称,以及目标软件需要回滚到的版本的版本号,该版本号与目标软件的差分回滚包可以相同,也可以通过预设对应关系确定。
类型二:用户对目标软件存在的回滚需求;
目标软件升级完成后,若用户希望目标软件回退至上一版本(旧版本),例如,某些软件不同的版本所具有的功能不同,升级后的新版本目标软件不再具有该用户经常使用的功能,此时用户可以触发终端设备进行回滚,例如,用户控制终端设备安装目标软件的旧版本的完整安装文件,或终端设备具有回滚功能按键,该回滚功能按键可以选择待回滚的软件,用户通过操作该功能按键,触发终端设备对目标软件进行回滚。
上述回滚需求仅为举例,本申请实施例对此不作限定。
生成方式二:由终端设备生成;
终端设备从升级服务器下载差分升级包,根据差分升级包生成差分回滚包。一种可实现的方式为,终端设备在使用差分升级包对目标软件进行升级之前,使用差分升级包生成差分回滚包,并存储该差分回滚包,在使用差分升级包对目标软件升级完成后,若检测到目标软件具有回滚需求时,可以使用该差分回滚包对目标软件进行回滚。
另一种可实现的方式为,终端设备将差分升级包进行备份,在使用差分升级包对目标软件升级完成后,若检测到目标软件具有回滚需求时,在使用备份的差分升级包生成差分回滚包,并使用生成的差分回滚包对目标软件进行回滚。可选的,终端设备还可以不对差分升级包进行备份,可以在检测到目标软件具有回滚需求时,从升级服务器下载差分升级包。
需要说明的是,本申请实施例适用的差分升级包的形式有多种,针对不同形式的差分升级包,在使用差分升级包生成差分回滚包的具体方式也可能不同,下面举例说明:
形式一:差分数据包含旧地址空间、旧数据、新地址空间和新数据;
请参阅上文的表1所示,差分升级包的差分数据包含旧版本的地址空间、旧数据以及新版本的地址空间和新数据。
由于该差分升级包所包含的数据完整,针对该形式的差分升级包,终端设备可以直接根据该差分升级包生成差分回滚包。具体生成方式可以参见上文的相关描述,此处不再赘述。
形式二:差分数据不包含旧数据;
以表1为例,表1所示的差分升级包所包含的数据是完整的,作为一种示例,该差分升级包的差分还可以不包含旧数据,如表3所示,为表1所示的差分升级包不包含旧数据的形式。
表3
Figure PCTCN2020077294-appb-000003
表3仅为示例,当差分升级包不包含旧数据时,表3中还可以删除旧数据这一列。
可以看出,表3所示的差分升级包不影响对目标软件进行升级的差分操作,但由于该形式的差分升级包包含的数据是不完整的,终端设备无法根据该差分升级包直接生成差分回滚包,因此,为了能够完善差分升级包,终端设备可以自行获取除忽略指令之外的差分指令对应的差分数据指示的旧地址空间存储的差分数据,以对该差分升级包或表3进行补充,并使用补充后的差分升级包或表3生成差分回滚包。
下面以终端设备为ECU为例,升级服务器为OTA云端服务器为例,通过具体实施例对本申请技术方案进行举例说明。
图6为本申请实施例提供的一种汽车进行软件升级以及软件版本回滚的***架构示意图。该***包括软件开发设备、OTA云端服务器和ECU。
下面结合图6所示的场景和实施例1~3对ECU实现软件版本回滚的过程进行说明。
【实施例1】
实施例1的流程可以包括:
步骤1:软件开发设备生成目标软件的差分升级包;
示例性地,软件开发设备生成差分升级包的过程包括:对目标软件的新版本和旧版本进行比较,并基于本申请实施例方式生成差分升级包,该差分升级包内的差分数据除新地址空间、旧地址空间和旧数据之外,还可包含旧数据。例如,该差分升级包包含指令类型为删除的差分操作指令,则该差分操作指令除包含待删除的旧地址空间之外,还可以包含该旧地址空间所存储的数据,即旧数据。
再示例性地,软件开发设备生成差分升级包的过程包括:对目标软件的新版本和旧版本进行比较,并利用现有机制生成差分升级包。需要说明的是,利用现有机制生成的差分升级包不包括旧数据,即该差分升级包的形式为形式二,因此,软件开发设备还可以对该差分升级包增加旧数据,得到形式一的差分升级包,以实现终端设备可以直接根据差分升级包生成差分回滚包。
步骤2:软件开发设备将该差分升级包发送至OTA服务器;
可选的,软件开发设备还可以集成于OTA服务器上,若软件开发设备集成于OTA服务器时,步骤2为可选的步骤,不是必须执行的步骤。
步骤3:ECU从OTA服务器下载目标软件的差分升级包;
步骤4:ECU根据差分升级包生成差分回滚包;
步骤5:ECU使用该差分升级包对目标软件进行升级,得到新版本软件;
步骤6:在检测到目标软件具有回滚需求时,ECU使用差分回滚包对目标软件进行回滚,得到旧版本软件。
步骤7:ECU安装旧版本软件,替换新版本软件。
需要说明的是,上述步骤4仅为举例,差分回滚包还可以是ECU在检测到目标软件有回滚需求后生成的。下面通过实施例2对该方式的流程进行介绍。
【实施例2】
该实施例2的流程可以包括:
步骤1:软件开发设备生成目标软件的差分升级包;
步骤2:软件开发设备将该差分升级包发送至OTA服务器;
步骤3:ECU从OTA服务器下载目标软件的差分升级包;
步骤4:ECU判断该差分升级包是否包含旧数据(即差分升级包的形式是否为上文介绍的形式一),若包含,则对差分升级包进行备份;若不包含,则ECU基于该目标软件当前运行的版本,获取差分升级包包含的差分操作指令对应的旧数据,并增加至差分升级包中,并对增加旧数据后的差分升级包进行备份。具体增加旧数据的方式,请参见上文的相关描述,此处不再赘述。
步骤5:ECU使用该差分升级包对目标软件进行升级,得到新版本软件;
步骤6:在检测到目标软件具有回滚需求时,ECU根据备份的差分升级包生成差分回滚包,并使用该差分回滚包对目标软件进行回滚,得到旧版本软件。
步骤7:ECU安装旧版本软件,替换新版本软件。
上述实施例1和实施例2是由ECU生成差分回滚包,本申请还可以通过软件开发设备生成差分回滚包,接下来通过实施例3对由软件开发设备生成差分回滚包时,ECU进行目标软件的软件版本回滚流程进行介绍:
【实施例3】
该实施例3的流程可以包括:
步骤1:软件开发设备生成目标软件的差分升级包和差分回滚包;
步骤2:软件开发设备将该差分升级包和差分回滚包发送至OTA服务器;
步骤3:ECU从OTA服务器下载目标软件的差分升级包和差分回滚包;
步骤4:ECU使用该差分升级包对目标软件进行升级,得到新版本软件;
步骤5:在检测到目标软件具有回滚需求时,ECU使用差分回滚包对目标软件进行回滚,得到旧版本软件。
对于实施例1-实施例3中的ECU可以是安装有目标软件的ECU,也可以是其他ECU。例如,安装有该目标软件的ECU具有与OTA升级服务器进行通信交互的能力时,则该ECU可以直接从OTA服务器下载目标软件的差分升级包和差分回滚包;或者还可以通过具有与OTA升级服务器进行通信交互能力的其他ECU下载目标软件的差分升级包和差分回滚包后,发送给安装有该目标软件的ECU,本申请实施例对此不作限定。
请参阅图7,图7为本申请实施例提供的另一种汽车进行软件升级以及软件版本回滚的***架构示意图。该***包括软件开发设备、OTA云端服务器和ECU master和ECU slave(从属节点)。
其中,ECU master,是指作为主控节点的ECU,用于监测以及集中控制ECU slave升级的节点,主要负责集中控制整车升级,整车升级时,ECU master从OTA下载整车升级所需要的整车软件升级包,该整车软件升级包包含ECU master和各ECU slave对应的差分升级包,ECU master可以对该整车软件升级包进行拆分,并将拆分后得到的各差分升级包发送给对应的ECU slave。
ECU slave,为ECU master的从属节点,本身可以具有与OTA云端服务器进行通信交互的能力,例如,ECU slave上某个软件需要进行升级时,若该ECU slave具有与OTA云端服务器进行通信交互的能力,则可以由该ECU slave自行从OTA服务器下载该软件的差分升级包,对该软件进行升级。或者,也可以由ECU master控制管理自身的软件升级。例如,ECU master监测到OTA云端服务器发布了某ECU slave上安装的软件的新版本的软件升级包后,从OTA云端服务器下载该软件的新版本的软件升级包,并发送给该ECU slave。
本申请实施例中,ECU master和ECU slave都可以根据差分升级包生成差分回滚包, 并且ECU master和ECU slave都可以与OTA进行通信,进行文件下载,也可以是ECU master负责ECU slave上的软件升级,由ECU master从OTA下载ECU slave上安装的目标软件的差分升级包和/或差分回滚包后发送给ECU slave。
下面结合图7所示的场景和实施例4~6对ECU实现软件版本回滚的过程进行说明。
【实施例4】
该实施例4的流程可以包括:
步骤1:软件开发设备生成目标软件的差分升级包;
步骤2:软件开发设备将该差分升级包发送至OTA服务器;
步骤3:ECU master从OTA服务器下载整车软件升级包;
步骤4:ECU master对整车软件升级包进行拆分,根据拆分得到的各差分升级包生成差分回滚包,并把同一软件的差分升级包和差分回滚包发送至对应的ECU slave。
步骤5:ECU slave分别使用各自的差分升级包对各自的目标软件进行升级,得到新版本软件,替换旧版本软件。
步骤6:ECU slave在检测到目标软件具有回滚需求时,使用差分回滚包对目标软件进行回滚,得到旧版本软件。
【实施例5】
该实施例5的流程可以包括:
步骤1:软件开发设备生成目标软件的差分升级包;
步骤2:软件开发设备将该差分升级包发送至OTA服务器;
步骤3:ECU master从OTA服务器下载整车软件升级包;
步骤4:ECU master对整车软件升级包进行拆分,将拆分得到的各差分升级包发送至对应的ECU slave。
步骤5:ECU slave接收来自ECU master的差分升级包,并利用该差分升级包生成差分回滚包;
步骤6:ECU slave分别使用各自的差分升级包对各自的目标软件进行升级,得到新版本软件,替换旧版本软件。
步骤6:ECU slave在检测到目标软件具有回滚需求时,使用差分回滚包对目标软件进行回滚,得到旧版本软件。
【实施例6】
该实施例5的流程可以包括:
步骤1:软件开发设备生成目标软件的差分升级包;
步骤2:软件开发设备将该差分升级包发送至OTA服务器;
步骤3:ECU master从OTA服务器下载整车软件升级包;
步骤4:ECU master对整车软件升级包进行拆分,将拆分得到的各差分升级包发送至对应的ECU slave。
步骤5:ECU slave接收来自ECU master的差分升级包,并判断该差分升级包是否包含旧数据,若包含,则对该差分升级包进行备份;若不包含,则对该差分升级包进行备份后,对备份的差分升级包增加旧数据;
需要说明的是,步骤5仅为举例,ECU slave还可以在判断差分升级包是否包含旧数据之前,对该差分升级包进行备份,即ECU slave可以通过两个进程,分别执行判断操作 和备份操作,以减少备份时延,本申请实施例对判断操作和备份操作不作限定。
步骤6:ECU slave分别使用各自的差分升级包对各自的目标软件进行升级,得到新版本软件,替换旧版本软件。
步骤6:ECU slave在检测到目标软件具有回滚需求时,利用备份的差分升级包生成差分回滚包,并使用差分回滚包对目标软件进行回滚,得到旧版本软件。
需要说明的是,实施例4仅为举例,当进行整车升级时,也可以应用上述实施例1-实施3所示的方法。示例性地。对于步骤1,可以由软件开发设备生成整车软件回滚包,示例性地,通过软件开发设备根据需要整车升级的各软件的差分升级包生成差分回滚包,并把各软件的差分回滚包打包为整车软件回滚包存储于OTA服务器。ECU master也可以备份各软件的差分升级包或整车软件升级包,在检测到ECU slave存在软件版本回滚需求后,使用备份的所述软件的差分升级包生成差分回滚包,并将该差分回滚包发送给ECU slave,具体请参见上文的相关描述,此处不再赘述。
上述各实施例所介绍的软件版本回滚的方式,汽车内不需要备份旧版本软件的完整安装文件,只需要存储体积远小于旧版本软件的完整安装文件的差分升级包,节省了存储空间。当发现目标软件具有回滚需求时,不需要重新去OTA云服务器侧下载旧版本软件的完整安装文件,可以直接根据本申请实施例提供的方法,根据差分升级包生成为差分回滚包,便可以进行及时的回滚,缩短了回滚时间。并且生成差分回滚包的方式更加简单快速,计算开销小。
与上述构思相同,如图8所示,本申请实施例还提供一种装置800用于实现上述方法中终端设备的功能。例如,该装置可以为软件模块或者芯片***。本申请实施例中,芯片***可以由芯片构成,也可以包含芯片和其他分立器件。该装置800可以包括:处理模块801和通信模块802。
本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。另外,在本申请各个实施例中的各功能模块可以集成在一个处理器中,也可以是单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
示例性地,当该装置800实现图2所示的流程中终端设备的功能时,通信模块802,用于获取目标软件的差分升级包;其中,所述差分升级包包含至少一个差分操作指令,所述差分操作指令用于指示目标软件的第一版本和待升级的第二版本之间的差异。
处理模块801,用于使用所述差分升级包对所述目标软件的当前版本进行升级,所述目标软件的当前版本由第一版本升级至第二版本;还用于检测到所述目标软件存在回滚需求时,使用所述差分升级包对所述目标软件执行回滚,令所述目标软件的当前版本回滚为所述第一版本。
在一种可能的设计中,所述差分升级包包含至少一个差分操作指令,所述差分操作指令包含指令类型以及差分数据;所述差分数据包含第一版本中的第一地址空间和/或第一地址空间内存储的第一数据,以及第二版本中的第二数据和/或第二地址空间。
在一种可能的设计中,处理模块801还用于根据所述差分升级包生成差分回滚包;
其中,所述差分回滚包是,将所述差分升级包内排列的所述至少一个差分操作指令,按照预设顺序重新排列,并将重新排列后的各差分操作指令替换为所述差分操作指令对应的逆差分操作指令后,得到的;其中,所述差分操作指令对应的逆差分操作指令是指,在 根据所述差分操作指令执行第一差分操作后,再根据所述逆差分操作指令执行第二差分操作能够使所述目标软件的版本回滚至未执行所述第一差分操作前的状态;
处理模块801具体用于,使用所述差分回滚包对所述目标软件执行回滚。
在一种可能的设计中,所述指令类型包括下列指令中的一种或多种:忽略、移位、***、删除或替换。
在一种可能的设计中,所述差分操作指令的指令类型为移位时,所述差分操作指令用于指示将第一数据由第一地址空间移出至第二地址空间;所述第二地址空间为所述第一***中除第一地址空间之外的其他地址空间;所述差分操作指令对应的逆差分操作指令为,将所述第二地址空间的所述第一数据移回至所述第一地址空间。
在一种可能的设计中,所述差分操作指令的指令类型为***时,所述差分操作指令用于指示在第一***中增加第二地址空间,将所述差分操作指令包含的第二数据添加至所述第二地址空间;所述差分操作指令对应的逆差分操作指令为,删除所述第二地址空间。
在一种可能的设计中,所述差分操作指令的指令类型为删除时,所述差分操作指令用于指示删除第一地址空间以及所述第一地址空间内存储的第一数据;所述差分操作指令对应的逆差分操作指令为,增加第一地址空间,并将所述第一数据添加至所述第一地址空间。
在一种可能的设计中,所述差分操作指令的指令类型为替换时,所述差分操作指令用于指示将第一地址空间的第一数据替换为第二数据;所述差分操作指令对应的逆差分操作指令为,将所述第一地址空间的所述第二数据替换为所述第一数据。
在一种可能的设计中,所述终端设备为车载终端设备。
如图9所示为本申请实施例提供的装置900,图9所示的装置可以为图9所示的装置的一种硬件电路的实现方式。该通信装置可适用于实现图2所示出的流程图中,执行上述方法实施例中终端设备的功能。为了便于说明,图9仅示出了该通信装置的主要部件。
图9所示的装置900包括至少一个处理器920,用于实现本申请实施例提供的方法中终端设备的功能。
装置900还可以包括至少一个存储器930,用于存储程序指令和/或数据。存储器930和处理器920耦合。本申请实施例中的耦合是装置、单元或模块之间的间接耦合或通信连接,可以是电性,机械或其它的形式,用于装置、单元或模块之间的信息交互。处理器920可能和存储器930协同操作。处理器920可能执行存储器930中存储的程序指令。所述至少一个存储器中的至少一个可以包括于处理器中。
装置900还可以包括通信接口910,用于通过传输介质和其它设备进行通信,从而用于装置900中的装置可以和其它设备进行通信。在本申请实施例中,通信接口可以是收发器、电路、总线、模块或其它类型的通信接口。在本申请实施例中,收发器可以为独立的接收器、独立的发射器、集成收发功能的收发器、或者是接口电路。处理器920利用通信接口910收发数据,并用于实现图2对应的实施例中终端设备所执行的方法。
示例性地,当该装置900实现图2所示的流程中终端设备的功能时,通信接口910,用于获取目标软件的差分升级包;其中,所述差分升级包包含至少一个差分操作指令,所述差分操作指令用于指示目标软件的第一版本和待升级的第二版本之间的差异;作为一种示例,所述通信接口910可以直接与升级服务器交互数据,例如下载差分升级包和/差分回滚包。作为另一种示例,所述装置900可以通过其他设备获取数据,例如,所述装置900为ECU,所述ECU包含通信接口910,所述ECU可以通过T-BOX获取数据,所述T-BOX 可以与升级服务器进行数据交互,例如T-BOX从升级服务器下载差分升级包和/差分回滚包,所述ECU可以通过通信接口910获取T-BOX内下载的差分升级包和/差分回滚包,本申请实施例对此不作限定。
再示例性地,处理器920,用于使用所述差分升级包对所述目标软件的当前版本进行升级,由第一版本得到第二版本;检测到所述目标软件存在回滚需求时,使用所述差分升级包对所述目标软件执行回滚,令所述目标软件的当前版本回滚为所述第一版本。
处理器920和通信接口910执行的其它方法可以参考图2所示的方法流程中的描述,这里不再赘述。
基于以上实施例,本申请实施例还提供了一种软件版本回滚装置的实体装置,该装置为车载终端设备,所述装置用于实现以上各图中的软件版本回滚方法。参阅图10所示,所述装置1000包括:通信单元1001、ECU1002以及存储器1003。其中,所述通信单元1001、所述ECU 1002以及所述存储器1003之间相互连接。
可选的,所述通信单元1001、所述ECU 1002以及所述存储器1003之间通过总线1004相互连接。所述总线1004可以是CAN(控制器局域网)总线或以太网总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图10中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
通信单元1001,用于通过传输介质和其它设备进行通信,例如用于装置1000中的装置ECU 1002可以和其它设备进行通信。示例性地,所述通信单元1001可以是T-BOX(telematics BOX,远程信息处理器)。
存储器1003,用于存放程序指令和数据等。具体地,程序指令可以包括程序代码,该程序代码包括计算机操作指令。数据可以包括目标软件的差分升级包和/或差分回滚包。存储器1003可能包含随机存取存储器(random access memory,RAM),也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。
ECU1002,可以应用到车载终端设备内的具体部件或***上,在不同的部件或***上,ECU可以具有不同的名称,例如,电动机时的VCU,变速箱上的TCU,发动机上的EMS,车身控制BCM均可以由ECU实现,可选的,车载终端设备内不同的部件或***还可以集成到同一ECU中。ECU1002,执行存储器1003所存放的程序指令和数据,实现上述功能,从而实现上述实施例提供的软件版本回滚方法。所述通信单元1001、所述ECU 1002以及所述存储器1003执行的其它方法可以参考图2所示的方法流程中的描述,这里不再赘述。
需要说明的是,在本申请实施例中,处理器可以是通用处理器、数字信号处理器、专用集成电路、现场可编程门阵列或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件,可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。
在本申请实施例中,“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。其中,“多个”是指两个或两个以上。
在本申请实施例中,“示例的”一词用于表示作例子、例证或说明。本申请中被描述为“示例”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用示例的一词旨在以具体方式呈现概念。
可选地,本申请实施例提及“第一”、“第二”等序数词可以用于对多个对象进行区分,不用于限定多个对象的顺序、时序、优先级或者重要程度。例如,第一信息和第二信息,只是为了区分不同的信令,而并不是表示这两种信息的内容、优先级、发送顺序或者重要程度等的不同。
在本申请实施例中,存储器可以是非易失性存储器,比如硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD)等,还可以是易失性存储器(volatile memory),例如随机存取存储器(random-access memory,RAM)。存储器是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。本申请实施例中的存储器还可以是电路或者其它任意能够实现存储功能的装置,用于存储程序指令和/或数据。
本申请实施例提供的方法中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本发明实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、网络设备、用户设备或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,简称DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机可以存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如,数字视频光盘(digital video disc,简称DVD))、或者半导体介质(例如,SSD)等。
在本申请实施例中,在无逻辑矛盾的前提下,各实施例之间可以相互引用,例如方法实施例之间的方法和/或术语可以相互引用,例如装置实施例之间的功能和/或术语可以相互引用,例如装置实施例和方法实施例之间的功能和/或术语可以相互引用。
本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。

Claims (14)

  1. 一种软件版本回滚方法,其特征在于,包括:
    获取目标软件的差分升级包;其中,所述差分升级包包含至少一个差分操作指令,所述差分操作指令用于指示目标软件的第一版本和待升级的第二版本之间的差异;
    使用所述差分升级包对所述目标软件的当前版本进行升级,所述目标软件的当前版本由第一版本升级至第二版本;
    检测到所述目标软件存在回滚需求时,使用所述差分升级包对所述目标软件执行回滚,令所述目标软件的当前版本回滚为所述第一版本。
  2. 如权利要求1所述的方法,其特征在于,所述差分升级包包含至少一个差分操作指令,所述差分操作指令包含指令类型以及差分数据;所述差分数据包含第一版本中的第一地址空间和/或第一地址空间内存储的第一数据,以及第二版本中的第二数据和/或第二地址空间。
  3. 如权利要求2所述的方法,其特征在于,还包括:
    根据所述差分升级包生成差分回滚包;
    其中,所述差分回滚包是,将所述差分升级包内排列的所述至少一个差分操作指令,按照预设顺序重新排列,并将重新排列后的各差分操作指令替换为所述差分操作指令对应的逆差分操作指令后,得到的;其中,所述差分操作指令对应的逆差分操作指令是指,在根据所述差分操作指令执行第一差分操作后,再根据所述逆差分操作指令执行第二差分操作能够使所述目标软件的版本回滚至未执行所述第一差分操作前的状态;
    所述使用所述差分升级包对所述目标软件执行回滚,包括:
    使用所述差分回滚包对所述目标软件执行回滚。
  4. 如权利要求3所述的方法,其特征在于,所述指令类型包括下列指令中的一种或多种:忽略、移位、***、删除或替换。
  5. 如权利要求4所述的方法,其特征在于,所述差分操作指令的指令类型为移位时,所述差分操作指令用于指示将第一数据由第一地址空间移出至第二地址空间;所述第二地址空间为所述第一***中除第一地址空间之外的其他地址空间;
    所述差分操作指令对应的逆差分操作指令为,将所述第二地址空间的所述第一数据移回至所述第一地址空间。
  6. 如权利要求4或5所述的方法,其特征在于,所述差分操作指令的指令类型为***时,所述差分操作指令用于指示在第一***中增加第二地址空间,将所述差分操作指令包含的第二数据添加至所述第二地址空间;
    所述差分操作指令对应的逆差分操作指令为,删除所述第二地址空间。
  7. 如权利要求4-6任一项所述的方法,其特征在于,所述差分操作指令的指令类型为删除时,所述差分操作指令用于指示删除第一地址空间以及所述第一地址空间内存储的第一数据;
    所述差分操作指令对应的逆差分操作指令为,增加第一地址空间,并将所述第一数据添加至所述第一地址空间。
  8. 如权利要求4-7任一项所述的方法,其特征在于,所述差分操作指令的指令类型为替换时,所述差分操作指令用于指示将第一地址空间的第一数据替换为第二数据;
    所述差分操作指令对应的逆差分操作指令为,将所述第一地址空间的所述第二数据替换为所述第一数据。
  9. 一种软件版本回滚装置,其特征在于,包括:
    存储器,用于存储程序指令和数据;
    收发器,用于接收和发送信号;
    处理器,用于调用存储在所述存储器中的程序指令以执行如权利要求1-8中任一项所述的方法。
  10. 一种软件版本回滚装置,应用于车载终端设备,其特征在于,包括:电子控制单元ECU,远程通信单元和存储单元;
    所述存储器,用于存储程序指令和数据;
    所述收发器,用于接收和发送信号;
    所述ECU,用于调用存储在所述存储器中的程序指令以执行如权利要求1-8中任一项所述的方法。
  11. 一种计算机程序,其特征在于,当所述计算机程序在计算机上运行时,使得所述计算机执行如权利要求1-8任一项所述的方法。
  12. 一种计算机存储介质,其特征在于,所述计算机存储介质中存储有计算机程序,当所述计算机程序被计算机执行时,使得所述计算机执行权利要求1-8任一项所述的方法。
  13. 一种芯片,其特征在于,所述芯片用于读取存储器中存储的计算机程序,执行如权利要求1-8任一项所述的方法。
  14. 一种软件版本回滚***,其特征在于,包括:升级服务器、软件版本回滚装置;
    所述升级服务器,用于向所述软件版本回滚装置发送差分升级包;
    所述软件版本回滚装置,用于从升级服务器获取目标软件的差分升级包;并使用所述差分升级包对所述目标软件的当前版本进行升级,所述目标软件的当前版本由第一版本升级至第二版本;在检测到所述目标软件存在回滚需求时,使用所述差分升级包对所述目标软件执行回滚,令所述目标软件的当前版本回滚为所述第一版本;其中,所述差分升级包包含至少一个差分操作指令,所述差分操作指令用于指示目标软件的第一版本和待升级的第二版本之间的差异。
PCT/CN2020/077294 2020-02-28 2020-02-28 一种软件版本回滚方法、装置及*** WO2021168840A1 (zh)

Priority Applications (5)

Application Number Priority Date Filing Date Title
CN202080002270.XA CN113574839B (zh) 2020-02-28 2020-02-28 一种软件版本回滚方法、装置及***
JP2022551726A JP7419557B2 (ja) 2020-02-28 2020-02-28 ソフトウェアバージョンロールバックの方法、装置、およびシステム
PCT/CN2020/077294 WO2021168840A1 (zh) 2020-02-28 2020-02-28 一种软件版本回滚方法、装置及***
EP20920851.1A EP4099655A4 (en) 2020-02-28 2020-02-28 METHOD, APPARATUS, AND SYSTEM FOR SOFTWARE VERSION ROLLING BACK
US17/896,677 US20230004381A1 (en) 2020-02-28 2022-08-26 Software version rollback method, apparatus, and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/077294 WO2021168840A1 (zh) 2020-02-28 2020-02-28 一种软件版本回滚方法、装置及***

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/896,677 Continuation US20230004381A1 (en) 2020-02-28 2022-08-26 Software version rollback method, apparatus, and system

Publications (1)

Publication Number Publication Date
WO2021168840A1 true WO2021168840A1 (zh) 2021-09-02

Family

ID=77490641

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/077294 WO2021168840A1 (zh) 2020-02-28 2020-02-28 一种软件版本回滚方法、装置及***

Country Status (5)

Country Link
US (1) US20230004381A1 (zh)
EP (1) EP4099655A4 (zh)
JP (1) JP7419557B2 (zh)
CN (1) CN113574839B (zh)
WO (1) WO2021168840A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115361428A (zh) * 2022-10-21 2022-11-18 北京鼎轩科技有限责任公司 一种远程控制方法和分级***
CN115495373A (zh) * 2022-10-08 2022-12-20 深圳市华曦达科技股份有限公司 基于Android***的自动化升级测试方法及装置
CN115756561A (zh) * 2022-10-14 2023-03-07 广州汽车集团股份有限公司 软件升级方法、装置、计算机设备以及存储介质

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2022109039A (ja) * 2021-01-14 2022-07-27 トヨタ自動車株式会社 センタ、更新管理方法及び更新管理プログラム
KR20220132864A (ko) * 2021-03-24 2022-10-04 현대자동차주식회사 차량 및 차량 제어 방법
JP2022187189A (ja) * 2021-06-07 2022-12-19 トヨタ自動車株式会社 Otaマスタ、センタ、システム、方法、プログラム、及び車両
CN114710407A (zh) * 2022-01-28 2022-07-05 锐捷网络股份有限公司 分布式***软件版本升级方法及装置

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1726476A (zh) * 2002-10-31 2006-01-25 松下电器产业株式会社 数据更新***、用于数据更新***的差分数据创建设备和程序、更新后文件恢复设备和程序
CN101420431A (zh) * 2008-11-28 2009-04-29 中兴通讯股份有限公司 Fota服务器、终端及其软件版本的处理方法和***
CN102609328A (zh) * 2012-01-29 2012-07-25 华为终端有限公司 ***差分升级方法和装置、移动终端
CN105897863A (zh) * 2016-03-28 2016-08-24 努比亚技术有限公司 移动终端版本升级回退方法及装置
CN106325892A (zh) * 2015-06-15 2017-01-11 中兴通讯股份有限公司 差分回退升级方法及装置
US20180276087A1 (en) * 2016-09-27 2018-09-27 International Business Machines Corporation Rebuild rollback support in distributed sds systems
CN109804355A (zh) * 2016-10-14 2019-05-24 日立汽车***株式会社 软件更新装置、软件更新方法、软件更新***
CN110321254A (zh) * 2019-07-09 2019-10-11 西安点告网络科技有限公司 软件版本回滚方法、装置、服务器及存储介质

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030182414A1 (en) * 2003-05-13 2003-09-25 O'neill Patrick J. System and method for updating and distributing information
US7664984B2 (en) * 2002-10-09 2010-02-16 Xpoint Technologies, Inc. Method and system for updating a software image
WO2005119432A2 (en) * 2004-06-01 2005-12-15 Red Bend Ltd Method and system for in-place updating content stored in a storage device
US8972967B2 (en) * 2011-09-12 2015-03-03 Microsoft Corporation Application packages using block maps
EP2881858B1 (de) * 2013-12-09 2016-04-06 dSPACE digital signal processing and control engineering GmbH Verfahren zur Änderung der Software im Speicher eines elektronischen Steuergerätes
US9535688B2 (en) * 2014-07-23 2017-01-03 Verizon Patent And Licensing Inc. Efficient deployment of application revisions and implementation of application rollbacks across multiple application servers
CN106293793A (zh) * 2015-06-02 2017-01-04 西安中兴新软件有限责任公司 一种终端的软件升级方法、装置和***
US9836300B2 (en) * 2015-06-16 2017-12-05 Lear Corporation Method for updating vehicle ECUs using differential update packages
US10496398B2 (en) * 2017-07-25 2019-12-03 Aurora Labs Ltd. Hot updates to ECU software using tool chain
US10834207B2 (en) * 2018-02-27 2020-11-10 Excelfore Corporation System and method for updating software in an electronic device
CN110502317B (zh) * 2018-05-16 2024-03-01 北京京东尚科信息技术有限公司 一种事务管理的方法和装置
US11237820B2 (en) 2018-05-29 2022-02-01 Nordic Semiconductor Asa Delta file with reversing data
WO2020032200A1 (ja) * 2018-08-10 2020-02-13 株式会社デンソー センター装置,諸元データの生成方法及び諸元データ生成用プログラム
JP7024765B2 (ja) 2018-08-10 2022-02-24 株式会社デンソー 車両用マスタ装置、更新データの配信制御方法及び更新データの配信制御プログラム
US11556326B2 (en) * 2018-09-06 2023-01-17 Arm Limited Methods for performing a rollback-capable software update at a device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1726476A (zh) * 2002-10-31 2006-01-25 松下电器产业株式会社 数据更新***、用于数据更新***的差分数据创建设备和程序、更新后文件恢复设备和程序
CN101420431A (zh) * 2008-11-28 2009-04-29 中兴通讯股份有限公司 Fota服务器、终端及其软件版本的处理方法和***
CN102609328A (zh) * 2012-01-29 2012-07-25 华为终端有限公司 ***差分升级方法和装置、移动终端
CN106325892A (zh) * 2015-06-15 2017-01-11 中兴通讯股份有限公司 差分回退升级方法及装置
CN105897863A (zh) * 2016-03-28 2016-08-24 努比亚技术有限公司 移动终端版本升级回退方法及装置
US20180276087A1 (en) * 2016-09-27 2018-09-27 International Business Machines Corporation Rebuild rollback support in distributed sds systems
CN109804355A (zh) * 2016-10-14 2019-05-24 日立汽车***株式会社 软件更新装置、软件更新方法、软件更新***
CN110321254A (zh) * 2019-07-09 2019-10-11 西安点告网络科技有限公司 软件版本回滚方法、装置、服务器及存储介质

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115495373A (zh) * 2022-10-08 2022-12-20 深圳市华曦达科技股份有限公司 基于Android***的自动化升级测试方法及装置
CN115756561A (zh) * 2022-10-14 2023-03-07 广州汽车集团股份有限公司 软件升级方法、装置、计算机设备以及存储介质
CN115361428A (zh) * 2022-10-21 2022-11-18 北京鼎轩科技有限责任公司 一种远程控制方法和分级***

Also Published As

Publication number Publication date
EP4099655A4 (en) 2023-02-15
JP7419557B2 (ja) 2024-01-22
US20230004381A1 (en) 2023-01-05
EP4099655A1 (en) 2022-12-07
CN113574839A (zh) 2021-10-29
CN113574839B (zh) 2024-04-09
JP2023515997A (ja) 2023-04-17

Similar Documents

Publication Publication Date Title
WO2021168840A1 (zh) 一种软件版本回滚方法、装置及***
US10782955B2 (en) Pre-shutdown swap verification
US10963241B2 (en) Control apparatus, program update method, and computer program
US10630538B2 (en) Software update method and apparatus for vehicle
US11061659B2 (en) Control apparatus, transfer method, and computer program
EP4044024A1 (en) Software upgrade method, apparatus and system
CN111061499A (zh) 一种基于文件***的ecu更新方法及***
WO2022061804A1 (zh) 一种数据传输***、数据传输方法,智能车以及装置
WO2023241458A1 (zh) 车载控制器的软件升级方法、装置、设备和存储介质
KR20200075626A (ko) 차량의 ecu 업데이트가 가능한 무선 업데이트 시스템 및 방법
CN115857985A (zh) 一种座舱升级***、运行方法及存储介质
CN115225492A (zh) 一种远程升级方法及***
CN115136122A (zh) 主装置、数据分发***以及更新控制程序
US20230259354A1 (en) Program management device, program management method, and recording medium
WO2022205200A1 (zh) 一种版本管理方法和装置
CN115277671A (zh) 车辆的ota升级方法、装置、车辆及存储介质
CN115145601A (zh) 一种基于整车以太网架构的ota升级方法
CN110677466A (zh) 应用程序的下载方法、装置、网关和存储介质
CN113162796A (zh) 一种设备更新方法、装置及设备更新***
JP2023503288A (ja) デジタルシステムを更新するための方法
JP7239025B2 (ja) センター装置及び車両情報通信システム
US20240028326A1 (en) Vehicular electronic control device, rewriting program, and data structure
JP7484814B2 (ja) 車両用電子制御装置及び更新プログラム
CN115987964B (zh) 一种整车fota升级***及方法
CN116319745A (zh) 应用资源下载方法、装置、车机、车辆及存储介质

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: 20920851

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2022551726

Country of ref document: JP

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2020920851

Country of ref document: EP

Effective date: 20220831

NENP Non-entry into the national phase

Ref country code: DE