Over-the-air upgrading method and device, electronic equipment and storage medium

By determining the partition upgrade area based on the current and latest version files in OTA upgrade, and building a smaller image file, the problem of large OTA upgrade package size is solved and the upgrade efficiency is improved.

CN119938112APending Publication Date: 2025-05-06GREAT WALL MOTOR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311447869.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-01
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

The image files of the partitions in the existing OTA upgrade package cover the entire partition, resulting in a large size of the upgrade package and affecting the upgrade efficiency.

Method used

By receiving the upgrade request sent by the target device, determine the upgrade area of ​​the partition based on the current version number and the latest version number file, and determine the image file based on the region and the latest version file, thereby building a smaller upgrade package.

Benefits of technology

It effectively reduces the size of the partition's image file, shortens the download and refresh time of upgrade packages, and improves the efficiency of over-the-air download and upgrade.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119938112A_ABST
    Figure CN119938112A_ABST
Patent Text Reader

Abstract

The invention provides an over-the-air upgrade method and device, electronic equipment and a storage medium, the over-the-air upgrade method comprises the following steps: receiving an upgrade request sent by target equipment for upgrading N partitions, the upgrade request carrying a current version number corresponding to each partition; for each partition in the N partitions, determining an upgrade area corresponding to the partition according to a first file corresponding to the current version number and a second file corresponding to the latest version of the partition, and determining a mirror image file corresponding to the partition according to the upgrade area corresponding to the partition and the second file; and according to the mirror image file corresponding to each partition in the N partitions, determining an upgrade package corresponding to the N partitions, and sending the upgrade package to the target device. According to the method and the device, the mirror image file can be determined based on the upgrading area and the file corresponding to the latest version, and the size of the mirror image file of the partition can be reduced, so that the downloading duration and the flashing duration of the upgrading package are shortened, and the over-the-air downloading upgrading efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to an over-the-air download upgrade method, device, electronic device and storage medium. Background Art

[0002] Over the Air (OTA) technology is a technology for downloading data through a wireless network. It has been widely used in the upgrade of vehicles, televisions, mobile phones, tablet computers, set-top boxes and other devices. OTA technology mainly performs automatic upgrades by downloading OTA upgrade packages (it also supports upgrading by copying OTA upgrade packages to SD cards). OTA upgrades are fast and have little impact on data, so OTA upgrades have become the main way to upgrade terminal functions. For example, for vehicles, vehicle manufacturers (Original Equipment Manufacturer, OEM, or original equipment manufacturer) upgrade related hardware or software of vehicles through OTA technology, which is beneficial for manufacturers to reduce recall costs, respond to needs quickly, and improve user experience.

[0003] The image file of the partition in the existing OTA upgrade package fills the entire partition. The size of the OTA upgrade package directly affects the upgrade efficiency, especially the upgrade package flashing time and the upgrade package downloading time. In view of this, a solution that can reduce the size of the OTA upgrade package and thus improve the upgrade efficiency needs to be developed urgently. Summary of the invention

[0004] The embodiments of the present application provide an over-the-air upgrade method, device, electronic device and storage medium to solve the problem of how to improve the upgrade efficiency of OTA upgrade.

[0005] In a first aspect, an embodiment of the present application provides an over-the-air download upgrade method, the method comprising:

[0006] Receiving an upgrade request for upgrading N partitions sent by a target device, wherein the upgrade request carries a current version number corresponding to each of the N partitions, where N is an integer greater than or equal to 1;

[0007] For each of the N partitions, determining an upgrade area corresponding to the partition according to a first file corresponding to the current version number and a second file corresponding to the latest version of the partition;

[0008] For each of the N partitions, determining the image file corresponding to the partition according to the upgrade area corresponding to the partition and the second file;

[0009] According to the image file corresponding to each of the N partitions, an upgrade package corresponding to the N partitions is determined, and the upgrade package is sent to the target device.

[0010] In a second aspect, an embodiment of the present application further provides an over-the-air download upgrade device, the device comprising:

[0011] A receiving module, configured to receive an upgrade request for upgrading N partitions sent by a target device, wherein the upgrade request carries a current version number corresponding to each of the N partitions, wherein N is an integer greater than or equal to 1;

[0012] A first determination module is used to determine, for each of the N partitions, an upgrade area corresponding to the partition according to a first file corresponding to the current version number and a second file corresponding to the latest version of the partition;

