Software upgrading and updating method and system, electronic equipment and storage medium

By generating full installation packages and comparing the differences, we obtain incremental patch packages based on the basic version, which solves the problem of multiple patch dependencies during software upgrades, and realizes the software to be quickly and easily upgraded to the latest version.

CN119718393APending Publication Date: 2025-03-28S2C
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411787607.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

In the prior art, multiple series upgrades are required during software upgrades, resulting in a large number of incremental patches and large patch sizes, resulting in complex implementation.

Method used

By obtaining the release version of the software to be updated as the basic version, generating a full installation package, and comparing the difference with the basic version, an incremental patch package based on the basic version is obtained, and directly distributed to the software to be updated for upgrade.

Benefits of technology

It realizes the software quickly upgrades to the latest version without relying on multiple patches for upgrades, reducing the upgrade complexity and number of patch packages, and improving the upgrade efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119718393A_ABST
    Figure CN119718393A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a software upgrading and updating method and system, electronic equipment and a storage medium. The method comprises the following steps: acquiring a release version of to-be-updated software, and taking the release version as a basic version of the to-be-updated software; according to the source code of the basic version and the updating code of the to-be-updated software, generating a full-quantity installation package of the to-be-updated software; carrying out difference comparison on the full-quantity installation package and the basic version to obtain an incremental service pack taking the basic version as a benchmark; and when the to-be-updated software needs to be upgraded and updated, issuing the incremental service pack to the to-be-updated software, so that the to-be-updated software is subjected to patch upgrading. According to the method, the incremental service pack taking the basic version as the benchmark is generated by depending on the basic version and the full-quantity installation pack, so that the dependency relationship when the software is subjected to multiple times of patch upgrading is solved, and the software can be directly upgraded to the latest version.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a software upgrade method, system, electronic device and storage medium. Background Art

[0002] According to Moore's Law, the number of transistors integrated on a single chip is increasing, the complexity of integrated circuit design is increasing, and the difficulty of chip function verification is also increasing. Field-Programmable Gate Array (FPGA) prototype verification is the mainstream solution for integrated circuit function verification.

[0003] In order to meet the different levels of user needs and problems, the application software functions of FPGA prototype verification are becoming more and more powerful. At the same time, it is also necessary to continuously update the application software through software patch upgrades, fix software failures or security issues, etc., in order to quickly respond to users and solve user problems.

[0004] In the prior art, software upgrades are made by creating incremental patches based on the released patches. When there are many users, different users use different software versions. When upgrading the software version used by the user to the latest version, the patch versions need to be upgraded in series, and one patch version needs to support upgrades on different patch versions, resulting in a large number of incremental patches and a gradually increasing patch size, which causes great implementation complexity. Summary of the invention

[0005] The present invention provides a software upgrade and update method, system, electronic device and storage medium to solve the dependency relationship when multiple patches of the software are upgraded, so that the software can be upgraded to the latest version faster.

[0006] According to one aspect of the present invention, a method for upgrading and updating software is provided, the method being executed by a patch making terminal, the method comprising:

[0007] Obtaining a release version of the software to be updated, and using the release version as a base version of the software to be updated;

[0008] Generate a full installation package of the software to be updated based on the source code of the basic version and the update code of the software to be updated;

[0009] Compare the full installation package with the base version to obtain an incremental patch package based on the base version;

[0010] When the software to be updated needs to be upgraded, the incremental patch package is sent to the software to be updated so that the software to be updated is upgraded with a patch.

[0011] According to another aspect of the present invention, a method for upgrading and updating software is provided, the method being executed by a patch application terminal, the method comprising:

[0012] Obtaining an incremental patch package based on a basic version of the software to be updated, generated by a software upgrade and update method provided in any embodiment of the present invention;

[0013] A patch upgrade is performed based on the basic version of the software to be updated according to the incremental patch package.

[0014] According to another aspect of the present invention, a software upgrade and update system is provided, the system comprising: a patch making terminal and a patch application terminal; wherein:

[0015] A patch making terminal is used to obtain a release version of the software to be updated and use the release version as a basic version of the software to be updated;

[0016] A patch production terminal, used to generate a full installation package of the software to be updated based on the source code of the basic version and the update code of the software to be updated;

[0017] A patch making terminal, used for comparing the difference between the full installation package and the basic version, to obtain an incremental patch package based on the basic version;

[0018] A patch production terminal is used to send the incremental patch package to the software to be updated in the patch application terminal when the software to be updated needs to be upgraded;

[0019] The patch application terminal is used to perform patch upgrade on the basis of the basic version of the software to be updated according to the incremental patch package.

[0020] According to another aspect of the present invention, there is provided a software upgrade and update device, which is executed by a patch making terminal, and comprises:

[0021] A basic version determination module, used to obtain a release version of the software to be updated, and use the release version as the basic version of the software to be updated;

[0022] A full installation package generation module, used to generate a full installation package of the software to be updated based on the source code of the basic version and the update code of the software to be updated;

[0023] An incremental patch package determination module is used to compare the difference between the full installation package and the basic version to obtain an incremental patch package based on the basic version;

[0024] The incremental patch package sending module is used to send the incremental patch package to the software to be updated when the software to be updated needs to be updated, so that the software to be updated can be patched and upgraded.

[0025] According to another aspect of the present invention, there is provided a software upgrade and update device, which is executed by a patch application terminal, and comprises:

[0026] An incremental patch package acquisition module, used to acquire an incremental patch package based on a basic version of the software to be updated, generated by a software upgrade and update method provided in any embodiment of the present invention;

[0027] The patch upgrade module is used to perform patch upgrade on the basis of the basic version of the software to be updated according to the incremental patch package.

[0028] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0029] at least one processor; and

[0030] a memory communicatively connected to the at least one processor; wherein,

[0031] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the software upgrade and update method described in any embodiment of the present invention.

[0032] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the software upgrade and update method described in any embodiment of the present invention when executed.

[0033] According to another aspect of the present invention, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the computer program implements the software upgrade and update method described in any embodiment of the present invention.

[0034] The technical solution of the embodiment of the present invention is to obtain the released version of the software to be updated and use the released version as the basic version of the software to be updated; generate a full installation package of the software to be updated according to the source code of the basic version and the update code of the software to be updated; compare the differences between the full installation package and the basic version to obtain an incremental patch package based on the basic version; when the software to be updated needs to be upgraded, the incremental patch package is sent to the software to be updated so that the software to be updated is patched and upgraded, thereby solving the problem of making incremental patch packages when upgrading the software. According to the incremental patch package provided by the embodiment of the present invention, the software can be directly upgraded to the latest version without relying on multiple patches that have been released for upgrading.

[0035] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0037] Figure 1 is a flowchart of a software upgrade and update method provided according to Embodiment 1 of the present invention;

[0038] Figure 2 This is a flowchart of an application example of software upgrade and update provided according to the first embodiment of the present invention;

[0039] Figure 3 is a flowchart of a software upgrade method provided according to Embodiment 2 of the present invention;

[0040] Figure 4 This is a flowchart of an application example of a software upgrade and update method provided in Embodiment 2 of the present invention;

[0041] Figure 5 This is a schematic diagram of the structure of a software upgrade and update system provided according to Embodiment 3 of the present invention;

[0042] Figure 6 This is a schematic diagram of the structure of a software upgrade and update device provided according to Embodiment 4 of the present invention;

[0043] Figure 7 This is a schematic diagram of the structure of a software upgrade and update device provided in accordance with Embodiment 5 of the present invention;

[0044] Figure 8 It is a structural schematic diagram of an electronic device for implementing the software upgrade and update method of an embodiment of the present invention. DETAILED DESCRIPTION

[0045] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0046] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0047] Embodiment 1

