Method for upgrading third-party software by using software self-upgrading channel

By transforming the package type compatible transformation of the upgrade management platform and adding a third-party software management script hook in the software self-upgrade stage, the existing software self-upgrade method has solved the problem of huge investment in complex systems and dependent environment upgrades and increased system complexity, and efficient software upgrades based on the existing upgrade channel are achieved.

CN120215982APending Publication Date: 2025-06-27KYLIN CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510321295.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-18
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

When facing the upgrading of complex systems and dependent environments, the existing software self-upgrade method requires new adaptation and dependent environment upgrades to the entire software system, resulting in huge investment and increased system complexity.

Method used

By transforming the existing upgrade management platform with package type compatibility, it supports the issuance of third-party software package formats, and adding a third-party software management script hook to be upgraded during the self-upgrade stage of the software to be upgraded, and combining third-party software management scripts to achieve upgrade and management of third-party software.

Benefits of technology

It realizes simple expansion based on the existing upgrade channel, meets the needs of complex software upgrade tasks, and reduces the investment in software upgrades and system complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120215982A_ABST
    Figure CN120215982A_ABST
Patent Text Reader

Abstract

The invention provides a method for upgrading third-party software by using a software self-upgrading channel, which belongs to the technical field of software upgrading and comprises the following steps of: S1, carrying out upgrading package type compatible transformation on an upgrading management platform before software self-upgrading; s2, detecting a to-be-upgraded software version, and checking whether a new version is available or not; s3, downloading updating and verification updating of the new version software package; s4, newly adding a hook for running a third-party software management script in the self-upgrading stage of the to-be-upgraded software, and merging the third-party software management script into a software directory; s5, closing an instance running by the current software before upgrading, creating a backup, and preparing for upgrading; s6, installing the new version software package downloaded in the step S3, and executing software upgrading; and S7, reporting an upgrading result. According to the method, the software can be simply expanded on the basis of the existing upgrading channel, so that a complicated software upgrading task can be met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for software upgrade, and in particular to a method for upgrading third-party software by using a software self-upgrade channel, belonging to the technical field of software upgrade. Background Art

[0002] With the rapid development of technology and the continuous progress of information technology, software, as an important product of the information age, has been widely used in various industries. Different software systems have brought great convenience to people's lives, and at the same time have promoted the iterative upgrade of production, greatly released productivity, and provided great benefits for social development. With the emergence of more powerful hardware, the increasing complexity of network communication means, the change of user needs, and the response to increasingly fierce market competition, software upgrade shows its necessity in many aspects such as technology, security, user needs, market competition, and compliance with regulations. It is of great significance to use the existing software self-upgrade channel to solve the upgrade problem of one or a class of terminal software.

[0003] Generally, the self-upgrade of software is an online upgrade, which updates itself according to the information pushed by the upgrade management platform. The overall process is as follows: 1. Version detection: The software will regularly or manually check whether there is a new version available during operation. The release of a new version requires the upgrade management platform to push.

[0004] 2. Download update: Once a new version is detected, the software will start to download the update file.

[0005] 3. Verify update: After the download is completed, the software will verify the integrity and authenticity of the update file.

[0006] 4. Prepare for upgrade: The verified update version needs to close the currently running instance and create a backup before upgrade.

[0007] 5. Execute upgrade: Start installing the update file to replace the old files and components.

[0008] 6. Report upgrade result: Check whether the new version runs normally and report the result.

[0009] However, with the increase in system complexity, when a single software cannot complete system functions or needs to upgrade its dependent operating environment, upgrading according to the current upgrade process requires new adaptation of the entire software system and also supports the upgrade of the dependent environment. However, building a new upgrade process and upgrading the compatible dependent environment often requires a large amount of manpower and material resources, and at the same time increases the system complexity. This method obviously cannot achieve simple and efficient software upgrade. Summary of the Invention

[0010] In view of the above problems, the present invention provides a method for upgrading its third-party software using a software self-upgrade channel, so as to reduce the investment in software upgrades and meet complex software upgrade tasks through simple expansion of the existing upgrade channel.

[0011] To achieve the above object, the technical solution of the present invention is: a method for upgrading its third-party software using a software self-upgrade channel, including the following steps: Step S1: Before software self-upgrade, perform package type compatibility transformation on the upgrade management platform so that the upgrade management platform supports the distribution of package formats of the software to be upgraded and third-party software; Step S2: Detect the version of the software to be upgraded and check whether a new version is available; Step S3: Download and update the new software package and verify the update; Step S4: Add a running third-party software management script hook during the self-upgrade stage of the software to be upgraded, and at the same time merge the third-party software management script into the software directory and install the third-party software; Step S5: Before upgrading, the software to be upgraded shuts down the currently running instance and creates a backup at the same time to prepare for the upgrade; Step S6: Install the new software package downloaded in Step S3 and execute the software upgrade; Step S7: Report the upgrade result.

