Software upgrade method and related device

By sending update requests to the server and receiving differential packages, splitting and merging resource blocks, the problems of high code invasiveness, high development costs and system compatibility in the existing software upgrade methods are solved, and incremental updates and security improvements of applications are achieved.

CN114327548BActive Publication Date: 2025-04-01GUANG DONG MING CHUANG SOFTWARE TECH CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111604181.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-24
Publication Date
2025-04-01
Estimated Expiration
2041-12-24

AI Technical Summary

Technical Problem

Among the existing software upgrade methods, the plug-in solution is highly invasive to code, has high development costs, and has system compatibility problems and low security.

Method used

By sending update requests to the server, receiving version update differential packages, splitting them into multiple resource blocks, and merging them into the application to achieve incremental updates of the application.

Benefits of technology

Incremental updates to applications are implemented, reducing the size of update installation packages, and allowing updates while the application is running, reducing development costs and system compatibility risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114327548B_ABST
    Figure CN114327548B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a software upgrade method and related devices, the method comprising: sending a first update request for a first application to a server; receiving a first update package from the server, the first update package being a version update differential package of the first application, the version update differential package comprising a file set of changed files of the first installation package relative to the second installation package, the second installation package being an installation package of a previous version of the first installation package, and the first installation package being an installation package of the latest version of the first application; splitting the first update package into multiple resource blocks; merging the multiple resource blocks into the first application to update the first application to the first application corresponding to the version of the first installation package. In this way, an incremental update corresponding to the first application is achieved, the size of the update installation package is reduced, and the application can be updated while it is running.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of software upgrade, and specifically relates to a software upgrade method and related devices. Background Art

[0002] Currently, existing software upgrades generally use plug-in solutions. Application developers can manually package some codes separately and send them to the application, and they will take effect in real time through the loading mechanism of the Android system.

[0003] However, this plug-in solution is highly invasive to the code, requires developers to invest relatively high development costs, involves many system compatibility issues, and has low security. Summary of the invention

[0004] The embodiments of the present application provide a software upgrade method and related devices to correspond to the incremental update of a first application.

[0005] In a first aspect, an embodiment of the present application provides a software upgrade method, which is applied to a first user device, and includes: sending a first update request for a first application to a server; receiving a first update package from the server, the first update package being a version update differential package of the first application, the version update differential package including a file set of changed files of the first installation package relative to a second installation package, the second installation package being an installation package of a previous version of the first installation package, and the first installation package being an installation package of the latest version of the first application; splitting the first update package into multiple resource blocks; and merging the multiple resource blocks into the first application to update the first application to a first application corresponding to the version of the first installation package.

[0006] In the second aspect, an embodiment of the present application provides a software upgrade method, which is applied to a server, and includes: receiving a first update request for a first application from a first user device; in response to the first update request, sending a first update package to the first user device, the first update package being a version update differential package of the first application, the version update differential package including a file set of changed files of the first installation package relative to the second installation package, the second installation package being an installation package of a previous version of the first installation package, the first installation package being an installation package of the latest version of the first application, and the first update package being used to participate in the update of the first application in the form of multiple resource blocks.

[0007] In the third aspect, an embodiment of the present application provides a software upgrade device, which is applied to a first user device, including: a sending unit, used to send a first update request for a first application to a server; a receiving unit, used to receive a first update package from the server, the first update package is a version update differential package of the first application, the version update differential package includes a file set of changed files of the first installation package relative to the second installation package, the second installation package is an installation package of a previous version of the first installation package, and the first installation package is an installation package of the latest version of the first application; a splitting unit, used to split the first update package into multiple resource blocks; an updating unit, used to merge the multiple resource blocks into the first application, so as to update the first application to a first application corresponding to the version of the first installation package.

[0008] In a fourth aspect, an embodiment of the present application provides a software upgrade device, which is applied to a server, including: a receiving unit, used to receive a first update request for a first application from a first user device; a sending unit, used to send a first update package to the first user device in response to the first update request, the first update package being a version update differential package of the first application, the version update differential package including a file set of changed files of the first installation package relative to the second installation package, the second installation package being an installation package of a previous version of the first installation package, the first installation package being an installation package of the latest version of the first application, and the first update package being used to participate in the update of the first application in the form of multiple resource blocks.

[0009] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the program comprises instructions for executing the steps of any one of the first to fourth aspects of the embodiments of the present application.