[0048] Figure 1 This is a flowchart of a software upgrade method provided according to the first embodiment of the present invention. This embodiment is applicable to the case where an incremental patch package required for the upgrade is produced when performing a patch upgrade on the software. Specifically, the incremental patch package may be a cold patch. The method may be executed by a software upgrade device, which may be implemented in the form of hardware and / or software, and may be configured in an electronic device such as a computer or a server. Specifically, the software upgrade method may be executed by a patch production terminal. Figure 1 As shown, the method includes:

[0049] Step 110: Obtain the release version of the software to be updated, and use the release version as the basic version of the software to be updated.

[0050] The software to be updated may be software of an application program that needs to be updated through a patch upgrade. The release version may be the version of the software when it is first used. Specifically, the release version may be the version of the software that has not been patched when it is in use. During the software iterative upgrade process, the basic version remains unchanged.

[0051] In an embodiment of the present invention, the basic version can be compiled and built to produce a basic version package. The compilation and construction can be implemented using a compilation tool. For example, the production of an installation package is triggered by a script or an automation tool. In multiple upgrades and updates of the software, the already built basic version package can be used directly without repeated compilation and construction, which can save software update time and improve update efficiency.

[0052] Step 120: Generate a full installation package of the software to be updated based on the source code of the basic version and the update code of the software to be updated.

[0053] Among them, the patch maker can generate the update code according to the update information required by the software. The patch making terminal can compile and build a full installation package based on the source code of the basic version and the update code. That is, one way to generate the full installation package can be to compile and generate it directly based on the source code. Among them, the update information of the software includes but is not limited to: one or more of the following: new software functions, software function removal, and software anomaly (bug) repair.

[0054] In an embodiment of the present invention, the full installation package may also be generated in other ways. For example, a full installation package is generated based on a patch package. Optionally, a full installation package of the software to be updated is generated based on the source code of the base version and the update code of the software to be updated, including: generating a full installation package of the software to be updated based on each upgrade patch package of the software to be updated and the base version.

[0055] Among them, the upgrade patch package is a patch package made based on the versions of the software to be updated at different times. The full installation package can be generated by compiling and building each upgrade patch package of the software to be updated on the basic version. This situation can be applicable to the situation where the software is updated through a patch package after the software is released, but due to the dependency relationship between the patch packages generated before and after, it is impossible to update to the latest version of the software at one time. In this case, the patch production terminal can collect the upgraded patch packages that have been released to generate a full installation package; and based on the software upgrade and update method of the embodiment of the present invention, regenerate the incremental patch package to upgrade the software to the latest version at one time. In this way, the upgrade patch package corresponding to the update code generated by the patch maker can be used to generate a full installation package.

[0056] Generating a full installation package based on an upgrade patch package may include the following two situations. First, in software that has had one or more patch upgrades, when generating a full installation package for the first time, you can consider all the upgrade patch packages that have been released for the updated software to ensure the reliability of the generation of the full installation package. When generating a full installation package for the next time, it can be generated based on the current upgrade patch package on the basis of the first full installation package. Similarly, when the current full installation package is subsequently generated, it only needs to be generated based on the previous full installation package and combined with the current upgrade patch package. Therefore, after the first generation of the full installation package, the complexity of its generation method will become lower and lower.

[0057] Second: For software that has not been patched, when generating a full installation package, you can directly generate it based on the base version and the current upgrade patch package. When subsequently generating the current full installation package, you only need to generate it based on the previous full installation package and the current upgrade patch package.

[0058] Since the full installation package needs to be updated by merging new files during each patch upgrade, the full installation package needs to be compiled and built during each patch upgrade.

[0059] Step 130: Compare the full installation package with the base version to obtain an incremental patch package based on the base version.

[0060] Difference comparison can be achieved by comparing files and directory structures one by one. In order to speed up the difference comparison, the verification code of the file can be calculated and compared to determine whether a change has occurred. Among them, the verification code can be a message digest algorithm (Message-Digest Algorithm 5, MD5) checksum or a cyclic redundancy check (Cyclic Redundancy Check, CRC) checksum, etc. If there is no file in the directory structure, it can be considered that the file is a file deleted from the full installation package. If a new file is added to the directory structure, it can be considered that the file is a new file in the full installation package.

[0061] The incremental patch package provided in the embodiment of the present invention is based on the basic version. That is, by upgrading the incremental patch package based on the basic version, the current full installation package of the software can be obtained. Therefore, when upgrading the software, there is no need to consider multiple patch packages with dependencies, and the software can be updated to the latest version at one time.

[0062] When generating an incremental patch package, optionally, the full installation package is compared with the base version to obtain an incremental patch package based on the base version, including: comparing the full installation package with the base version to obtain changed files, and generating a difference file list based on the changed files; processing the changed files according to the difference file list, and generating the directory structure of the incremental patch package according to the directory structure of the updated code.

[0063] The changed files include: adding new files, deleting files, and modifying one or more of the files. The difference file list includes: patch version number, basic version information, and the name of the software to be updated. By traversing the directory structure one by one, a difference file list can be generated. The difference file list can be used to make incremental patch packages. The difference file list can also be used to verify software and patch packages.

[0064] The processing of the changed files according to the difference file list can specifically be one or more of the following operations: adding new files, deleting files, and modifying files in the base version. The directory structure of the incremental patch package can be generated based on the directory structure of the base version according to the directory structure of the updated code. Each file in the incremental patch package can be placed in the directory structure of the incremental patch package accordingly. When generating the directory structure, the name needs to be consistent with the directory structure in the software.

[0065] In order to speed up the difference comparison, the search directory structure can be excluded and filtered. For example, the target structure can be specified by the patch maker, and the directories and files can be excluded in the difference comparison to speed up the difference comparison. For example, if the two files (or directories) being compared have not changed during the difference comparison, the changed file list of the file (or directory) is directly used.

[0066] On the basis of the above implementation, basic attributes may also be set for the incremental patch package, for example, operation attributes such as readable, writable or executable, owner, modification and creation time, etc. may be set for the incremental patch package.

[0067] When generating an incremental patch package, the directory structure and files can also be compressed to generate a compressed package to save storage space and data transmission volume. The name of the compressed package can be determined according to the naming specification of the software, and it is ensured that the compressed package does not conflict with the existing compressed package name and is easy to identify. During the compression process, the file information of the compressed package can also be generated according to requirements, including the file name, verification code and other information to prevent the compressed package from being tampered with. Among them, the verification code can be MD5.

[0068] Step 140: When the software to be updated needs to be updated, the incremental patch package is sent to the software to be updated so that the software to be updated can be patched and upgraded.

[0069] When the software is upgraded according to the incremental patch package, the software can be upgraded to the latest version at one time, without considering the dependencies between multiple patch packages, and without having to upgrade according to the full patch package, which will make the patch very large, inconvenient to transmit, and take a long time to install.

[0070] Optionally, the method also includes: when the software to be updated has an update based on the current version, generating a current patch package based on the current version; updating the full installation package according to the current patch package; and returning to compare the differences between the full installation package and the base version to obtain an incremental patch package based on the base version, so as to update the incremental patch package.

[0071] When there is a patch upgrade in the future, the full installation package can be directly updated according to the current patch package, which can save the update data of the full installation package. By maintaining the full installation package, it is easy to generate an incremental patch package based on the basic version, and upgrade the software at one time.

[0072] In the embodiment of the present invention, the incremental patch packages generated multiple times are all upgraded based on the basic version, and there is no dependency between them; and the incremental patch packages are only for upgrading and updating the software, with a small amount of data, and a fast transmission speed and upgrade speed.

[0073] The technical solution of this embodiment is to obtain the released version of the software to be updated and use the released version as the basic version of the software to be updated; generate a full installation package of the software to be updated according to the source code of the basic version and the update code of the software to be updated; compare the full installation package with the basic version to obtain an incremental patch package based on the basic version; when the software to be updated needs to be upgraded, the incremental patch package is sent to the software to be updated so that the software to be updated can be patched and upgraded, thereby solving the problem of making incremental patch packages when upgrading the software. According to the incremental patch package provided by the embodiment of the present invention, the software can be directly upgraded to the latest version without relying on multiple patches that have been released for upgrading.

[0074] When updating the incremental patch package, only the basic version and the maintained full patch package are relied upon, without relying on the already released patches; patch production is simple, the number of patches is small, and only one patch is produced for each patch release, without the need to produce patches for different software versions; the workload of patch installation, testing and verification is reduced; and the patch only depends on the basic version, not on the released patches; the patch package is small in size and easy to transmit, allowing for rapid software upgrades.

[0075] Figure 2 1 is a flowchart of an example of software upgrade application provided according to the first embodiment of the present invention. Figure 2As shown, two versions can be maintained in the patch production terminal, one is the basic version of the software, and the other is the patch version of the software. Among them, the basic version remains unchanged. The patch version starts from the basic version and is updated in sequence according to each update code or upgrade patch package. That is, when the software needs to be updated and there is a current patch package, the current patch package can be merged into the patch version. The basic version and the patch version can be compiled separately to build a basic version package and a full installation package. The full installation package can be compared with the basic version package to generate a difference file list. According to the difference file list, file processing can be performed on the basis of the basic version file. According to the file processing results, an incremental patch package is generated. The incremental patch package is based on the basic version of the software, which can avoid the dependency between multiple patches of the software and upgrade the software to the latest version in one go and quickly.

[0076] Embodiment 2

[0077] Figure 3 This is a flowchart of a software upgrade method provided according to the second embodiment of the present invention. This embodiment is applicable to the situation where the software is quickly and one-time patched to the latest version. The method can be executed by a software upgrade device. The software upgrade device can be implemented in the form of hardware and / or software. The software upgrade device can be configured in an electronic device such as a computer, server, mobile phone, or wearable device. Specifically, the method can be executed by a patch application terminal. Figure 3 As shown, the method includes:

[0078] Step 310: Obtain an incremental patch package based on the basic version of the software to be updated, generated by the software upgrade and update method provided in any embodiment of the present invention.

[0079] Step 320: Perform a patch upgrade based on the basic version of the software to be updated according to the incremental patch package.

[0080] When the software is the basic version, you can directly use the incremental patch package for patch upgrade. When the software is not the basic version, you can roll back the software version, and when it rolls back to the basic version, you can use the incremental patch package for upgrade.

[0081] Specifically, in an optional implementation of an embodiment of the present invention, before performing a patch upgrade based on the basic version of the software to be updated according to the incremental patch package, it also includes: backing up the basic version; when the current version of the software to be updated is not the basic version, rolling back the software to be updated to the basic version.

[0082] The backed-up basic version can be used to roll back the software version, so that the incremental patch package can be used for a one-time rapid upgrade. When upgrading the software, the incremental patch package can also be backed up to ensure data recovery and re-upgrade in case of upgrade failure.

[0083] For example, before upgrading the software according to the incremental patch package, the modified and deleted files of the basic version can be backed up first, and then the incremental patch package can be backed up. Then, the basic version can be modified, added, and deleted according to the differential file list of the incremental patch package.

[0084] When rolling back the software to the base version, the modified and deleted files of the backed-up base version can be restored to obtain the base version.

[0085] It should be noted that, since the content of each software upgrade is different, the above-mentioned exemplary basic version backup and / or rollback is required before each update.

[0086] When the software upgrade is completed, the upgraded files can also be post-processed. Post-processing includes but is not limited to: modifying file permissions, adding verification cases, and logging information. Adding verification cases can verify the correctness of the upgraded software functions. Log information can record historical information, execution names, and result information during the software upgrade process for information display and problem location.

[0087] In order to ensure the correctness of the software upgrade, on the basis of the above implementation mode, optionally, a patch upgrade is performed on the basis of the basic version of the software to be updated according to the incremental patch package, including: verifying the matching of the incremental patch package and the software to be updated according to the basic version information and / or the name of the software to be updated; when the matching verification passes, performing a patch upgrade on the basis of the basic version of the software to be updated according to the incremental patch package.

