CN111176716A - Upgrade package generation method and device, electronic equipment and storage medium - Google Patents

Upgrade package generation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111176716A
CN111176716A CN201911304160.4A CN201911304160A CN111176716A CN 111176716 A CN111176716 A CN 111176716A CN 201911304160 A CN201911304160 A CN 201911304160A CN 111176716 A CN111176716 A CN 111176716A
Authority
CN
China
Prior art keywords
version
patch
existing
file
upgrade
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911304160.4A
Other languages
Chinese (zh)
Inventor
王治军
赵广石
潘廷勇
王艳辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Visionvera Information Technology Co Ltd
Original Assignee
Visionvera Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Visionvera Information Technology Co Ltd filed Critical Visionvera Information Technology Co Ltd
Priority to CN201911304160.4A priority Critical patent/CN111176716A/en
Publication of CN111176716A publication Critical patent/CN111176716A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides an upgrade patch generation method and device, electronic equipment and a storage medium. The method comprises the following steps: receiving a version identification and a complete data packet of an upgrade version uploaded by a user, wherein the version identification comprises a terminal type and a version number; searching an existing version corresponding to the version identifier with the same terminal type as the version identifier of the upgraded version; aiming at each found existing version, comparing the complete data packet of the existing version with the complete data packet of the upgraded version, and determining an updated file of the upgraded version compared with the existing version; and generating a patch upgrade patch with the existing version corresponding to the upgraded version according to the updated file. The invention can generate the patch upgrade patch corresponding to the upgrade version of the existing version aiming at the existing version corresponding to the version identification with the same terminal type as the version identification of the upgrade version, and the patch upgrade patch comprises the upgrade file of the upgrade version compared with the existing version, so that the relevance of the patch upgrade patch and the existing version is larger.

Description

Upgrade package generation method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to an upgrade package generation method and apparatus, an electronic device, and a storage medium.
Background
With the rapid development of network technologies, bidirectional communications such as video conferences and video teaching are widely popularized in the aspects of life, work, learning and the like of users. The user uses the terminal to communicate, and in order to meet the changing user requirements, the terminal used by the user needs to be continuously upgraded.
In the prior art, research and development personnel manufacture and upload a complete data packet of an upgraded version to a server, and the server stores the complete data packet of the upgraded version. When the terminal is to be upgraded, the terminal needs to download the complete data packet of the upgraded version from the server. However, the complete package of the upgraded version may contain a file that is duplicated with the existing version, so that the complete package of the upgraded version is poorly associated with the existing version.
Disclosure of Invention
In view of the above problems, embodiments of the present invention are proposed to provide an upgrade package generation method, apparatus, electronic device and storage medium that overcome or at least partially solve the above problems.
In a first aspect, an embodiment of the present invention discloses a method for generating an upgrade package, where the method includes:
receiving a version identification and a complete data packet of an upgrade version uploaded by a user, wherein the version identification comprises a terminal type and a version number;
searching an existing version corresponding to the version identifier with the same terminal type as the version identifier of the upgraded version;
aiming at each found existing version, comparing the complete data packet of the existing version with the complete data packet of the upgraded version, and determining an update file of the upgraded version compared with the existing version;
and generating a patch upgrade patch of which the existing version corresponds to the upgraded version according to the update file.
Optionally, the generating, according to the update file, a patch upgrade package of which the existing version corresponds to the upgraded version includes: acquiring script information corresponding to the update file, and writing the script information into a script of the update file; and packaging the update file and the script to generate the patch upgrade package.
Optionally, after the generating, according to the update file, a patch upgrade package of which the existing version corresponds to the upgraded version, the method further includes: and combining the version identification of the existing version and the version identification of the upgraded version to be used as the identification of the patch upgrade package.
Optionally, the method further comprises: regularly counting the number of terminals provided with each existing version; and deleting the complete data packets of the existing versions and the corresponding patch upgrading packets, wherein the number of the terminals is zero.
Optionally, the comparing the complete data package of the existing version with the complete data package of the upgraded version to determine the update file of the upgraded version compared with the existing version includes: comparing the file name of the file in the complete data packet of the existing version with the file name of the file in the complete data packet of the upgraded version; comparing the file contents of the files with the same file name to obtain files with the same file name and different file contents in the complete data packet of the upgraded version as modified files; acquiring a file which exists in the complete data packet of the upgraded version but does not exist in the complete data packet of the existing version as a newly added file; acquiring files which do not exist in the complete data packet of the upgraded version but exist in the complete data packet of the existing version as deleted files; and taking the file name of the deleted file, the modified file and the newly added file as the update file.
In a second aspect, an embodiment of the present invention discloses an upgrade package generation apparatus, where the apparatus includes:
the version receiving module is used for receiving a version identifier and a complete data packet of an upgrade version uploaded by a user, wherein the version identifier comprises a terminal type and a version number;
the version searching module is used for searching the existing version corresponding to the version identifier with the same terminal type as the version identifier of the upgraded version;
the determining module is used for comparing the complete data packet of the existing version with the complete data packet of the upgraded version aiming at each found existing version, and determining the updated file of the upgraded version compared with the existing version;
and the generating module is used for generating the patch upgrade patch of which the existing version corresponds to the upgrade version according to the update file.
Optionally, the generating module includes: the script obtaining unit is used for obtaining script information corresponding to the update file and writing the script information into a script of the update file; and the patch generating unit is used for packaging the update file and the script to generate the patch upgrade package.
Optionally, the apparatus further comprises: and the identification module is used for combining the version identification of the existing version and the version identification of the upgraded version to be used as the identification of the patch upgrade package.
Optionally, the apparatus further comprises: the statistical module is used for regularly counting the number of the terminals provided with each existing version; and the deleting module is used for deleting the complete data packets of the existing versions and the corresponding patch upgrading packets, the number of the terminals of which is zero.
Optionally, the determining module includes: the comparison unit is used for comparing the file name of the file in the complete data packet of the existing version with the file name of the file in the complete data packet of the upgraded version; the first acquisition unit is used for comparing the file contents of the files with the same file name and acquiring the files with the same file name and different file contents in the complete data packet of the upgraded version as modified files; a second obtaining unit, configured to obtain, as a new file, a file that exists in the complete data packet of the upgraded version but does not exist in the complete data packet of the existing version; a third obtaining unit, configured to obtain a file that does not exist in the complete data packet of the upgraded version but exists in the complete data packet of the existing version, as a deleted file; and the file determining unit is used for taking the file name of the deleted file, the modified file and the newly added file as the update file.
In a third aspect, an embodiment of the present invention discloses an electronic device, including: one or more processors; and one or more machine-readable media having instructions stored thereon; the instructions, when executed by the one or more processors, cause the processors to perform the upgrade package generation method as any one of above.
In a fourth aspect, an embodiment of the present invention discloses a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the upgrade package generation method as described in any one of the above.
In the embodiment of the invention, version identification and a complete data packet of an upgrade version uploaded by a user are received, wherein the version identification comprises a terminal type and a version number; searching an existing version corresponding to the version identifier with the same terminal type as the version identifier of the upgraded version; aiming at each found existing version, comparing the complete data packet of the existing version with the complete data packet of the upgraded version, and determining an update file of the upgraded version compared with the existing version; and generating a patch upgrade patch of which the existing version corresponds to the upgraded version according to the update file. Therefore, in the embodiment of the present invention, for an existing version corresponding to a version identifier having the same terminal type as the version identifier of the upgraded version, a patch upgrade patch corresponding to the upgraded version to the existing version may be generated, where the patch upgrade patch includes an update file of the upgraded version compared with the existing version, so that the association between the patch upgrade patch and the existing version is greater.
Drawings
Fig. 1 is a flowchart illustrating steps of an upgrade package generation method according to a first embodiment of the present invention.
Fig. 2 is a schematic diagram of an upgrade package generation process according to a second embodiment of the present invention.
Fig. 3 is a schematic diagram of an overall process according to a third embodiment of the present invention.
Fig. 4 is a block diagram of an upgrade package generation apparatus according to a fourth embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
Example one
Referring to fig. 1, a flowchart illustrating steps of an upgrade package generation method according to a first embodiment of the present invention is shown. The upgrade package generation method of the embodiment of the invention can be applied to a server (such as a storage server or a storage gateway).
The upgrade patch generation method of the embodiment of the invention can comprise the following steps:
step 101, receiving a version identifier and a complete data packet of an upgrade version uploaded by a user, wherein the version identifier comprises a terminal type and a version number.
The user may be a developer. After the research and development personnel manufacture the complete data packet of the upgrade version, the research and development personnel set the version identification for the upgrade version and upload the version identification of the upgrade version and the complete data packet to the server.
In the embodiment of the invention, the version identification comprises a terminal type and a version number. For example, if the terminal type is a and the version number is 1.0.2, the version identifier is a-1.0.2; and if the terminal type is B and the version number is 1.0.2, the version identification is B-1.0.2. The terminal type may be a type of a terminal, such as a 2-terminal, a 3-terminal, and the like.
And 102, searching an existing version corresponding to the version identifier with the same terminal type as the version identifier of the upgraded version.
The server stores the version identification and the complete data packet of the existing version. The existing version refers to a version in which the terminal is installed. After receiving the version identification of the upgraded version and the complete data packet, the server compares the version identification of each existing version with the version identification of the upgraded version, and searches for the existing version corresponding to the version identification of the upgraded version with the version identification of the same terminal type.
For example, if the version identifier of the upgraded version is a-1.0.2, the existing version corresponding to the version identifier including the terminal type a is searched from the existing version, for example, the existing version with the version identifier of a-1.0.0 and the existing version with the version identifier of a-1.0.1 are searched.
Step 103, comparing the complete data packet of the existing version with the complete data packet of the upgraded version for each found existing version, and determining the updated file of the upgraded version compared with the existing version.
And respectively processing each found existing version, wherein the processing process of each existing version is the same. For the found existing version, the complete data packet of the existing version is obtained, the complete data packet of the existing version is compared with the complete data packet of the upgraded version, and the updated file of the upgraded version compared with the existing version can be determined.
And 104, generating a patch upgrade patch of which the existing version corresponds to the upgraded version according to the updated file.
For a found existing version, a patch upgrade patch corresponding to the existing version can be generated according to the upgrade file of the upgrade version compared with the existing version, and the patch upgrade patch includes the upgrade file of the upgrade version compared with the existing version.
Therefore, for each existing version having the same terminal type as the version identifier of the upgraded version, a patch upgrade patch corresponding to the upgraded version of the existing version can be generated.
In the embodiment of the invention, aiming at the existing version corresponding to the version identification with the same terminal type as the version identification of the upgraded version, the patch upgrade patch corresponding to the upgraded version can be generated, and the patch upgrade patch comprises the updated file of the upgraded version compared with the existing version, so that the relevance between the patch upgrade patch and the existing version is larger.
Example two
Referring to fig. 2, a schematic diagram of an upgrade package generation process according to a second embodiment of the present invention is shown. As shown in fig. 2, the server (i.e., the server upgrade system) may include two parts, an upgrade version processing module and a version management module, respectively.
The processing process of the upgrade version processing module comprises the following steps:
1. and receiving the uploaded upgrade version. The received data comprises the version identification of the upgraded version and the complete data packet. The version identification comprises a terminal type and a version number, and the terminal type contained in the version identification of the upgraded version is used as the current terminal type. The complete package contains all the files required by the terminal to run from one system to the entire software program.
2. And scanning the existing version corresponding to the current terminal type. When the terminal version identifier is used, the version identifier including the current terminal type is searched from the version identifiers of the existing versions, the searched version identifier is the version identifier with the same terminal type as the version identifier of the upgraded version, and the existing version corresponding to the searched version identifier is obtained.
3. A file comparison module: and aiming at each found existing version, comparing the complete data packet of the existing version with the complete data packet of the upgraded version, and determining the updated file of the upgraded version compared with the existing version. The embodiment of the invention explains the processing process of an existing version.
In an implementation, each complete data package may include a plurality of files, each having a respective file name. And the file comparison module compares the file name of the file in the complete data packet of the existing version with the file name of the file in the complete data packet of the upgraded version. After comparison, the following three files can be obtained:
(1) the file name of the file in the complete data package of the upgraded version is the same as that of the file in the complete data package of the existing version. And comparing the file contents of the files with the same file name in the complete data packet of the upgraded version and the complete data packet of the existing version. If the file contents are the same, the file is not modified and is not processed. If the file contents are different, the file is modified, that is, the file is modified by the upgraded version compared with the existing version, so that the file with the same file name but different file contents in the complete data packet of the upgraded version is obtained as the modified file.
In an alternative embodiment, the comparison may be performed by way of a comparison MD5(Message digest algorithm, fifth edition) when comparing file contents. For two files with the same file name, respectively calculating MD5 values of the two files, comparing whether the two MD5 values are the same, if the MD5 values are the same, determining that the file contents of the two files are the same, and if the MD5 values are different, determining that the file contents of the two files are different. For the specific process of calculating MD5 value, those skilled in the art can do the relevant processing according to actual experience, and the embodiment of the present invention is not discussed in detail herein.
(2) And the file exists in the complete data packet of the upgraded version but does not exist in the complete data packet of the existing version, and the file is the newly added file of the upgraded version compared with the existing version, so that the file existing in the complete data packet of the upgraded version but does not exist in the complete data packet of the existing version is obtained and is used as the newly added file.
(3) The files which do not exist in the complete data package of the upgraded version but exist in the complete data package of the existing version are deleted compared with the files of the existing version, so that the files which do not exist in the complete data package of the upgraded version but exist in the complete data package of the existing version are obtained and serve as deleted files.
And the file comparison module acquires the file name of the deleted file, the modified file and the newly added file as an updated file of which the upgraded version is compared with the existing version. The file comparison module transmits the list of the updated files to the script generation module, and transmits the updated files to the patch package generation module. Updating the manifest for a file may include deleting the file name of the file, modifying the file name of the file, and adding the file name of the file newly.
4. And the script generation module and the patch package generation module generate a patch upgrade package of which the existing version corresponds to the upgraded version according to the update file.
The script generation module: and acquiring script information corresponding to the update file according to the list of the update file transmitted by the file comparison module, and writing the script information into the script of the update file.
In implementation, when a version is made, a script of the version is also made correspondingly, so that for one version, the script can be included in a complete data packet. The script generation module acquires the script of the existing version and the script of the upgraded version, wherein the script can comprise script information, and the script information comprises information such as a file name, a file path and the like. And aiming at the update file, searching script information corresponding to the file name of the update file from the obtained script according to the file name of the update file, taking the searched script information as the script information corresponding to the update file, writing the script information into the script corresponding to the update file, wherein the script information comprises the information of the file name, the file path and the like of the update file.
And the script generation module transmits the script of the updated file to the patch package generation module.
A patch package generation module: and packaging the update file and the script of the update file to generate a patch upgrade package of which the existing version corresponds to the upgraded version.
5. And generating the identification of the patch upgrade package. And after generating a patch upgrade patch with an existing version corresponding to an upgraded version, combining the version identification of the existing version and the version identification of the upgraded version to be used as the identification of the patch upgrade patch. The identification of the patch upgrade patch can be used as an index of the patch upgrade patch, and is used for inquiring the corresponding patch upgrade patch when the terminal is upgraded subsequently.
Secondly, the processing procedure of the version management module comprises the following steps:
1. the number of terminals installed with each existing version is periodically counted. And counting the use conditions of all the existing versions regularly. For an existing version, after a terminal installs the existing version, the number of terminals installed with the existing version is increased by one. The number of terminals installed with the existing version is periodically counted.
2. And deleting the complete data packets of the existing versions and the corresponding patch upgrading packets, wherein the number of the terminals is zero. For the existing version which is stored in the server but has no terminal to be installed again, the server can automatically delete the complete data package and the corresponding patch upgrade package of the existing version, so that the waste of storage space is avoided.
EXAMPLE III
Referring to fig. 3, a schematic diagram of an overall process according to a third embodiment of the present invention is shown. As shown in fig. 3, the overall process may include:
1. the upgrading tool is connected with the server, and after the connection is successful, the server returns a connection success response to the upgrading tool.
The upgrade tool may be upgrade software used by a developer and communicatively coupled to the server. In the embodiment of the present invention, the upgrade tool and the server may be connected by a socket (socket) or the like.
2. The upgrading tool uploads the upgrading version to the server, the uploaded data can comprise a version identification and a complete data packet of the upgrading version, and the version identification comprises a terminal type and a version number. And after the uploading is successful, the server returns a response of successful version uploading to the upgrading tool.
In an implementation, the version identification may be a combination of a terminal type and a version number. For example, if the terminal type is a and the version number is 1.0.2, the version identifier obtained by combination may be a-1.0.2, and the version identifier may also be 1.0.2-a.
3. And the server receives the version identification of the upgraded version and the complete data packet, and searches for the existing version corresponding to the version identification of the upgraded version with the same terminal type.
For example, if the version identifier of the upgraded version is a-1.0.2, the existing version corresponding to the version identifier including the terminal type a is searched from the existing version, for example, the existing version with the version identifier of a-1.0.0 and the existing version with the version identifier of a-1.0.1 are searched.
4. And the server compares the complete data packet of the existing version with the complete data packet of the upgraded version aiming at each found existing version, and determines the updated file of the upgraded version compared with the existing version.
For example, for the found existing version with version id a-1.0.0, the complete data packet of the existing version with version id a-1.0.0 is compared with the complete data packet of the upgraded version with version id a-1.0.2, and update file 1 (update file 1 may include multiple files) of the upgraded version a-1.0.2 compared with the existing version a-1.0.0 is determined. And aiming at the found existing version with the version identification of A-1.0.1, comparing the complete data packet of the existing version with the version identification of A-1.0.1 with the complete data packet of the upgraded version with the version identification of A-1.0.2, and determining that the upgraded version A-1.0.2 is compared with the updated file 2 (the updated file 2 may comprise a plurality of files) of the existing version A-1.0.1.
5. And the server generates a patch upgrade patch of which the existing version corresponds to the upgraded version according to the update file.
In the implementation, the server acquires script information corresponding to the update file, writes the script information into a script of the update file, and packages the update file and the script to generate a patch upgrade patch with an existing version corresponding to the upgraded version.
For example, script information corresponding to the update file 1 of the upgraded version A-1.0.2 compared with the existing version A-1.0.0 is obtained, the script information is written into the script of the update file 1, the update file 1 and the script are packaged to generate a patch upgrade patch 1, and the patch upgrade patch 1 is the patch upgrade patch of the existing version A-1.0.0 corresponding to the upgraded version A-1.0.2. Obtaining script information corresponding to the update file 2 of the upgraded version A-1.0.2 compared with the existing version A-1.0.1, writing the script information into the script of the update file 2, and packaging the update file 2 and the script to generate a patch upgrade patch 2, wherein the patch upgrade patch 2 is the patch upgrade patch of which the existing version A-1.0.1 corresponds to the upgraded version A-1.0.2.
6. And the server combines the version identification of the existing version and the version identification of the upgraded version to be used as the identification of the patch upgrade package.
For example, the version identifier A-1.0.0 of the existing version and the version identifier A-1.0.2 of the upgraded version are combined to obtain the A-1.0.0-A-1.0.2 which is used as the identifier of the patch upgrade patch 1. And combining the version identification A-1.0.1 of the existing version and the version identification A-1.0.2 of the upgraded version to obtain A-1.0.1-A-1.0.2 which is used as the identification of the patch upgrade package 2.
Of course, other combinations may be used, such as A-1.0.0-1.0.2 being the identifier of the patch upgrade package 1, or A-1.0.2-A-1.0.1 being the identifier of the patch upgrade package 1, or A-1.0.2-1.0.1 being the identifier of the patch upgrade package 1, and so on.
After the server finishes making an upgrade patch package, the server can inform the upgrade tool that the current patch upgrade package is finished, and grey display is carried out in the upgrade tool when the patch upgrade package is not finished.
7. And the server periodically counts the number of the terminals with each existing version, and deletes the complete data packets with the number of the terminals being zero and the corresponding patch upgrade packets of the existing versions.
8. And the upgrading tool triggers upgrading and sends an upgrading instruction to the server.
The terminal upgrading of the embodiment of the invention can be upgrading software installed on the terminal, such as upgrading video conference software installed on a video networking terminal.
When the terminal is to be upgraded, the upgrade tool acquires a version list stored in the server. The version list may include version identifications of all versions stored in the server, and the version identifications may include a terminal type and a version number. The upgrade tool may also obtain a terminal list, which may include terminal identifications of all terminals communicatively connected to the server.
The user can trigger the upgrading instruction, select the target version identification from the version list, select the target terminal identification from the terminal list, trigger the upgrading tool to generate the upgrading instruction, and the upgrading tool sends the upgrading instruction to the server. The upgrading instruction can comprise a target version identification and a target terminal identification. The target terminal identification is a terminal identification selected by a user and to be upgraded, and the target version identification is a version identification selected by the user and to be upgraded to the target terminal.
9. And the server receives an upgrading instruction triggered by a user and acquires the current version identification of the target terminal corresponding to the target terminal identification.
After receiving the upgrade instruction, the server may obtain a current version identifier of the corresponding target terminal according to the target terminal identifier, where the current version identifier is an identifier of a version currently installed in the target terminal.
In implementation, as shown in fig. 3, after receiving the upgrade instruction, the server notifies the terminal to upgrade, and sends the upgrade instruction to the target terminal corresponding to the target terminal identifier. After receiving the upgrade instruction, the target terminal may return the current version identifier installed in the target terminal to the server.
It should be noted that, if the terminal is an internet of view terminal, data between the server and the internet of view terminal is forwarded through the internet of view core server. Therefore, the server sends the upgrading instruction to the video network core server, and the video network core server forwards the upgrading instruction to the target terminal. The target terminal returns the current version identification to the video network core server, the video network core server forwards the current version identification to the server, and data are transmitted by adopting a video network transparent transmission protocol. Before adopting the video networking transparent transmission protocol, a server and a video networking terminal exchange a Media Access Control (MAC) address of the video networking via a video networking core server, the server obtains the MAC address of the video networking terminal, and the video networking terminal obtains the MAC address of the video networking terminal. When the server sends an upgrade instruction, the video network MAC address (source MAC address) of the server and the video network MAC address (destination MAC address) of the target video network terminal are added in a data packet corresponding to the upgrade instruction, and the video network core server forwards the upgrade instruction according to the MAC address added in the data packet corresponding to the upgrade instruction. When the target video network terminal returns the current version identification, the video network MAC address (source MAC address) of the target video network terminal and the video network MAC address (target MAC address) of the server are added in the data packet corresponding to the current version identification, and the video network core server forwards the current version identification according to the MAC address added in the data packet corresponding to the current version identification.
10. And the server searches whether a target patch upgrade patch with a current version corresponding to the target version exists in the pre-generated patch upgrade patch according to the current version identification and the target version identification.
As described above, after the user uploads a new upgrade version, the server obtains update files of the existing versions, which are compared with the upgrade version, for the existing versions corresponding to the version identifier of the upgrade version, and generates a patch upgrade patch, of which the existing versions correspond to the upgrade version, according to the update files. Compared with a complete upgrade patch, the patch upgrade patch has smaller data volume, and the patch upgrade patch contains the upgrade files and does not contain the same files in the two versions, so that the upgrade can be completed according to the patch upgrade patch.
After acquiring the current version identifier of the target terminal corresponding to the target terminal identifier, the server may search, according to the current version identifier and the target version identifier, whether a target patch upgrade patch corresponding to the target version exists in the pre-generated patch upgrade patch. The target patch upgrade patch is generated according to the update file of the target version compared with the current version.
As described above, after the server generates the patch upgrade package, the server also generates an identifier of the patch upgrade package. Because the patch upgrade patch is a patch upgrade patch in which the existing version corresponds to the upgraded version, the version identifier of the existing version and the version identifier of the upgraded version can be combined to serve as the identifier of the patch upgrade patch.
The process of the server searching whether the target patch upgrade patch corresponding to the target version exists in the pre-generated patch upgrade patch according to the current version identifier and the target version identifier may include: comparing the combination of the current version identifier and the target version identifier with the combination of the version identifier of the existing version and the version identifier of the upgraded version (i.e. comparing the two combinations); searching whether a patch upgrading packet with the version identification of the existing version identical to the current version identification and the version identification of the upgraded version identical to the target version identification exists; and when the patch upgrade patch exists, using the searched patch upgrade patch as the target patch upgrade patch.
11. And if the server finds that the target patch upgrade patch exists, the server issues the target patch upgrade patch to the terminal, and the terminal upgrades the target version according to the target patch upgrade patch.
If the server finds that the target patch upgrade patch corresponding to the target version exists in the current version, the server can send the target patch upgrade patch to the corresponding target terminal. The target terminal receives a target patch upgrade patch, wherein the target patch upgrade patch comprises an update file of a target version to be upgraded compared with a current version installed by the terminal, so that a related file of the target version can be obtained according to a complete data packet of the current version installed by the terminal and the received target patch upgrade patch, and the target version is upgraded.
12. And if the server finds that the target patch upgrading packet does not exist, the server sends the complete data packet of the target version to a target terminal so that the target terminal can upgrade according to the complete data packet.
If the server finds that the target patch upgrade patch corresponding to the target version does not exist in the current version, the server can send the complete data packet of the target version to the corresponding target terminal. And the target terminal receives the complete data packet of the target version so as to upgrade to the target version.
Similarly, if the terminal is a video network terminal, data between the server and the video network terminal is forwarded through a video network core server. Therefore, the server sends the target patch upgrade patch or the complete data packet of the target version to the video network core server, and the video network core server forwards the target patch upgrade patch or the complete data packet of the target version to the target terminal. When the server sends the target patch upgrade package or the complete data package of the target version, the video network MAC address (source MAC address) of the server and the video network MAC address (target MAC address) of the target video network terminal are added in the target patch upgrade package or the complete data package of the target version, and the video network core server forwards the target patch upgrade package or the complete data package of the target version according to the MAC address added in the target patch upgrade package or the complete data package of the target version.
For example, the target version identification selected by the user is A-1.0.2, the target terminal identifications are A1 and A2, the current version identification of the target terminal A1 is A-1.0.0, and the current version identification of the target terminal A2 is A-1.0.1. As described in the above processes 5 and 6, the patch upgrade patch 1 is a patch upgrade patch corresponding to the upgraded version A-1.0.2 from the existing version A-1.0.0, and the identifier of the patch upgrade patch 1 is A-1.0.0-A-1.0.2; the patch upgrade patch 2 is a patch upgrade patch corresponding to the upgraded version A-1.0.2 of the existing version A-1.0.1, and the identification of the patch upgrade patch 2 is A-1.0.1-A-1.0.2. The server compares the current version identification A-1.0.0 and the target version identification A-1.0.2 of the target terminal A1 with the identification of the patch upgrade patch, so that the target patch upgrade patch of which the current version of the target terminal A1 corresponds to the target version can be found to be the patch upgrade patch 1; according to the comparison between the current version identification A-1.0.1 and the target version identification A-1.0.2 of the target terminal A2 and the identification of the patch upgrade patch, the target patch upgrade patch of which the current version of the target terminal A2 corresponds to the target version can be found to be the patch upgrade patch 2. Therefore, the server issues the patch upgrade patch 1 to the target terminal A1, and the target terminal A1 upgrades the version A-1.0.0 installed by the target terminal A1 to the version A-1.0.2 according to the patch upgrade patch 1; the server sends the patch upgrade patch 2 to the target terminal A2, and the target terminal A2 upgrades the version A-1.0.1 installed by the target terminal A2 to the version A-1.0.2 according to the patch upgrade patch 2.
In the embodiment of the present invention, the processes 1 to 7 are processes for generating an upgrade patch (specifically, a patch upgrade patch), and the specific description of the processes 1 to 7 only needs to refer to the related description of the first embodiment and the related description of the second embodiment, which are not discussed in detail in the third embodiment of the present invention. The process 8-12 is a terminal upgrading process, which is performed according to the patch upgrade package generated before.
In the embodiment of the invention, the terminal needs to download the complete data packet including a large amount of data such as menus, programs, libraries, picture materials and the like in consideration of upgrading. However, in the actual upgrading process, all upgrading files are hardly replaced by upgrading, most of the upgrading files only update part of the files, the versions are numerous, and research and development personnel cannot manufacture a customized upgrading package for each version. Therefore, in the embodiment of the invention, the server generates a plurality of patch upgrade packages according to one upgrade version for upgrading different versions to the upgrade version, and the patch upgrade packages corresponding to a plurality of terminals of the same type are obtained in one manufacturing process. In the terminal upgrading process, if the patch upgrading package exists, upgrading is carried out according to the patch upgrading package, and the data volume of the patch upgrading package is smaller than that of a complete data package, so that the data volume processed in the processes of downloading the upgrading package, compressing, decompressing and the like can be reduced, the processing time is reduced, the upgrading efficiency is improved, the space occupied by the upgrading package can be reduced, and the upgrading work can be completed only in a small space at the terminal.
Example four
Referring to fig. 4, a block diagram of an upgrade package generation apparatus according to a fourth embodiment of the present invention is shown. The upgrade package generation apparatus according to an embodiment of the present invention may include the following modules:
the version receiving module 401 is configured to receive a version identifier of an upgraded version and a complete data packet, where the version identifier includes a terminal type and a version number;
a version searching module 402, configured to search an existing version corresponding to the version identifier of the upgraded version having the same terminal type;
a determining module 403, configured to compare, for each found existing version, the complete data packet of the existing version with the complete data packet of the upgraded version, and determine an update file of the upgraded version compared with the existing version;
a generating module 404, configured to generate, according to the update file, a patch upgrade patch in which the existing version corresponds to the upgraded version.
Optionally, the generating module 404 includes: the script obtaining unit is used for obtaining script information corresponding to the update file and writing the script information into a script of the update file; and the patch generating unit is used for packaging the update file and the script to generate the patch upgrade package.
Optionally, the apparatus further comprises: and the identification module is used for combining the version identification of the existing version and the version identification of the upgraded version to be used as the identification of the patch upgrade package.
Optionally, the apparatus further comprises: the statistical module is used for regularly counting the number of the terminals provided with each existing version; and the deleting module is used for deleting the complete data packets of the existing versions and the corresponding patch upgrading packets, the number of the terminals of which is zero.
Optionally, the determining module 403 includes: the comparison unit is used for comparing the file name of the file in the complete data packet of the existing version with the file name of the file in the complete data packet of the upgraded version; the first acquisition unit is used for comparing the file contents of the files with the same file name and acquiring the files with the same file name and different file contents in the complete data packet of the upgraded version as modified files; a second obtaining unit, configured to obtain, as a new file, a file that exists in the complete data packet of the upgraded version but does not exist in the complete data packet of the existing version; a third obtaining unit, configured to obtain a file that does not exist in the complete data packet of the upgraded version but exists in the complete data packet of the existing version, as a deleted file; and the file determining unit is used for taking the file name of the deleted file, the modified file and the newly added file as the update file.
Optionally, the apparatus further comprises: the instruction receiving module is used for receiving an upgrading instruction triggered by a user, wherein the upgrading instruction comprises a target version identifier and a target terminal identifier; the identification acquisition module is used for acquiring the current version identification of the target terminal corresponding to the target terminal identification; the patch searching module is used for searching whether a target patch upgrading packet of which the current version corresponds to the target version exists in a pre-generated patch upgrading packet according to the current version identification and the target version identification; the target patch upgrading package is generated according to the updated file of the target version compared with the current version; the sending module is used for sending the target patch upgrade patch to the target terminal when the search result of the patch search module exists so that the target terminal can be upgraded according to the target patch upgrade patch; and when the search result of the patch search module does not exist, sending the complete data packet of the target version to the target terminal so that the target terminal can be upgraded according to the complete data packet.
Optionally, the patch upgrade patch has an identifier, where the identifier is a combination of a version identifier of an existing version and a version identifier of an upgraded version; the patch searching module 403 includes: the identification comparison unit is used for comparing the combination of the current version identification and the target version identification with the combination of the version identification of the existing version and the version identification of the upgraded version; the identification searching unit is used for searching whether a patch upgrading packet with the version identification of the existing version identical to the current version identification and the version identification of the upgraded version identical to the target version identification exists; and when the patch upgrade patch exists, using the searched patch upgrade patch as the target patch upgrade patch.
In the embodiment of the invention, aiming at the existing version corresponding to the version identification with the same terminal type as the version identification of the upgraded version, the patch upgrade patch corresponding to the upgraded version can be generated, and the patch upgrade patch comprises the updated file of the upgraded version compared with the existing version, so that the relevance between the patch upgrade patch and the existing version is larger.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
In an embodiment of the invention, an electronic device is also provided. The electronic device may include one or more processors and one or more machine-readable media having instructions, such as an application program, stored thereon. The instructions, when executed by the one or more processors, cause the processors to perform the upgrade package generation method described above.
In an embodiment of the present invention, there is also provided a non-transitory computer-readable storage medium having stored thereon a computer program executable by a processor of an electronic device to perform the upgrade package generation method described above. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The upgrade package generation method, device, electronic device and storage medium provided by the present invention are described in detail above, and a specific example is applied in the text to explain the principle and the implementation of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. An upgrade package generation method, comprising:
receiving a version identification and a complete data packet of an upgrade version uploaded by a user, wherein the version identification comprises a terminal type and a version number;
searching an existing version corresponding to the version identifier with the same terminal type as the version identifier of the upgraded version;
aiming at each found existing version, comparing the complete data packet of the existing version with the complete data packet of the upgraded version, and determining an update file of the upgraded version compared with the existing version;
and generating a patch upgrade patch of which the existing version corresponds to the upgraded version according to the update file.
2. The method of claim 1, wherein the generating the patch upgrade patch corresponding to the upgraded version of the existing version according to the update file comprises:
acquiring script information corresponding to the update file, and writing the script information into a script of the update file;
and packaging the update file and the script to generate the patch upgrade package.
3. The method according to claim 1, further comprising, after said generating a patch upgrade patch corresponding to the upgraded version of the existing version according to the update file, the steps of:
and combining the version identification of the existing version and the version identification of the upgraded version to be used as the identification of the patch upgrade package.
4. The method of claim 1, further comprising:
regularly counting the number of terminals provided with each existing version;
and deleting the complete data packets of the existing versions and the corresponding patch upgrading packets, wherein the number of the terminals is zero.
5. The method of claim 1, wherein comparing the existing version of the complete data package with the upgraded version of the complete data package to determine the upgraded version of the update file compared to the existing version comprises:
comparing the file name of the file in the complete data packet of the existing version with the file name of the file in the complete data packet of the upgraded version;
comparing the file contents of the files with the same file name to obtain files with the same file name and different file contents in the complete data packet of the upgraded version as modified files;
acquiring a file which exists in the complete data packet of the upgraded version but does not exist in the complete data packet of the existing version as a newly added file;
acquiring files which do not exist in the complete data packet of the upgraded version but exist in the complete data packet of the existing version as deleted files;
and taking the file name of the deleted file, the modified file and the newly added file as the update file.
6. An upgrade package generation apparatus, comprising:
the version receiving module is used for receiving a version identifier and a complete data packet of an upgrade version uploaded by a user, wherein the version identifier comprises a terminal type and a version number;
the version searching module is used for searching the existing version corresponding to the version identifier with the same terminal type as the version identifier of the upgraded version;
the determining module is used for comparing the complete data packet of the existing version with the complete data packet of the upgraded version aiming at each found existing version, and determining the updated file of the upgraded version compared with the existing version;
and the generating module is used for generating the patch upgrade patch of which the existing version corresponds to the upgrade version according to the update file.
7. The apparatus of claim 6, wherein the generating module comprises:
the script obtaining unit is used for obtaining script information corresponding to the update file and writing the script information into a script of the update file;
and the patch generating unit is used for packaging the update file and the script to generate the patch upgrade package.
8. The apparatus of claim 6, further comprising:
and the identification module is used for combining the version identification of the existing version and the version identification of the upgraded version to be used as the identification of the patch upgrade package.
9. An electronic device, comprising:
one or more processors; and
one or more machine-readable media having instructions stored thereon;
the instructions, when executed by the one or more processors, cause the processors to perform the upgrade package generation method of any one of claims 1 to 5.
10. A computer-readable storage medium, having stored thereon a computer program which, when executed by a processor, implements the upgrade package generation method according to any one of claims 1 to 5.
CN201911304160.4A 2019-12-17 2019-12-17 Upgrade package generation method and device, electronic equipment and storage medium Pending CN111176716A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911304160.4A CN111176716A (en) 2019-12-17 2019-12-17 Upgrade package generation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911304160.4A CN111176716A (en) 2019-12-17 2019-12-17 Upgrade package generation method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111176716A true CN111176716A (en) 2020-05-19