[0013] A second determination module is used to determine, for each of the N partitions, the image file corresponding to the partition according to the upgrade area corresponding to the partition and the second file.

[0014] The first sending module is used to determine the upgrade package corresponding to the N partitions according to the image file corresponding to each partition in the N partitions, and send the upgrade package to the target device.

[0015] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the above-mentioned over-the-air upgrade method when executed by the processor.

[0016] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned over-the-air download upgrade method is implemented.

[0017] The embodiments of the present application include at least the following technical effects:

[0018] The technical solution of the embodiment of the present application, when an upgrade request for upgrading N partitions is received from a target device, for each of the N partitions, an upgrade area of ​​the partition is determined according to a first file corresponding to the current version number of the partition and a second file corresponding to the latest version, and a mirror file for upgrading the partition is determined according to the obtained upgrade area and second file, and then the upgrade packages corresponding to the N partitions are determined and sent to the target device. The upgrade area corresponding to the partition can be determined based on the file corresponding to the current version and the file corresponding to the latest version, so that the mirror file can be determined based on the upgrade area and the file corresponding to the latest version. Compared with the mirror file determined only based on the file of the latest version in the prior art, the size of the mirror file of the partition can be effectively reduced, thereby shortening the download time and flashing time of the upgrade package, and improving the efficiency of over-the-air download upgrades. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.

[0020] Figure 1 It is a flowchart of the over-the-air download upgrade method provided in an embodiment of the present application;

[0021] Figure 2 It is a structural diagram of an over-the-air download upgrade device provided in an embodiment of the present application;

[0022] Figure 3 A block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0023] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0024] It should be understood that the references to "one embodiment" or "an embodiment" throughout the specification mean that the specific features, structures, or characteristics associated with the embodiment are included in at least one embodiment of the present application. Therefore, the references to "in one embodiment" or "in an embodiment" appearing throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0025] In the various embodiments of the present application, it should be understood that the size of the serial numbers of the following processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0026] like Figure 1 As shown, an embodiment of the present application provides an over-the-air download upgrade method, the method comprising:

[0027] Step 101: receiving an upgrade request for upgrading N partitions sent by a target device, wherein the upgrade request carries a current version number corresponding to each of the N partitions, wherein N is an integer greater than or equal to 1.

[0028] The over-the-air download upgrade method provided in this application is applied to the OTA platform, which is a platform for providing upgrade packages to the target device. A communication module is installed on the target device, and the target device and the OTA platform communicate based on the communication module installed on the target device. When the target device is a vehicle computer, the communication module is a vehicle telematics processor (TelematicsBox, TBOX). The vehicle computer, i.e., the target device, can send an upgrade request to the OTA platform through TBOX. After the vehicle computer receives the upgrade package fed back by the OTA platform, the vehicle computer system can automatically complete the upgrade based on the upgrade package, and improve the relevant performance of the vehicle, thereby bringing a better operating experience to the user.

[0029] Specifically, the target device may include multiple partitions, each partition corresponds to a functional module, and a list of functional modules to be upgraded is displayed on the function upgrade operation interface of the target device. The user can select the functional modules to be upgraded from the list of functional modules to be upgraded according to their own needs. After determining the functional modules to be upgraded, the target device determines at least one partition to be upgraded based on the correspondence between the functional modules and the partitions, that is, N partitions, and obtains the current version number corresponding to each partition in the N partitions and adds it to the upgrade request.

[0030] Step 102: for each partition of the N partitions, determine the upgrade area corresponding to the partition according to the first file corresponding to the current version number and the second file corresponding to the latest version of the partition.

[0031] After receiving the upgrade request sent by the target device, the OTA platform first obtains the current version number corresponding to each of the N partitions carried in the upgrade request, and then obtains the second file corresponding to the latest version of each partition, and obtains the first file corresponding to the current version number based on the current version number of the partition, so that the upgrade area of ​​the partition can be determined based on the first file and the second file.

[0032] Specifically, the upgrade area corresponding to the partition is part or all of the partition, which needs to be determined based on the first file and the second file. When the upgrade area is part of the partition, only the part of the partition, that is, the part corresponding to the upgrade area, can be upgraded. When the upgrade area is the entire partition, the entire partition needs to be upgraded.