[0010] In a sixth aspect, an embodiment of the present application provides a computer storage medium, characterized in that it stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the steps described in any one of the first to fourth aspects of this embodiment.

[0011] In a seventh aspect, an embodiment of the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps described in any one of the first to fourth aspects of the embodiments of the present application. The computer program product may be a software installation package.

[0012] It can be seen that in the embodiment of the present application, first, a first update request for a first application is sent to a server; a first update package is received from the server, the first update package is a version update differential package of the first application, the version update differential package includes a file set of changed files of the first installation package relative to the second installation package, the second installation package is an installation package of the previous version of the first installation package, and the first installation package is an installation package of the latest version of the first application; the first update package is split into multiple resource blocks; the multiple resource blocks are merged into the first application to update the first application to the first application corresponding to the version of the first installation package. In this way, an incremental update of the corresponding first application is achieved, the size of the update installation package is reduced, and the application can be updated while it is running. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] 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 will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0014] Figure 1 is a schematic diagram of an electronic device provided in an embodiment of the present application;

[0015] Figure 2 It is a flowchart of a software upgrade method provided in an embodiment of the present application;

[0016] Figure 3 It is a flowchart of another software upgrade method provided in an embodiment of the present application;

[0017] Figure 4a This is a block diagram of the functional units of a software upgrade device provided in an embodiment of the present application;

[0018] Figure 4b It is a block diagram of the functional units of another software upgrading device provided in an embodiment of the present application;

[0019] Figure 5a It is a block diagram of the functional units of another software upgrading device provided in an embodiment of the present application;

[0020] Figure 5b This is a block diagram of the functional units of another software upgrading device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0021] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only 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.

[0022] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.

[0023] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0024] The following is an introduction to the relevant terms involved in this application.

[0025] Incremental update: Incremental update means that when performing an update operation, only the parts that need to be changed are updated, and the parts that do not need to be updated or have been updated will not be updated repeatedly. Incremental update is the opposite of full update. This concept of update has a wide range of applications and is used wherever data needs to be updated, such as software updates, database updates, virus database updates for antivirus software, CMS updates, and routing table updates.

[0026] At present, existing software upgrades generally use plug-in solutions, where application developers can manually package and distribute part of the code separately to the application and take effect in real time through the loading mechanism of the Android system. However, this plug-in solution is highly invasive to the code, requires developers to invest relatively high development costs, and also involves many system compatibility issues, and has low security.

[0027] To solve the above problems, an embodiment of the present application provides a software upgrade method. The software upgrade method can be applied to the scenario of upgrading an application. A first update request for a first application can be sent to a server; then a first update package can be received from the server, the first update package is a version update differential package of the first application, the version update differential package includes a file set of changed files of the first installation package relative to the second installation package, the second installation package is an installation package of the previous version of the first installation package, and the first installation package is an installation package of the latest version of the first application; then the first update package is split into multiple resource blocks; finally, the multiple resource blocks are merged into the first application to update the first application to the first application corresponding to the version of the first installation package. This solution can be applicable to a variety of scenarios, including but not limited to the application scenarios mentioned above.

[0028] The following introduces the system architecture involved in the embodiments of the present application.

[0029] The present application also provides an electronic device 10, such as Figure 1 As shown, it includes at least one processor 11; a display screen 12; and a memory 13, and may also include a communications interface 15 and a bus 14. The processor 11, the display screen 12, the memory 13 and the communications interface 15 can communicate with each other through the bus 14. The display screen 12 is configured to display a preset user guide interface in the initial setting mode. The communications interface 15 can transmit information. The processor 11 can call the logic instructions in the memory 13 to execute the method in the above embodiment.

[0030] Optionally, the electronic device 10 may be a user device, or an electronic device or other device, which is not limited to any uniqueness herein.

[0031] Among them, the user equipment can be a mobile phone, a tablet computer (pad), a desktop computer, a laptop computer, an all-in-one computer, a vehicle-mounted terminal, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical surgery, a wireless terminal in a smart grid, a wireless terminal in transportation safety, a wireless terminal in a smart city, a wireless terminal in a smart home, a cellular phone, a cordless phone, a session initiation protocol (SIP) phone, a wireless local loop (WLL) station, a personal digital assistant (PDA), a handheld device with wireless communication function, a computing device or other processing device connected to a wireless modem, a wearable device, a terminal device in a future mobile communication network or a terminal device in a future evolved public mobile land network (PLMN), etc., and no unique limitation is made here.

[0032] In addition, the logic instructions in the memory 13 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.

