Lightweight upgrading method and device for client software and electronic equipment
By introducing a lightweight upgrade method of dynamic decision-making in client software, supporting user-defined upgrade mode and target version, the problem of fixed upgrade solutions in the existing technology is solved, and higher user satisfaction is achieved.
Patent Information
- Application Number
- CN202510221636.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-27
- Publication Date
- 2025-06-27
AI Technical Summary
The existing online upgrade technology of client software cannot fully meet users' needs for software upgrades, mainly due to the fixed upgrade plan caused by user differences and diversity, and lack of flexibility.
A lightweight upgrade method for client software that supports dynamic decision-making is proposed. By starting the upgrade preference setting process when the target client software is first started, it records the timing of prompt updates, the way of downloading update files, and the behavior of software upgrades, and stores it in the form of an upgrade operation instruction table.
It realizes dynamically deciding the upgrade operation instruction list based on the user-defined upgrade mode and target version, thereby supporting the user-defined software upgrade method, fully improving the user's satisfaction with software upgrade.
Smart Images

Figure CN120215973A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular, to a lightweight upgrade method, device, and electronic device for client software. Background Art
[0002] With the popularization of the Internet, online upgrade technology is commonly used for client software. This technology involves the client sending a request to detect updates to the server, and the server returns information such as whether there is a new version, the latest version number, and the download address. The client then processes this information and downloads the latest installation program or update file accordingly.
[0003] In the prior art, there are the following forms of online upgrade for client software:
[0004] 1. Zip file update: To reduce the download time and the size of the installation package, the zip file update method is used. In this method, the files to be updated are packaged into a zip file, and after the client downloads it, it can be unzipped to the installation directory to complete the upgrade.
[0005] 2. Binary difference algorithm: As the size of the software upgrade package increases, in order to reduce the download volume, algorithms such as BsDiff and Courgette have been developed. These algorithms generate smaller patch packages by comparing the binary differences of files, thus significantly reducing the amount of data that the client needs to download.
[0006] 3. Background silent download: To reduce the waiting time of users, some software adopts the background silent download method. In this method, the update file is downloaded without the user's awareness, improving the user experience.
[0007] 4. Dual-directory update: To avoid the interruption of the user experience caused by closing the main program during the upgrade process, some software adopts the dual-directory update method. In this method, the original files are copied to another directory for update, and after completion, the user is switched to the new directory to achieve seamless upgrade.
[0008] 5. Proximity download: To accelerate the download speed of the software upgrade files required during the update process, some software divides the files involved in the update package into multiple parts. If a certain part is located in the transfer server where the client software is located, it is directly provided by the transfer server; otherwise, it is downloaded from the server to the transfer server and then provided by the transfer server, so as to accelerate the software upgrade speed.
[0009] It can be seen that existing online upgrade technologies for client software have conducted extensive research on how to reduce the size of the software upgrade package, how to minimize the impact on the user experience during the software upgrade process, and how to increase the download speed of the software upgrade package. However, they still cannot fully meet the actual needs of users for software upgrades. The reason for this phenomenon is the differences and diversity among users in software upgrade issues. For example:
[0010] In terms of differences, after installing the initial version of the software, users may delay software upgrades for various reasons, resulting in different software versions installed by different users. This further leads to the need for update packages with different contents when different users upgrade the software to a certain new version.
[0011] In terms of diversity, users have different preferences for the timing of software upgrade actions. Some users expect to start the upgrade when the software is opened and then use the software after the upgrade is completed. Some users expect to complete the download of the update package through silent download and start the upgrade when the software is closed. Some users expect to complete the upgrade through the dual-directory update method.
[0012] However, existing client software upgrade behaviors are all fixed by adopting a certain combination of the above solutions. For example, the client software always prompts to upgrade to the latest version each time, rather than allowing users to choose to upgrade to a certain version; or the client software always prompts for updates when opened or when closed, rather than prompting for updates at different times for different users.
[0013] In summary, it can be concluded that existing client software only supports one behavior mode to complete the upgrade and lacks support for upgrade differences and diversity. If the client software can allow users to independently select the target version and upgrade mode during the upgrade, the above problems can be effectively solved. Summary of the Invention
[0014] Object of the Invention: To propose a lightweight upgrade method for client software that supports dynamic decision-making, and further propose a device and an electronic device for implementing this method, so as to meet the purpose of different users using different upgrade behaviors for the same type of software to complete software updates, and aim to effectively solve the above problems existing in the prior art.
[0015] In the first aspect of the present invention, a lightweight upgrade method for client software is proposed, and the steps are as follows:
[0016] When the target client software is first started, start the upgrade preference setting process; the upgrade preference setting process records the timing of prompting for updates, the method of downloading update files, and the behavior mode of software upgrades, and stores them in the form of an upgrade operation instruction table;
[0017] When the timing for prompting an update as recorded in the upgrade operation instruction table is met, start the upgrade management process;
[0018] The upgrade management process obtains the latest software version number from the upgrade server; if the latest software version number is less than or equal to the version number of the current client software, the upgrade management process is silent or exits;
[0019] If the latest software version number is greater than the version number of the current client software, the upgrade management process compares and records the list of differential file items between the current software version and the software version to be upgraded;
[0020] According to the list of differential file items, match the methods of downloading update files and the behavior methods of software upgrade recorded in the upgrade operation instruction table, download the software upgrade incremental package from the server, and after verifying the information, release it into the installation directory of the target client software to complete this round of lightweight upgrade of the client software.
[0021] In a further embodiment of the first aspect, the timing for prompting an update includes:
[0022] Prompt for update when opening the software: Check and prompt for high-version update information when starting the software;
[0023] Prompt for update at any time: Regularly check and prompt for high-version update information after the software is started;
[0024] Prompt for update when exiting software usage: Check and prompt for high-version update information when exiting the software.
[0025] In a further embodiment of the first aspect, the methods of downloading update files include:
[0026] Background silent download: Open a separate thread to execute file download;
[0027] Blocking display download: Block the running state of the current software, execute file download processing, and resume the software running state after the download is complete.
[0028] In a further embodiment of the first aspect, the behavior methods of software upgrade include:
[0029] Interruption mode upgrade: Require the user to close the software process and restart the software after the upgrade is complete;
[0030] Dual-directory update: Copy the original software files to another directory for update, and then switch the user to the new directory and delete the old directory after completion.
[0031] In a further embodiment of the first aspect, when the timing for prompting an update recorded in the upgrade operation instruction table is met, the upgrade management process is started. At this time, the upgrade management process organizes all the file items in the installation directory where the current client software is located in the form of an installation package list. Each installation package list corresponds to a file item and includes: file path, file size, file MD5 digest value, network path, compression algorithm, and creation time. The installation package lists are stored sorted in the natural order of the file paths.
[0032] In a further embodiment of the first aspect, during the process of organizing the software installation package list, the upgrade management process decides whether to perform compression processing based on the file item size and file type;
[0033] During the process of organizing the software installation package list, the upgrade management process synchronously generates a list of differential file items with the previous adjacent version to indicate the file items that need to be processed when upgrading between adjacent software versions. Each item in the file item difference list includes: file path, difference type, and source version.
[0034] In a further embodiment of the first aspect, during cross-version upgrade, the upgrade management process obtains multiple lists of differential file items of adjacent versions for calculation to obtain and save the list of differential file items between the current software version and the target software version.
[0035] In a second aspect of the present invention, a client upgrade device is proposed. The device includes a software management module for managing software version information and a client upgrade module for comparing software version information and performing corresponding software upgrade operations.
[0036] The software management module is used to record the timing for prompting an update, the method of downloading update files, and the behavior mode of software upgrade, and stores them in the form of an upgrade operation instruction table;
[0037] The client upgrade module obtains the latest software version number from the upgrade server, compares and records the list of differential file items between the current software version and the software version to be upgraded. According to the list of differential file items, it matches the method of downloading update files and the behavior mode of software upgrade recorded in the upgrade operation instruction table, downloads the software upgrade incremental package from the server, and after verifying the information, releases it into the installation directory of the target client software to complete this round of lightweight upgrade of the client software.
[0038] In a third aspect of the present invention, an electronic device is proposed, characterized in that the device includes: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the lightweight upgrade method of the client software as described in the first aspect is implemented.
[0039] Beneficial effects: Compared with other existing solutions, the present invention does not package the files required for upgrading between different versions of software into a compressed upgrade package, but instead converts it into a description of the updated content, which indicates which files the client software should download. As a result, it can better support parallel downloading of multiple files in a multi-threaded manner. At the same time, for each file exceeding the specified size, relevant compression is performed separately according to the file type to obtain the optimal compression ratio, further reducing the size of the downloaded files. In addition, since only individual files are stored on the transfer server, the advantage of proximity downloading can be further utilized to improve the download speed. Furthermore, the present invention allows users to freely choose the software update method, and its flexibility can fully enhance user satisfaction with software upgrades. Brief Description of the Drawings
[0040] Figure 1 It is a structural diagram of the client upgrade device in an embodiment of the present invention.
[0041] Figure 2 It is a flowchart of the lightweight upgrade method for client software in an embodiment of the present invention.
[0042] Figure 3 It is a flowchart for comparing the old and new software versions in the lightweight upgrade method for client software. Detailed Embodiments
[0043] In the following description, a large number of specific details are given to provide a more thorough understanding of the present invention. However, it is obvious to those skilled in the art that the present invention can be implemented without one or more of these details. In other examples, some technical features well known to the art are not described to avoid confusion with the present invention.
[0044] The essence of software upgrade is to adjust the software installation and deployment files of the lower version to be consistent with those of the higher version. In terms of its behavior, it is to change the software installation and deployment files of the lower version, including: deleting the files that have been abandoned, adding the missing files, and replacing the modified files. In addition, in order to fully enhance user satisfaction with software upgrade behavior, software upgrade behavior needs to be improved in the following two aspects:
[0045] 1. Fully enhance the download speed of updated files, including: reducing the size of updated files, downloading the same updated file using the proximity principle, and downloading updated files in parallel in a multi-threaded manner.
[0046] Furthermore, there are no differences in the actual needs of users for quickly completing software upgrades. And the above different solutions improve the download speed of updated files from different dimensions, all aiming to improve the software upgrade speed. It can be inferred that the above solutions can be comprehensively constructed and optimized into a general solution.
[0047] 2. Allow users to freely choose the software update method, including: the timing of prompting for updates, the method of downloading update files, and the behavior method of software upgrade.
[0048] Furthermore, the timing of prompting for updates includes three types:
[0049] Prompt for update when opening the software: Only check and prompt for high-version update information when starting the software.
[0050] Prompt for update at any time: Regularly check and prompt for high-version update information after the software is started.
[0051] Prompt for update when exiting software usage: Only check and prompt for high-version update information when exiting the software.
[0052] Furthermore, the method of downloading update files includes two types:
[0053] Background silent download method: Open a separate thread to execute file download without affecting the operation of the software.
[0054] Blocking display download method: Block the running state of the software, execute file download processing, and resume the running state of the software after the download is completed.
[0055] Furthermore, the behavior method of software upgrade includes two types:
[0056] Interruption mode upgrade: Require the user to close the software process, and then start the software after the upgrade is completed.
[0057] Dual-directory update: Copy the original software files to another directory for update, and then switch the user to the new directory and delete the old directory after completion to achieve seamless upgrade.
[0058] Furthermore, the above-mentioned timing of prompting for updates, the method of downloading update files, and the behavior method of software upgrade will construct 12 different software update modes through permutation and combination. For example: Prompt for update when opening the software, use the blocking display method to download update files and then open the software after completing the software upgrade; Prompt for update when opening the software, use the background silent method to download update files while opening the software for the user to use, and prompt the user to execute the upgrade after the background download of update files is completed. At this time, the user exits software usage and then opens the software after completing the software upgrade; and so on.
[0059] Furthermore, the above 12 different software update modes all have corresponding advantages and disadvantages, and it is impossible to coordinate the user's preference for these update modes. It can be inferred that the above solutions can be constructed as a behavior factor for the user to choose respectively to form a software update mode, so as to cover the diverse needs of different users in software upgrade issues.
[0060] Therefore, the following lightweight upgrade method for client software that supports dynamic decision-making is designed in this embodiment:
[0061] First, design an upgrade operation instruction table, and use any one of structured text data such as XML and JSON to describe the software upgrade mode and update content.
[0062] Furthermore, the software upgrade mode in the upgrade operation instruction table is set by the user himself, and is used to specify: the timing of prompting for updates, the method of downloading update files, and the behavior mode of software upgrades. This part is used to address the diverse needs of users in software upgrade issues.
[0063] Furthermore, the update content in the upgrade operation instruction table is determined by the differences between the target version selected by the user and the current version, and is used to specify: file items to be deleted, file items to be added, and file items to be updated. This part is used to address the differential needs of users in software upgrade issues.
[0064] Furthermore, it can be inferred that the upgrade operation instruction table describes the differences in software upgrade differences and diversities of users using a unified data structure. Performing software upgrades according to the instructions of the upgrade operation instruction table can effectively solve the differences and diversity problems faced by software upgrades.
[0065] In addition, design an independent client upgrade device for providing users to set software upgrade modes, obtain upgrade operation instruction tables, and parse upgrade operation instruction tables to complete software upgrades.
[0066] Furthermore, when the client upgrade device is started for the first time, it needs to set: the timing of prompting for updates, the method of downloading update files, and the behavior mode of software upgrades. These settings are used to obtain the software upgrade mode preferred by the user.
[0067] Furthermore, the client upgrade device allows subsequent modification of the above settings to change the software upgrade mode preferred by the user.
[0068] Furthermore, when the client upgrade device detects a new version, it will display all target versions higher than the current software version in a list for the user to select, in order to obtain the target version of the upgrade.
[0069] Furthermore, after the user selects the target version, the client upgrade device will generate an upgrade operation instruction table corresponding to the current upgrade task, and perform the corresponding software upgrade behavior according to the upgrade operation instruction table.
[0070] In addition, design a software management platform for maintaining software version information and providing description information of difference file items between software versions.
[0071] Furthermore, the software management platform organizes all file items involved in the software installation package in the form of a list. Each list item corresponds to a file item and includes: file path, file size, file MD5 digest value, network path, compression algorithm, and creation time. It is sorted and stored in the natural order of the file paths.
[0072] Furthermore, the software management platform divides the software installation packages by version. For example, version 1.0 of software A corresponds to one installation list, and version 2.0 of software A corresponds to another installation list, and so on.
[0073] Furthermore, during the process of organizing the software installation package list, the software management platform decides whether to perform compression processing based on the file item size and file type to reduce the network transmission size of the updated files.
[0074] Furthermore, during the process of organizing the software installation package list, the software management platform will synchronously generate a list of differential file items with the previous adjacent version to indicate the file items that need to be processed when upgrading adjacent software versions.
[0075] Furthermore, during cross-version upgrades, the software management platform will obtain the above-mentioned multiple lists of differential file items between adjacent versions for calculation to obtain and save the list of differential file items between the current software version and the target software version, effectively reducing the calculation amount.
[0076] The device structure provided in this embodiment is shown in the appendix Figure 1 , and includes the following components:
[0077] (1) Software management platform: Composed of a compression device, a storage device, and a comparison device, it is used to manage software version information.
[0078] Furthermore, the compression device decompresses the software package uploaded to the software management platform, traverses all file items of the software package starting from the decompressed file root directory, and performs compression processing on single file items that exceed the specified size according to their file types to obtain file items with the corresponding optimal compression ratio, so as to reduce the transmission size of these file items during network transmission.
[0079] Furthermore, the compression device transfers the processed software package information and file item information to the storage device. The storage device stores all file items of this version of the software on the disk and records the installation list of file items involved in this version of the software and the list of differential file items compared with the previous adjacent version of the software in the database.
[0080] Furthermore, each list item in the above-mentioned file item installation list includes: file path, file size, file MD5 digest value, network path, compression algorithm, and creation time information.
[0081] Further, each item in the above file item difference list includes: file path, difference type, and source version.
[0082] Further, the comparison device receives two version numbers to be compared uploaded by the client upgrade device, and generates a description of the update content of the software upgrade task by comprehensively calculating all the difference file item lists between the two versions. This description is described in any one of the structured text data such as XML and JSON, and includes: a list of file items to be deleted, a list of file items to be added, and a list of file items to be updated. Among them, each file item includes the following information: file path, network path, compression algorithm, and creation time information.
[0083] Further, the above description of the update content will be stored in the comparison result record. When performing the comparison calculation, first query from the comparison result record whether there is a description of the update content corresponding to the two versions. If not, then execute the above comprehensive calculation process.
[0084] Further, when the software management platform receives an update request uploaded by the client upgrade device, it will not package the file items involved in the update content into a compressed upgrade package, but send the above description of the update content to the client upgrade device in text mode.
[0085] (2) Client upgrade device: It consists of a download device, an extraction device, and an update device, and is used to support users to customize software upgrade operations.
[0086] Further, the download device uses a multi-threaded method for parallel downloading, and uses a separate thread for each file involved in the list of file items to be added and the list of file items to be updated recorded in the description of the update content to improve the download speed.
[0087] Further, the download device uses the principle of downloading from the nearest location. Each thread first queries from the local file transfer server whether the corresponding file exists. If it exists, it downloads from the transfer server. Otherwise, it directly downloads from the management platform and triggers the transfer server to download the file at the same time.
[0088] Further, the extraction device processes the downloaded single file. If it belongs to the compressed file type, it uses the corresponding decompression algorithm for processing to obtain the original file.
[0089] Further, the update device provides a software upgrade mode for setting and changing user preferences.
[0090] Further, the update device is used to obtain a list of high software versions for the user to select the target version for upgrade, and pulls the description of the update content from the software management platform after determining the target version.
[0091] Further, the update device generates an upgrade operation instruction list according to the software upgrade mode and the obtained update content description to match the upgrade behavior expected by the user.
[0092] Further, the update device completes the software upgrade according to the upgrade operation instruction list.
[0093] For the execution process of this method, see the appendix Figure 2 , including the following steps:
[0094] S1. When the user opens the client software, the update device reports the current client software identifier and the client software version number to the management platform.
[0095] S2. The management platform queries all versions of the client software in the storage device through the client software identifier, and returns all version number information greater than the client software version number to the upgrade device in the form of a list.
[0096] S3. The update device displays the list of upgradable versions to the user. After the user selects the target version number, the upgrade device reports the software identifier, the current version number, and the target higher version number to the management platform.
[0097] S4. The management platform obtains the list of all difference file item lists between the two versions in the storage device according to the software identifier, the current version number, and the target version number.
[0098] S5. The management platform uses the comparison device to obtain the update file description involved in this upgrade task.
[0099] S6. The download device downloads the update files according to the update file description.
[0100] S7. After the decompression device restores the compressed files in the update files to the original files, the update device completes the addition and deletion of relevant files to complete the software upgrade.
[0101] The above comparison process is shown in the appendix Figure 3 , including the following steps:
[0102] For the initial version of the software, the storage device only saves the list of its corresponding installation file items. For subsequent versions, the storage device saves not only the list of its corresponding installation file items but also the list of difference file items between it and the previous adjacent version.
[0103] Further, the difference file item list will record the information of the newly added file items, deleted file items, and modified file items in the new version relative to the old version.
[0104] Further, based on the list of installation file items of the old version, the list of installation file items of the new version can be obtained through the above difference file item list.
[0105] When obtaining the update content description of the software upgrade task, the comparison device only obtains it through set operations on the list of differential file items between versions. For example, when the software is upgraded from version 1 to version 4, the comparison device will obtain the list of differential file items S1, S2, and S3 between version 1 and version 4, and perform set operations on the file items involved in the list of differential file items, so as to obtain the corresponding update content description when upgrading from version 1 to version 4.
[0106] Furthermore, it can be concluded that since the scale of the list of differential file items is much smaller than that of the list of installation file items, compared with the method of directly comparing the list of installation file items to obtain differences in other upgrade methods, the amount of calculation required to obtain the differential file items between versions in this method is smaller and the speed is faster.
[0107] Taking the management of the intelligent networking client software by this device as an example, it is further described as follows:
[0108] 1. The file item information involved in the installation package of the intelligent networking client software version 1.0.0 is as follows:
[0109] File Path Size (KB) / client.exe 1406 / conf / config.cfg 41 / conf / tip.wav 199 / conf / data.db 10240 / skin / spring.skn 6680 / dll / jcom.dll 76 / dll / V8.dll 2440
[0110] 2. The list of installation file items generated after importing the above installation package into the management platform is as follows:
[0111] File Path Size (KB) MD5 Digest Network Path Compression Algorithm Creation Time / client.exe 1406 9F9A4... http: / / 9F9A4... / client.exe ... / conf / config.cfg 41 09449... http: / / 09449... / config.cfg ... / conf / tip.wav 199 87c36... http: / / 87c36... / tip.wav ... / conf / data.db 10240 f95ef... http: / / f95ef... / data.7z 7z ... / skin / spring.skn 6680 928a4... http: / / 928a4... / spring.zip zip ... / dll / jcom.dll 76 39af2... http: / / 39af2... / jcom.dll ... / dll / V8.dll 2440 s6c75... http: / / s6c75... / V8.dll ...
[0112] It can be seen that for different types of files, the management platform uses different compression algorithms for separate processing to obtain compressed files in the best way (comprehensive compression ratio, security, compression processing efficiency).
[0113] Furthermore, for the network path of the file, using the MD5 value of the file as the path identifier can effectively ensure that the same file items existing in multiple software versions are mapped with a unique network path.
[0114] 3. The file item information involved in the installation package of the intelligent networking client software version 1.1.0 is as follows:
[0115] File Path Size (KB) / client.exe 1406 / conf / config.cfg 41 / conf / tip.wav 199 / conf / data.db 10240 / skin / spring.skn 6680 / skin / summer.skn 6720 / skin / autumn.skn 6830 / skin / winter.skn 6180 / dll / jcom.dll 76 / dll / V8.dll 2440
[0116] 4. The list of installation file items generated after importing the above installation package into the management platform is as follows:
[0117] File Path Size (KB) MD5 Digest Network Path Compression Algorithm Creation Time / client.exe 1406 9F9A4... http: / / 9F9A4... / client.exe ... / conf / config.cfg 41 09449... http: / / 09449... / config.cfg ... / conf / tip.wav 199 87c36... http: / / 87c36... / tip.wav ... / conf / data.db 10240 f95ef... http: / / f95ef... / data.7z 7z ... / skin / spring.skn 6680 928a4... http: / / 928a4... / spring.zip zip ... / skin / summer.skn 6720 as367... http: / / as367... / summer.zip zip ... / skin / autumn.skn 6830 zv327... http: / / zv327... / autumn.zip zip ... / skin / winter.skn 6180 vd127... http: / / vd127... / winter.zip zip ... / dll / jcom.dll 76 39af2... http: / / 39af2... / jcom.dll ... / dll / V8.dll 2440 s6c75... http: / / s6c75... / V8.dll ...
[0118] The corresponding list of differential file items is as follows:
[0119] File path Difference type Source version / skin / summer.skn ADD 1.1.0 / skin / autumn.skn ADD 1.1.0 / skin / winter.skn ADD 1.1.0
[0120] 5. The file item information involved in the installation package of the intelligent networking client software version 1.2.0 is as follows:
[0121] File path Size (KB) / client.exe 3930 / conf / config.cfg 41 / conf / tip.wav 199 / conf / data.db 10240 / skin / spring.skn 6680 / skin / summer.skn 6720 / skin / autumn.skn 6830 / skin / winter.skn 6180
[0122] 6. The list of installation file items generated after the above installation package is imported into the management platform is as follows:
[0123] File path Size (KB) MD5 digest Network path Compression algorithm Creation time / client.exe 3930 c861c... http: / / c861c... / client.exe ... / conf / config.cfg 41 09449... http: / / 09449... / config.cfg ... / conf / tip.wav 199 87c36... http: / / 87c36... / tip.wav ... / conf / data.db 10240 f95ef... http: / / f95ef... / data.7z 7z ... / skin / spring.skn 6680 928a4... http: / / 928a4... / spring.zip zip ... / skin / summer.skn 6720 as367... http: / / as367... / summer.zip zip ... / skin / autumn.skn 6830 zv327... http: / / zv327... / autumn.zip zip ... / skin / winter.skn 6180 vd127... http: / / vd127... / winter.zip zip ...
[0124] The corresponding list of different file items is as follows:
[0125] File path Difference type Source version / client.exe UPDATE 1.2.0 / dll / jcom.dll DELETE 1.2.0 / dll / V8.dll DELETE 1.2.0
[0126] Taking the upgrade of the intelligent networking client software by this device as an example is further described as follows:
[0127] 1. The upgrade mode setting for User A in Area A is: when opening the software, it prompts for an update, downloads the update file in a blocking display mode, and then opens the software after completing the software upgrade; the upgrade mode setting for User B in Area A is: when the software is running, it prompts for an update, downloads the update file in a background silent mode without affecting the user's normal use of the software, and performs the software upgrade when the background download of the update file is completed and the user exits the software.
[0128] 2. When the above User A selects to upgrade from the intelligent networking client software version 1.0.0 to version 1.1.0, the relevant execution process is as follows:
[0129] First, when User A opens the software, the management platform obtains the list of different file items between software version 1.0.0 and version 1.1.0, as follows:
[0130] File path Difference type Source version / skin / summer.skn ADD 1.1.0 / skin / autumn.skn ADD 1.1.0 / skin / winter.skn ADD 1.1.0
[0131] According to the indication of this list of different file items, it can be known that version 1.1.0 only adds three skin files. Therefore, the management platform generates a description of the update content corresponding to this upgrade task based on the installation file item list of version 1.1.0, as follows:
[0132] <?xml version="1.0" encoding="UTF-8"?>
[0133] <!-- Update file list -->
[0134] <updatefiles>
[0135] <!-- Updated file -->
[0136] <updatefile>
[0137] <!-- Action: Update, Add, Delete -->
[0138] <action>Add< / action>
[0139] <!-- Path: Path relative to the software root directory -->
[0140] <path> / skin / summer.skn< / path>
[0141] <!-- Network path -->
[0142] <link> http: / / as367... / summer.zip
[0143] <!-- Compression algorithm -->
[0144] <algorithm>zip< / algorithm>
[0145] <!-- Update description -->
[0146] <description>xxxx< / description>
[0147] < / updatefile>
[0148] <updatefile>
[0149] <action>Add< / action>
[0150] <path> / skin / autumn.skn< / path>
[0151] <link> http: / / zv327... / autumn.zip
[0152] <algorithm>zip< / algorithm>
[0153] <description>xxxx< / description>
[0154] < / updatefile>
[0155] <updatefile>
[0156] <action>Add< / action>
[0157] <path> / skin / winter.skn< / path>
[0158] <link> http: / / vd127... / winter.zip
[0159] <algorithm>zip< / algorithm>
[0160] <description>xxxx< / description>
[0161] < / updatefile>
[0162] < / updatefiles>
[0163] Second, the upgrade device generates an upgrade operation instruction table based on the software upgrade mode and the obtained description of the update content, as follows:
[0164] <?xml version="1.0" encoding="UTF-8"?>
[0165] <updateinfos>
[0166] <updateinfo>
[0167] <!-- Software version -->
[0168] <version> 1.1.0< / version>
[0169] <!-- Software execution upgrade timing -->
[0170] <updatetime>now< / updatetime>
[0171] <!-- Download mode -->
[0172] <downloadmode>sync< / downloadmode>
[0173] <!-- Updated file list -->
[0174] <updatefiles>
[0175] <!-- Updated file -->
[0176] <updatefile>
[0177] <!-- Action: Update, Add, Delete -->
[0178] <action>Add< / action>
[0179] <!-- Path: Path relative to the software root directory -->
[0180] <path> / skin / summer.skn< / path>
[0181] <!-- Network path -->
[0182] <link> http: / / as367... / summer.zip
[0183] <!-- Compression algorithm -->
[0184] <algorithm>zip< / algorithm>
[0185] <!-- Update description -->
[0186] <description>xxxx< / description>
[0187] < / updatefile>
[0188] <updatefile>
[0189] <action>Add< / action>
[0190] <path> / skin / autumn.skn< / path>
[0191] <link> http: / / zv327... / autumn.zip
[0192] <algorithm>zip< / algorithm>
[0193] <description>xxxx< / description>
[0194] < / updatefile>
[0195] <updatefile>
[0196] <action>Add< / action>
[0197] <path> / skin / winter.skn< / path>
[0198] <link> http: / / vd127... / winter.zip
[0199] <algorithm>zip< / algorithm>
[0200] <description>xxxx< / description>
[0201] < / updatefile>
[0202] < / updatefiles>
[0203] < / updateinfo>
[0204] < / updateinfos>
[0205] Again, the upgrade device interprets the above upgrade operation instruction table, obtains that the software execution upgrade timing updateTime value is now and the download mode downloadMode value is sync. Therefore, the software upgrade operation is immediately executed in a synchronous blocking manner, and the number of link values corresponding to the nodes with action values of Add or Update in the updated file list is counted. The files are downloaded in a multi-threaded mode. After all files are downloaded, the relevant files will be decompressed locally according to the algorithm value, and file synchronization will be completed according to the path indicated by the path value. Specifically: if the action is Add, the file will be newly added to the corresponding path; if the action is Update, the file will be replaced to the corresponding path; if the action is Delete, the file at the corresponding path will be deleted. After that, the current software version number will be modified to the value indicated by version, thus completing the software upgrade.
[0206] Finally, after the upgrade device successfully executes the above operations, the software is opened for User A to use. At this time, the above three skin files already exist in the file transfer server in Area A.
[0207] 3. When the above User B selects to upgrade from the intelligent networking client software version 1.0.0 to version 1.2.0, the relevant execution process is as follows:
[0208] First, during the process of User B using the software, the management platform obtains the list of difference file items between software version 1.0.0 and version 1.2.0, as follows:
[0209] File path Difference type Source version / skin / summer.skn ADD 1.1.0 / skin / autumn.skn ADD 1.1.0 / skin / winter.skn ADD 1.1.0 File path Difference type Source version / client.exe UPDATE 1.2.0 / dll / jcom.dll DELETE 1.2.0 / dll / V8.dll DELETE 1.2.0
[0210] Therefore, the management platform comprehensively calculates the list of difference file items between software version 1.0.0 and version 1.2.0, as follows:
[0211] File path Difference type Source version / skin / summer.skn ADD 1.1.0 / skin / autumn.skn ADD 1.1.0 / skin / winter.skn ADD 1.1.0 / client.exe UPDATE 1.2.0 / dll / jcom.dll DELETE 1.2.0 / dll / V8.dll DELETE 1.2.0
[0212] According to the indication of this list of difference file items, it can be known that during the process of the software upgrading from version 1.0.0 to version 1.2.0, three skin files were newly added through version 1.1.0, the program running file was modified through version 1.2.0, and the dependent dll file was deleted. Therefore, the management platform generates a description of the update content corresponding to this upgrade task based on the installation file item list of version 1.1.0 and the installation file item list of version 1.2.0, as follows:
[0213] <?xml version="1.0" encoding="UTF-8"?>
[0214] <!-- Update file list -->
[0215] <updatefiles>
[0216] <!-- Update file -->
[0217] <updatefile>
[0218] <!-- Action: Update, Add, Delete -->
[0219] <action>Add< / action>
[0220] <!-- Path: Path relative to the software root directory -->
[0221] <path> / skin / summer.skn< / path>
[0222] <!-- Network path -->
[0223] <link> http: / / as367... / summer.zip
[0224] <!-- Compression algorithm -->
[0225] <algorithm>zip< / algorithm>
[0226] <!-- Update description -->
[0227] <description>xxxx< / description>
[0228] < / updatefile>
[0229] <updatefile>
[0230] <action>Add< / action>
[0231] <path> / skin / autumn.skn< / path>
[0232] <link> http: / / zv327... / autumn.zip
[0233] <algorithm>zip< / algorithm>
[0234] <description>xxxx< / description>
[0235] < / updatefile>
[0236] <updatefile>
[0237] <action>Add< / action>
[0238] <path> / skin / winter.skn< / path>
[0239] <link> http: / / vd127... / winter.zip
[0240] <algorithm>zip< / algorithm>
[0241] <description>xxxx< / description>
[0242] < / updatefile>
[0243] <updatefile>
[0244] <action>Update< / action>
[0245] <path> / client.exe< / path>
[0246] <link> http: / / c861c... / client.exe
[0247] <algorithm>< / algorithm>
[0248] <description>xxxx< / description>
[0249] < / updatefile>
[0250] <updatefile>
[0251] <action>Delete< / action>
[0252] <path> / dll / jcom.dll< / path>
[0253] <link> http: / / 39af2... / jcom.dll
[0254] <algorithm>< / algorithm>
[0255] <description>xxxx< / description>
[0256] < / updatefile>
[0257] <updatefile>
[0258] <action>Delete< / action>
[0259] <path> / dll / V8.dll< / path>
[0260] <link> http: / / s6c75... / V8.dll
[0261] <algorithm>< / algorithm>
[0262] <description>xxxx< / description>
[0263] < / updatefile>
[0264] < / updatefiles>
[0265] Secondly, the upgrade device generates an upgrade operation instruction table according to the software upgrade mode and the obtained update content description as follows:
[0266] <?xml version="1.0" encoding="UTF-8"?>
[0267] <updateinfos>
[0268] <updateinfo>
[0269] <!-- Software version -->
[0270] <version> 1.2.0< / version>
[0271] <!-- Software execution upgrade timing -->
[0272] <updatetime>exit< / updatetime>
[0273] <!-- Download mode -->
[0274] <downloadmode>async< / downloadmode>
[0275] <!-- Updated file list -->
[0276] <updatefiles>
[0277] <!-- Updated file -->
[0278] <updatefile>
[0279] <!-- Action: Update, Add, Delete -->
[0280] <action>Add< / action>
[0281] <!-- Path: Path relative to the software root directory -->
[0282] <path> / skin / summer.skn< / path>
[0283] <!-- Network path -->
[0284] <link> http: / / as367... / summer.zip
[0285] <!-- Compression algorithm -->
[0286] <algorithm>zip< / algorithm>
[0287] <!-- Update description -->
[0288] <description>xxxx< / description>
[0289] < / updatefile>
[0290] <updatefile>
[0291] <action>Add< / action>
[0292] <path> / skin / autumn.skn< / path>
[0293] <link> http: / / zv327... / autumn.zip
[0294] <algorithm>zip< / algorithm>
[0295] <description>xxxx< / description>
[0296] < / updatefile>
[0297] <updatefile>
[0298] <action>Add< / action>
[0299] <path> / skin / winter.skn< / path>
[0300] <link> http: / / vd127... / winter.zip
[0301] <algorithm>zip< / algorithm>
[0302] <description>xxxx< / description>
[0303] < / updatefile>
[0304] <updatefile>
[0305] <action>Update< / action>
[0306] <path> / client.exe< / path>
[0307] <link> http: / / c861c... / client.exe
[0308] <algorithm>< / algorithm>
[0309] <description>xxxx< / description>
[0310] < / updatefile>
[0311] <updatefile>
[0312] <action>Delete< / action>
[0313] <path> / dll / jcom.dll< / path>
[0314] <link> http: / / 39af2... / jcom.dll
[0315] <algorithm>< / algorithm>
[0316] <description>xxxx< / description>
[0317] < / updatefile>
[0318] <updatefile>
[0319] <action>Delete< / action>
[0320] <path> / dll / V8.dll< / path>
[0321] <link> http: / / s6c75... / V8.dll
[0322] <algorithm>< / algorithm>
[0323] <description>xxxx< / description>
[0324] < / updatefile>
[0325] < / updatefiles>
[0326] < / updateinfo>
[0327] < / updateinfos>
[0328] Thirdly, the upgrade device interprets the above upgrade operation instruction table, and obtains that the software execution upgrade timing updateTime value is exit, and the download mode downloadMode value is async. Therefore, the update files required for the software are downloaded in an asynchronous non-blocking manner, and the software upgrade operation is executed when User B exits the software usage.
[0329] Furthermore, since User A has made the above three skin files exist in the file transfer server in Region A when upgrading the software from 1.0.0 to 1.1.0, when User B upgrades the software from 1.0.0 to 1.2.0, the above three skin files can be directly obtained from the transfer server, which improves the download speed. It can be seen that compared with other methods where only upgrades between exactly the same versions can play the role of accelerating downloads, this method of maintaining each file item separately is more flexible.
[0330] The logical ideas behind the methods and devices disclosed in the above embodiments can be implemented in whole or in part by software, hardware, firmware, or any other arbitrary combination. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs.
[0331] When the computer instructions or computer programs are loaded or executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more sets of available media. The available medium may be a magnetic medium (such as a floppy disk, hard disk, or magnetic tape), an optical medium (such as a DVD), or a semiconductor medium. The semiconductor medium may be a solid-state drive.
[0332] It should be understood that in various embodiments of the present application, the magnitudes of the sequence numbers of the above processes do not imply the order of execution. The order of execution of each process should be determined by its function and internal logic and should not constitute any limitation to the implementation process of the embodiments of the present application.
Claims
1. A lightweight client software upgrade method, characterized in that: The steps include: When the target client software is started for the first time, an upgrade preference setting process is started; the upgrade preference setting process records the timing of prompting for update, the method of downloading update files and the behavior of software upgrade, and is stored in the form of an upgrade operation instruction table; When the update prompting opportunity recorded in the upgrade operation instruction table is met, the upgrade management process is started; The upgrade management process obtains the latest software version number from the upgrade server; If the latest software version number is less than or equal to the current client software version number, the upgrade management process will be silent or exit; If the latest software version number is greater than the current client software version number, the upgrade management process compares and records the difference file item list between the current software version and the software version to be upgraded; According to the list of difference file items, match the method of downloading update files and the behavior of software upgrade recorded in the upgrade operation instruction table, download the software upgrade incremental package from the server, verify the information and release it into the installation directory of the target client software to complete this round of lightweight upgrade of the client software.
2. A method for lightweight upgrading of client software according to claim 1, characterized in that: The timing of prompting update includes: Prompt for updates when opening the software: Check and prompt for high-version update information when starting the software; Update reminder at any time: Regularly check and prompt the latest version update information after the software is opened; Update prompt when exiting the software: Check and prompt for higher version update information when exiting the software.
3. A method for lightweight upgrading of client software according to claim 1, characterized in that: The method of downloading the update file includes: Background silent download: start a separate thread to execute file download; Block display download: Block the current software running status, execute file download processing, and resume the software running status after the download is completed.
4. A method for lightweight upgrading of client software according to claim 1, characterized in that: The software upgrade behavior includes: Interrupt mode upgrade: requires the user to close the software process and restart the software after the upgrade is completed; Dual-directory update: Copy the original software files to another directory for update. After the update is completed, switch the user to the new directory and delete the old directory.
5. A method for lightweight upgrading of client software according to claim 1, characterized in that: When the timing for prompting an update as recorded in the upgrade operation instruction table is met, the upgrade management process is started. At this time, the upgrade management process organizes all file items in the installation directory of the current client software in the form of an installation package list. Each installation package list corresponds to a file item, including: file path, file size, file MD5 digest value, network path, compression algorithm, creation time, and the installation package list is sorted and stored in the natural order of the file path.
6. A method for lightweight upgrading of client software according to claim 5, characterized in that: In the process of organizing the software installation package list, the upgrade management process determines whether to perform compression processing according to the file item size and file type.
7. A method for lightweight upgrading of client software according to claim 5, characterized in that: The upgrade management process, in the process of organizing the software installation package list, synchronously generates a list of file items that are different from the previous adjacent version to indicate the file items that need to be processed when the adjacent version of the software is upgraded; Each list item in the file item difference list includes: file path, difference type, and source version.
8. A method for lightweight upgrading of client software according to claim 7, characterized in that: During a cross-version upgrade, the upgrade management process obtains a plurality of lists of differential file items of adjacent versions for calculation, so as to obtain and save a list of differential file items between the current software version and the target software version.
9. A client upgrade device, comprising: A software management module for managing software version information, and a client upgrade module for comparing software version information and performing corresponding software upgrade operations; Features: The software management module is used to record the timing of prompting update, the method of downloading update files and the behavior of software upgrade, and store them in the form of an upgrade operation instruction table; The client upgrade module obtains the latest software version number from the upgrade server, compares and records the difference file item list between the current software version and the software version to be upgraded, matches the method of downloading update files and the behavior of software upgrade recorded in the upgrade operation instruction table according to the difference file item list, downloads the software upgrade incremental package from the server, verifies the information and releases it into the installation directory of the target client software to complete this round of lightweight upgrade of the client software.
10. An electronic device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the method for lightweight upgrading of client software according to any one of claims 1 to 8 is implemented.