[0033] Step 103: for each partition of the N partitions, determine the image file corresponding to the partition according to the upgrade area corresponding to the partition and the second file.

[0034] After determining the upgrade area corresponding to each partition, the image file corresponding to the partition can be determined based on the upgrade area and the second file. Determining the image file here includes determining the occupied space of the image file and the content of the image file. Specifically, the occupied space is determined based on the upgrade area, and the content is determined based on the second file.

[0035] Step 104: Determine the upgrade package corresponding to the N partitions according to the image file corresponding to each partition in the N partitions, and send the upgrade package to the target device.

[0036] After determining the image file corresponding to each partition, the upgrade packages corresponding to the N partitions can be determined based on the image files corresponding to the N partitions, that is, the N image files are packaged to obtain the upgrade package. After obtaining the upgrade package, the upgrade package is sent to the target device, so that the system of the target device automatically upgrades the N partitions through the upgrade package.

[0037] In the above implementation process of the present application, when an upgrade request for upgrading N partitions is received from the target device, for each of the N partitions, the upgrade area of ​​the partition is determined according to the first file corresponding to the current version number of the partition and the second file corresponding to the latest version, and the image file used to upgrade the partition is determined according to the obtained upgrade area and the second file, and then the upgrade packages corresponding to the N partitions are determined and sent to the target device. The upgrade area corresponding to the partition can be determined based on the file corresponding to the current version and the file corresponding to the latest version, so that the image file can be determined based on the upgrade area and the file corresponding to the latest version. Compared with the image file determined only based on the file of the latest version in the prior art, the size of the partition's image file can be effectively reduced, thereby shortening the download time and flashing time of the upgrade package, and improving the efficiency of over-the-air download upgrades.

[0038] In an optional embodiment of the present application, the first file includes at least one sub-file, the second file includes at least one sub-file, and determining the upgrade area corresponding to the partition according to the first file corresponding to the current version number and the second file corresponding to the latest version of the partition includes:

[0039] Determine a first subfile set according to the subfiles included in the first file and the subfiles included in the second file, wherein the subfiles in the first subfile set belong to the first file but do not belong to the second file;

[0040] When the number of subfiles in the first subfile set is zero, the upgrade area is determined based on the second file;

[0041] When the number of sub-files in the first sub-file set is greater than zero, the upgrade area is determined based on the second file and the first sub-file set.

[0042] Specifically, the first file corresponding to the current version number of the partition, that is, the file used to implement the function corresponding to the partition in the current target device, may include at least one sub-file. Correspondingly, the second file corresponding to the latest version of the partition may also include at least one sub-file. It should be noted that the sub-files included in the first file and the sub-files included in the second file are not in a one-to-one correspondence. For example, the first file includes: sub-file 1, sub-file 2 and sub-file 3, and the second file includes: sub-file 2, sub-file 3 and sub-file 4. That is to say, compared with the current version, the latest version deletes sub-file 1 and adds sub-file 4.

[0043] When determining the upgrade area corresponding to the partition according to the first file and the second file, first determine a first subfile set consisting of subfiles belonging to the first file but not belonging to the second file according to the subfiles included in the first file and the subfiles included in the second file, that is, determine a subfile set consisting of subfiles deleted in the new version. Specifically, an empty subfile set may be first established, and then the subfiles in the first file and the second file may be traversed in sequence, and when a subfile belonging to the first file but not belonging to the second file appears, it may be added to the first subfile set.

[0044] When the number of subfiles in the first subfile set is zero, that is, there is no subfile that belongs to the first file but not to the second file, that is, the latest version does not delete subfiles compared to the current version, it can be determined that the occupied space of the upgrade area of ​​the partition is equal to the occupied space of the second file, that is, the upgrade area is determined based on the second file.

[0045] When the number of subfiles in the first subfile set is greater than zero, that is, there are subfiles that belong to the first file but not to the second file, that is, the latest version has deleted at least one subfile compared to the current version. At this time, the occupied space of the upgrade area of ​​the partition is equal to the sum of the occupied spaces of the second file and the first subfile set, that is, the upgrade area is determined based on the second file and the first subfile set.