[0012] Further, the package type compatibility transformation is achieved in the following way: allowing files with third-party software package formats to be uploaded to the upgrade management platform, adding storage for files with third-party software package formats when the new software package is stored in the warehouse, and adding the newly added third-party software package format to the type whitelist during type verification in the software distribution stage.

[0013] Further, in Step S3, the integrity and authenticity of the new software package are verified.

[0014] Further, the upgrade result in Step S7 includes the upgrade result of the new software package and the upgrade result of the third-party software.

[0015] Further, the third-party software management script is responsible for managing the operating environment, dependency conditions, and version changes of the third-party software, including backup mechanisms, failure handling processes, and result feedback.

[0016] Further, the third-party software management script sets a file lock mechanism, and at the same time sets a timeout mechanism and a delay mechanism for the file lock.

[0017] Further, the timeout mechanism is used to handle the situation where the lock is not unlocked when an exception is interrupted, resulting in the inability to obtain the lock subsequently; the delay mechanism ensures that the normally running script can always hold the lock normally, preventing the loss of the lock caused by unexpected lock timeouts.

[0018] The beneficial effects of a method for upgrading a third-party software using a software self-upgrade channel according to the present invention are as follows: The present invention solves the problems of the huge investment required to upgrade other dependent software outside the current existing software self-upgrade scope and the potential risk of further increase in system complexity due to the increase in software complexity. The present invention enables the software to meet complex software upgrade tasks with simple expansion based on the existing upgrade channel. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0020] Figure 1 It is a schematic diagram of the upgrade process for upgrading a third-party software using a software self-upgrade channel according to the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0021] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Many specific details are set forth in the following description in order to fully understand the present invention, but the present invention may also be implemented in other ways different from those described herein. Those skilled in the art may make similar generalizations without departing from the spirit of the present invention, so the present invention is not limited by the specific embodiments disclosed below.

[0022] DEFINITION OF KEY TERMS: Data packet: It refers to the data file that needs to be downloaded to the local of the upgrade end during the online upgrade process of the software; New version software package: It refers to the new version of the software to be upgraded during the software upgrade process; Third-party software package: It refers to other software packages (i.e., third-party software) outside the software to be upgraded, and its main function is to provide a support and dependency environment for the software to be upgraded.

[0023] In operation and maintenance practice, the existing software self-upgrade mechanism that has been running for a long time should have better stability and lower operation and maintenance complexity. It should run multiple times in the actual production environment, successfully complete the self-upgrade of the software, and at the same time be able to solve its function and performance problems in practice, and have predictable upgrade results for the current software upgrade. After the operation and maintenance personnel have a deep understanding of the upgrade system, they can proficiently use the overall system for the full-process upgrade operation.

[0024] The present invention aims to address scenarios where the current software has undergone major architectural adjustments, or its underlying dependency environment has changed, or major vulnerabilities in the operating system on which it runs have been discovered, thus requiring the installation or upgrade of third-party software.

[0025] The difficulties and major expenses of software online upgrade are concentrated in the download and distribution of software. As long as the data packets to be upgraded can be downloaded to the local upgrade environment, the upgrade difficulty will be greatly reduced. Therefore, using the existing upgrade management platform and the software's self-upgrade channel for software online distribution is a shortcut to quickly solve this problem. Embodiment 1

[0026] As Figure 1 shown, a method for upgrading a third-party software using the software's self-upgrade channel. By performing package type compatibility transformation on the upgrade management platform on which the existing software upgrade depends, the upgrade management platform can support the distribution of the package format of the third-party software; by adding a running hook for the third-party software management script during the self-upgrade stage of the software to be upgraded, and at the same time merging the third-party software management script into the software directory, the upgrade and management of the third-party software are realized. When the self-upgrade process of the software to be upgraded triggers the execution of the third-party software management script, the installation and update of the third-party software are realized. Specifically, it includes the following steps: Step S1: Perform package type compatibility transformation on the upgrade management platform before software self-upgrade The self-upgrade of software depends on the upgrade management platform in the cloud, which undertakes the management and release of software package versions. Generally speaking, the upgrade management platform should support the distribution of packages in multiple formats. If the existing platform does not support the distribution of packages in formats other than the current software upgrade format, then an upgrade for package format type compatibility needs to be performed on the upgrade management platform. At this time, the overall update process of the upgrade management platform is made compatible with the incremental update of one or more upgrade package formats.