Family

ID=70657338

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911304160.4A Pending CN111176716A (en) 2019-12-17 2019-12-17 Upgrade package generation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111176716A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103955363A (en) * 2014-04-08 2014-07-30 国云科技股份有限公司 Manufacturing method of program upgrade and installation package
CN103973475A (en) * 2013-02-05 2014-08-06 腾讯科技(深圳)有限公司 Difference service pack generating method, difference service pack downloading method, server and client-side
CN106201614A (en) * 2016-07-11 2016-12-07 天津中兴智联科技有限公司 A kind of universal method and system that multiple similar software can be carried out chain type upgrading
CN106293793A (en) * 2015-06-02 2017-01-04 西安中兴新软件有限责任公司 The method for upgrading software of a kind of terminal, device and system
WO2017036228A1 (en) * 2015-09-02 2017-03-09 中兴通讯股份有限公司 Method and apparatus for implementing system upgrading
WO2018006677A1 (en) * 2016-07-06 2018-01-11 中兴通讯股份有限公司 Smart upgrade method, server, terminal and system
CN108415714A (en) * 2018-02-08 2018-08-17 上海商米科技有限公司 The method for upgrading system and device of mobile terminal
CN109271196A (en) * 2018-09-28 2019-01-25 平安普惠企业管理有限公司 APP version upgrading method, device, system and computer equipment

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103973475A (en) * 2013-02-05 2014-08-06 腾讯科技(深圳)有限公司 Difference service pack generating method, difference service pack downloading method, server and client-side
CN103955363A (en) * 2014-04-08 2014-07-30 国云科技股份有限公司 Manufacturing method of program upgrade and installation package
CN106293793A (en) * 2015-06-02 2017-01-04 西安中兴新软件有限责任公司 The method for upgrading software of a kind of terminal, device and system
WO2017036228A1 (en) * 2015-09-02 2017-03-09 中兴通讯股份有限公司 Method and apparatus for implementing system upgrading
WO2018006677A1 (en) * 2016-07-06 2018-01-11 中兴通讯股份有限公司 Smart upgrade method, server, terminal and system
CN107589952A (en) * 2016-07-06 2018-01-16 中兴通讯股份有限公司 Intelligent upgrade method, device and system
CN106201614A (en) * 2016-07-11 2016-12-07 天津中兴智联科技有限公司 A kind of universal method and system that multiple similar software can be carried out chain type upgrading
CN108415714A (en) * 2018-02-08 2018-08-17 上海商米科技有限公司 The method for upgrading system and device of mobile terminal
CN109271196A (en) * 2018-09-28 2019-01-25 平安普惠企业管理有限公司 APP version upgrading method, device, system and computer equipment

Similar Documents

Publication Publication Date Title
CN110221872B (en) Page jump method and device, electronic equipment and storage medium
CN1988535B (en) Synchronous method, system for file storage and customer terminal
CN102307210B (en) Data downloading system and data management and downloading method thereof
CN111083722A (en) Model pushing method, model requesting method, model pushing device, model requesting device and storage medium
CN107203395A (en) Resource graded method, device and computer-readable recording medium and electronic equipment
CN109391673B (en) Method, system and terminal equipment for managing update file
CN105893075A (en) Update method and device of application
CN110263001B (en) File management method, device, system, equipment and computer readable storage medium
CN111176706A (en) Terminal upgrading method and device, electronic equipment and storage medium
CN111447248A (en) File transmission method and device
CN109618176B (en) Processing method, equipment and storage medium for live broadcast service
CN109800005A (en) A kind of hot update method of client and device
CN112702195A (en) Gateway configuration method, electronic device and computer readable storage medium
CN112788126A (en) Resource downloading method, device, server and storage medium
CN110543324A (en) Plug-in increment updating method and device for application program
CN103595808B (en) A kind of file update information method for pushing and device
CN114390044B (en) File uploading method, system, equipment and storage medium
EP3506599B1 (en) Method for synchronizing contact information, apparatus and medium
CN113067853A (en) Data pushing method and device, electronic equipment and storage medium
CN111683114A (en) Method and device for upgrading equipment program, terminal equipment and storage medium
CN110677443A (en) Data transmitting and receiving method, transmitting end, receiving end, system and storage medium
CN115129574A (en) Code testing method and device
CN112579877A (en) Information source system control method, device, storage medium and equipment
CN110895583B (en) Method, device and system for acquiring data resources
CN109213955B (en) Data processing method and related equipment

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