[0046] The above implementation scheme of the present application determines a first sub-file set consisting of sub-files in the partition that belong to the first file but not to the second file, and determines the upgrade area of ​​the partition based on the second file or based on the second file and the first sub-file set according to the number of sub-files in the first sub-file set. It can be achieved that the upgrade area in the partition that actually needs to be upgraded is determined according to the comparison of the sub-files in the first file and the second file, so that the image file is subsequently determined based on the upgrade area, thereby eliminating the need to fill the area in the partition that does not need to be upgraded, i.e., the non-upgrade area, with invalid characters in the image file, and the space occupied by the image file can be effectively reduced.

[0047] The following describes how to determine the image file corresponding to a partition based on the upgrade area and the second file corresponding to the partition.

[0048] Based on the above embodiment, the determination of the upgrade area can be divided into the following two cases.

[0049] In the case where the upgrade area is determined based on the second file, determining the image file includes:

[0050] Determine the occupied space corresponding to the image file based on the upgrade area;

[0051] Determine content corresponding to the image file based on the second file.

[0052] Specifically, at this time, compared with the first file, the second file does not delete the sub-files included in the first file. When determining the image file used to upgrade the partition, the space occupied by the image file can be directly determined based on the upgrade area, and the content of the image file can be determined based on the second file. In other words, the image file is completely filled with the second file.

[0053] In the case where the upgrade area is determined based on the second file and the first sub-file set, determining the mirror file includes:

[0054] Determine the occupied space corresponding to the image file based on the upgrade area;

[0055] A filling file is determined based on the occupied space corresponding to the first sub-file set, and content corresponding to the mirror file is determined based on the second file and the filling file.

[0056] Specifically, at this time, compared with the first file, the second file deletes at least one sub-file included in the first file. When determining the image file used to upgrade the partition, it is necessary to determine the space occupied by the image file based on the upgrade area, determine the filler file based on the occupied space corresponding to the first sub-file set, and determine the content corresponding to the image file based on the second file and the filler file. In other words, the image file is partially filled with the second file, and the remaining part is filled with a filler file of the same size as the first sub-file set, and the filler file is composed of invalid data. It should be noted that when the system of the target device detects that the image file includes a filler file composed of invalid data, it can be determined that the sub-file corresponding to the filler file is deleted in the new version.

[0057] According to the above implementation scheme of the present application, when the upgrade area is determined based on the second file, the occupied space corresponding to the image file is determined based on the upgrade area, and the content corresponding to the image file is determined based on the second file; when the upgrade area is determined based on the second file and the first sub-file set, the occupied space corresponding to the image file is determined based on the upgrade area; the fill file is determined based on the occupied space corresponding to the first sub-file set, and the content corresponding to the image file is determined based on the second file and the fill file. The occupied space corresponding to the image file can be determined through the upgrade area, so that when the partition is not completely filled with the first file, compared with the image file size being equal to the partition size, the occupied space of the image file can be made smaller than the total space of the partition, thereby reducing the size of the image file, thereby shortening the download time and upgrade flashing time of the upgrade package composed of the image file, thereby improving the upgrade efficiency and enhancing the user experience.

[0058] In an optional embodiment of the present application, before sending the upgrade package to the target device, the method further includes:

[0059] Sending upgrade package sending prompt information to the target device, wherein the upgrade package sending prompt information is used to prompt the target device to download the upgrade package;

[0060] Sending the upgrade package to the target device includes:

[0061] After receiving the confirmation download information fed back by the target device based on the upgrade package sending prompt information, the upgrade package is sent to the target device.

[0062] Specifically, after the OTA platform obtains the upgrade package and before sending the upgrade package to the target device, it needs to send an upgrade package issuance prompt information to the target device, and the upgrade package issuance prompt information is used to prompt the target device to download the upgrade package. After the user selects the function module to be upgraded on the function upgrade operation interface of the target device and clicks Submit, the target device sends an upgrade request information to the OTA platform. After the OTA platform determines the upgrade package, it sends an upgrade package issuance prompt information to the target device. After the target device receives the upgrade package issuance prompt information, a download window pops up on the function upgrade operation interface. The download window can display the size of the upgrade package, that is, the data traffic required to download the upgrade package, as well as two options of "Yes" and "No" for the user to click. If the user selects the "Yes" option, the target device will feedback the download confirmation information to the OTA platform. Since the download of the upgrade package takes a certain amount of time and consumes data traffic, if the user determines that the current network situation is not suitable for downloading the upgrade package, the "No" option can be selected, and the target device closes the current download window.

[0063] Accordingly, sending the upgrade package to the target device includes: after receiving confirmation download information fed back by the target device based on the prompt information of sending the upgrade package, sending the upgrade package to the target device. In other words, the OTA platform transmits the upgrade package to the target device only after receiving confirmation download information fed back by the user.

[0064] The above implementation scheme of the present application sends the upgrade package to the target device by sending a prompt message to send the upgrade package, and after receiving the confirmation download information fed back by the target device based on the prompt message of sending the upgrade package, sends the upgrade package to the target device. Before transmitting the upgrade package, the consent of the user using the target device can be sought, thereby avoiding the situation where the data traffic caused by directly downloading the upgrade package transmitted by the OTA platform when the target device uses its own data traffic exceeds the remaining data traffic of the target device, thereby improving the user experience.

[0065] In an optional embodiment of the present application, before receiving an upgrade request for upgrading N partitions sent by the target device, the method further includes:

[0066] Determine a list of partitions to be upgraded corresponding to the target device;

[0067] An over-the-air upgrade prompt message carrying the list of partitions to be upgraded is sent to the target device, wherein the over-the-air upgrade prompt message is used to prompt that there are partitions to be upgraded in the target device.

[0068] Specifically, the OTA platform can regularly screen the versions of various functional modules included in the devices connected to it for communication, determine the partitions corresponding to the functional modules that can be upgraded in each device, and then determine the list of partitions to be upgraded corresponding to the target device, and send an over-the-air download upgrade prompt message carrying the list of partitions to be upgraded to the target device to prompt the target device that there are partitions to be upgraded.

[0069] The above implementation scheme of the present application can achieve the purpose of actively prompting the target device to upgrade by sending an over-the-air upgrade reminder message carrying a list of partitions to be upgraded to the target device, so that the user can improve the performance of the target device by downloading and installing the upgrade package.

[0070] In an optional embodiment of the present application, determining the list of partitions to be upgraded corresponding to the target device includes:

[0071] Obtaining the current version number and the latest version number corresponding to each partition included in the target device;

[0072] The partition whose current version number is smaller than the latest version number is determined as a partition to be upgraded, and the partition to be upgraded is added to a partition list to be upgraded, wherein the partition list to be upgraded includes M partitions to be upgraded, where M is greater than or equal to N.

[0073] For the target device, the OTA platform can regularly obtain the current version number and the latest version number corresponding to each partition included in the target device, and compare the current version number and the latest version number of each partition. If the current version number is less than the latest version number, it indicates that the partition needs to be upgraded, and it is determined as the partition to be upgraded and added to the list of partitions to be upgraded.

[0074] Then, the user of the target device can select N partitions to be upgraded from the list of partitions to be upgraded including M partitions to be upgraded, where M is greater than or equal to N. That is, the user can select some or all of the partitions to be upgraded from the list of partitions to be upgraded.

[0075] The above implementation scheme of the present application can obtain the partition that needs to be upgraded in the target device by determining the partition whose current version number is smaller than the latest version number as the partition to be upgraded and adding it to the list of partitions to be upgraded, so as to provide the list of partitions to be upgraded to the target device so that the user of the target device can select the partition that needs to be upgraded from it.

[0076] The above describes the over-the-air upgrade method provided by the embodiment of the present application. The following describes the over-the-air upgrade device provided by the embodiment of the present application in conjunction with the accompanying drawings.

[0077] like Figure 2As shown, an embodiment of the present invention further provides an over-the-air download upgrade device, the device comprising:

[0078] The receiving module 201 is used to receive an upgrade request for upgrading N partitions sent by a target device, wherein the upgrade request carries a current version number corresponding to each partition in the N partitions, where N is an integer greater than or equal to 1;

[0079] A first determination module 202 is used to determine, for each of the N partitions, an upgrade area corresponding to the partition according to a first file corresponding to the current version number and a second file corresponding to the latest version of the partition;

[0080] The second determination module 203 is used to determine, for each of the N partitions, the image file corresponding to the partition according to the upgrade area corresponding to the partition and the second file.

[0081] The first sending module 204 is used to determine the upgrade package corresponding to the N partitions according to the image file corresponding to each partition in the N partitions, and send the upgrade package to the target device.

[0082] Optionally, the first file includes at least one sub-file, the second file includes at least one sub-file, and the first determining module includes:

[0083] A first determining submodule, configured to determine a first subfile set according to subfiles included in the first file and subfiles included in the second file, wherein subfiles in the first subfile set belong to the first file but do not belong to the second file;

[0084] A second determination submodule, configured to determine the upgrade area based on the second file when the number of subfiles in the first subfile set is zero;

[0085] The third determination submodule is configured to determine the upgrade area based on the second file and the first subfile set when the number of subfiles in the first subfile set is greater than zero.

[0086] Optionally, when the upgrade area is determined based on the second file, the second determination module includes:

[0087] A fourth determination submodule, configured to determine an occupied space corresponding to the image file based on the upgrade area;

[0088] The fifth determining submodule is used to determine the content corresponding to the image file based on the second file.

[0089] Optionally, when the upgrade area is determined based on the second file and the first sub-file set, the second determination module includes:

[0090] A sixth determination submodule, configured to determine an occupied space corresponding to the image file based on the upgrade area;

[0091] The seventh determination submodule is used to determine a filling file based on the occupied space corresponding to the first sub-file set, and determine the content corresponding to the mirror file based on the second file and the filling file.

[0092] Optionally, before sending the upgrade package to the target device, the apparatus further includes:

[0093] A second sending module is used to send upgrade package sending prompt information to the target device, and the upgrade package sending prompt information is used to prompt the target device to download the upgrade package;

[0094] The first sending module is further used for:

[0095] After receiving the confirmation download information fed back by the target device based on the upgrade package sending prompt information, the upgrade package is sent to the target device.

[0096] Optionally, before receiving the upgrade request for upgrading N partitions sent by the target device, the apparatus further includes:

[0097] A third determination module is used to determine a list of partitions to be upgraded corresponding to the target device;

[0098] The third sending module is used to send an over-the-air upgrade prompt message carrying the list of partitions to be upgraded to the target device, wherein the over-the-air upgrade prompt message is used to prompt that there are partitions to be upgraded in the target device.

[0099] Optionally, the third determining module includes:

[0100] An acquisition submodule, used to acquire the current version number and the latest version number corresponding to each partition included in the target device;

[0101] The eighth determination submodule is used to determine the partition whose current version number is smaller than the latest version number as the partition to be upgraded, and add the partition to be upgraded to a partition list to be upgraded, wherein the partition list to be upgraded includes M partitions to be upgraded, and M is greater than or equal to N.

[0102] The over-the-air upgrade device provided by the present application, upon receiving an upgrade request for upgrading N partitions sent by a target device, determines, for each of the N partitions, an upgrade area of ​​the partition according to a first file corresponding to the current version number of the partition and a second file corresponding to the latest version, and determines a mirror file for upgrading the partition according to the obtained upgrade area and second file, and then determines the upgrade packages corresponding to the N partitions and sends them to the target device. The upgrade area corresponding to the partition can be determined based on the file corresponding to the current version and the file corresponding to the latest version, thereby determining the mirror file based on the upgrade area and the file corresponding to the latest version. Compared with the mirror file determined only based on the file of the latest version in the prior art, the size of the mirror file of the partition can be effectively reduced, thereby shortening the download time and flashing time of the upgrade package, and improving the efficiency of over-the-air upgrade.

[0103] An embodiment of the present application also provides an electronic device, including: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the various processes of the above-mentioned over-the-air download upgrade method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0104] For example, Figure 3 A schematic diagram of the physical structure of an electronic device is shown.

[0105] like Figure 3 As shown, the electronic device may include: a processor 310, a communication interface 320, a memory 330 and a communication bus 340, wherein the processor 310, the communication interface 320 and the memory 330 communicate with each other through the communication bus 340. The processor 310 may call the logic instructions in the memory 330, and the processor 310 is used to perform the following steps: receiving an upgrade request for upgrading N partitions sent by a target device, wherein the upgrade request carries the current version number corresponding to each of the N partitions, wherein N is an integer greater than or equal to 1; for each of the N partitions, according to the first file corresponding to the current version number and the second file corresponding to the latest version of the partition, determining the upgrade area corresponding to the partition; for each of the N partitions, according to the upgrade area corresponding to the partition and the second file, determining the image file corresponding to the partition; according to the image file corresponding to each of the N partitions, determining the upgrade package corresponding to the N partitions, and sending the upgrade package to the target device.

[0106] In addition, the logic instructions in the above-mentioned memory 330 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.

[0107] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the above-mentioned over-the-air download upgrade method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0108] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0109] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0110] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.

[0111] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the embodiments of the present invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0112] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0113] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0114] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0115] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0116] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical disks.

[0117] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. An over-the-air download upgrade method, characterized in that: The method comprises: Receiving an upgrade request for upgrading N partitions sent by a target device, wherein the upgrade request carries a current version number corresponding to each of the N partitions, where N is an integer greater than or equal to 1; For each of the N partitions, determining an upgrade area corresponding to the partition according to a first file corresponding to the current version number and a second file corresponding to the latest version of the partition; For each of the N partitions, determining the image file corresponding to the partition according to the upgrade area corresponding to the partition and the second file; According to the image file corresponding to each partition in the N partitions, the upgrade package corresponding to the N partitions is determined, and the upgrade package is sent to the target device.

2. The over-the-air upgrade method according to claim 1, characterized in that: The first file includes at least one sub-file, the second file includes at least one sub-file, and determining the upgrade area corresponding to the partition according to the first file corresponding to the current version number and the second file corresponding to the latest version of the partition includes: Determine a first subfile set according to the subfiles included in the first file and the subfiles included in the second file, wherein the subfiles in the first subfile set belong to the first file but do not belong to the second file; When the number of subfiles in the first subfile set is zero, the upgrade area is determined based on the second file; When the number of sub-files in the first sub-file set is greater than zero, the upgrade area is determined based on the second file and the first sub-file set.

3. The over-the-air upgrade method according to claim 2, characterized in that: When the upgrade area is determined based on the second file, determining the image file corresponding to the partition according to the upgrade area corresponding to the partition and the second file includes: Determine the occupied space corresponding to the image file based on the upgrade area; Determine content corresponding to the image file based on the second file.

4. The over-the-air upgrade method according to claim 2, characterized in that: When the upgrade area is determined based on the second file and the first sub-file set, determining the image file corresponding to the partition according to the upgrade area corresponding to the partition and the second file includes: Determine the occupied space corresponding to the image file based on the upgrade area; A filling file is determined based on the occupied space corresponding to the first sub-file set, and content corresponding to the mirror file is determined based on the second file and the filling file.

5. The over-the-air upgrade method according to claim 1, characterized in that: Before sending the upgrade package to the target device, the method further includes: Sending upgrade package sending prompt information to the target device, wherein the upgrade package sending prompt information is used to prompt the target device to download the upgrade package; Sending the upgrade package to the target device includes: After receiving the confirmation download information fed back by the target device based on the upgrade package sending prompt information, the upgrade package is sent to the target device.

6. The over-the-air upgrade method according to claim 1, characterized in that: Before receiving an upgrade request for upgrading the N partitions sent by the target device, the method further includes: Determine a list of partitions to be upgraded corresponding to the target device; An over-the-air upgrade prompt message carrying the list of partitions to be upgraded is sent to the target device, wherein the over-the-air upgrade prompt message is used to prompt that there are partitions to be upgraded in the target device.

7. The over-the-air upgrade method according to claim 6, characterized in that: The determining a list of partitions to be upgraded corresponding to the target device includes: Obtaining the current version number and the latest version number corresponding to each partition included in the target device; The partition whose current version number is smaller than the latest version number is determined as a partition to be upgraded, and the partition to be upgraded is added to a partition list to be upgraded, wherein the partition list to be upgraded includes M partitions to be upgraded, where M is greater than or equal to N.

8. An over-the-air download upgrade device, characterized in that: include: A receiving module, configured to receive an upgrade request for upgrading N partitions sent by a target device, wherein the upgrade request carries a current version number corresponding to each of the N partitions, wherein N is an integer greater than or equal to 1; A first determination module is used to determine, for each of the N partitions, an upgrade area corresponding to the partition according to a first file corresponding to the current version number and a second file corresponding to the latest version of the partition; A second determination module is used to determine, for each of the N partitions, the image file corresponding to the partition according to the upgrade area corresponding to the partition and the second file. The first sending module is used to determine the upgrade package corresponding to the N partitions according to the image file corresponding to each partition in the N partitions, and send the upgrade package to the target device.

9. An electronic device, characterized in that: The invention comprises a processor, a memory and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the over-the-air download upgrade method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the over-the-air download upgrade method according to any one of claims 1 to 7 are implemented.