Disclosure of Invention
The embodiment of the application aims to provide an application software upgrading method, which can avoid the problem of version incompatibility between application software and dependent software after the application software is upgraded. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present application provides an application software upgrading method, which is applied to a server, and the method includes:
receiving an upgrade request of application software to be upgraded sent by terminal equipment, wherein the upgrade request indicates a plurality of application software, current version numbers of the application software and version numbers of upgraded application software corresponding to the application software to be upgraded, and the application software to be upgraded comprises the application software to be upgraded;
acquiring reference information, wherein the reference information comprises a plurality of pieces of information, and each piece of information indicates a corresponding relation between one piece of application software, the version number of the application software, and the version number of at least one piece of dependent software of the application software;
determining at least one dependent software of the upgraded application software corresponding to the application software to be upgraded and the version number of at least one dependent software of the upgraded application software corresponding to the application software to be upgraded according to the application software to be upgraded, the version number of the upgraded application software corresponding to the application software to be upgraded and the reference information;
determining the version number of the dependency software before upgrading corresponding to at least one dependency software of the application software after upgrading corresponding to the application software to be upgraded from the current version numbers of the plurality of application software according to the at least one dependency software of the application software after upgrading corresponding to the application software to be upgraded;
under the condition that the version number of the dependent software before upgrading corresponding to the at least one dependent software is different from the version number of the at least one dependent software of the application software after upgrading corresponding to the application software to be upgraded, generating a software update package of the dependent software before upgrading corresponding to the at least one dependent software;
and sending the software update package of the dependent software before upgrading corresponding to the at least one dependent software to the terminal equipment.
Specifically, the upgrade request includes a plurality of application software, current version numbers of the plurality of application software, and version numbers of upgraded application software corresponding to the application software to be upgraded.
Specifically, the generating of the software update package of the dependent software before the upgrade corresponding to the at least one dependent software includes:
determining a file corresponding to the version number of at least one dependent software of the upgraded application software corresponding to the application software to be upgraded according to the version number of the at least one dependent software of the upgraded application software corresponding to the application software to be upgraded, and determining a file corresponding to the version number of the at least one dependent software of the dependent software before upgrading corresponding to the at least one dependent software according to the version number of the at least one dependent software before upgrading corresponding to the at least one dependent software;
and packaging subfiles of files corresponding to the version number of at least one piece of dependency software of the application software to be upgraded, which are different from the files corresponding to the version number of the dependency software before upgrading, which correspond to the at least one piece of dependency software, so as to generate a software update package of the dependency software before upgrading, which corresponds to the at least one piece of dependency software.
Specifically, the generating of the software update package of the dependent software before the upgrade corresponding to the at least one dependent software includes:
determining a file corresponding to the version number of at least one dependent software of the upgraded application software corresponding to the application software to be upgraded according to the version number of the at least one dependent software of the upgraded application software corresponding to the application software to be upgraded;
and packaging a file corresponding to the version number of at least one dependent software of the upgraded application software corresponding to the application software to be upgraded, and generating a software update package of the dependent software before upgrading corresponding to the at least one dependent software.
In particular, the method further comprises:
generating a software update package of the application software to be upgraded;
and sending the software update package of the application software to be upgraded to the terminal equipment.
Specifically, the generating a software update package of the application software to be upgraded includes:
determining a file of the upgraded application software corresponding to the application software to be upgraded according to the version number of the upgraded application software corresponding to the application software to be upgraded, and determining a file corresponding to the current version number of the application software to be upgraded according to the current version number of the application software to be upgraded;
and packaging subfiles of the upgraded application software files corresponding to the application software to be upgraded, which are different from the files corresponding to the current version number of the application software to be upgraded, and generating a software update package of the application software to be upgraded.
Specifically, the generating a software update package of the application software to be upgraded includes:
determining a file of the upgraded application software corresponding to the application software to be upgraded according to the version number of the upgraded application software corresponding to the application software to be upgraded;
and packaging the updated application software files corresponding to the application software to be updated, and generating a software update package of the application software to be updated.
In a second aspect, an embodiment of the present application provides an application software upgrading method, which is applied to a terminal device, and the method includes:
sending an upgrade request of application software to be upgraded to a server, wherein the upgrade request indicates a plurality of application software, current version numbers of the application software and version numbers of upgraded application software corresponding to the application software to be upgraded, and the application software comprises the application software to be upgraded;
receiving a software update package of the dependent software before upgrading corresponding to at least one dependent software returned by the server;
and upgrading the dependent software before upgrading corresponding to the at least one piece of dependent software according to the software update package of the dependent software before upgrading corresponding to the at least one piece of dependent software.
Specifically, the upgrade request includes a plurality of application software, current version numbers of the plurality of application software, and version numbers of upgraded application software corresponding to the application software to be upgraded.
In particular, the method further comprises:
receiving a software update package of the application software to be upgraded returned by the server;
and upgrading the application software to be upgraded according to the software update package of the application software to be upgraded.
In particular, before sending an upgrade request of application software to be upgraded to the server, the method further includes:
and responding to an upgrading instruction, scanning the plurality of application software installed on the terminal equipment, and determining the current version numbers of the plurality of application software.
In a third aspect, an embodiment of the present application provides a server, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the application software upgrading method according to the first aspect when executing the computer program.
In a fourth aspect, an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the application software upgrading method according to the second aspect when executing the computer program.
In a fifth aspect, an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored, where the computer program, when executed by a processor, implements the application software upgrading method as described above.
In a sixth aspect, an embodiment of the present application further provides an application software upgrading system, where the system includes:
a server for implementing the method of any of the above aspects performed by the server;
the terminal device is used for realizing the method executed by the terminal device in any aspect.
The embodiment of the application has the following beneficial effects:
the application provides an application software upgrading method, which comprises the steps of sending an upgrading request of application software to be upgraded to a server, analyzing a plurality of application software by the server according to the upgrading request and a reference relation, determining at least one dependent software of the application software after upgrading corresponding to the application software to be upgraded which needs to be upgraded actually, generating a software updating package of the dependent software before upgrading corresponding to the at least one dependent software, and sending the software updating package to a terminal device, so that the terminal device can upgrade the dependent software before upgrading corresponding to the at least one dependent software while upgrading the application software, and the problem that the application software cannot be used after upgrading due to the fact that the dependent software is not upgraded can be solved. In addition, the method provided by the application analyzes the plurality of application software in the terminal equipment, so that omission in software upgrading can be avoided, and the upgrading success rate is improved. When the omission of software-dependent upgrading is avoided, the plurality of application software do not need to be completely upgraded, and the upgrading cost is saved.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of and not restrictive on the broad application.
In the following, the terms "first", "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the embodiments of the present application, "a plurality" means two or more unless otherwise specified.
Fig. 1 is a schematic flowchart of an application software upgrading method 100 provided in an embodiment of the present application. The method 100 comprises at least the following steps:
s101, a terminal device sends an upgrading request of application software to be upgraded to a server, wherein the upgrading request indicates a plurality of application software, current version numbers of the application software and version numbers of the application software after upgrading corresponding to the application software to be upgraded, and the application software comprises the application software to be upgraded;
s102, a server receives an upgrading request of application software to be upgraded sent by terminal equipment, and acquires reference information, wherein the reference information comprises a plurality of pieces of information, and each piece of information indicates the corresponding relation between one piece of application software, the version number of the application software, and the version number of at least one piece of dependent software of the application software and the version number of at least one piece of dependent software;
s103, the server determines at least one dependent software of the upgraded application software corresponding to the application software to be upgraded and the version number of at least one dependent software of the upgraded application software corresponding to the application software to be upgraded according to the application software to be upgraded, the version number of the upgraded application software corresponding to the application software to be upgraded and the reference information;
s104, the server determines the version number of the dependency software before upgrading corresponding to at least one dependency software of the upgraded application software corresponding to the application software to be upgraded from the current version numbers of the plurality of application software according to the at least one dependency software of the upgraded application software corresponding to the application software to be upgraded;
s105, under the condition that the version number of the dependent software before upgrading corresponding to the at least one dependent software is different from the version number of the at least one dependent software of the application software after upgrading corresponding to the application software to be upgraded, the server generates a software update package of the dependent software before upgrading corresponding to the at least one dependent software;
s106, the server sends a software update package of the dependent software before upgrading corresponding to at least one dependent software to the terminal equipment;
s107, the terminal equipment receives the software updating package of the dependent software before the upgrade corresponding to the at least one dependent software returned by the server, and upgrades the dependent software before the upgrade corresponding to the at least one dependent software according to the software updating package of the dependent software before the upgrade corresponding to the at least one dependent software.
The application provides an application software upgrading method, which comprises the steps of sending an upgrading request of application software to be upgraded to a server, analyzing a plurality of application software by the server according to the upgrading request and a reference relation, determining at least one dependent software of the application software after upgrading corresponding to the application software to be upgraded which needs to be upgraded actually, generating a software updating package of the dependent software before upgrading corresponding to the at least one dependent software, and sending the software updating package to a terminal device, so that the terminal device can upgrade the dependent software before upgrading corresponding to the at least one dependent software while upgrading the application software, and the problem that the application software cannot be used after upgrading due to the fact that the dependent software is not upgraded can be solved. In addition, the method provided by the application analyzes the plurality of application software in the terminal equipment, so that omission in software upgrading can be avoided, and the upgrading success rate is improved. When the omission of software-dependent upgrading is avoided, the plurality of application software do not need to be completely upgraded, and the upgrading cost is saved.
Application software is software that is developed for a particular purpose. It may be a specific program such as an image browser. Or a collection of closely related programs that can cooperate with each other, such as a series of office software. Or a large software system consisting of many separate programs, such as a database management system. The terminal device may be a mobile phone, a tablet computer, a notebook computer, a desktop computer, and the like, and the specific type of the terminal device is not limited in this embodiment.
Taking application software as a specific program as an example, before describing the application software upgrading method 100 in detail, the contents stored in the server and the terminal device will be explained first.
When developing a piece of application software, a developer can describe the organization structure, module division, function distribution and the like of the application software to generate a description file, and in addition, different types of files can be generated according to different requirements, and the files are stored in a server according to a certain hierarchical structure.
In the embodiment of the application, when the application software of a certain version is developed, a developer can define a self-description file of the application software under the version, including a product package dependent self-description file, a product full package production self-description file, and the like. Different version numbers are used for representing different versions, so that one application software has a plurality of version numbers. The product package dependency self-description file indicates a dependency relationship corresponding to a certain version number of the application software. The product full package is made of a file corresponding to a certain version number of the application software indicated by the self-description file, and the file in the product full package is a file corresponding to a certain version number of the application software.
When the version numbers are different, the identifiers of the application software are the same, but the product packages depend on the self-description files, and the product full package is made of the self-description files differently. The identifier is used for distinguishing different application software, the identifier corresponds to the application software one by one, and the identifier can be the name or the number of the application software.
Specifically, the product package dependency self-description file indicates a correspondence relationship between one piece of application software, a version number of the application software, and a version number of at least one piece of dependent software and at least one piece of dependent software of the application software. That is, according to the identifier of an application software, a version number of the application software, and the package dependent self-description file corresponding to the version number, the version number of at least one dependent software and the version number of at least one dependent software corresponding to the application software at this version number can be determined. The number of the dependent software can be one or more.
The product package-dependent self-description file corresponds to the reference information mentioned in the embodiment shown in fig. 1. The reference information includes a plurality of pieces of information, and one piece of information corresponds to one product package dependency self-description file.
For example, for the application software a, when the version number is 1.1.0, the information indicated by the package-dependent self-description file is as follows: when the version number of the application software A is 1.1.0, the corresponding dependent software is the application software B, and the version number of the application software B is 1.1.0.
When there are multiple pieces of dependent software, for example, for the application software a, the version number is 1.1.0, the information indicated by the package dependent self-description file is: when the version number of the application software A is 1.1.0, the corresponding dependent software is the application software B and the application software C, the version number of the application software B is 1.1.0, and the version number of the application software C is 1.1.1.
The dependency relationship may be different for different versions of the same application software. For example, for the application software a, the version is upgraded from the 1.1.0 version to the 1.2.0 version, and when the version number is 1.2.0, the information indicated by the package-dependent self-description file is as follows: when the version number of the application software A is 1.2.0, the corresponding dependent software is the application software C, and the version number of the application software C is 2.1.1.
Specifically, the product full package is manufactured from a description file to describe a packaging source directory, a packaging target directory and the like when the product full package is packaged. The packaging means that files are copied from a source directory to a target directory, and are compressed and integrated into an installation package according to a certain hierarchical structure. The source directory is a source code directory stored in the server before packaging, and the source code includes but is not limited to javascript, cs, dll, exe and other files. The target directory is a directory in a compressed package after being packaged, and the target directory is also a directory actually deployed in the user environment, namely the directory in the compressed package is the same as the installation directory in the terminal device. The source directory has a one-to-one correspondence with the hierarchy of the target directory, for example, if file a is contained in file B in the source directory, then file a is also contained in file B in the target directory.
The product full package is made from the description file and also describes the bound file, the bound catalog, the exclusion catalog and the exclusion file. The files in the source directory are more than the files in the target directory, and the bound files represent the files which must be copied to the target directory in order to ensure that the functions of the application software can be used normally. An excluded file represents a file that does not need to be copied to the target directory. For example, there are 5 files in the source directory, where 3 files are files that are guaranteed to be used by the application software function, and these 3 files are files that must be copied to the target directory, and assuming that these 3 files are named as file 1, file 2, and file 3, respectively, the information in the product full-scale package self-description file includes: files to be printed are file 1, file 2 and file 3. The files in the product full package are file 1, file 2 and file 3.
The bibliography means that a certain part of the target directory must be copied in order to ensure that the functions of the application software can be used normally. An exclude directory indicates a portion of a directory that does not need to be copied to the target directory. A directory is a collection of files having a hierarchical structure. The description of the directory must be made and the directory must be excluded in order to improve the working efficiency. If 10000 files are required to be written in one application software, the product full package self-description file only describes the files required to be written, 10000 description languages are required to be configured during description, and if the product full package self-description file also describes the directories which comprise 500 files, 499 description languages can be subtracted during description, thereby greatly reducing the configuration work.
In the embodiment of the application, the self-description file is manufactured according to the product full package corresponding to each version number of the application software, and the product full package corresponding to each version number of the application software is generated. Storing the product full package in a server, traversing files in the product full package by the server, and calculating a hash code (hashcode) of each file, wherein the hashcode is a unique identifier of the file and is used for distinguishing the files. There are many ways to calculate hashcode, and in the embodiment of the present application, the value of the fifth version of the Message Digest Algorithm (Message Digest Algorithm 5, md5) is used as the hashcode of the file. For plain text files, the whole file is taken as a text message, and the MD5 value of the file is directly calculated. For a binary file, the file content is decompiled, and an MD5 value is calculated according to the decompiled content, and the decompilation mode is various, and the decompilation mode in the embodiment of the present application is not limited. The plain text file is used for storing data of text characters and does not contain other data except the characters. The other files are binary files, such as Dynamic Link Library (dll) files, exe files, and the like.
The self-description file can be described by a plurality of languages, and the specification definition of the self-description file in the embodiment of the present application is implemented by another Markup Language (YAML), where YAML is a format with high readability and is used for expressing data serialization, and can simply express data forms such as lists, hash tables, scalars, and the like. When the files are stored in the server, the files can be named, for example, the product package dependent self-description file is named package.
As can be seen from the foregoing, for one application, the server stores at least: the method comprises the steps of identification of application software, version number of each version, product full package of each version, hash code of each file in the product full package, and product package dependency self-description file of each version.
When one version of the application software is released, the product full-amount package of the version is provided for a user, and the user installs the product full-amount package to a terminal device. In the embodiment of the application, the product full-volume packet further comprises a server identifier, after the product full-volume packet is installed on the terminal device, the server identifier is stored at a specified position of the terminal device, and the server identifier can be various expression forms such as an authorization code and a license. The terminal equipment scans the designated position to inquire a plurality of application software from the server on the terminal equipment, and scans the installation files of the plurality of application software to obtain information such as the identification, the version number and the like of the application software. The application software from the server is the application software developed by the same company.
The embodiment of the application further provides a background manager, as shown in fig. 2, the background manager is used for interacting with a user, the user opens the background manager, the background manager displays a plurality of application software from the server and version numbers of the application software on the terminal device, an upgrade button corresponding to each application software is provided, and when the application software does not have an upgrade version, the upgrade button cannot be clicked. When the application software has an upgrading version, the user clicks an upgrading button to trigger the terminal equipment to carry out an upgrading process. The background manager can also have other functions of displaying version distribution, upgrading conditions of application software and the like.
The terminal equipment inquires the upgrading information from the server regularly, and prompts a user whether to upgrade or not and selects an upgrading version through the background manager.
The application software upgrade method 100 is described in detail below.
When a user triggers an upgrade instruction, the terminal device responds to the upgrade instruction and scans the local environment to obtain a plurality of application software and the current version numbers of the application software.
And the terminal equipment sends an upgrading request of the application software to be upgraded to the server. In one implementation, the upgrade request includes identifiers of a plurality of application software, current version numbers of the plurality of application software, and version numbers of upgraded application software corresponding to the application software to be upgraded, and the plurality of application software includes the application software to be upgraded.
In another implementation manner, the upgrade request includes a plurality of numbers, each number corresponds to information of one application software, for example, the number "11" corresponds to a current version number of the application software to be upgraded, the number "12" corresponds to a version number of the application software after upgrade corresponding to the application software to be upgraded, and the like, the server stores a corresponding relationship between the number and the application software, and queries an identifier and a version number of the application software according to the number.
The application software to be upgraded and the upgraded application software corresponding to the application software to be upgraded are the same in identification.
Taking the case that the upgrade request includes the identifiers of the plurality of application software, the current version numbers of the plurality of application software, and the version number of the upgraded application software corresponding to the application software to be upgraded, after receiving the upgrade request, the server searches for a product package dependent self-description file corresponding to the upgraded application software corresponding to the application software to be upgraded according to the identifiers of the application software to be upgraded and the version number of the upgraded application software corresponding to the application software to be upgraded, and determines the dependent software corresponding to the upgraded application software to be upgraded and the version number of the dependent software according to the information indicated by the product package dependent self-description file, where the dependent software is first-level dependent software.
And aiming at one piece of primary dependent software, determining secondary dependent software of the upgraded application software corresponding to the application software to be upgraded and the version number of the secondary dependent software according to the identification of the primary dependent software, the version number of the primary dependent software and a product package dependent self-description file corresponding to the version number of the primary dependent software, wherein the secondary dependent software is the dependent software of the primary dependent software. And sequentially searching according to the linear relation, and determining the multi-level dependent software of the upgraded application software corresponding to the application software to be upgraded and the version number of the multi-level dependent software. The level of the dependent software can be one or more. And when the identifiers of the multi-level dependent software are the same but the version numbers are different, selecting the multi-level dependent software corresponding to the highest version number to perform the next step.
For example, the version number of the upgraded application software a corresponding to the application software to be upgraded is 1.0, and the first-level dependent software B and the first-level dependent software C of the upgraded application software a corresponding to the application software to be upgraded are determined according to the package dependent self-description file, wherein the version number of the first-level dependent software B is 2.0, and the version number of the first-level dependent software C is 1.0. And determining the secondary dependent software C according to the product package dependent self-description file corresponding to the primary dependent software B with the version number of 2.0, wherein the version number of the secondary dependent software C is 2.0. And determining that other multi-level dependent software does not exist according to the product package dependent self-description file corresponding to the first-level dependent software C with the version number of 1.0 and the product package dependent self-description file corresponding to the first-level dependent software C with the version number of 2.0.
At the moment, according to the identifier A and the version number 1.0, determining a first-level dependent software B, a first-level dependent software C and a second-level dependent software C, comparing the version numbers of the first-level dependent software C and the second-level dependent software C when the identifiers of the multi-level dependent software are the same and the version numbers are different, selecting the second-level dependent software C when the version number of the second-level dependent software C is larger, and removing the first-level dependent software C. And finally, determining the upgraded application software A corresponding to the application software to be upgraded, wherein when the version number is 1.0, the corresponding dependent software is dependent software B and dependent software C, and the version number of the dependent software B is 2.0 and the version number of the dependent software C is 2.0.
At least one dependent software of the upgraded application software corresponding to the application software to be upgraded is referred to as a dependent software hereinafter. After one or more dependent software is determined, aiming at one dependent software, the server matches the identifiers of the multiple application software according to the identifier of the dependent software, and the corresponding current version number is the version number of the dependent software before upgrading corresponding to the dependent software when the identifiers are the same. Comparing the version number of the dependent software before upgrading corresponding to the dependent software with the version number of the dependent software, if the version numbers are the same, the corresponding dependent software before upgrading does not need to be upgraded, and if the version numbers are different, the corresponding dependent software before upgrading needs to be upgraded.
For example, the dependent software is finally determined to be dependent software B and dependent software C, the version numbers of B and C are both 2.0, and according to the identifiers of B and C, the dependent software is respectively matched with the identifiers of the plurality of application software, and the version numbers of the dependent software before upgrading corresponding to B and C are determined to be 1.0 and 2.0 respectively. At this time, the version number of the dependent software before upgrading corresponding to the dependent software B is different from the version number of the dependent software before upgrading corresponding to the dependent software C, and the version number of the dependent software before upgrading corresponding to the dependent software C is the same as the version number of the dependent software before upgrading corresponding to the dependent software B, so that the dependent software before upgrading corresponding to the dependent software B does not need to be upgraded.
And the server generates a software update package of the dependent software before upgrading corresponding to the dependent software under the condition that the version number of the dependent software before upgrading corresponding to the dependent software is different from the version number of the dependent software, namely when the corresponding dependent software before upgrading needs to be upgraded. One dependent software corresponds to one software update package.
The software update package of the dependent software before the upgrade corresponding to the at least one dependent software is hereinafter referred to as a first software update package. In an implementation manner, the first software update package is an incremental package, and in the method 100 for upgrading application software, the step S105 specifically includes the following steps:
determining a file corresponding to the version number of at least one dependent software of the upgraded application software corresponding to the application software to be upgraded according to the version number of the at least one dependent software of the upgraded application software corresponding to the application software to be upgraded, and determining a file corresponding to the version number of the at least one dependent software of the dependent software before upgrading corresponding to the at least one dependent software according to the version number of the at least one dependent software before upgrading corresponding to the at least one dependent software;
and packaging subfiles of files corresponding to the version number of at least one piece of dependency software of the application software to be upgraded and corresponding to the version number of the dependency software before upgrading corresponding to the at least one piece of dependency software, and generating a software update package of the dependency software before upgrading corresponding to the at least one piece of dependency software.
Taking one dependent software as an example, determining a product full package 1 according to the version number of the dependent software, wherein files in the product full package 1 are files corresponding to the version number of the dependent software, and the product full package 1 comprises a plurality of first subfiles. And determining a product full package 2 according to the version number of the dependent software before the dependent software is upgraded and corresponding to the dependent software, wherein files in the product full package 2 are files corresponding to the version number of the dependent software before the dependent software is upgraded and corresponding to the dependent software, and the product full package 2 comprises a plurality of second subfiles. In brief, the files in the full product package 1 are the files after upgrading, and the files in the full product package 2 are the files before upgrading.
And comparing the hash code of the first subfile with the hash codes of all the second subfiles in sequence, and skipping the first subfile if the hash code of one second subfile is the same as the hash code of the first subfile, which indicates that the first subfile is unchanged. When the hash code of the second subfile is not the same as the hash code of the first subfile, the first subfile is changed and needs to be updated. After the comparison of one first subfile is completed, the comparison of the next first subfile is continued until all the comparison of the first subfiles is completed. And packaging the first subfile needing to be updated to generate a first software update package. And the terminal equipment combines the first software updating package with the product full package 2 to upgrade the dependent software before the upgrade corresponding to the dependent software.
Because the hash code of each file is generated in the server in advance in the embodiment of the application, whether the file is updated or not can be judged by directly comparing the hash codes during upgrading, the file can be quickly packaged to generate the incremental package, and the upgrading efficiency is improved.
In another implementation manner, the first software update package is a full product package, and in the application software upgrading method 100, the step S105 specifically includes the following steps:
determining a file corresponding to the version number of at least one dependent software of the upgraded application software corresponding to the application software to be upgraded according to the version number of the at least one dependent software of the upgraded application software corresponding to the application software to be upgraded;
and packaging files corresponding to the version number of at least one dependent software of the upgraded application software corresponding to the application software to be upgraded, and generating a software update package of the dependent software before upgrading corresponding to the at least one dependent software.
And the file corresponding to the version number of the dependent software is the file in the full product package corresponding to the version number of the dependent software. For one dependent software, the whole product package is already stored in the server, so that the whole product package corresponding to the version number of the dependent software is determined according to the version number of the dependent software, and the whole product package is directly used as a first software updating package, or files in the whole product package are repackaged to generate the first software updating package. And the terminal equipment replaces the whole product package of the dependent software before upgrading corresponding to the dependent software by using the first software updating package, and upgrades the dependent software before upgrading corresponding to the dependent software.
In addition, the application software upgrade method 100 comprises the following steps (not shown in the figure):
generating a software update package of the application software to be upgraded;
and sending the software update package of the application software to be upgraded to the terminal equipment.
The software update package of the application software to be upgraded is hereinafter referred to as a second software update package. In one implementation, the second software update package is an incremental package, the second software update package generated according to the steps of:
determining a file of the upgraded application software corresponding to the application software to be upgraded according to the version number of the upgraded application software corresponding to the application software to be upgraded, and determining a file corresponding to the current version number of the application software to be upgraded according to the current version number of the application software to be upgraded;
and packaging subfiles of the upgraded application software files corresponding to the application software to be upgraded, wherein the subfiles are different from the files corresponding to the current version number of the application software to be upgraded, and generating a software updating package of the application software to be upgraded.
In another implementation, the second software update package is a full product package, the second software update package generated according to the steps of:
determining a file of the upgraded application software corresponding to the application software to be upgraded according to the version number of the upgraded application software corresponding to the application software to be upgraded;
and packaging the upgraded application software files corresponding to the application software to be upgraded to generate a software update package of the application software to be upgraded.
Specifically, the method for generating the second software update package is similar to the method for generating the first software update package, and for brevity, no further description is provided here.
Taking the first software update package and the second software update package as example increment packages, in one implementation manner, the server sends the first software update package and the second software update package to the terminal device respectively. In another implementation manner, the server packages the first software update package and the second software update package into one package and sends the package to the terminal equipment.
Taking the example that the server sends the first software update package and the second software update package to the terminal device respectively, in one implementation, the server directly sends the first software update package and the second software update package to the terminal device. In another implementation manner, the server stores the first software update package and the second software update package in the cloud sharing service, generates a first download address of the first software update package and a second download address of the second software update package, and sends the first download address and the second download address to the terminal device. And the terminal equipment downloads the corresponding software updating package according to the downloading address.
The terminal device can automatically run the software update package after acquiring the software update package, or run the software update package when detecting an installation instruction of a user, so as to upgrade dependent software before upgrading and application software to be upgraded corresponding to the dependent software.
Fig. 3 is a schematic flowchart of an application software upgrading method 300 according to an embodiment of the present application. The method 300 includes at least the following steps:
s301, the terminal device sends an upgrade request of application software to be upgraded to a server, wherein the upgrade request indicates the application software to be upgraded, the version number of the upgraded application software corresponding to the application software to be upgraded, and the version numbers of at least one dependent software of the upgraded application software corresponding to the application software to be upgraded and at least one dependent software before upgrading corresponding to the at least one dependent software;
s302, a server receives an upgrade request of application software to be upgraded sent by terminal equipment, and acquires reference information, wherein the reference information comprises a plurality of pieces of information, and each piece of information indicates a corresponding relation between one piece of application software, the version number of the application software, and the version number of at least one piece of dependent software and at least one piece of dependent software of the application software;
s303, the server determines the version number of at least one dependent software of the upgraded application software corresponding to the application software to be upgraded according to the application software to be upgraded, the at least one dependent software of the upgraded application software corresponding to the application software to be upgraded, the version number of the upgraded application software corresponding to the application software to be upgraded and the reference information;
s304, under the condition that the version number of the dependent software before the upgrade corresponding to the at least one dependent software is different from the version number of the at least one dependent software of the application software after the upgrade corresponding to the application software to be upgraded, the server generates a software update package of the dependent software before the upgrade corresponding to the at least one dependent software;
s305, the server sends a software update package of the dependent software before upgrading corresponding to at least one dependent software to the terminal equipment;
s306, the terminal device receives the software updating package of the dependent software before upgrading corresponding to the at least one dependent software, and upgrades the dependent software before upgrading corresponding to the at least one dependent software according to the software updating package of the dependent software before upgrading corresponding to the at least one dependent software.
In the embodiment of the application, the terminal device obtains the corresponding relation between the upgraded application software and the dependent software corresponding to the application software to be upgraded in advance.
The terminal equipment responds to the upgrading instruction and sends query information of the application software to be upgraded to the server, the query information indicates the application software to be upgraded and the version number of the upgraded application software corresponding to the application software to be upgraded, and the query information is used for querying the corresponding relation between the upgraded application software corresponding to the application software to be upgraded and the dependent software; the server analyzes the product package dependence self-description file according to the query information and the reference information, determines at least one dependence software of the upgraded application software corresponding to the application software to be upgraded, and sends information indicating the at least one dependence software to the terminal equipment; and the terminal equipment receives the indication information, namely acquires the corresponding relation between the upgraded application software and the dependent software corresponding to the application software to be upgraded. When the upgrade request is sent to the server, the upgrade request does not need to indicate the application software, which does not have a dependency relationship with the upgraded application software corresponding to the application software to be upgraded, among the plurality of application software.
For other details not described in the method 300, please refer to the description in the method 100, and for brevity, the description is omitted here.
The application software upgrading method according to the embodiment of the present application is described in detail above with reference to fig. 1 to 3, and the apparatus, the device, and the system provided in the embodiment of the present application are described in detail below with reference to fig. 4 to 7.
Fig. 4 is a schematic block diagram of an apparatus 400 provided in the present embodiment, including a receiving unit 401, a processing unit 402, and a sending unit 403.
A receiving unit 401, configured to receive an upgrade request of application software to be upgraded sent by a terminal device, where the upgrade request indicates multiple application software, current version numbers of the multiple application software, and version numbers of upgraded application software corresponding to the application software to be upgraded, and the multiple application software includes the application software to be upgraded;
a processing unit 402, configured to obtain reference information after receiving an upgrade request of application software to be upgraded sent by a terminal device, where the reference information includes multiple pieces of information, and each piece of information indicates a correspondence between one piece of application software, a version number of the application software, and at least one piece of dependent software of the application software and a version number of the at least one piece of dependent software; determining at least one dependent software of the upgraded application software corresponding to the application software to be upgraded and the version number of at least one dependent software of the upgraded application software corresponding to the application software to be upgraded according to the application software to be upgraded, the version number of the upgraded application software corresponding to the application software to be upgraded and the reference information; determining the version number of the dependent software before upgrading corresponding to at least one dependent software of the upgraded application software corresponding to the application software to be upgraded from the current version numbers of the plurality of application software according to the at least one dependent software of the upgraded application software corresponding to the application software to be upgraded; under the condition that the version number of the dependent software before the upgrade corresponding to the at least one dependent software is different from the version number of the at least one dependent software of the application software after the upgrade corresponding to the application software to be upgraded, generating a software updating package of the dependent software before the upgrade corresponding to the at least one dependent software;
a sending unit 403, configured to send a software update package of the dependent software before upgrading corresponding to at least one dependent software to the terminal device.
Optionally, the processing unit 402 is further configured to:
determining a file corresponding to the version number of at least one dependent software of the upgraded application software corresponding to the application software to be upgraded according to the version number of the at least one dependent software of the upgraded application software corresponding to the application software to be upgraded, and determining a file corresponding to the version number of the at least one dependent software of the dependent software before upgrading corresponding to the at least one dependent software according to the version number of the at least one dependent software before upgrading corresponding to the at least one dependent software;
and packaging subfiles of files corresponding to the version number of at least one piece of dependency software of the application software after upgrading corresponding to the application software to be upgraded, which are different from the files corresponding to the version number of the dependency software before upgrading corresponding to at least one piece of dependency software, and generating a software update package of the dependency software before upgrading corresponding to at least one piece of dependency software.
Optionally, the processing unit 402 is further configured to:
determining a file corresponding to the version number of at least one dependent software of the upgraded application software corresponding to the application software to be upgraded according to the version number of the at least one dependent software of the upgraded application software corresponding to the application software to be upgraded;
and packaging files corresponding to the version number of at least one dependent software of the upgraded application software corresponding to the application software to be upgraded to generate a software update package of the dependent software before upgrading corresponding to the at least one dependent software.
Optionally, the processing unit 402 is further configured to generate a software update package of the application software to be upgraded; the sending unit 403 is further configured to send the software update package of the application software to be upgraded to the terminal device.
Optionally, the processing unit 402 is further configured to:
determining a file of the upgraded application software corresponding to the application software to be upgraded according to the version number of the upgraded application software corresponding to the application software to be upgraded, and determining a file corresponding to the current version number of the application software to be upgraded according to the current version number of the application software to be upgraded;
and packaging subfiles, which are different from the files corresponding to the current version number of the application software to be upgraded, in the files of the application software after upgrading corresponding to the application software to be upgraded, and generating a software updating package of the application software to be upgraded.
Optionally, the processing unit 402 is further configured to:
determining the file of the upgraded application software corresponding to the application software to be upgraded according to the version number of the upgraded application software corresponding to the application software to be upgraded;
and packaging the upgraded application software files corresponding to the application software to be upgraded to generate a software update package of the application software to be upgraded.
It should be understood that the apparatus 400 of the embodiment of the present application may be implemented by an application-specific integrated circuit (ASIC), or a Programmable Logic Device (PLD), which may be a Complex Programmable Logic Device (CPLD), a field-programmable gate array (FPGA), a General Array Logic (GAL), or any combination thereof. The application software upgrading method shown in fig. 1 or fig. 3 may also be implemented by software, and when the application software upgrading method shown in fig. 1 or fig. 3 is implemented by software, the apparatus 400 and its respective modules may also be software modules.
The apparatus 400 according to the embodiment of the present application may correspond to performing the method described in the embodiment of the present application, and the above and other operations and/or functions of each unit in the apparatus 400 are not described herein again for brevity in order to implement the corresponding process performed by the server in the method shown in fig. 1 or the corresponding process performed by the server in the method shown in fig. 3.
Fig. 5 is a schematic block diagram of an apparatus 500 provided in the present embodiment, which includes a sending unit 501, a receiving unit 502, and a processing unit 503.
A sending unit 501, configured to send an upgrade request of application software to be upgraded to a server, where the upgrade request indicates a plurality of application software, current version numbers of the application software, and version numbers of upgraded application software corresponding to the application software to be upgraded, and the application software includes the application software to be upgraded;
a receiving unit 502, configured to receive a software update package of the dependent software before upgrading corresponding to at least one dependent software returned by the server;
the processing unit 503 is configured to upgrade, according to the software update package of the dependent software before being upgraded corresponding to the at least one dependent software, the dependent software before being upgraded corresponding to the at least one dependent software.
Optionally, the receiving unit 502 is further configured to receive a software update package of the application software to be upgraded, which is returned by the server; the processing unit 503 is further configured to upgrade the application software to be upgraded according to the software update package of the application software to be upgraded.
Optionally, the processing unit 503 is further configured to scan, in response to the upgrade instruction, a plurality of application software installed on the terminal device, and determine current version numbers of the plurality of application software.
It should be understood that the apparatus 500 of the embodiment of the present application may be implemented by an application-specific integrated circuit (ASIC), or a Programmable Logic Device (PLD), which may be a Complex Programmable Logic Device (CPLD), a field-programmable gate array (FPGA), a General Array Logic (GAL), or any combination thereof. The application software upgrading method shown in fig. 1 or fig. 3 may also be implemented by software, and when the application software upgrading method shown in fig. 1 or fig. 3 is implemented by software, the apparatus 500 and its respective modules may also be software modules.
The apparatus 500 according to the embodiment of the present application may correspond to performing the method described in the embodiment of the present application, and the above and other operations and/or functions of each unit in the apparatus 500 are not described herein again for brevity in order to implement the corresponding process performed by the terminal device in the method shown in fig. 1 or the corresponding process performed by the terminal device in the method shown in fig. 3.
Fig. 6 is a schematic structural diagram of an apparatus according to an embodiment of the present application. As shown in fig. 6, the device 600 includes a processor 601, a memory 602, a communication interface 603, and a bus 604. The processor 601, the memory 602, and the communication interface 603 communicate with each other via the bus 604, or may communicate with each other via other means such as wireless transmission. The memory 602 is used for storing instructions and the processor 601 is used for executing the instructions stored by the memory 602. The memory 602 stores program code 6021 and the processor 601 may invoke the program code 6021 stored in the memory 602 to perform the application software upgrade method shown in fig. 1 or 3.
It should be understood that in the embodiment of the present application, the processor 601 may be a CPU, and the processor 601 may also be other general purpose processors, digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or any conventional processor or the like.
The memory 602 may include both read-only memory and random access memory and provides instructions and data to the processor 601. The memory 602 may also include non-volatile random access memory. The memory 602 may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile memory may be a read-only memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash memory. Volatile memory can be Random Access Memory (RAM), which acts as external cache memory. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (static RAM, SRAM), dynamic Random Access Memory (DRAM), synchronous Dynamic Random Access Memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), and direct bus RAM (DR RAM).
The bus 604 may include a power bus, a control bus, a status signal bus, and the like, in addition to a data bus. But for clarity of illustration the various busses are labeled in figure 6 as bus 604.
It should be understood that the apparatus 600 according to the embodiment of the present application may correspond to the apparatus 400 or the apparatus 500 in the embodiment of the present application, and may correspond to a server or a terminal device in the method illustrated in fig. 1 in the embodiment of the present application, and may also correspond to a server or a terminal device in the method illustrated in fig. 3 in the embodiment of the present application, when the apparatus 600 corresponds to the server in the method illustrated in fig. 1, the above and other operations and/or functions of the respective modules in the apparatus 600 are respectively for implementing the operation steps of the method illustrated in fig. 1 by the server, when the apparatus 600 corresponds to the terminal device in the method illustrated in fig. 1, the above and other operations and/or functions of the respective modules in the apparatus 600 are respectively for implementing the operation steps of the method illustrated in fig. 1 by the terminal device, when the apparatus 600 corresponds to the server in the method illustrated in fig. 3, the above and other operations and/or functions of the respective modules in the apparatus 600 are respectively for implementing the operation steps of the method illustrated in fig. 3, and when the apparatus 600 corresponds to the terminal device illustrated in fig. 3, the above and other operations and other modules in the method illustrated in the apparatus 600 are not needed for implementing the operation steps of the method illustrated in fig. 3, respectively, and this is for brevity.
The above embodiments may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, the above-described embodiments may 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. When loaded or executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains one or more collections of available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. The semiconductor medium may be a Solid State Drive (SSD).
Fig. 7 is a schematic structural diagram of an application software upgrading system 700 according to an embodiment of the present application, where the system 700 includes aserver 701 and aterminal device 702. Theserver 701 implements the method executed by the server in the embodiments of the present application, and theterminal device 702 implements the method executed by the terminal device in the embodiments of the present application. For brevity, no further description is provided herein.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.