CN114268941A - Target equipment upgrading method, device, equipment and storage medium - Google Patents

Target equipment upgrading method, device, equipment and storage medium Download PDF

Info

Publication number
CN114268941A
CN114268941A CN202111619236.XA CN202111619236A CN114268941A CN 114268941 A CN114268941 A CN 114268941A CN 202111619236 A CN202111619236 A CN 202111619236A CN 114268941 A CN114268941 A CN 114268941A
Authority
CN
China
Prior art keywords
target
version
basic
packet
upgrading
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202111619236.XA
Other languages
Chinese (zh)
Inventor
张恒
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Ziroom Information Technology Co Ltd
Original Assignee
Beijing Ziroom Information Technology Co Ltd
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 Beijing Ziroom Information Technology Co Ltd filed Critical Beijing Ziroom Information Technology Co Ltd
Priority to CN202111619236.XA priority Critical patent/CN114268941A/en
Publication of CN114268941A publication Critical patent/CN114268941A/en
Pending legal-status Critical Current

Links

Images

Abstract

The application relates to a method, a device, equipment and a storage medium for upgrading target equipment, in particular to the technical field of equipment updating. The method comprises the following steps: receiving target upgrading information; downloading the target differential packet according to the download address of the target differential packet; detecting whether the target differential packet is matched with the basic version of the target equipment; when the target basic package is not matched with the target basic package, downloading the target basic package according to the downloading address of the target basic package; and upgrading the target equipment according to the target basic packet and the target differential packet. According to the scheme, the target device can be updated to the target version only by one-time differential packet updating process, the risk of updating errors caused by multiple updating is avoided, and the updating and upgrading reliability of the device is improved.

Description