[0033] The memory 13, as a computer-readable storage medium, can be configured to store software programs, computer executable programs, such as program instructions or modules corresponding to the methods in the embodiments of the present disclosure. The processor 11 executes functional applications and data processing by running the software programs, instructions or modules stored in the memory 13, that is, implementing the methods in the above embodiments.

[0034] The memory 13 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the electronic device 10, etc. In addition, the memory 13 may include a high-speed random access memory and may also include a non-volatile memory. For example, a variety of 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, may also be a transient storage medium.

[0035] The specific methods are introduced in detail below.

[0036] See also Figure 2 The present application also provides a software upgrade method, which can be applied to the electronic device as described above, and in this embodiment is specifically applied to the first user equipment, including the following steps:

[0037] Step 201: Send a first update request for a first application to a server.

[0038] In a possible embodiment, before sending a first update request for a first application to a server, the process includes: sending a version inquiry message for the first application to the server; receiving a first version response message for the version inquiry message from the server; and detecting that the first version response message indicates that the first application is not the latest version.

[0039] Illustratively, the first version response message is used to indicate that the first application is not the latest version.

[0040] In a specific implementation, one or more applications are installed in the first user device, and the first application is any one of the one or more applications. The first user device sends a version query message for the first application to the server, and then the first user device receives a first version response message for the version query message from the server, determines that the first application is not the latest version according to the first version response message, and then executes step 201.

[0041] Furthermore, the first user device can send corresponding version inquiry messages to the server in sequence for the one or more applications to query the update of the one or more applications. In addition, the time node for sending the version inquiry message can be set, for example, sending the version inquiry message at midnight every day, or sending the version inquiry message every preset time, or sending the version inquiry message when the phone is off. It can be understood that the time node can be set in any way and can be a combination of multiple rules, and is not limited to uniqueness here.

[0042] It can be seen that in this embodiment, by sending a version inquiry message to the server, it is determined whether the first application needs to be updated.

[0043] Step 202: Receive a first update package from the server.

[0044] Among them, the first update package is a version update differential package of the first application, and the version update differential package includes a file set of changed files of the first installation package relative to the second installation package, the second installation package is an installation package of the previous version of the first installation package, and the first installation package is an installation package of the latest version of the first application.

[0045] In a possible embodiment, before receiving the first update package from the server, the method further includes: receiving a download address from the server; and sending a download request message for the corresponding first update package to the server according to the download address.

[0046] In a specific implementation, after the first user device sends a first update request to the server, the server sends a download address of a first update package of the first application to the first user device, and then the first user device downloads the corresponding first update package according to the download address.

[0047] It can be seen that in this embodiment, the downloading of the first update package is implemented.

[0048] Step 203: split the first update package into multiple resource blocks.

[0049] In a possible embodiment, splitting the first update package into multiple resource blocks includes: obtaining an installation process record of the initial installation package of the first application; and splitting the first update package into corresponding multiple resource blocks according to the multiple resource files to be loaded in the installation process record.

[0050] For example, the initial installation package is an installation package used when the first user device installs the first application for the first time.

[0051] In a specific implementation, when the first user device installs the first application for the first time, the installation process of the initial installation package of the first application is recorded to obtain an installation process record. The installation process record records multiple resource files to be loaded for installing the first application. Therefore, in order to comply with the installation process of the first application, the first update package is split into multiple corresponding resource blocks.

[0052] It can be seen that in this embodiment, based on the multiple resource files to be loaded in the installation process record of the initial installation package of the first application, the first update package is split into corresponding multiple resource blocks, so that in the process of updating the first application, the corresponding resource files can be updated without the need for a complete installation package.

[0053] Step 204: merge the multiple resource blocks into the first application to update the first application to a first application corresponding to the version of the first installation package.

[0054] In a possible embodiment, merging the multiple resource blocks into the first application includes: determining a first loading order in which the multiple resource blocks are loaded into the memory; and merging the multiple resource blocks into the first application in sequence according to the first loading order.

[0055] In a specific implementation, in the existing update process, under normal circumstances, the application cannot be updated and installed while the application is running, and can only be suspended and automatically installed and updated in the next detection cycle. In order to achieve the purpose of being able to update the first application while it is running, this embodiment needs to first determine the first loading order in which the multiple resource modules are loaded into the memory, and then update the resource files of the first application in sequence according to the first loading order, so that the resource files are finally updated one by one during the operation of the first application, and there is no need to restart the first application after the update is completed.

[0056] It can be seen that in this embodiment, updating of an application during operation is achieved.

[0057] The following is an example to illustrate how to determine the first loading order.

[0058] Method 1: Determining the first loading order in which the multiple resource blocks are loaded into the memory includes: obtaining the first time when each of the multiple resource files in the installation process record is loaded into the memory; associating each of the multiple resource blocks with the first time of the corresponding resource file to obtain a first loading order sorted by the first time.

[0059] In a specific implementation, when installing the initial installation package, the first user device will record the first time each resource file in the initial installation package is loaded into the memory, and the order in which each resource file is loaded into the memory can be determined according to the first time. Finally, the first time of the resource file corresponding to the resource block is associated, and then the multiple resource blocks are sorted according to the order of each first time to obtain the first loading order.

[0060] Furthermore, there may be a situation where there are fewer resource blocks than resource files. In this situation, the corresponding first loading order may also be obtained according to the first time sequence.

[0061] It can be seen that in this embodiment, the first loading order of the multiple resource blocks is determined by the time sequence in which the multiple resource files are loaded into the memory during the installation process of the initial installation package.

[0062] Method 2: Determining the first loading order in which the multiple resource blocks are loaded into the memory includes: obtaining a loading order record, the loading order record including multiple sequence identifiers, the multiple sequence identifiers corresponding one-to-one to the multiple resource files, each sequence identifier in the multiple sequence identifiers is used to indicate the order in which the corresponding resource files are loaded into the memory; associating each resource block in the multiple resource blocks with the sequence identifier of the corresponding resource file to obtain a first loading order sorted by the sequence identifiers.

[0063] In a specific implementation, when installing the initial installation package, the first user device will associate a sequence identifier with each resource file loaded into the memory, and the sequence identifier is used to indicate the order in which each resource file is loaded into the memory. For example, if resource file 1 is loaded into the memory first, then resource file 1 is associated with sequence identifier 1; if resource file 3 is loaded into the memory second, then resource file 3 is associated with sequence identifier 2, and so on, and finally the order in which all resource files are loaded into the memory is obtained. Finally, multiple resource blocks are associated with the sequence identifiers of the corresponding resource files, and then the multiple resource blocks are sorted according to the serial number of each sequence identifier to obtain the first loading order.

[0064] It can be seen that in this embodiment, during the installation process of the initial installation package, a sequence identifier is set for the sequence in which the multiple resource files are loaded into the memory to determine the first loading sequence of the multiple resource blocks.

[0065] In a possible embodiment, merging the multiple resource blocks into the first application in sequence according to the first loading order includes: performing the following operations for the multiple resource blocks in sequence according to the first loading order: obtaining the resource blocks that need to be processed in the current order; determining the change type of the resource block relative to the corresponding resource file in the first application, the change type including addition, deletion and modification; and merging the resource block with the corresponding resource file in the first application according to the change type.

[0066] In a specific implementation, the Android system includes an incremental file subsystem, which is used to perform specific operations of incremental updates. Specifically, the first resource block in the first loading order is obtained, and the first resource block is written into the incremental file subsystem. The incremental file subsystem then merges the first resource block with the corresponding resource file in the running first application according to the change type, thereby completing the update of the first resource block. Then, the next resource block is obtained in turn and written into the incremental file subsystem for updating, until the multiple resource blocks are successively merged into the first application according to the first loading order, and the update of the first application is completed.

[0067] It can be seen that in this embodiment, the resource blocks are updated one by one into the first application according to the first loading sequence.

[0068] In a possible embodiment, the resource block is merged with the corresponding resource file in the first application according to the change type, including: if the change type is addition, the resource block is directly added to the corresponding resource file; if the change type is deletion, the resource file corresponding to the resource block is deleted or the unit corresponding to the resource block in the corresponding resource file is deleted; if the change type is modification, the resource block and the resource file are replaced.

[0069] In a specific implementation, a corresponding change type identifier can be set for each resource block, and then the change type corresponding to each resource block can be determined by the change type identifier. Then, for a resource block whose change type is newly added, the resource block is directly added to the corresponding resource file, and the corresponding content is added to the corresponding resource file; for a resource block whose change type is deleted, since it may be part of the content of the corresponding resource file or the entire resource file is deleted, it is determined whether to delete the entire corresponding resource file or part of the content of the corresponding resource file according to the deleted content of the resource block; for a resource block whose change type is modified, the resource block is replaced with the resource file or the modified content can be replaced.