[0088] Exemplarily, before upgrading the software, you can determine whether the name of the software is consistent with the name of the incremental patch package, and / or whether the basic version corresponding to the incremental patch package is consistent with the basic version corresponding to the software, etc., to determine the compatibility of the incremental patch package with the software to be updated.

[0089] The software upgrade and update method provided in the embodiment of the present invention is applicable to cold patches, so when performing software upgrades, it is also possible to check whether the installed software has stopped running. If the software has not stopped running, the user can be reminded to stop running the software, or the software can be forced to stop running. In addition, when upgrading the software, it is also possible to detect whether the environment in which the software runs meets the patch upgrade requirements.

[0090] The technical solution provided by the embodiment of the present invention obtains an incremental patch package based on the basic version of the software to be updated, which is generated by the software upgrade and update method provided by any embodiment of the present invention; based on the basic version of the software to be updated, the patch is upgraded according to the incremental patch package, which solves the problem of dependency between multiple patches during software patch upgrade, and can achieve a one-time rapid patch upgrade of the software to the latest version. The patch upgrade only depends on the basic version and does not depend on the installed patch version. The patch upgrade operation is simple and the upgrade efficiency is high. In addition, the number of patches is small, and any version of the software can be upgraded to the current latest version, which greatly improves the upgrade efficiency and performance.

[0091] Figure 4 1 is a flowchart of an application example of a software upgrade method provided according to Embodiment 2 of the present invention. Figure 4 As shown, the software can perform a compatibility check between the software and the patch package based on the installed software version and the acquired incremental patch package. When the compatibility is passed, the software version can be rolled back to the basic version. On the basic version, the patch is upgraded and updated based on the incremental patch package. After the upgrade, post-processing can be performed.

[0092] Embodiment 3

[0093] Figure 5 1 is a schematic diagram of the structure of a software upgrade and update system provided according to Embodiment 3 of the present invention. Figure 5 As shown, the system includes a patch making terminal 510 and a patch applying terminal 520 .

[0094] like Figure 5 As shown, the patch production terminal 510 is used to: obtain the release version of the software to be updated, and use the release version as the basic version of the software to be updated; generate a full installation package of the software to be updated based on the source code of the basic version and the update code of the software to be updated; compare the full installation package with the basic version to obtain an incremental patch package based on the basic version; when the software to be updated needs to be upgraded, send the incremental patch package to the software to be updated in the patch application terminal.

[0095] The patch application terminal 520 is used to perform patch upgrade on the basis of the basic version of the software to be updated according to the incremental patch package.

[0096] Optionally, the patch making terminal 510 is specifically used to: generate a full installation package of the software to be updated according to each upgrade patch package of the software to be updated and the basic version; wherein the upgrade patch package is a patch package made based on versions of the software to be updated at different times.

[0097] Optionally, the patch production terminal 510 is also specifically used to: generate a current patch package based on the current version when the software to be updated has an update based on the current version; update the full installation package according to the current patch package; and return to compare the differences between the full installation package and the base version to obtain an incremental patch package based on the base version to update the incremental patch package.

[0098] Optionally, the patch production terminal 510 is also specifically used to: compare the full installation package with the basic version to obtain the changed file, and generate a difference file list based on the changed file; wherein the changed file includes: one or more of: newly added files, deleted files, and modified files; the difference file list includes: patch version number, basic version information, and the name of the software to be updated; process the changed file according to the difference file list, and generate the directory structure of the incremental patch package according to the directory structure of the update code.

[0099] Optionally, the patch application terminal 520 is further used to back up the basic version of the software to be updated before performing a patch upgrade based on the basic version of the software to be updated according to the incremental patch package; when the current version of the software to be updated is not the basic version, roll back the software to be updated to the basic version.

[0100] Optionally, the patch application terminal 520 is further specifically used to: verify the compatibility of the incremental patch package and the software to be updated based on the basic version information and / or the name of the software to be updated; when the matching verification passes, perform a patch upgrade based on the basic version of the software to be updated according to the incremental patch package.

[0101] The embodiment of the present invention uses a software upgrade and update system including a patch production terminal and a patch application terminal to produce and upgrade software patches, thereby solving the problems in the prior art of software upgrades, such as the existence of dependencies between multiple patches, resulting in complex software upgrades, a large number of patch packages, and a limited upgrade sequence. The following technical effects can be achieved: patch upgrades only depend on the basic version of the product and do not depend on the installed patch version; patch upgrades are easy to operate, require a small number of patches, and can be upgraded from any installed patch version to the current latest version, greatly improving upgrade efficiency and performance.

[0102] Embodiment 4

[0103] Figure 6 1 is a schematic diagram of the structure of a software upgrade and update device provided according to Embodiment 4 of the present invention. Figure 6 As shown, the device can be executed by a patch production terminal, and the device includes: a basic version determination module 610, a full installation package generation module 620, an incremental patch package determination module 630 and an incremental patch package delivery module 640. Among them:

[0104] A basic version determination module 610 is used to obtain a release version of the software to be updated and use the release version as a basic version of the software to be updated;

[0105] A full installation package generation module 620, configured to generate a full installation package of the software to be updated according to the source code of the basic version and the update code of the software to be updated;

[0106] The incremental patch package determination module 630 is used to compare the full installation package with the basic version to obtain an incremental patch package based on the basic version;

[0107] The incremental patch package sending module 640 is used to send the incremental patch package to the software to be updated when the software to be updated needs to be updated, so that the software to be updated can be patched and upgraded.

[0108] Optionally, the full installation package generation module 620 is specifically used to: generate a full installation package of the software to be updated according to each upgrade patch package of the software to be updated and the basic version; wherein the upgrade patch package is a patch package made based on versions of the software to be updated at different times.

[0109] Optionally, the device further includes:

[0110] The current patch package generation module is used to generate a current patch package based on the current version when there is an update on the basis of the current version of the software to be updated;

[0111] The incremental patch package update module is used to update the full installation package according to the current patch package; and return to compare the full installation package with the basic version to obtain the incremental patch package steps based on the basic version to update the incremental patch package.

[0112] Optionally, the incremental patch package determination module 630 includes:

[0113] A difference file list generating unit is used to compare the full installation package with the basic version to obtain the changed files, and generate a difference file list according to the changed files;

[0114] The changed files include: one or more of the newly added files, deleted files, and modified files; the difference file list includes: patch version number, basic version information, and the name of the software to be updated;

[0115] The directory structure generating unit is used to process the changed files according to the difference file list, and generate the directory structure of the incremental patch package according to the directory structure of the updated code.

[0116] The software upgrade and update device provided in the embodiment of the present invention can execute the software upgrade and update method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0117] Embodiment 5

[0118] Figure 7 1 is a schematic diagram of the structure of a software upgrade and update device provided according to Embodiment 5 of the present invention. Figure 7 As shown, the device is executed by a patch application terminal, and includes: an incremental patch package acquisition module 710 and a patch upgrade module 720. Among them:

[0119] The incremental patch package acquisition module 710 is used to acquire an incremental patch package based on the basic version of the software to be updated, which is generated by the software upgrade and update method provided in any embodiment of the present invention;

[0120] The patch upgrade module 720 is used to perform a patch upgrade based on the basic version of the software to be updated according to the incremental patch package.

[0121] Optionally, the device further includes:

[0122] A backup module is used to back up the basic version of the software to be updated before performing a patch upgrade based on the incremental patch package on the basic version of the software to be updated;

[0123] The version rollback module is used to roll back the software to be updated to the basic version when the current version of the software to be updated is not the basic version.

[0124] Optionally, the patch upgrade module 720 includes:

[0125] A matching verification unit, used to verify matching between the incremental patch package and the software to be updated according to the basic version information and / or the name of the software to be updated;