Target equipment upgrading method, device, equipment and storage medium
Technical Field
The invention relates to the technical field of equipment updating, in particular to a method, a device, equipment and a storage medium for upgrading target equipment.
Background
With The development of The internet of things, The functions of The network-connectable embedded device become more and more complex, and it has become necessary to upgrade and maintain The embedded device through The OTA (Over The Air) upgrade technology. The OTA upgrading technology is to store the upgrading packet in the server, and the embedded device downloads the upgrading packet through the network and carries out upgrading.
OTA upgrades can be divided into whole-package upgrades and differential-package upgrades. The whole package upgrading is to make the whole software system into an upgrading package for upgrading; the differential upgrading is to make the difference part of the new version and the old version into an upgrading packet for upgrading. Because the differential upgrade package only comprises a differential part, the size of the differential upgrade package is obviously smaller than that of the whole upgrade package, and the differential package has the advantages of short download time and fast upgrade. The differential upgrade package is required to be manufactured based on a specific basic version, so that the differential upgrade can only be upgraded from the specific basic version to a target version, and the version upgrade cannot be skipped.
In the above scheme, when the terminal device performs version upgrade on the device through the differential upgrade package, a specific differential upgrade package needs to be pushed according to the dependency relationship of the differential package, the number of times of update required by the target device is large, and the risk of update errors is large.
Disclosure of Invention
The application provides a method, a device, equipment and a storage medium for upgrading target equipment, which improve the reliability of equipment updating and upgrading.
In one aspect, a method for upgrading a target device is provided, where the method includes:
receiving target upgrading information; the target upgrading information comprises a downloading address of the target differential packet and a downloading address of the target basic packet;
downloading the target differential packet according to the download address of the target differential packet;
detecting whether the target differential packet is matched with a basic version of the target device;
when the target basic package is not matched with the target basic package, downloading the target basic package according to the downloading address of the target basic package;
and upgrading the target equipment according to the target basic packet and the target differential packet.
In another aspect, an apparatus for upgrading a target device is provided, the apparatus including:
the upgrading information receiving module is used for receiving target upgrading information; the target upgrading information comprises a downloading address of the target differential packet and a downloading address of the target basic packet;
the differential packet downloading module is used for downloading the target differential packet according to the downloading address of the target differential packet;
the version matching module is used for detecting whether the target differential packet is matched with the basic version of the target equipment or not;
a basic package downloading module, configured to download the target basic package according to the download address of the target basic package when the target basic package is not matched with the target basic package;
and the equipment upgrading module is used for upgrading the target equipment according to the target basic packet and the target differential packet.
In one possible implementation, the device upgrade module is further configured to,
and when the target differential packet is matched with the basic version of the target equipment, upgrading the version of the target equipment according to the target differential packet.
In one possible implementation, the device upgrade module is further configured to,
updating the version of the target equipment according to the target basic package to obtain target equipment of a target basic version;
and updating the version of the target equipment of the target basic version according to the target differential packet so as to realize the version upgrading of the target equipment.
In one possible implementation, the target device includes at least a primary partition and a backup partition; the backup partition is used for storing the downloaded target differential packages and the target basic packages;
the equipment upgrading module is also used for upgrading the equipment,
in the backup partition, performing differential solution operation on the target differential packet based on the target basic packet to obtain target version data;
and writing the target version data into a main partition in the target equipment to realize version upgrading of the target equipment.
In a possible implementation manner, the target differential packet includes basic version information;
the version matching module is further configured to,
acquiring a basic version of the target equipment;
and detecting whether the basic version of the target equipment is matched with the version information in the target differential packet.
In a possible implementation manner, the target differential packet includes basic version information;
the version matching module is further configured to,
acquiring a basic version of the target equipment;
and detecting whether the basic version of the target equipment is matched with the basic version information in the target upgrading information.
In one possible implementation, the apparatus further includes:
and the differential packet deleting module is used for deleting the target differential packet after the target equipment is detected to be upgraded.
In still another aspect, a computer device is provided, where the computer device includes a processor and a memory, where the memory stores at least one instruction, at least one program, a code set, or a set of instructions, and the at least one instruction, at least one program, a code set, or a set of instructions is loaded and executed by the processor to implement the target device upgrading method.
In yet another aspect, a computer-readable storage medium is provided, in which at least one instruction is stored, and the at least one instruction is loaded and executed by a processor to implement the target device upgrade method described above.
In yet another aspect, a computer program product is provided, as well as a computer program product or a computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the target device upgrading method.
The technical scheme provided by the application can comprise the following beneficial effects:
when the target equipment needs to be upgraded, the upgrading information of the version upgrading can be obtained firstly, the downloading address of the target differential packet of the latest version pushed by the server and the downloading address of the target basic packet required by the upgrading of the target differential packet exist in the upgrading information, the target equipment downloads the target differential packet firstly, after the target differential packet is obtained, whether the versions are matched or not can be verified according to the information in the target differential packet, when the versions are not matched, the basic packet is downloaded again, the target equipment is directly updated through the target basic packet and the target differential packet, by the scheme, when the target equipment updates a plurality of versions, the plurality of differential packets do not need to be obtained and updated one by one according to the dependency relationship of the differential packets, when the obtained target differential packet is matched with the basic version, the target basic packet is directly updated, and when the target differential packet is not matched, the target basic packet is downloaded again, that is to say, the target device can update the target version only by performing the differential packet updating process once, so that the risk of updating errors caused by multiple updating is avoided, and the reliability of updating and upgrading the device is improved.
Drawings
In order to more clearly illustrate the detailed description of the present application or the technical solutions in the prior art, the drawings needed to be used in the detailed description of the present application or the prior art description will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic structural diagram illustrating a target device upgrade system according to an exemplary embodiment.
FIG. 2 is a method flow diagram illustrating a method for target device upgrade, according to an example embodiment.
FIG. 3 is a method flow diagram illustrating a method for target device upgrade, according to an example embodiment.
FIG. 4 is a method flow diagram illustrating a method for target device upgrade, according to an example embodiment.
Fig. 5 is a block diagram illustrating a structure of a target device upgrade apparatus according to an exemplary embodiment.
FIG. 6 is a schematic diagram of a computer device provided in accordance with an exemplary embodiment of the present application.
Detailed Description
The technical solutions of the present application will be described clearly and completely with reference to the accompanying drawings, and it should be understood that the described embodiments are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be understood that "indication" mentioned in the embodiments of the present application may be a direct indication, an indirect indication, or an indication of an association relationship. For example, a indicates B, which may mean that a directly indicates B, e.g., B may be obtained by a; it may also mean that a indicates B indirectly, for example, a indicates C, and B may be obtained by C; it can also mean that there is an association between a and B.
In the description of the embodiments of the present application, the term "correspond" may indicate that there is a direct correspondence or an indirect correspondence between the two, may also indicate that there is an association between the two, and may also indicate and be indicated, configure and configured, and so on.
In the embodiment of the present application, "predefining" may be implemented by saving a corresponding code, table, or other manners that may be used to indicate related information in advance in a device (for example, including a terminal device and a network device), and the present application is not limited to a specific implementation manner thereof.
Before describing the various embodiments shown herein, several concepts related to the present application will be described.
1) Embedded device
An embedded device generally refers to an embedded system, which is composed of hardware and software and is a device capable of operating independently. The software content of the software only comprises a software running environment and an operating system thereof. The hardware content includes various contents including a signal processor, a memory, a communication module, and the like. Compared with a common computer processing system, the embedded system has larger difference, and cannot realize the large-capacity storage function because no large-capacity medium matched with the embedded system exists, most of the adopted storage media comprise E-PROM, EEPROM and the like, and the software part takes an API programming interface as the core of a development platform.
2) Over-the-air upgrade
OTA is a method of distributing new software, configuration, or even updating encryption keys (encrypted two-way radio, for example, for a mobile phone, a digital video converter box, or a secure voice communication device) for a device. An important feature of OTA is that one central location can send updates to all users that cannot be rejected, destroyed or changed and that are immediately applied to everyone on the channel. In modern mobile devices such as smartphones, over-the-air, OTA updates may simply refer to acquiring distributed firmware or operating system updates over Wi-Fi or mobile broadband, where "over-the-air" refers to wireless internet applications, without requiring the user to connect the device to a computer via USB to perform the updates. Firmware updates may be downloaded through OTA services.
3) Differential upgrade
The differential updating is called incremental updating, namely, the difference is made between the data files of the old version and the new version to obtain a patch of the updated part, namely a differential packet; after downloading the differential packet, the user combines the old version data with the differential packet to obtain a new version data file, and mostly adopts a BSDiff differential algorithm. By adopting a differential upgrading mode, when the same parts of the new version and the old version are more, the OTA data packet is smaller, and the downloading is convenient and quick. When the new version and the old version are greatly different, the OTA data packet may be larger than the new file; the patch package needs to correspond to the version of the old file, and is troublesome when the updated product has multiple different versions, and the patch package needs to be generated by the cloud.
Fig. 1 is a schematic structural diagram illustrating a target device upgrade system according to an exemplary embodiment. The target device upgrade system includes a server 110 and a target device 120. The target device 120 and the server 110 are in data communication via a communication network, which may be a wired network or a wireless network.
Optionally, in a possible implementation manner of the embodiment of the present application, the target device may be an embedded device, where the embedded device includes a FLASH, and the FLASH includes a boot partition, a main partition, and a backup partition. The main partition is provided with an upgrading component, and the upgrading component receives upgrading information pushed by the server and downloads an upgrading package; the base version is stored in the backup partition, along with the downloaded differential packets.
Optionally, the target device 120 may also be a target device having a data transmission interface, where the data transmission interface is configured to receive device upgrade indication information sent by the server and an upgrade package of the target device.
Optionally, the target device 120 further has a data acquisition component (e.g., a mouse, a keyboard, a touch screen, etc.), and the data acquisition component of the target device may acquire an input operation triggered by a user, so as to implement control over the target device.
In a possible implementation manner, when a target device includes a client of an application program, the target device opens the client and performs data interaction with a server of the application program in a server after receiving a specified operation, triggered by a user, on the client, the server detects version information of the client, and when it is detected that the version of the client is not the latest version, a target upgrade request is sent to the target device, so that the target device performs a subsequent upgrade process according to the target upgrade request.
Optionally, the target device 120 may also be a mobile target device such as a smart phone, a tablet computer, a laptop portable notebook computer, or the like, or may also be a target device such as a desktop computer, a projection computer, or the like, or an intelligent target device having a data processing component, which is not limited in this embodiment of the present application.
The server 110 may be implemented as one server, or may be implemented as a server cluster formed by a group of servers, which may be physical servers or cloud servers. In one possible implementation, the server 110 is a backend server for applications in the target device 120.
Optionally, the server may be an independent physical server, a server cluster formed by a plurality of physical servers, or a distributed system, and may also be a cloud server that provides technical computing services such as cloud service, a cloud database, cloud computing, a cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN, and a big data and artificial intelligence platform.
Optionally, the system may further include a management device, where the management device is configured to manage the system (e.g., manage connection states between the modules and the server, and the management device is connected to the server through a communication network. Optionally, the communication network is a wired network or a wireless network.
Optionally, the wireless network or wired network described above uses standard communication techniques and/or protocols. The network is typically the internet, but may be any other network including, but not limited to, a local area network, a metropolitan area network, a wide area network, a mobile, a limited or wireless network, a private network, or any combination of virtual private networks. In some embodiments, data exchanged over the network is represented using techniques and/or formats including hypertext markup language, extensible markup language, and the like. All or some of the links may also be encrypted using conventional encryption techniques such as secure sockets layer, transport layer security, virtual private network, internet protocol security, and the like. In other embodiments, custom and/or dedicated data communication techniques may also be used in place of, or in addition to, the data communication techniques described above.
FIG. 2 is a method flow diagram illustrating a method for target device upgrade, according to an example embodiment. The method is performed by a target device, which may be the target device 120 in the target device upgrade system as shown in fig. 1. As shown in fig. 2, the target device upgrading method may include the following steps:
step 201, receiving target upgrading information.
The target upgrade information includes a download address of the target differential packet and a download address of the target basic packet.
Taking the target device upgrading system shown in fig. 1 as an example, after the target device establishes a communication connection with the server, the server may detect current version information of the target device, where the version information may be version information of an application program or software corresponding to the server.
When the server detects that the current version information of the target device is not the latest version or the version set by the server, the server may send target upgrade information to the target device to indicate a subsequent upgrade process of the target device.
Step 202, downloading the target differential packet according to the download address of the target differential packet.
After the download address of the target differential packet is obtained, the target device may send a request to the server indicated by the download address according to the download address to obtain the target differential packet.
In a possible implementation manner, when the server needs to update the target device to the latest version, the target differential packet is an update packet corresponding to the latest version, that is, if the target device can be updated normally through the target differential packet, the updated version information of the target device should be the latest version indicated by the server.
Step 203, detecting whether the target differential packet matches with the base version of the target device.
In the embodiment of the present application, the number of the target differential packets acquired by the target device according to the target upgrade information is 1, that is, the target device only performs one update according to the target differential packet, that is, when the target device needs to be in the basic version number corresponding to the target differential packet, the target device can implement normal update through the target differential packet.
Therefore, before updating, in order to avoid a problem in updating, the target differential packet needs to be matched with the current basic version of the target device first, whether the basic version required by the target differential packet is the same as the current version of the target device is determined, and the target device can be updated directly according to the target differential packet only when the basic version is the same as the current version of the target device.
And step 204, downloading the target basic package according to the download address of the target basic package when the target basic package is not matched with the target basic package.
When the basic version required by the target differential packet is different from the current version of the target device, the target differential packet is not matched with the basic version of the target device, and obviously, the target device cannot be upgraded directly through the target differential packet.
And because the target upgrading request also has the download address of the target basic package in addition to the download address of the target differential package, at this time, the target device can download the target basic package from the corresponding server through the download address of the target basic package and store the target basic package in the target device, at this time, the target device simultaneously stores the target basic package and the target differential package, and the update basis of the target differential package is the target basic package, so that the target device meets the precondition of version update at this time.
Step 205, upgrading the target device according to the target basic package and the target differential package.
After the target device obtains the target basic packet and the target differential packet, because the target differential packet is the difference information between the two versions, and the target basic packet is the basic information of the target differential packet, after the target device performs the de-differential processing on the target differential packet according to the target basic packet, the upgraded version required by the target device can be obtained, thereby realizing the version upgrading of the target device.
In summary, when the version of the target device needs to be upgraded, the upgrade information of the version upgrade may be obtained first, where the upgrade information includes a download address of a target differential packet of a latest version pushed by the server and a download address of a target basic packet required for upgrading the target differential packet, and at this time, the target device downloads the target differential packet first, and after obtaining the target differential packet, it may verify whether the versions at this time match according to information in the target differential packet, and when the versions do not match, the basic packet is downloaded again, and the target device is updated directly by the target basic packet and the target differential packet, according to the above scheme, when the target device updates multiple versions, it is not necessary to obtain multiple differential packets and update one by one according to the dependency relationship of the differential packets, when the obtained target differential packet matches with the basic version, it is updated directly, the target basic package is downloaded again, that is, the target device can update the target version only by performing the differential package updating process once, so that the risk of updating errors caused by multiple updates is avoided, and the reliability of updating and upgrading the device is improved.
FIG. 3 is a method flow diagram illustrating a method for target device upgrade, according to an example embodiment. The method is performed by a target device, which may be the target device 120 in the target device upgrade system as shown in fig. 1. As shown in fig. 3, the target device upgrading method may include the steps of:
step 301, receiving target upgrade information.
In this embodiment, the target upgrade information includes a download address of the target differential packet and a download address of the target basic packet.
In a possible implementation manner of the embodiment of the present application, the target upgrade information further includes version information of the target basic package.
That is, when the server performs the target upgrade information to the target device, the server can simultaneously save the version information required when upgrading to the target version in the target upgrade information to send to the target device.
In a possible implementation manner, taking the target device upgrading system shown in fig. 1 as an example, before upgrading the target device, the target device receives a trigger operation of a user, runs corresponding software, and establishes a communication connection with a server corresponding to the software. And when the server detects that the current version number of the target equipment does not accord with the operation standard or needs updating, the server updates the latest version information to the download address of the target differential packet of the latest version and the download address of the target basic packet corresponding to the target differential packet to the target equipment.
In a possible implementation manner, after receiving the target upgrade information, the target device displays an upgrade confirmation control on a display interface of the target device, and when receiving a specified operation of the upgrade confirmation control by a user, executes a subsequent version upgrade operation according to the upgrade confirmation request.
Step 302, the target differential packet is downloaded according to the download address of the target differential packet.
After the target device receives the target upgrading request, the target device can directly send a downloading request to a server corresponding to the downloading address according to the target differential packet downloading address in the target upgrading request so as to download the target differential packet.
Step 303, detecting whether the target differential packet matches the base version of the target device.
Optionally, whether the target differential packet matches the base version of the target device is whether the target differential packet matches the current base version of the target device according to the base version information required by the target differential packet.
The data in the target differential packet is the data difference between the previous version (such as version 1) and the next version (such as version 2), when the current version of the target device is version 1, the target device acquires the target differential packet, and after the target differential packet is subjected to de-differential processing based on the data in the version 1, the obtained version data is the version data of the version 2, so that the process of updating the data from the version 1 to the version 2 is completed.
If the current version of the target device is not version 1, for example, is version 0 before version 1, the target device cannot perform correct differential processing on the target differential packet according to the version data of version 0, or the version data obtained after the differential processing has an error and cannot be directly updated to version 2.
In order to solve the problem, the server usually sends a differential upgrade package between version 0 and version 1 to the target device, so that the target device is updated to version 1 through version 0 and the differential upgrade package first, and then updated from version 1 to version 2 through the target differential package.
In a possible implementation manner, the target differential packet includes basic version information; acquiring a basic version of the target equipment; and detecting whether the basic version of the target equipment is matched with the version information in the target differential packet.
That is, the target differential packet has base version information, and the target device may detect the target differential packet after downloading the target differential packet, so as to obtain the base version information corresponding to the target differential packet, for example, the version name of the target differential packet has the corresponding base version information, and if the name of the target differential packet includes V1-V2, that is, the target differential packet represents an update from the V1 version to the V2 version, and the V1 version is the base version information.
In another possible implementation manner, the target upgrade information includes basic version information; acquiring a basic version of the target equipment; and detecting whether the basic version of the target equipment is matched with the basic version information in the target upgrading information.
Alternatively, the basic version information may be the version information of the target basic package, which is sent by the server to the target device through the target upgrade information, that is, the target upgrade information includes the basic version information required by the target differential package, in addition to the download address of the target differential package and the download address of the target basic package.
At this time, after the target device acquires the target upgrading information, the data required to be downloaded by the target device can be determined.
Step 304A, when the target differential packet matches the basic version of the target device, performing version upgrade on the target device according to the target differential packet.
When the target differential packet is matched with the basic version of the target equipment, the basic version of the target equipment can support normal differential processing of the target differential packet, and the computer equipment directly performs differential processing on the target differential packet so as to obtain target version data of the target equipment, thereby realizing version upgrading of the target equipment.
And step 304B, downloading the target basic package according to the download address of the target basic package when the target basic package is not matched with the target basic package.
When the target differential packet is not matched with the basic version of the target device, in order to normally update the target version indicated by the target device update value target differential packet, the target device may also download the target basic packet according to the download address of the target basic packet in the target update request and store the target basic packet into the target device, so as to support the de-differentiation process of the target differential packet.
Step 305, upgrading the target device according to the target basic packet and the target differential packet.
In one possible implementation, the target device includes at least a primary partition and a backup partition; the backup partition is used for storing the downloaded target differential package and the target basic package;
in the backup partition, performing differential operation on the target differential packet based on the target basic packet to obtain target version data; and writing the target version data into a main partition in the target device to realize version upgrading of the target device.
Optionally, a boot partition is further present in the target device, and the boot partition is configured to control processes of downloading, decompressing, and installing the installation package in the primary partition and the backup partition.
When the boot partition of the target equipment detects that the target differential packet and the target basic packet exist in the backup partition, the target basic packet and the target differential packet are directly subjected to differential de-processing, so that the version data of the target version updated by the target differential packet is obtained, at the moment, the boot partition writes the version data of the target version into a main partition in the target equipment, replaces the original version data, and accordingly the version upgrading of the target equipment is achieved.
By the method, the target version data is actually obtained by performing the differential processing on the downloaded target basic packet and the target differential packet, that is, only one version data updating operation is performed in the process of obtaining the target version data, so that multiple version updating operations through a plurality of differential packets are avoided, and the error probability in the version updating process is reduced.
In another possible implementation manner, according to the target basic package, version updating is performed on the target device to obtain a target device of a target basic version; and updating the version of the target equipment of the target basic version according to the target differential packet so as to realize the version upgrading of the target equipment.
That is, when the target device detects that the target device has the target basic package and the target differential package, the target device may write the version data in the target basic package into the main partition in the target device first, and replace the original version data, thereby implementing replacement of the target device to the target basic version.
At this time, the target basic version obviously meets the differential resolution requirement of the target differential package, at this time, the target device performs differential resolution data on the target differential package based on the target basic version data in the main partition to obtain the version data of the target version, and then writes the version data into the main partition of the target device to replace the target basic version data again, thereby realizing the version upgrade of the target device.
And step 306, deleting the target differential packet after the target device is detected to be upgraded.
When the target device detects that the software or the application program is upgraded, the target device can delete the stored target differential packet, so that the memory space occupied in the upgrading process of the target device is reduced as much as possible.
In summary, when the version of the target device needs to be upgraded, the upgrade information of the version upgrade may be obtained first, where the upgrade information includes a download address of a target differential packet of a latest version pushed by the server and a download address of a target basic packet required for upgrading the target differential packet, and at this time, the target device downloads the target differential packet first, and after obtaining the target differential packet, it may verify whether the versions at this time match according to information in the target differential packet, and when the versions do not match, the basic packet is downloaded again, and the target device is updated directly by the target basic packet and the target differential packet, according to the above scheme, when the target device updates multiple versions, it is not necessary to obtain multiple differential packets and update one by one according to the dependency relationship of the differential packets, when the obtained target differential packet matches with the basic version, it is updated directly, the target basic package is downloaded again, that is, the target device can update the target version only by performing the differential package updating process once, so that the risk of updating errors caused by multiple updates is avoided, and the reliability of updating and upgrading the device is improved.
FIG. 4 is a method flow diagram illustrating a method for target device upgrade, according to an example embodiment. The method is performed by a target device, which may be the target device 120 in the target device upgrade system shown in fig. 1, in this embodiment, the target device is an embedded device. As shown in fig. 4, the target device upgrading method may include the steps of:
the embedded device comprises a FLASH, and the FLASH comprises a boot partition, a main partition and a backup partition. The main partition is provided with an upgrading component, and the upgrading component receives upgrading information pushed by the server and downloads an upgrading package; the base version is stored in the backup partition, along with the downloaded differential packets.
The upgrading steps are as follows:
s1, the server pushes the upgrade message, the upgrade message contains the differential package download address and the basic version download address that the differential package depends on.
And S2, after receiving the upgrade message, the embedded device downloads the differential packet according to the differential packet download address in the upgrade message, and stores the differential packet in the backup partition. The differential package contains the basic version information depended on by the differential package, the upgrading component checks whether the basic version information is consistent with the basic version stored in the backup partition, if not, the step goes to step S3, and if so, the step goes to step S4.
And S3, downloading the basic version according to the basic version downloading address in the upgrading message received in the step S1, and updating the original basic version in the backup partition into the newly downloaded basic version after the basic version is downloaded and verified successfully.
And S4, restarting to enter the boot partition, and when the boot partition detects that the differential upgrade package exists in the backup partition, performing differential operation on the differential upgrade package based on the basic version in the backup partition, and writing the target version obtained by differential operation into the main partition. And then deleting the differential packet in the backup partition, rebooting the system to enter the main partition, and finishing upgrading.
Fig. 5 is a block diagram illustrating a structure of a target device upgrade apparatus according to an exemplary embodiment.
The device comprises:
an upgrade information receiving module 501, configured to receive target upgrade information; the target upgrading information comprises a downloading address of the target differential packet and a downloading address of the target basic packet;
a differential packet downloading module 502, configured to download the target differential packet according to a downloading address of the target differential packet;
a version matching module 503, configured to detect whether the target differential packet matches a base version of the target device;
a basic package downloading module 504, configured to download the target basic package according to the download address of the target basic package when the target basic package is not matched with the target basic package;
and the device upgrading module 505 is configured to upgrade the target device according to the target basic packet and the target differential packet.
In one possible implementation, the device upgrade module is further configured to,
and when the target differential packet is matched with the basic version of the target equipment, upgrading the version of the target equipment according to the target differential packet.
In one possible implementation, the device upgrade module is further configured to,
updating the version of the target equipment according to the target basic package to obtain target equipment of a target basic version;
and updating the version of the target equipment of the target basic version according to the target differential packet so as to realize the version upgrading of the target equipment.
In one possible implementation, the target device includes at least a primary partition and a backup partition; the backup partition is used for storing the downloaded target differential packages and the target basic packages;
the equipment upgrading module is also used for upgrading the equipment,
in the backup partition, performing differential solution operation on the target differential packet based on the target basic packet to obtain target version data;
and writing the target version data into a main partition in the target equipment to realize version upgrading of the target equipment.
In a possible implementation manner, the target differential packet includes basic version information;
the version matching module is further configured to,
acquiring a basic version of the target equipment;
and detecting whether the basic version of the target equipment is matched with the version information in the target differential packet.
In a possible implementation manner, the target differential packet includes basic version information;
the version matching module is further configured to,
acquiring a basic version of the target equipment;
and detecting whether the basic version of the target equipment is matched with the basic version information in the target upgrading information.
In one possible implementation, the apparatus further includes:
and the differential packet deleting module is used for deleting the target differential packet after the target equipment is detected to be upgraded.
In summary, when the version of the target device needs to be upgraded, the upgrade information of the version upgrade may be obtained first, where the upgrade information includes a download address of a target differential packet of a latest version pushed by the server and a download address of a target basic packet required for upgrading the target differential packet, and at this time, the target device downloads the target differential packet first, and after obtaining the target differential packet, it may verify whether the versions at this time match according to information in the target differential packet, and when the versions do not match, the basic packet is downloaded again, and the target device is updated directly by the target basic packet and the target differential packet, according to the above scheme, when the target device updates multiple versions, it is not necessary to obtain multiple differential packets and update one by one according to the dependency relationship of the differential packets, when the obtained target differential packet matches with the basic version, it is updated directly, the target basic package is downloaded again, that is, the target device can update the target version only by performing the differential package updating process once, so that the risk of updating errors caused by multiple updates is avoided, and the reliability of updating and upgrading the device is improved.
Refer to fig. 6, which is a schematic diagram of a computer device according to an exemplary embodiment of the present application, the computer device including a memory and a processor, the memory storing a computer program, and the computer program when executed by the processor implementing the method.
The processor may be a Central Processing Unit (CPU). The Processor may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, or a combination thereof.
The memory, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the methods of the embodiments of the present invention. The processor executes various functional applications and data processing of the processor by executing non-transitory software programs, instructions and modules stored in the memory, that is, the method in the above method embodiment is realized.
The memory may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created by the processor, and the like. Further, the memory may include high speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory optionally includes memory located remotely from the processor, and such remote memory may be coupled to the processor via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
In an exemplary embodiment, a computer readable storage medium is also provided for storing at least one computer program, which is loaded and executed by a processor to implement all or part of the steps of the above method. For example, the computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a Compact Disc Read-Only Memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (10)

1. A method for upgrading a target device, the method comprising:
receiving target upgrading information; the target upgrading information comprises a downloading address of the target differential packet and a downloading address of the target basic packet;
downloading the target differential packet according to the download address of the target differential packet;
detecting whether the target differential packet is matched with a basic version of the target device;
when the target basic package is not matched with the target basic package, downloading the target basic package according to the downloading address of the target basic package;
and upgrading the target equipment according to the target basic packet and the target differential packet.
2. The method of claim 1, further comprising:
and when the target differential packet is matched with the basic version of the target equipment, upgrading the version of the target equipment according to the target differential packet.
3. The method of claim 1, wherein the upgrading the target device according to the target base package and the target differential package comprises:
updating the version of the target equipment according to the target basic package to obtain target equipment of a target basic version;
and updating the version of the target equipment of the target basic version according to the target differential packet so as to realize the version upgrading of the target equipment.
4. The method of claim 1, wherein the target device comprises at least a primary partition and a backup partition; the backup partition is used for storing the downloaded target differential packages and the target basic packages;
the upgrading the target device according to the target basic packet and the target differential packet further includes:
in the backup partition, performing differential solution operation on the target differential packet based on the target basic packet to obtain target version data;
and writing the target version data into a main partition in the target equipment to realize version upgrading of the target equipment.
5. The method according to any one of claims 1 to 4, wherein the target differential packet includes base version information;
the detecting whether the target differential packet matches the base version of the target device includes:
acquiring a basic version of the target equipment;
and detecting whether the basic version of the target equipment is matched with the version information in the target differential packet.
6. The method according to any one of claims 1 to 3, wherein the target upgrade information includes basic version information;
the detecting whether the target differential packet matches the base version of the target device includes:
acquiring a basic version of the target equipment;
and detecting whether the basic version of the target equipment is matched with the basic version information in the target upgrading information.
7. The method of any of claims 1 to 4, further comprising:
and deleting the target differential packet after the target equipment is detected to be upgraded.
8. An apparatus for upgrading a target device, the apparatus comprising:
the upgrading information receiving module is used for receiving target upgrading information; the target upgrading information comprises a downloading address of the target differential packet and a downloading address of the target basic packet;
the differential packet downloading module is used for downloading the target differential packet according to the downloading address of the target differential packet;
the version matching module is used for detecting whether the target differential packet is matched with the basic version of the target equipment or not;
a basic package downloading module, configured to download the target basic package according to the download address of the target basic package when the target basic package is not matched with the target basic package;
and the equipment upgrading module is used for upgrading the target equipment according to the target basic packet and the target differential packet.
9. A computer device comprising a processor and a memory, the memory having at least one instruction, at least one program, a set of codes, or a set of instructions stored therein, the at least one instruction, at least one program, set of codes, or set of instructions being loaded and executed by the processor to implement the target device upgrade method according to any one of claims 1 to 7.
10. A computer readable storage medium having stored therein at least one instruction which is loaded and executed by a processor to implement the target device upgrade method according to any one of claims 1 to 7.
CN202111619236.XA 2021-12-27 2021-12-27 Target equipment upgrading method, device, equipment and storage medium Pending CN114268941A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111619236.XA CN114268941A (en) 2021-12-27 2021-12-27 Target equipment upgrading method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111619236.XA CN114268941A (en) 2021-12-27 2021-12-27 Target equipment upgrading method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114268941A true CN114268941A (en) 2022-04-01

Family

ID=80831030

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111619236.XA Pending CN114268941A (en) 2021-12-27 2021-12-27 Target equipment upgrading method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114268941A (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060112152A1 (en) * 2004-11-22 2006-05-25 Microsoft Corporation Smart patching by targeting particular prior versions of a file
US20090070374A1 (en) * 2005-12-20 2009-03-12 Telefonaktiebolaget L M Ericsson (Publ) Generating Incremental Program Updates
CN102880495A (en) * 2012-10-15 2013-01-16 华为终端有限公司 Mobile terminal and software upgrading method for same
CN103259936A (en) * 2013-05-21 2013-08-21 东莞宇龙通信科技有限公司 Operating system upgrade method for mobile terminal and operating system upgrade device of operating system upgrade method
CN105373410A (en) * 2015-12-22 2016-03-02 京信通信技术(广州)有限公司 Differential upgrading method and device for base station software
CN106658475A (en) * 2015-10-30 2017-05-10 上海中兴软件有限责任公司 Over-the-air technology upgrading method an over-the-air technology upgrading device
CN106873960A (en) * 2016-07-13 2017-06-20 阿里巴巴集团控股有限公司 The update method and equipment of a kind of application software
CN109032653A (en) * 2018-08-29 2018-12-18 百度在线网络技术(北京)有限公司 Pilotless automobile car-mounted terminal upgrade method, device, equipment and storage medium
CN112073994A (en) * 2020-09-03 2020-12-11 百度在线网络技术(北京)有限公司 Method and device for over-the-air upgrading, electronic equipment and readable storage medium
CN112306537A (en) * 2019-07-31 2021-02-02 北京君正集成电路股份有限公司 Processing method for upgrading equipment system
CN112416406A (en) * 2020-11-30 2021-02-26 腾讯科技(深圳)有限公司 Terminal equipment upgrading method and device, terminal equipment and medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060112152A1 (en) * 2004-11-22 2006-05-25 Microsoft Corporation Smart patching by targeting particular prior versions of a file
US20090070374A1 (en) * 2005-12-20 2009-03-12 Telefonaktiebolaget L M Ericsson (Publ) Generating Incremental Program Updates
CN102880495A (en) * 2012-10-15 2013-01-16 华为终端有限公司 Mobile terminal and software upgrading method for same
CN103259936A (en) * 2013-05-21 2013-08-21 东莞宇龙通信科技有限公司 Operating system upgrade method for mobile terminal and operating system upgrade device of operating system upgrade method
CN106658475A (en) * 2015-10-30 2017-05-10 上海中兴软件有限责任公司 Over-the-air technology upgrading method an over-the-air technology upgrading device
CN105373410A (en) * 2015-12-22 2016-03-02 京信通信技术(广州)有限公司 Differential upgrading method and device for base station software
CN106873960A (en) * 2016-07-13 2017-06-20 阿里巴巴集团控股有限公司 The update method and equipment of a kind of application software
CN109032653A (en) * 2018-08-29 2018-12-18 百度在线网络技术(北京)有限公司 Pilotless automobile car-mounted terminal upgrade method, device, equipment and storage medium
CN112306537A (en) * 2019-07-31 2021-02-02 北京君正集成电路股份有限公司 Processing method for upgrading equipment system
CN112073994A (en) * 2020-09-03 2020-12-11 百度在线网络技术(北京)有限公司 Method and device for over-the-air upgrading, electronic equipment and readable storage medium
CN112416406A (en) * 2020-11-30 2021-02-26 腾讯科技(深圳)有限公司 Terminal equipment upgrading method and device, terminal equipment and medium

Similar Documents

Publication Publication Date Title
US9075693B2 (en) Methods for updating applications
US8719810B2 (en) Program upgrade system and method for over the air-capable mobile terminal
CN105786538B (en) software upgrading method and device based on android system
US20040062130A1 (en) Updating electronic files using byte-level file differencing and updating algorithms
US20050289534A1 (en) Method for upgrading software version of mobile terminal using integrated difference files
US8544053B2 (en) System and method for upgrading a multiprocessor set-top box device with a monolithilic firmware image
KR101201276B1 (en) Method, software and apparatus for performing actions on a wireless device using action lists and versioning
WO2019056187A1 (en) Application deployment method, apparatus and system
CN110457049B (en) Method and device for realizing plug-in automation, electronic equipment and storage medium
US20210349710A1 (en) Software update agent device and software patching method through the same
CN104699511A (en) Plug-in upgrading method and plug-in upgrading device
CN110765394A (en) So file loading method and device, storage medium and terminal equipment
CN114090033A (en) OTA (over the air) upgrading method and device, electronic equipment and readable medium
CN110851151B (en) Method, device, terminal, server and storage medium for pre-installing application
WO2020233045A1 (en) Plug-in update method and device, server and computer readable storage medium
US10078532B2 (en) Resource management method and device for terminal system among multiple operating systems
CN111752577B (en) Upgrading method and equipment for system version
CN106354832B (en) Data publishing method, device and system
KR20070095530A (en) Method for providing patch data to client terminals and game providing system of enabling the method
CN113094064A (en) Gateway software module upgrading method, device, equipment and storage medium
CN112882743A (en) Software upgrading method
CN116069366A (en) Client application program updating method and device, storage medium and electronic equipment
EP2680135B1 (en) Methods for updating applications
CN114268941A (en) Target equipment upgrading method, device, equipment and storage medium
CN114610366A (en) Difference package upgrading method and system, intelligent electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination