CN113553090A - Update control method and device for client application program - Google Patents

Update control method and device for client application program Download PDF

Info

Publication number
CN113553090A
CN113553090A CN202110844287.6A CN202110844287A CN113553090A CN 113553090 A CN113553090 A CN 113553090A CN 202110844287 A CN202110844287 A CN 202110844287A CN 113553090 A CN113553090 A CN 113553090A
Authority
CN
China
Prior art keywords
file
migrated
client application
package
packed
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.)
Granted
Application number
CN202110844287.6A
Other languages
Chinese (zh)
Other versions
CN113553090B (en
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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202110844287.6A priority Critical patent/CN113553090B/en
Publication of CN113553090A publication Critical patent/CN113553090A/en
Application granted granted Critical
Publication of CN113553090B publication Critical patent/CN113553090B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/658Incremental updates; Differential updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/162Delete operations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files

Abstract

The application provides a method and a device for controlling update of a client application program, wherein the client application program is installed on a network side terminal device, a first package file and a second package file of the client application program are stored in the network side terminal device, and the method comprises the following steps: the method comprises the steps that a server determines a file to be migrated from a plurality of files included in a first package file; and generating a program updating instruction according to a first storage position of the file to be migrated in the first packed file and a second storage position of the target second packed file. The client application program migrates the file to be migrated from the first packaged file to the target second packaged file based on the program update instruction. According to the method and the device, only program updating instructions need to be added into the patch files for file migration once, the patch files cannot be obviously increased, more troublesome technologies are not needed for avoiding multiple times of file migration, the application program updating experience is greatly improved, the burden of a development team on file management can be relieved, and the operation freedom is improved.

Description

Update control method and device for client application program
Technical Field
The present application relates to the field of client application program update technologies, and in particular, to a method and an apparatus for controlling update of a client application program.
Background
After an application is online, the update is typically continued. On the one hand, some known problems with the old version of the application are fixed; on the other hand, some new functions are opened, and the heat of the application program is kept. The current common update scheme is: the difference between the old version and the new version is made by downloading patches.
In practice, after an application is online, when a file of the application is packaged, the file of the application is divided into a plurality of packaged files, and the size of each packaged file does not exceed the maximum threshold supported by a storage space. However, for a long-term running application, the files included in the application usually increase continuously with the update of the application, and when the application is updated, migration of some files may be involved in order to ensure that the size of a single packed file is maintained at a stable value. Currently, a file migration scheme in an application program update process includes: deleting the file to be migrated in the first packaged file by using a deleting operation instruction in the patch file, and adding the file to be migrated backed up in the patch file into the second packaged file by using an adding operation instruction in the patch file. That is, when a file is migrated once, the patch file may add a delete operation instruction, an add operation instruction, and data of the file to be migrated.
The applicant found in the research that the following problems exist in the prior art: firstly, the patch size is greatly increased by carrying out file migration once, and the updating experience of the application program is greatly reduced; secondly, due to the defect of file migration, file migration can be avoided as far as possible, the freedom degree of an application program development and manufacturing team is restricted, too much constraint is brought to file management, and certain negative influence is caused on team working efficiency to a certain extent; and packaging needs to be avoided by using a more troublesome technology, and if file migration needs to be performed, the file migration needs to be performed for multiple times, so that overlarge one-time patches are avoided.
Disclosure of Invention
In view of this, an object of the present application is to provide a method and an apparatus for controlling update of a client application program, which can perform one file migration only by adding a program update instruction to a patch file, which does not result in significant increase of the patch file, and which does not need to use a more troublesome technique to avoid multiple file migrations, thereby greatly improving the application program update experience, and can relieve the burden of a development team on file management and improve the degree of freedom of operation.
In a first aspect, an embodiment of the present application provides an update control method for a client application, where the update control method is applied to a server, the client application is installed in a network-side terminal device, and a first packed file and a second packed file of the client application are stored in the network-side terminal device, and the update control method includes:
determining a file to be migrated from a plurality of files included in the first package file;
generating a program updating instruction aiming at the file to be migrated according to a first storage position of the file to be migrated in the first packed file and a second storage position of a target second packed file;
sending the program updating instruction to the client application program so that the client application program can transfer the file to be transferred from the first packing file to the target second packing file based on the program updating instruction.
In a possible implementation manner, the step of determining a file to be migrated from a plurality of files included in the first package file includes:
when the client application program is updated, if the first package file is detected not to meet the storage condition, determining a file to be migrated from a plurality of files included in the first package file.
In one possible embodiment, the first package file does not satisfy a storage condition, including at least one of:
the storage space of the first package file cannot accommodate a plurality of files included in the updated first package file;
the first package file comprises a file that has been corrupted;
the first package file comprises a file that cannot be run.
In a possible implementation manner, the step of determining a file to be migrated from a plurality of files included in the first package file includes:
responding to a file migration instruction aiming at the first packaged file, and determining a file to be migrated from a plurality of files included in the first packaged file; the file migration instruction is configured in advance by a user.
In a possible implementation manner, the step of determining a file to be migrated from a plurality of files included in the first package file includes:
determining the storage space required to be released by the first package file based on the current remaining storage space and the required remaining storage space of the first package file;
determining at least one file to be migrated occupying the storage space required to be released from a plurality of files included in the first package file.
In a possible implementation manner, the step of determining at least one file to be migrated that occupies the storage space that needs to be released from a plurality of files included in the first package file includes:
randomly selecting at least one file to be migrated occupying the storage space required to be released from a plurality of files included in the first package file; or
Selecting at least one file to be migrated which occupies the storage space to be released and has file creation time close to the current time from a plurality of files included in the first package file; or
Selecting a plurality of files to be migrated which occupy the storage space to be released and have mutually associated file contents from a plurality of files included in the first package file; or
And selecting a plurality of files to be migrated which occupy the storage space to be released, have mutually associated file contents and have file creation time close to the current time from the plurality of files included in the first package file.
In a possible implementation manner, the step of determining a file to be migrated from a plurality of files included in the first package file includes:
and selecting the damaged file to be migrated and/or the file to be migrated which cannot be operated from a plurality of files included in the first package file.
In one possible embodiment, the target second packaged file is determined from a plurality of the second packaged files.
In one possible embodiment, the number of the target second packaged files is one or more.
In a possible implementation manner, the total remaining storage space of the updated plurality of target second packed files can accommodate a plurality of files to be migrated, and the remaining storage space of each updated target second packed file can accommodate at least one file to be migrated.
In a possible implementation manner, if the updated remaining storage space of the second packaged file cannot accommodate at least one file to be migrated, a target second packaged file is newly created.
In a possible implementation manner, the program update instruction includes the first storage location, a second storage location, and first control information, where the first control information is used to control the client application program to read the file to be migrated from the first packed file corresponding to the first storage location into a cache, and to migrate the file to be migrated in the cache to the target second packed file corresponding to the second storage location.
In a possible implementation manner, the program update instruction includes the first storage location, a second storage location, modification data of the file to be migrated, and second control information, where the second control information is used to control the client application program to read the file to be migrated from a first packed file corresponding to the first storage location into a cache, modify the file to be migrated in the cache based on the modification data, and migrate the modified file to be migrated in the cache to a target second packed file corresponding to the second storage location.
In a second aspect, an embodiment of the present application further provides an update control method for a client application, which is applied to the client application, where the client application is installed in a network-side terminal device, and a first package file and a second package file of the client application are stored in the network-side terminal device, and the update control method includes:
receiving a program updating instruction aiming at a file to be migrated; wherein the file to be migrated is determined by the server from a plurality of files included in the first package file; the program updating instruction is generated by the server according to a first storage position of the file to be migrated in the first packed file and a second storage position of a target second packed file;
and migrating the file to be migrated from the first packaged file to the target second packaged file based on the program updating instruction.
In one possible embodiment, the program update instruction includes the first storage location, a second storage location, and first control information;
the step of migrating the file to be migrated from the first packaged file to the target second packaged file based on the program update instruction comprises:
reading the file to be migrated from the first package file corresponding to the first storage position to a cache based on the first control information;
and migrating the file to be migrated in the cache to a target second packed file corresponding to the second storage position.
In a possible implementation manner, the program update instruction includes the first storage location, a second storage location, modification data of the file to be migrated, and second control information;
the step of migrating the file to be migrated from the first packaged file to the target second packaged file based on the program update instruction comprises:
reading the file to be migrated from the first package file corresponding to the first storage position into a cache based on the second control information;
modifying the file to be migrated in the cache based on the modification data;
and migrating the modified file to be migrated in the cache to a target second packed file corresponding to the second storage position.
In a third aspect, an embodiment of the present application further provides an update control apparatus for a client application, which is applied to a server, where the client application is installed in a network-side terminal device, and a first packed file and a second packed file of the client application are stored in the network-side terminal device, and the update control apparatus includes:
the determining module is used for determining files to be migrated from a plurality of files included in the first package file;
the generating module is used for generating a program updating instruction aiming at the file to be migrated according to a first storage position of the file to be migrated in the first packed file and a second storage position of a target second packed file;
and the sending module is used for sending the program updating instruction to the client application program so that the client application program can migrate the file to be migrated from the first packed file to the target second packed file based on the program updating instruction.
In a fourth aspect, an embodiment of the present application further provides an update control apparatus for a client application, which is applied to the client application, where the client application is installed in a network-side terminal device, and a first package file and a second package file of the client application are stored in the network-side terminal device, and the update control apparatus includes:
the receiving module is used for receiving a program updating instruction for a file to be migrated; wherein the file to be migrated is determined by the server from a plurality of files included in the first package file; the program updating instruction is generated by the server according to a first storage position of the file to be migrated in the first packed file and a second storage position of a target second packed file;
and the migration module is used for migrating the file to be migrated from the first packaged file to the target second packaged file based on the program updating instruction.
In a fifth aspect, an embodiment of the present application further provides an electronic device, including: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating via the bus when the electronic device is running, the machine-readable instructions when executed by the processor performing the steps of any one of the possible implementations of the first or second aspect.
In a sixth aspect, this application provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and the computer program is executed by a processor to perform the steps in any one of the possible implementation manners of the first aspect or the second aspect.
The update control method for the client application program provided by the embodiment of the application includes that the client application program is installed in a network side terminal device, a first packing file and a second packing file of the client application program are stored in the network side terminal device, and the update control method includes: firstly, the server determines a file to be migrated from a plurality of files included in the first package file; and generating a program updating instruction aiming at the file to be migrated according to a first storage position of the file to be migrated in the first packed file and a second storage position of a target second packed file, and sending the program updating instruction to a client application program. Therefore, when the client application program is updated, file migration is performed once, and only a program updating instruction needs to be added to the patch file, and data of the file to be migrated does not need to be added. Then, the client application program receives a program updating instruction for the file to be migrated; and migrating the file to be migrated from the first packaged file to the target second packaged file based on the program updating instruction. Therefore, in the embodiment of the application, only a program updating instruction needs to be added to the patch file for file migration once, data of the file to be migrated does not need to be added, the patch file cannot be significantly increased, a more troublesome technology is not needed to avoid multiple file migrations, the application program updating experience is greatly improved, the burden of a development team on file management can be relieved, and the operation freedom degree is improved.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a flowchart illustrating an update control method for a client application according to an embodiment of the present application;
fig. 2 is a schematic structural diagram illustrating an update control apparatus of a client application according to an embodiment of the present application;
fig. 3 is a schematic structural diagram illustrating another update control apparatus for a client application according to an embodiment of the present application;
fig. 4 shows a schematic structural diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
In a conventional update control scheme of a client application program, a file to be migrated in a first packed file is deleted by using a deletion operation instruction in a patch file, and then a file to be migrated backed up in the patch file is added to a second packed file by using an addition operation instruction in the patch file. That is, when a file is migrated once, the patch file may add a delete operation instruction, an add operation instruction, and data of the file to be migrated. The above conventional scheme has the following problems: firstly, the patch size is greatly increased by carrying out file migration once, and the updating experience of the application program is greatly reduced; secondly, due to the defect of file migration, file migration can be avoided as far as possible, the freedom degree of an application program development and manufacturing team is restricted, too much constraint is brought to file management, and certain negative influence is caused on team working efficiency to a certain extent; and packaging needs to be avoided by using a more troublesome technology, and if file migration needs to be performed, the file migration needs to be performed for multiple times, so that overlarge one-time patches are avoided. Based on this, embodiments of the present application provide a method and an apparatus for controlling update of a client application, which are described below by way of embodiments.
To facilitate understanding of the present embodiment, a detailed description is first given of an update control method for a client application disclosed in the embodiments of the present application.
Referring to fig. 1, fig. 1 is a flowchart illustrating an update control method for a client application according to an embodiment of the present disclosure. The client application program is installed on a network side terminal device, and a first packing file and a second packing file of the client application program are stored in the network side terminal device. As shown in fig. 1, the update control method may include the steps of:
s101, determining a file to be migrated from a plurality of files included in the first package file by the server;
s102, the server generates a program updating instruction aiming at the file to be migrated according to a first storage position of the file to be migrated in the first packed file and a second storage position of a target second packed file;
s103, the server sends the program updating instruction to the client application program;
s104, the client application program receives a program updating instruction aiming at the file to be migrated;
s105, the client application program transfers the file to be transferred from the first packing file to the target second packing file based on the program updating instruction.
In step S101, when the client application is updated, the server may automatically detect whether the first package file meets a storage condition, and if not, automatically determine a file to be migrated from a plurality of files included in the first package file.
Specifically, the first package file does not satisfy the storage condition, and may include at least one of:
the storage space of the first package file cannot accommodate a plurality of files included in the updated first package file;
the first package file comprises a file which is damaged;
and the first package file comprises files which cannot be operated.
Regarding the first case, since the disk format does not support a package file with a storage space size exceeding a preset threshold, for example, the FAT32 format does not support a package file with a storage space size exceeding 4GB, for better compatibility, the storage space of a single package file should not exceed 4 GB. In this embodiment, when the plurality of files included in the updated first package file exceeds 4GB, the storage space of the first package file cannot accommodate the files, and it is necessary to select a file to be migrated from the plurality of files included in the first package file, and migrate the file to be migrated from the first package file.
Regarding to the second case, since the placement of the damaged file in the first package file may affect the operating efficiency of the first package file, when the server detects that the first package file includes the damaged file, the damaged file to be migrated needs to be migrated from the first package file, thereby improving the operating efficiency of the first package file.
Regarding to the third situation, since the file which cannot be run is placed in the first package file, the first package file may not be run, and when the server detects that the first package file includes the file which cannot be run, the file to be migrated which cannot be run needs to be migrated from the first package file, thereby avoiding the problem that the first package file cannot be run.
Optionally, step S101 may also be implemented by adopting another implementation manner: responding to a file migration instruction aiming at the first packaged file, and determining a file to be migrated from a plurality of files included in the first packaged file; the file migration instruction is configured in advance by a user. In this embodiment, a user configures a file migration instruction in advance, where the file migration instruction may include a first storage location in the first packed file and a second storage location of the target second packed file, and the file migration instruction may be stored in a format of a file migration table.
For the file to be migrated, several schemes for selecting the file to be migrated are specifically described below.
(1) Determining the storage space required to be released by the first package file based on the current remaining storage space and the required remaining storage space of the first package file; determining at least one file to be migrated occupying the storage space required to be released from a plurality of files included in the first package file. In this embodiment, since the first package file needs to have some remaining storage space to accommodate the update data of the client application program or the intermediate data generated during the operation process, a difference between the required remaining storage space and the current remaining storage space is determined as the storage space that needs to be released by the first package file, and then at least one file to be migrated that occupies the storage space that needs to be released is selected from a plurality of files included in the first package file.
Specifically, at least one file to be migrated that occupies the storage space that needs to be released may be selected according to the following ways: randomly selecting at least one file to be migrated occupying the storage space required to be released from a plurality of files included in the first package file; selecting at least one file to be migrated which occupies the storage space to be released and has file creation time close to the current time from a plurality of files included in the first package file, namely preferentially migrating the file with closer creation time, and keeping the original file with earlier creation time as far as possible not to migrate; selecting a plurality of files to be migrated which occupy the storage space to be released and have mutually associated file contents from a plurality of files included in the first package file (for example, a group of picture files with mutually associated file contents, and the whole group of picture files can be migrated to facilitate subsequent call); selecting a plurality of files to be migrated which occupy the storage space to be released, have mutually related file contents and have file creation time close to the current time from the plurality of files included in the first packing file. The embodiment is not limited to this, and at least one file to be migrated that occupies the storage space that needs to be released may also be selected in other manners.
(2) And selecting the damaged file to be migrated and/or the file to be migrated which cannot be operated from a plurality of files included in the first package file. In this embodiment, the file to be migrated that cannot be run is selected from the plurality of files included in the first package file, so that the problem that the first package file cannot be run can be avoided. The damaged file to be migrated is selected from the plurality of files included in the first package file, so that the operating efficiency of the first package file can be improved.
In step S102, the first storage location may refer to a storage path of the file to be migrated in the first packed file, and the second storage location may refer to a storage path of the target second packed file.
For the program update instruction, the following two cases can be classified.
(1) The program update instruction 1 may include the first storage location, a second storage location, and first control information, where the first control information is used to control the client application program to read the file to be migrated from the first packed file corresponding to the first storage location into a cache, and to migrate the file to be migrated in the cache to a target second packed file corresponding to the second storage location.
(2) The program update instruction 2 may include the first storage location, a second storage location, modification data of the file to be migrated, and second control information, where the second control information is used to control the client application program to read the file to be migrated from a first packed file corresponding to the first storage location to a cache, modify the file to be migrated in the cache based on the modification data, and migrate the modified file to be migrated in the cache to a target second packed file corresponding to the second storage location.
The locations of the program update instruction 1 and the program update instruction 2 in the patch file may be as shown in table one:
table-patch file
Figure BDA0003180232690000121
Figure BDA0003180232690000131
As can be seen from Table one, the present application adds program update instructions. In the traditional scheme, a delete operation instruction, an increase operation instruction and data of a file to be migrated need to be added to a patch file, and in this embodiment, only a program update instruction needs to be added to the patch file for file migration once, and the data of the file to be migrated does not need to be added, so that the patch file is not significantly increased, and multiple file migrations do not need to be avoided by using a more troublesome technology, thereby greatly improving the application program update experience, relieving the file management burden of a development team, and improving the operation freedom.
For a target second packaged file, the target second packaged file is determined from a plurality of the second packaged files. Wherein the number of the target second packaged files is one or more.
If the number of the target second packed files is multiple, selecting multiple target second packed files meeting the following conditions from the multiple second packed files: the updated total remaining storage space of the plurality of target second packed files can accommodate a plurality of files to be migrated, and the remaining storage space of each updated target second packed file can accommodate at least one file to be migrated.
And if the updated residual storage space of the second packaged file cannot contain at least one file to be migrated, newly building a target second packaged file. In this embodiment, if the number of the target second packaged files is one, and the updated remaining storage space of each second packaged file cannot accommodate at least one file to be migrated, a target second packaged file is newly created. And if the number of the target second packaging files is multiple and the number of the target second packaging files meeting the conditions in the multiple second packaging files is not enough, establishing one or more target second packaging files.
In step S105, if the program update command includes the first storage location, the second storage location, and the first control information, step S105 includes: reading the file to be migrated from the first package file corresponding to the first storage position to a cache based on the first control information; and migrating the file to be migrated in the cache to a target second packed file corresponding to the second storage position.
If the program update instruction includes the first storage location, the second storage location, the modification data of the file to be migrated, and the second control information, step S105 includes: reading the file to be migrated from the first package file corresponding to the first storage position into a cache based on the second control information; modifying the file to be migrated in the cache based on the modification data; and migrating the modified file to be migrated in the cache to a target second packed file corresponding to the second storage position.
The update control method for the client application program provided by the embodiment of the application includes that the client application program is installed on a network side terminal device, a first packing file and a second packing file of the client application program are stored in the network side terminal device, and the update control method includes the following steps: firstly, the server determines a file to be migrated from a plurality of files included in the first package file; and generating a program updating instruction aiming at the file to be migrated according to a first storage position of the file to be migrated in the first packed file and a second storage position of a target second packed file, and sending the program updating instruction to a client application program. Therefore, when the client application program is updated, file migration is performed once, and only a program updating instruction needs to be added to the patch file, and data of the file to be migrated does not need to be added. Then, the client application program receives a program updating instruction for the file to be migrated; and migrating the file to be migrated from the first packaged file to the target second packaged file based on the program updating instruction. Therefore, in the embodiment of the application, only a program updating instruction needs to be added to the patch file for file migration once, data of the file to be migrated does not need to be added, the patch file cannot be significantly increased, a more troublesome technology is not needed to avoid multiple file migrations, the application program updating experience is greatly improved, the burden of a development team on file management can be relieved, and the operation freedom degree is improved.
Based on the same technical concept, the embodiment of the present application further provides an update control device of a client application, an electronic device, a computer storage medium, and the like, and specifically, refer to the following embodiments.
Referring to fig. 2, fig. 2 is a schematic structural diagram of an update control apparatus for a client application according to an embodiment of the present disclosure. The updating control device is applied to a server, the client application program is installed on network side terminal equipment, and a first packing file and a second packing file of the client application program are stored in the network side terminal equipment. The update control means may include:
a determining module 201, configured to determine a file to be migrated from multiple files included in the first package file;
a generating module 202, configured to generate a program update instruction for the file to be migrated according to a first storage location of the file to be migrated in the first packed file and a second storage location of a target second packed file;
a sending module 203, configured to send the program update instruction to the client application program, so that the client application program migrates the file to be migrated from the first packaged file to the target second packaged file based on the program update instruction.
In a possible implementation, the determining module 201 is specifically configured to: when the client application program is updated, if the first package file is detected not to meet the storage condition, determining a file to be migrated from a plurality of files included in the first package file.
In one possible embodiment, the first package file does not satisfy a storage condition, including at least one of:
the storage space of the first package file cannot accommodate a plurality of files included in the updated first package file;
the first package file comprises a file that has been corrupted;
the first package file comprises a file that cannot be run.
In a possible implementation, the determining module 201 is specifically configured to: responding to a file migration instruction aiming at the first packaged file, and determining a file to be migrated from a plurality of files included in the first packaged file; the file migration instruction is configured in advance by a user.
In a possible implementation, the determining module 201 is specifically configured to:
determining the storage space required to be released by the first package file based on the current remaining storage space and the required remaining storage space of the first package file;
determining at least one file to be migrated occupying the storage space required to be released from a plurality of files included in the first package file.
In a possible implementation, the determining module 201 is specifically configured to:
randomly selecting at least one file to be migrated occupying the storage space required to be released from a plurality of files included in the first package file; or
Selecting at least one file to be migrated which occupies the storage space to be released and has file creation time close to the current time from a plurality of files included in the first package file; or
Selecting a plurality of files to be migrated which occupy the storage space to be released and have mutually associated file contents from a plurality of files included in the first package file; or
And selecting a plurality of files to be migrated which occupy the storage space to be released, have mutually associated file contents and have file creation time close to the current time from the plurality of files included in the first package file.
In a possible implementation, the determining module 201 is specifically configured to: and selecting the damaged file to be migrated and/or the file to be migrated which cannot be operated from a plurality of files included in the first package file.
In one possible embodiment, the target second packaged file is determined from a plurality of the second packaged files.
In one possible embodiment, the number of the target second packaged files is one or more.
In a possible implementation manner, the total remaining storage space of the updated plurality of target second packed files can accommodate a plurality of files to be migrated, and the remaining storage space of each updated target second packed file can accommodate at least one file to be migrated.
In a possible implementation manner, if the updated remaining storage space of the second packaged file cannot accommodate at least one file to be migrated, a target second packaged file is newly created.
In a possible implementation manner, the program update instruction includes the first storage location, a second storage location, and first control information, where the first control information is used to control the client application program to read the file to be migrated from the first packed file corresponding to the first storage location into a cache, and to migrate the file to be migrated in the cache to the target second packed file corresponding to the second storage location.
In a possible implementation manner, the program update instruction includes the first storage location, a second storage location, modification data of the file to be migrated, and second control information, where the second control information is used to control the client application program to read the file to be migrated from a first packed file corresponding to the first storage location into a cache, modify the file to be migrated in the cache based on the modification data, and migrate the modified file to be migrated in the cache to a target second packed file corresponding to the second storage location.
Referring to fig. 3, fig. 3 is a schematic structural diagram of another update control apparatus for a client application according to an embodiment of the present disclosure. The updating control device is applied to a client application program, the client application program is installed on a network side terminal device, and a first packing file and a second packing file of the client application program are stored in the network side terminal device. The update control means may include:
a receiving module 301, configured to receive a program update instruction for a file to be migrated; wherein the file to be migrated is determined by the server from a plurality of files included in the first package file; the program updating instruction is generated by the server according to a first storage position of the file to be migrated in the first packed file and a second storage position of a target second packed file;
a migration module 302, configured to migrate the file to be migrated from the first packaged file to the target second packaged file based on the program update instruction.
In one possible embodiment, the program update instruction includes the first storage location, a second storage location, and first control information; the migration module 302 is specifically configured to:
reading the file to be migrated from the first package file corresponding to the first storage position to a cache based on the first control information;
and migrating the file to be migrated in the cache to a target second packed file corresponding to the second storage position.
In a possible implementation manner, the program update instruction includes the first storage location, a second storage location, modification data of the file to be migrated, and second control information; the migration module 302 is specifically configured to:
reading the file to be migrated from the first package file corresponding to the first storage position into a cache based on the second control information;
modifying the file to be migrated in the cache based on the modification data;
and migrating the modified file to be migrated in the cache to a target second packed file corresponding to the second storage position.
Referring to fig. 4, fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. As shown in fig. 4, includes: the processor 401, the memory 402, and the bus 403, where the memory 402 stores machine-readable instructions executable by the processor 401, when the electronic device runs, the processor 401 communicates with the memory 402 through the bus 403, and the processor 401 executes the machine-readable instructions to execute the method described in the foregoing method embodiment.
The computer program product of the update control method for the client application program provided in the embodiment of the present application includes a computer-readable storage medium storing a nonvolatile program code executable by a processor, where instructions included in the program code may be used to execute the method described in the foregoing method embodiment, and specific implementation may refer to the method embodiment, and is not described herein again.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present application, and are used for illustrating the technical solutions of the present application, but not limiting the same, and the scope of the present application is not limited thereto, and although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope disclosed in the present application; such modifications, changes or substitutions do not depart from the spirit and scope of the exemplary embodiments of the present application, and are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (20)

1. An update control method of a client application program, which is applied to a server, wherein the client application program is installed in a network side terminal device, and a first packed file and a second packed file of the client application program are stored in the network side terminal device, the update control method comprising:
determining a file to be migrated from a plurality of files included in the first package file;
generating a program updating instruction aiming at the file to be migrated according to a first storage position of the file to be migrated in the first packed file and a second storage position of a target second packed file;
sending the program updating instruction to the client application program so that the client application program can transfer the file to be transferred from the first packing file to the target second packing file based on the program updating instruction.
2. The update control method according to claim 1, wherein the step of determining a file to be migrated from among a plurality of files included in the first package file includes:
when the client application program is updated, if the first package file is detected not to meet the storage condition, determining a file to be migrated from a plurality of files included in the first package file.
3. The update control method according to claim 2, wherein the first package file does not satisfy a storage condition, and includes at least one of:
the storage space of the first package file cannot accommodate a plurality of files included in the updated first package file;
the first package file comprises a file that has been corrupted;
the first package file comprises a file that cannot be run.
4. The update control method according to claim 1, wherein the step of determining a file to be migrated from among a plurality of files included in the first package file includes:
responding to a file migration instruction aiming at the first packaged file, and determining a file to be migrated from a plurality of files included in the first packaged file; the file migration instruction is configured in advance by a user.
5. The update control method according to claim 1, wherein the step of determining a file to be migrated from among a plurality of files included in the first package file includes:
determining the storage space required to be released by the first package file based on the current remaining storage space and the required remaining storage space of the first package file;
determining at least one file to be migrated occupying the storage space required to be released from a plurality of files included in the first package file.
6. The update control method according to claim 5, wherein the step of determining at least one file to be migrated that occupies the storage space to be freed from the plurality of files included in the first package file comprises:
randomly selecting at least one file to be migrated occupying the storage space required to be released from a plurality of files included in the first package file; or
Selecting at least one file to be migrated which occupies the storage space to be released and has file creation time close to the current time from a plurality of files included in the first package file; or
Selecting a plurality of files to be migrated which occupy the storage space to be released and have mutually associated file contents from a plurality of files included in the first package file; or
And selecting a plurality of files to be migrated which occupy the storage space to be released, have mutually associated file contents and have file creation time close to the current time from the plurality of files included in the first package file.
7. The update control method according to claim 1, wherein the step of determining a file to be migrated from among a plurality of files included in the first package file includes:
and selecting the damaged file to be migrated and/or the file to be migrated which cannot be operated from a plurality of files included in the first package file.
8. The update control method according to claim 1, wherein the target second packaged file is determined from a plurality of the second packaged files.
9. The update control method according to claim 8, wherein the number of the target second package files is one or more.
10. The update control method according to claim 9, wherein the total remaining storage space of the plurality of updated target second packaged files can accommodate a plurality of files to be migrated, and the remaining storage space of each updated target second packaged file can accommodate at least one file to be migrated.
11. The update control method according to claim 1, wherein if the updated remaining storage space of the second packaged file cannot accommodate at least one file to be migrated, a target second packaged file is newly created.
12. The update control method according to claim 1, wherein the program update instruction includes the first storage location, a second storage location, and first control information, and the first control information is used to control the client application program to read the file to be migrated from the first packed file corresponding to the first storage location into a cache, and to migrate the file to be migrated in the cache to a target second packed file corresponding to the second storage location.
13. The update control method according to claim 1, wherein the program update instruction includes the first storage location, a second storage location, modification data of the file to be migrated, and second control information, where the second control information is used to control the client application program to read the file to be migrated from a first packed file corresponding to the first storage location into a cache, modify the file to be migrated in the cache based on the modification data, and migrate the modified file to be migrated in the cache to a target second packed file corresponding to the second storage location.
14. An update control method of a client application program is applied to the client application program, the client application program is installed on a network side terminal device, and a first packed file and a second packed file of the client application program are stored in the network side terminal device, and the update control method is characterized by comprising the following steps:
receiving a program updating instruction aiming at a file to be migrated; wherein the file to be migrated is determined by the server from a plurality of files included in the first package file; the program updating instruction is generated by the server according to a first storage position of the file to be migrated in the first packed file and a second storage position of a target second packed file;
and migrating the file to be migrated from the first packaged file to the target second packaged file based on the program updating instruction.
15. The update control method according to claim 14, wherein the program update instruction includes the first storage location, a second storage location, and first control information;
the step of migrating the file to be migrated from the first packaged file to the target second packaged file based on the program update instruction comprises:
reading the file to be migrated from the first package file corresponding to the first storage position to a cache based on the first control information;
and migrating the file to be migrated in the cache to a target second packed file corresponding to the second storage position.
16. The update control method according to claim 14, wherein the program update instruction includes the first storage location, a second storage location, modification data of the file to be migrated, and second control information;
the step of migrating the file to be migrated from the first packaged file to the target second packaged file based on the program update instruction comprises:
reading the file to be migrated from the first package file corresponding to the first storage position into a cache based on the second control information;
modifying the file to be migrated in the cache based on the modification data;
and migrating the modified file to be migrated in the cache to a target second packed file corresponding to the second storage position.
17. An update control apparatus of a client application, which is applied to a server, the client application being installed in a network-side terminal device, the network-side terminal device storing therein a first packed file and a second packed file of the client application, the update control apparatus comprising:
the determining module is used for determining files to be migrated from a plurality of files included in the first package file;
the generating module is used for generating a program updating instruction aiming at the file to be migrated according to a first storage position of the file to be migrated in the first packed file and a second storage position of a target second packed file;
and the sending module is used for sending the program updating instruction to the client application program so that the client application program can migrate the file to be migrated from the first packed file to the target second packed file based on the program updating instruction.
18. An update control apparatus of a client application, applied to a client application, the client application being installed in a network-side terminal device, the network-side terminal device storing therein a first packed file and a second packed file of the client application, the update control apparatus comprising:
the receiving module is used for receiving a program updating instruction for a file to be migrated; wherein the file to be migrated is determined by the server from a plurality of files included in the first package file; the program updating instruction is generated by the server according to a first storage position of the file to be migrated in the first packed file and a second storage position of a target second packed file;
and the migration module is used for migrating the file to be migrated from the first packaged file to the target second packaged file based on the program updating instruction.
19. An electronic device, comprising: a processor, a storage medium and a bus, the storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium communicating via the bus when the electronic device is operating, the processor executing the machine-readable instructions to perform the steps of the method according to any one of claims 1 to 16.
20. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, is adapted to carry out the steps of the method according to any one of claims 1 to 16.
CN202110844287.6A 2021-07-26 2021-07-26 Update control method and device for client application program Active CN113553090B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110844287.6A CN113553090B (en) 2021-07-26 2021-07-26 Update control method and device for client application program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110844287.6A CN113553090B (en) 2021-07-26 2021-07-26 Update control method and device for client application program

Publications (2)

Publication Number Publication Date
CN113553090A true CN113553090A (en) 2021-10-26
CN113553090B CN113553090B (en) 2023-07-25

Family

ID=78132773

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110844287.6A Active CN113553090B (en) 2021-07-26 2021-07-26 Update control method and device for client application program

Country Status (1)

Country Link
CN (1) CN113553090B (en)

Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050071371A1 (en) * 2003-09-26 2005-03-31 Red Hat, Inc. Software and data file updating process
KR20070000867A (en) * 2005-06-28 2007-01-03 케이티하이텔 주식회사 Apparatus and method for providing update file, and apparatus and method for downloading update file using the same
US7665081B1 (en) * 2006-05-06 2010-02-16 Kaspersky Lab, Zao System and method for difference-based software updating
CN102200915A (en) * 2010-03-22 2011-09-28 珠海金山快快科技有限公司 Method and device for version migration of software package
US20140237464A1 (en) * 2013-02-15 2014-08-21 Zynstra Limited Computer system supporting remotely managed it services
US20140358854A1 (en) * 2013-05-30 2014-12-04 Dassault Systemes Enovia Corp. Live Upgrade
CN104978215A (en) * 2014-10-08 2015-10-14 腾讯科技(深圳)有限公司 File updating method, relevant equipment and system
EP3168747A1 (en) * 2015-11-13 2017-05-17 Xiaomi Inc. Method and device for monitoring a file in a system partition
CN106843928A (en) * 2016-12-22 2017-06-13 北京五八信息技术有限公司 The remote repairing method and apparatus of application program
US20170168798A1 (en) * 2015-12-10 2017-06-15 International Business Machines Corporation Applying program patch sets
CN107145362A (en) * 2016-03-01 2017-09-08 瑞萨电子株式会社 Embedded device and method for updating program
US9762701B1 (en) * 2009-04-10 2017-09-12 Open Invention Network Llc System and method for cached streaming application isolation
WO2017193640A1 (en) * 2016-05-07 2017-11-16 腾讯科技(深圳)有限公司 Application updating method and device
CN109725923A (en) * 2018-12-27 2019-05-07 广州华多网络科技有限公司 A kind of software light weight update method, device and equipment
US20200244731A1 (en) * 2019-01-30 2020-07-30 Valve Corporation Techniques for updating files
CN111752592A (en) * 2020-05-09 2020-10-09 国电南瑞科技股份有限公司 Power system secondary equipment version control method, client and system
CN111813429A (en) * 2016-12-13 2020-10-23 青岛海信移动通信技术股份有限公司 Program updating method and device
CN112667224A (en) * 2021-01-12 2021-04-16 北京字节跳动网络技术有限公司 File processing method and device, computer equipment and storage medium
CN113110864A (en) * 2021-03-19 2021-07-13 深圳市腾讯网络信息技术有限公司 Application program updating method and device and storage medium

Patent Citations (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050071371A1 (en) * 2003-09-26 2005-03-31 Red Hat, Inc. Software and data file updating process
KR20070000867A (en) * 2005-06-28 2007-01-03 케이티하이텔 주식회사 Apparatus and method for providing update file, and apparatus and method for downloading update file using the same
US7665081B1 (en) * 2006-05-06 2010-02-16 Kaspersky Lab, Zao System and method for difference-based software updating
US9762701B1 (en) * 2009-04-10 2017-09-12 Open Invention Network Llc System and method for cached streaming application isolation
CN102200915A (en) * 2010-03-22 2011-09-28 珠海金山快快科技有限公司 Method and device for version migration of software package
WO2011116613A1 (en) * 2010-03-22 2011-09-29 北京金山软件有限公司 Method and device for migrating software package version
US20140237464A1 (en) * 2013-02-15 2014-08-21 Zynstra Limited Computer system supporting remotely managed it services
US20140358854A1 (en) * 2013-05-30 2014-12-04 Dassault Systemes Enovia Corp. Live Upgrade
CN104978215A (en) * 2014-10-08 2015-10-14 腾讯科技(深圳)有限公司 File updating method, relevant equipment and system
EP3168747A1 (en) * 2015-11-13 2017-05-17 Xiaomi Inc. Method and device for monitoring a file in a system partition
US20170168798A1 (en) * 2015-12-10 2017-06-15 International Business Machines Corporation Applying program patch sets
CN107145362A (en) * 2016-03-01 2017-09-08 瑞萨电子株式会社 Embedded device and method for updating program
WO2017193640A1 (en) * 2016-05-07 2017-11-16 腾讯科技(深圳)有限公司 Application updating method and device
CN111813429A (en) * 2016-12-13 2020-10-23 青岛海信移动通信技术股份有限公司 Program updating method and device
CN106843928A (en) * 2016-12-22 2017-06-13 北京五八信息技术有限公司 The remote repairing method and apparatus of application program
CN109725923A (en) * 2018-12-27 2019-05-07 广州华多网络科技有限公司 A kind of software light weight update method, device and equipment
US20200244731A1 (en) * 2019-01-30 2020-07-30 Valve Corporation Techniques for updating files
CN111752592A (en) * 2020-05-09 2020-10-09 国电南瑞科技股份有限公司 Power system secondary equipment version control method, client and system
CN112667224A (en) * 2021-01-12 2021-04-16 北京字节跳动网络技术有限公司 File processing method and device, computer equipment and storage medium
CN113110864A (en) * 2021-03-19 2021-07-13 深圳市腾讯网络信息技术有限公司 Application program updating method and device and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
张莹莹;: "分布式测试系统的软件增量更新设计", 计算机测量与控制, no. 11 *
曾晓旭: "MIS系统中应用软件版本的自动更新", 计算机与现代化, no. 02 *
杨卉竹;夏洪山;: "C/S结构下客户端应用程序自动升级的方法研究", 科技信息, no. 21 *

Also Published As

Publication number Publication date
CN113553090B (en) 2023-07-25

Similar Documents

Publication Publication Date Title
JP5346253B2 (en) Firmware update system, information device, and program
JP5342302B2 (en) Firmware update system, firmware distribution server, and program
CN105867947B (en) Data processing method and device after preset application program updating
JP5113700B2 (en) Firmware update apparatus and method
US20160054990A1 (en) Method Of And Terminal For Updating Library File In System Application
CN110032339B (en) Data migration method, device, system, equipment and storage medium
CN103455354A (en) Method and equipment for preventing hardware update from failing
KR20050028173A (en) Method and system for updating software
TWI775616B (en) Method and equipment for generating differential package, method for upgrade and embedded system
CN109634638B (en) Cluster software upgrading method, device, equipment and medium
CN109086078A (en) Android system upgrade method, device, server and mobile terminal
JP4755244B2 (en) Information generation method, information generation program, and information generation apparatus
CN110209420A (en) A kind of method and device updating bootstrap loader
CN113110853A (en) Configuration data online downloading method and device and electronic equipment
CN110597568A (en) Plug-in deployment method, system and terminal
CN110941516B (en) Operating system restoration method, device, equipment and storage medium
CN113553090A (en) Update control method and device for client application program
JP2008226167A (en) Data distribution system and data distribution program
WO2017214369A1 (en) Systems and methods for implementing dynamic file systems
CN112346771A (en) Upgrade file generation method and device
US10860533B1 (en) File size as an indicator of file properties
US20230015941A1 (en) Data migration method and apparatus for database
JP5023169B2 (en) Required patch list creation apparatus and method
CN110333967B (en) Method, device and equipment for preventing USB flash disk data loss and system damage
CN114327573A (en) Flash partitioning method and related equipment in system upgrading process

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
GR01 Patent grant
GR01 Patent grant