[0027] The specific transformation method is as follows: Allow uploading files with the third-party software package format to the upgrade management platform, add the storage of files with the third-party software package format when the new software package is stored in the warehouse, and add the newly added third-party software package format to the type whitelist during the type verification in the software distribution stage. When this transformation takes effect, the upgrade of the current upgrade management platform software already supports the distribution of new package formats.

[0028] Such transformations usually only involve the verification of file types, require few resources, can achieve an upgrade of the upgrade management platform based on a small amount of modification at one time, have a small modification range, a simple modification logic, and can be achieved quickly and efficiently.

[0029] Step S2: Detect the version of the software to be upgraded The software will regularly or manually check whether there is a new version available during operation, and the release of the new version requires the upgrade management platform to push.

[0030] When the software version is upgraded, the new version of the software needs to be released on the upgrade management platform. According to the software upgrade mechanism, it can actively poll regularly to check if there is an update task, or subscribe to the upgrade messages of the upgrade management platform. When a new version is released, the upgrade management platform will send a message to the subscribers. At this time, whether using the client polling or the subscription message mode, the software will receive the new version release information and enter the self-upgrade phase; the software will initiate a request to download the new version, and download the new software package from the upgrade management platform to the local.

[0031] Step S3: Download and update the new software package and verify the update After detecting the new version of the software to be upgraded, the software to be upgraded will start to download the update file (i.e., the new software package). After the download is completed, the software will verify the integrity and authenticity of the update file.

[0032] Step S4: Transform the self-upgrade phase of the software to be upgraded The specific transformation method is as follows: Add a hook for running the third-party software management script in the self-upgrade phase of the software to be upgraded, and at the same time merge the third-party software management script into the software directory.

[0033] The original software self-upgrade process does not include handling operations for third-party software. To minimize the transformation to be compatible with the upgrade or installation of third-party software packages, it is necessary to transform the current software (the software to be upgraded). Add a hook for running the third-party software management script in its self-upgrade phase, and at the same time merge the third-party software management script into the software directory to facilitate the upgrade of the third-party software management script.

[0034] After this transformation takes effect, the current upgrade process can already distribute third-party software packages, and also has the ability to call the third-party software management script to install third-party software packages. At this time, the upgrade management platform distributes the third-party software package to the local of the upgrade end. In the upgrade process, the third-party software management script is triggered to execute, and the third-party software package will be installed, and then go to step S7 for the following operations: Collect the installation results and report the results to the upgrade management platform using the original channel.

[0035] The installed third-party software may be used as a new running environment for the new version of the software and needs to be deployed before the installation of the new version of the software. Before the software self-upgrade starts to install, insert the third-party software management script hook after verifying the update of the new software package in step S3. At this time, call the third-party software management script to initiate operations such as the installation and verification of the third-party software.

[0036] Step S5: Prepare for the upgrade of the software to be upgraded Before the upgrade, close the running instance of the current software and create a backup at the same time.

[0037] Step S6: The software to be upgraded performs the upgrade. Start installing the update file downloaded in step S3 to replace the old files and components.

[0038] Step S7: Report the upgrade result. Check whether the new version of the software runs properly and report the result; at the same time, the third-party software management script submits the third-party software upgrade result to the upgrade management platform in the original upgrade result format.

[0039] As an important feedback of the software upgrade, the software needs to report the status after the upgrade ends to the upgrade management platform, so that the operation and maintenance management personnel can analyze whether the upgrade is successfully completed and can take timely remedies in case of failure. Embodiment 2

[0040] Based on Embodiment 1, refine the operations of the third-party software management script for third-party software management, as follows: For the management of third-party software, a complete management script needs to be implemented. As the main management tool for third-party software on the terminal, this script needs to be able to manage the running environment, dependency conditions, version changes, etc. of third-party software. At the same time, a perfect backup mechanism, failure handling process, and result feedback also need to be considered.

[0041] Before the upgrade starts, the third-party software management script needs to detect whether other tasks have called the script to ensure the uniqueness of the installation task. At this time, a file lock mechanism should be provided to ensure that it can run only after obtaining the file lock. At the same time, a timeout mechanism and a delay mechanism need to be set for the lock to prevent deadlocks. The timeout mechanism of the file lock is to deal with the situation where the lock is not unlocked when the exception is interrupted, resulting in the inability to obtain the lock subsequently; the delay mechanism is to ensure that the normally running script can always hold the lock normally to prevent the lock from being lost due to unexpected lock timeouts.