[0070] It can be seen that in this embodiment, different merging operations are performed for different change types.

[0071] In a possible embodiment, the method further includes: if it is detected that part of the content in the first update package has no corresponding resource file, directly adding the part of the content to the first application.

[0072] In the specific implementation, in actual applications, there may be a situation where new resource files are added. In this case, some content in the first update package does not have a corresponding resource file in the first application. Therefore, this part of the content is divided into independent resource blocks. When updating, the independent resource blocks are directly added to the first application.

[0073] It can be seen that in this embodiment, the update of the newly added resource file is achieved.

[0074] In summary, in the embodiment of the present application, first, a first update request for a first application is sent to a server; a first update package is received from the server, the first update package is a version update differential package of the first application, the version update differential package includes a file set of changed files of the first installation package relative to the second installation package, the second installation package is an installation package of the previous version of the first installation package, and the first installation package is an installation package of the latest version of the first application; the first update package is split into multiple resource blocks; the multiple resource blocks are merged into the first application to update the first application to the first application corresponding to the version of the first installation package. In this way, an incremental update of the corresponding first application is achieved, the size of the update installation package is reduced, and the application can be updated while it is running.

[0075] The above mainly introduces the solution of the embodiment of the present application from the perspective of the method execution process on the terminal side. The following introduces the solution of the embodiment of the present application from the perspective of the method execution process on the server side.

[0076] See also Figure 3 The embodiment of the present application also provides a software upgrade method, which is applied to a server and includes:

[0077] Step 301: Receive a first update request for a first application from a first user device.

[0078] Step 302: In response to the first update request, send a first update package to the first user equipment.

[0079] Among them, the first update package is a version update differential package of the first application, the version update differential package includes a file set of changed files of the first installation package relative to the second installation package, the second installation package is an installation package of the previous version of the first installation package, the first installation package is the installation package of the latest version of the first application, and the first update package is used to participate in the update of the first application in the form of multiple resource blocks.

[0080] It can be seen that in this embodiment, an incremental update of the corresponding first application is implemented, the size of the update installation package is reduced, and the update can be performed while the application is running.

[0081] In a possible embodiment, before receiving a first update request for a first application from a first user device, the method further includes: receiving a first installation package for the first application from a second user device; obtaining a second installation package of a previous version of the first installation package; and splitting out a file set of changed files of the first installation package relative to the second installation package to obtain a first update package.

[0082] In an exemplary embodiment, the second user device is a user device corresponding to a software developer of the first application.

[0083] In a specific implementation, the software developer uploads a first installation package for the first application through a second user device, and then the server receives the first installation package and simultaneously obtains a second installation package which is a previous version of the first installation package. The first installation package and the second installation package are compared in memory through a differential algorithm, and a file set of changed files of the first installation package relative to the second installation package is identified to obtain a first update package.

[0084] It can be seen that, in this embodiment, the first update package is obtained by comparing the differences between the first installation package and the second installation package.

[0085] In a possible embodiment, after obtaining the first update package, the method also includes: receiving a version inquiry message from a first user device; obtaining a first version number of the first application corresponding to the inquiry message; comparing the first version number with the latest version number of the first application; if the first version number is inconsistent with the latest version number, sending a first version response message to the first user device; if the first version number is consistent with the latest version number, sending a second version response message to the first user device.

[0086] In a specific implementation, the version inquiry message carries the first version number of the first application corresponding to the first user device, and the first version number is obtained from the version inquiry message. The first version number is then compared with the latest version number in the first installation package. If the first version number is inconsistent with the latest version number, it means that the first application in the first user device is not the latest version, so a first version response message is sent to the first user device; if the first version number is consistent with the latest version number, it means that the first application in the first user device is the latest version, so a second version response message is sent to the first user device.

[0087] It can be seen that in this embodiment, whether the first application in the first user equipment is the latest version is determined by comparing the version numbers.

[0088] The following is an example of interaction between the server side and the user device side.