[0126] The patch upgrade unit is used to perform a patch upgrade on the basis of the basic version of the software to be updated according to the incremental patch package when the matching verification is passed.

[0127] The software upgrade and update device provided in the embodiment of the present invention can execute the software upgrade and update method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0128] Embodiment 6

[0129] Figure 8A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0130] like Figure 8 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0131] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0132] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a software upgrade and update method.

[0133] In some embodiments, the software upgrade and update method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the software upgrade and update method described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to execute the software upgrade and update method in any other appropriate manner (for example, by means of firmware).

[0134] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0135] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0136] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0137] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0138] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0139] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0140] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0141] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A software upgrade method, characterized in that: The method is executed by a patch making terminal, and the method comprises: Obtaining a release version of the software to be updated, and using the release version as a base version of the software to be updated; Generate a full installation package of the software to be updated based on the source code of the basic version and the update code of the software to be updated; Compare the full installation package with the base version to obtain an incremental patch package based on the base version; When the software to be updated needs to be upgraded, the incremental patch package is sent to the software to be updated so that the software to be updated is upgraded with a patch.

2. The method according to claim 1, characterized in that Generate a full installation package of the software to be updated based on the source code of the basic version and the update code of the software to be updated, including: Generate a full installation package of the software to be updated based on the upgrade patch packages of the software to be updated and the basic version; The upgrade patch package is a patch package produced based on versions of the software to be updated at different times.

3. The method according to claim 2, characterized in that Also includes: When the software to be updated has an update based on the current version, generating a current patch package based on the current version; The full installation package is updated according to the current patch package; and the step of returning to compare the full installation package with the base version to obtain an incremental patch package based on the base version is performed to update the incremental patch package.

4. The method according to claim 1, characterized in that: Comparing the difference between the full installation package and the basic version to obtain an incremental patch package based on the basic version includes: Compare the full installation package with the basic version to obtain a change file, and generate a difference file list based on the change file; The changed files include: one or more of: newly added files, deleted files, and modified files; the difference file list includes: patch version number, basic version information, and the name of the software to be updated; The changed files are processed according to the difference file list, and the directory structure of the incremental patch package is generated according to the directory structure of each update code.

5. A software upgrade method, characterized in that: The method is executed by a patch application terminal, and the method includes: Obtaining an incremental patch package based on a basic version of the software to be updated, generated by the software upgrade and update method according to any one of claims 1 to 4; A patch upgrade is performed based on the basic version of the software to be updated according to the incremental patch package.

6. The method according to claim 5, characterized in that Before performing a patch upgrade based on the basic version of the software to be updated according to the incremental patch package, the method further includes: Backing up the basic version; When the current version of the software to be updated is not the basic version, the software to be updated is rolled back to the basic version.

7. The method according to claim 5, characterized in that Performing a patch upgrade based on the basic version of the software to be updated according to the incremental patch package includes: Verify the compatibility of the incremental patch package with the software to be updated based on the basic version information and / or the name of the software to be updated; When the matching verification is passed, a patch upgrade is performed based on the basic version of the software to be updated according to the incremental patch package.

8. A software upgrade and update system, characterized in that: The system comprises: a patch making terminal and a patch applying terminal; wherein: A patch making terminal is used to obtain a release version of the software to be updated and use the release version as a basic version of the software to be updated; A patch production terminal, used to generate a full installation package of the software to be updated based on the source code of the basic version and the update code of the software to be updated; A patch making terminal, used for comparing the difference between the full installation package and the basic version, to obtain an incremental patch package based on the basic version; A patch production terminal is used to send the incremental patch package to the software to be updated in the patch application terminal when the software to be updated needs to be upgraded; The patch application terminal is used to perform patch upgrade on the basis of the basic version of the software to be updated according to the incremental patch package.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the software upgrade and update method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the software upgrade and update method according to any one of claims 1 to 7 when executed.

Citation Information

Cited By

  • Cross-platform software processing method and computer readable storage medium

    CN121326361A