[0042] When the third-party software management script holds the lock, the script needs to check whether there was a previous failure or an unfinished installation. If so, roll back using the backup data, return the information about the rollback operation, release the held lock, and then end the task; if there is no historical residual data, start mirroring the environment affected by the upgrade, mirror a complete copy of the data to the specified backup directory, and then start the installation upgrade.

[0043] If an error or exception occurs during the third-party software upgrade, it is necessary to clean up the residual data, roll back the backed-up data, return the error message, release the held lock, and then end the task; if everything is normal, that is, it passes the inspection, installation, and subsequent verification, then return the installation success message, release the held lock, and then end the task.

[0044] Since the third-party software management script adopts the design form of calling and replying with results, there is no interaction during the intermediate process, and all data is returned with messages and status codes after the script ends to send the information and end status of the script operation.

[0045] The third-party software management script completely isolates the management of third-party software. Only a simple call is required to complete the upgrade of third-party software. Since this process is integrated as part of the original software upgrade process, this part of the process can be considered to belong to the original software at this time, and subsequent upgrade iterations should be carried out with the self-upgrade of the original software version.

[0046] In summary, the present invention utilizes the self-upgrade solution of existing software, and for scenarios where other software needs to be upgraded or installed to complete functions, it greatly reduces the system construction cost and the system complexity.

[0047] In actual business, usually the upgrade management platform has a high complexity and security level as a management center. Similarly, building an upgrade management platform requires a large amount of resources. Software self-upgrade is generally provided by software suppliers as a value-added project of the software. However, in the package management structure of the Linux environment, a large number of basic packages cannot be updated through automatic upgrade. Therefore, commercial software effectively reduces costs and complexity by managing the upgrade of third-party software through its own upgrade channel. The present invention aims to provide an economical and efficient implementation method for upgrades in scenarios with a self-upgrade mechanism and the need to upgrade or install third-party software.

[0048] Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

Claims

1. A method for upgrading third-party software using a software self-upgrade channel, characterized in that: The steps include: Step S1: Before the software is upgraded, the upgrade management platform is modified to be compatible with the package type, so that the upgrade management platform supports the distribution of the package format of the software to be upgraded and the third-party software; Step S2: Detect the software version to be upgraded to check whether a new version is available; Step S3: Download and update the new version of the software package and verify the update; Step S4: adding a hook for running a third-party software management script in the self-upgrade phase of the software to be upgraded, merging the third-party software management script into the software directory, and installing the third-party software; Step S5: the software to be upgraded closes the currently running instance before upgrading, and creates a backup in preparation for upgrading; Step S6: Install the new version of the software package downloaded in step S3 to perform software upgrade; Step S7: Report the upgrade result.

2. A method for upgrading third-party software using a software self-upgrade channel according to claim 1, characterized in that: The package type compatibility transformation is achieved by allowing files with third-party software package formats to be uploaded to the upgrade management platform, adding storage for third-party software package format files when the new version of the software package is stored in the library, and adding the newly added third-party software package format to the type whitelist in the type verification during the software distribution stage.

3. A method for upgrading third-party software using a software self-upgrade channel according to claim 1, characterized in that: In step S3, the integrity and authenticity of the new version of the software package are verified.

4. The method for upgrading third-party software by using a software self-upgrade channel according to claim 1, characterized in that: The upgrade result in step S7 includes the upgrade result of the new version software package and the upgrade result of the third-party software.

5. The method for upgrading third-party software by using a software self-upgrade channel according to claim 1, characterized in that: The third-party software management script is responsible for managing the operating environment, dependency conditions and version changes of the third-party software, including backup mechanisms, failure handling processes, and result feedback.

6. A method for upgrading third-party software using a software self-upgrade channel according to claim 5, characterized in that: The third-party software management script sets a file lock mechanism, and also sets a timeout mechanism and a delay mechanism for the file lock.

7. A method for upgrading third-party software using a software self-upgrade channel according to claim 6, characterized in that: The timeout mechanism is used to deal with the situation where the lock is not unlocked when the exception is interrupted, resulting in the inability to obtain the lock subsequently; The delay mechanism ensures that the normally running script can always hold the lock normally, preventing the lock from being lost due to unexpected lock timeout.