[0089] In a specific implementation, the second user device of the software developer uploads the first installation package for the first application through the second user device. Then the server receives the first installation package, and obtains the second installation package of the previous version of the first installation package at the same time, compares the first installation package and the second installation package in the memory through a differential algorithm, identifies the file set of the changed files of the first installation package relative to the second installation package, and obtains the first update package. The first user device sends a version inquiry message for the first application to the server. The server receives the version inquiry message from the first user device, and then obtains the first version number of the corresponding first application from the inquiry message, and then compares the first version number with the latest version number of the first application, and sends a first version response message to the first user device if the first version number is inconsistent with the latest version number. Then the first user device receives the first version response message for the version inquiry message from the server, determines that the first application is not the latest version according to the first version response message, and then sends a first update request for the first application to the server. Then, the server receives the first update request for the first application from the first user device, responds to the first update request, and sends a first update package to the first user device. The first user equipment receives a first update package from the server, splits the first update package into multiple resource blocks, and then merges the multiple resource blocks into the first application to update the first application to a first application corresponding to the version of the first installation package.

[0090] The above mainly introduces the scheme of the embodiment of the present application from the perspective of the execution process of the method side. It is understandable that, in order to realize the above functions, the electronic device or server includes a hardware structure and / or software module corresponding to the execution of each function. It should be easily appreciated by those skilled in the art that, in combination with the units and algorithm steps of each example described in the embodiments provided herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware 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 application.

[0091] The embodiment of the present application can divide the electronic device or server into functional units according to the above method example. For example, each functional unit can be divided corresponding to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0092] See also Figure 4a The present application also provides a software upgrade device, applied to a first user equipment, the device comprising:

[0093] A sending unit 401 is used to send a first update request for a first application to a server;

[0094] The receiving unit 402 is configured to receive a first update package from the server, where the first update package is a version update differential package of the first application, and the version update differential package includes a file set of changed files of the first installation package relative to the second installation package, where the second installation package is an installation package of a previous version of the first installation package, and the first installation package is an installation package of the latest version of the first application;

[0095] A splitting unit 404, configured to split the first update package into a plurality of resource blocks;

[0096] The updating unit 403 is configured to merge the multiple resource blocks into the first application program to update the first application program to a first application program corresponding to the version of the first installation package.

[0097] It can be seen that in this embodiment, an incremental update of the corresponding first application is implemented, the size of the update installation package is reduced, and the update can be performed while the application is running.

[0098] It can be understood that since the method embodiment and the device embodiment are different presentation forms of the same technical concept, the content of the method embodiment part in this application should be synchronously adapted to the device embodiment part and will not be repeated here.

[0099] In the case of an integrated unit, such as Figure 4b As shown, Figure 4b This is a functional unit block diagram of another software upgrade device provided in an embodiment of the present application. Figure 4b In the embodiment, the software upgrade device 41 includes: a processing module 412 and a communication module 411. The processing module 412 is used to control and manage the actions of the software upgrade device 41, for example, to execute the steps of the sending unit 401, the receiving unit 402, the updating unit 403 and the splitting unit 404, and / or to execute other processes of the technology described herein. The communication module 411 is used to support the interaction between the software upgrade device 41 and other devices. Figure 4b As shown, the software upgrade device 41 may further include a storage module 413, and the storage module 413 is used to store program codes and data of the software upgrade device.

[0100] Among them, the processing module 412 can be a processor or a controller, for example, a central processing unit (CPU), a general processor, a digital signal processor (DSP), an ASIC, an FPGA or other programmable logic device, a transistor logic device, a hardware component or any combination thereof. It can implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements a computing function, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like. The communication module 411 can be a transceiver, an RF circuit or a communication interface, and the like. The storage module 413 can be a memory.

[0101] Among them, all relevant contents of each scenario involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here. The above software upgrade device 41 can execute the above Figure 2 The compilation method shown.

[0102] See also Figure 5a The present application also provides a software upgrade device, which is applied to a server, and the device comprises:

[0103] A receiving unit 501 is configured to receive a first update request for a first application from a first user equipment;

[0104] A sending unit 502 is used to send a first update package to the first user device in response to the first update request, where the first update package is a version update differential package of the first application, and the version update differential package includes a file set of changed files of the first installation package relative to the second installation package, the second installation package is an installation package of a previous version of the first installation package, and the first installation package is an installation package of the latest version of the first application, and the first update package is used to participate in the update of the first application in the form of multiple resource blocks.

[0105] It can be seen that in this embodiment, an incremental update of the corresponding first application is implemented, the size of the update installation package is reduced, and the update can be performed while the application is running.

[0106] It can be understood that since the method embodiment and the device embodiment are different presentation forms of the same technical concept, the content of the method embodiment part in this application should be synchronously adapted to the device embodiment part and will not be repeated here.

[0107] In the case of an integrated unit, such as Figure 5b As shown, Figure 5b This is a functional unit block diagram of another software upgrade device provided in an embodiment of the present application. Figure 5b In the embodiment, the software upgrade device 51 includes: a processing module 512 and a communication module 511. The processing module 512 is used to control and manage the actions of the software upgrade device 51, for example, to execute the steps of the receiving unit 501 and the sending unit 502, and / or to execute other processes of the technology described herein. The communication module 511 is used to support the interaction between the software upgrade device 51 and other devices. Figure 5b As shown, the software upgrade device 51 may further include a storage module 513, and the storage module 513 is used to store program codes and data of the software upgrade device.

[0108] Among them, the processing module 512 can be a processor or a controller, for example, a central processing unit (CPU), a general processor, a digital signal processor (DSP), an ASIC, an FPGA or other programmable logic device, a transistor logic device, a hardware component or any combination thereof. It can implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements a computing function, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like. The communication module 511 can be a transceiver, an RF circuit or a communication interface, and the like. The storage module 513 can be a memory.

[0109] Among them, all relevant contents of each scenario involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here. The above software upgrade device 51 can execute the above Figure 3 The compilation method shown.

[0110] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired or wireless means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.

[0111] An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the steps of any method described in the above method embodiments, and the above computer includes an electronic device.

[0112] The embodiment of the present application also provides a computer program product, the computer program product includes a non-transitory computer-readable storage medium storing a computer program, the computer program is operable to cause a computer to execute some or all of the steps of any method described in the method embodiment. The computer program product may be a software installation package, and the computer includes an electronic device.

[0113] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned 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.

[0114] In the several embodiments provided in the present application, it should be understood that the disclosed methods, devices and systems can be implemented in other ways. For example, the device embodiments described above are merely schematic; for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation; for example, 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.

[0115] 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.

[0116] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may be physically included separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0117] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform some steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a volatile memory or a non-volatile memory. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM) or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM) and direct RAM bus RAM (DR RAM). Various media that can store program code are available.

[0118] Although the present invention is disclosed as above, the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions without departing from the spirit and scope of the present invention, and can make various changes and modifications, including the combination of the above-mentioned different functions and implementation steps, including software and hardware implementation methods, all of which are within the scope of protection of the present invention.

Claims

1. A software upgrade method, characterized in that: Applied to a first user device, comprising: Sending a first update request for a first application to a server; Receive a first update package from the server, where the first update package is a version update differential package of the first application, and the version update differential package includes a file set of changed files of the first installation package relative to the second installation package, where the second installation package is an installation package of a previous version of the first installation package, and the first installation package is an installation package of the latest version of the first application; Splitting the first update package into multiple resource blocks includes: obtaining an installation process record of an initial installation package of the first application; splitting the first update package into corresponding multiple resource blocks according to multiple resource files to be loaded in the installation process record; Merging the multiple resource blocks into the first application to update the first application to a first application corresponding to the version of the first installation package, including: determining a first loading order in which the multiple resource blocks are loaded into the memory; and merging the multiple resource blocks into the first application in sequence according to the first loading order.

2. The method according to claim 1, characterized in that The determining a first loading order in which the plurality of resource blocks are loaded into the memory comprises: Obtaining the first time when each of the plurality of resource files in the installation process record is loaded into the memory; Each resource block in the plurality of resource blocks is associated with the first time of the corresponding resource file to obtain a first loading sequence sorted by the first time.

3. The method according to claim 1, characterized in that The determining a first loading order in which the plurality of resource blocks are loaded into the memory comprises: Acquire a loading sequence record, the loading sequence record comprising a plurality of sequence identifiers, the plurality of sequence identifiers corresponding one-to-one to the plurality of resource files, each of the plurality of sequence identifiers being used to indicate an order in which a corresponding resource file is loaded into the memory; Each resource block in the multiple resource blocks is associated with a sequence identifier of a corresponding resource file to obtain a first loading sequence sorted by the sequence identifiers.

4. The method according to claim 1, characterized in that: The step of sequentially merging the plurality of resource blocks into the first application program according to the first loading sequence includes: According to the first loading order, the following operations are performed in sequence for the multiple resource blocks: Get the resource blocks that need to be processed in the current order; Determine a change type of the resource block relative to a corresponding resource file in the first application, the change type including addition, deletion and modification; The resource block is merged with a corresponding resource file in the first application according to the change type.

5. The method according to claim 4, characterized in that The merging of the resource block with a corresponding resource file in the first application according to the change type includes: If the change type is new addition, the resource block is directly added to the corresponding resource file; If the change type is deletion, deleting the resource file corresponding to the resource block or deleting the unit corresponding to the resource block in the corresponding resource file; If the change type is modification, the resource block and the resource file are replaced.

6. The method according to claim 1, characterized in that The method further comprises: If it is detected that part of the content in the first update package has no corresponding resource file, the part of the content is directly added to the first application.

7. The method according to any one of claims 1 to 6, characterized in that: Before sending the first update request for the first application to the server, the method includes: Sending a version inquiry message for the first application to the server; receiving a first version response message for the version query message from the server; The first version response message is detected indicating that the first application is not the latest version.

8. A software upgrade method, characterized in that: Applicable to servers, including: receiving a first update request for a first application from a first user device; In response to the first update request, a first update package is sent to the first user device, the first update package being a version update differential package of the first application, the version update differential package including a file set of changed files of the first installation package relative to the second installation package, the second installation package being an installation package of a previous version of the first installation package, the first installation package being an installation package of the latest version of the first application, the first update package being used to participate in the update of the first application in the form of multiple resource blocks, the first update package being performed by the first user device to determine the multiple resource blocks: the first user device obtains an installation process record of the initial installation package of the first application; the first user device splits the first update package into corresponding multiple resource blocks according to the multiple resource files to be loaded in the installation process record.

9. The method according to claim 8, characterized in that Before receiving a first update request for a first application from a first user device, the method further includes: Receiving a first installation package for the first application from a second user device; Obtain a second installation package of a previous version of the first installation package; A file set of changed files of the first installation package relative to the second installation package is separated to obtain a first update package.

10. The method according to claim 9, characterized in that After obtaining the first update package, the method further includes: Receiving a version inquiry message from a first user device; Obtaining a first version number of a first application corresponding to the query message; Comparing the first version number with the latest version number of the first application; If the first version number is inconsistent with the latest version number, sending a first version response message to the first user equipment; If the first version number is consistent with the latest version number, a second version response message is sent to the first user equipment.

11. A software upgrade device, characterized in that: Applied to a first user device, comprising: A sending unit, configured to send a first update request for a first application to a server; a receiving unit, configured to receive a first update package from the server, wherein the first update package is a version update differential package of the first application, the version update differential package includes a file set of changed files of the first installation package relative to the second installation package, the second installation package is an installation package of a previous version of the first installation package, and the first installation package is an installation package of the latest version of the first application; A splitting unit, configured to split the first update package into a plurality of resource blocks, comprising: obtaining an installation process record of an initial installation package of the first application; and splitting the first update package into a plurality of corresponding resource blocks according to a plurality of resource files to be loaded in the installation process record; An updating unit, used for merging the multiple resource blocks into the first application to update the first application to a first application corresponding to the version of the first installation package, comprising: determining a first loading order in which the multiple resource blocks are loaded into the memory; and merging the multiple resource blocks into the first application in sequence according to the first loading order.

12. A software upgrade device, characterized in that: Applicable to servers, including: A receiving unit, configured to receive a first update request for a first application from a first user device; A sending unit is used to send a first update package to the first user device in response to the first update request, the first update package being a version update differential package of the first application, the version update differential package including a file set of changed files of the first installation package relative to the second installation package, the second installation package being an installation package of a previous version of the first installation package, the first installation package being an installation package of the latest version of the first application, the first update package being used to participate in the update of the first application in the form of multiple resource blocks, the first update package being performed by the first user device to determine the multiple resource blocks: the first user device obtains an installation process record of an initial installation package of the first application; the first user device splits the first update package into corresponding multiple resource blocks according to the multiple resource files to be loaded in the installation process record.

13. An electronic device, characterized in that: The method comprises a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, wherein the programs include instructions for executing the steps in the method according to any one of claims 1 to 10, or the programs include instructions for the steps of the apparatus according to claim 11 or 12.

14. A computer-readable storage medium, characterized in that: A computer program for electronic data exchange is stored, wherein the computer program enables a computer to execute instructions of the steps in the method according to any one of claims 1 to 10, or instructions of the steps of the device according to claim 11 or 12.

15. A computer program product, characterized in that A non-transitory computer-readable storage medium storing a computer program, wherein the computer program can be operated to cause a computer to execute instructions of the steps in the method according to any one of claims 1 to 10, or instructions of the steps of the apparatus according to claim 11 or 12.

Citation Information

Patent Citations

  • Terminal software upgrading method and device

    CN104932909A