Software updating method, device, equipment and storage medium
By setting intermediate versions and multi-level update strategies in software updates, the problem of increasing file size of software update packages is solved, and the effect of reducing update download time and traffic loss is achieved.
Patent Information
- Application Number
- CN202210650326.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-10
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2042-06-10
AI Technical Summary
In the prior art, when software version is updated, the update package file must contain multiple old versions of update content, resulting in the continuous increase in the size of the update package file, resulting in too long download time and increased traffic loss.
By setting the intermediate version, the software update version is divided into multiple update intervals, and a multi-level update strategy is adopted. After the software update and upgrade thread is started, the version configuration information of the target software is obtained, and whether the software needs to be updated, and the corresponding software update package is downloaded based on the local version number and the intermediate version number.
Effectively control the size of the update package, reduce update download time, reduce traffic loss of software updates, and improve user experience.
Smart Images

Figure CN115098128B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of software, and in particular to a software updating method, device, equipment and storage medium. Background Art
[0002] In today's society, software apps in mobile devices (including mobile phones, tablets, portable PCs and other mobile devices) have flooded every aspect of people's lives. Each software has its focus and periodicity. Software updaters will optimize the software according to the software's applicability and user usage and feedback, and integrate it into a software version update package, which will be uploaded to the server for users to download and update.
[0003] In today's technology, during the software version upgrade process, in order to take into account the software updates and upgrades for users who use old versions and users who use old version installation packages to install the software, the update package files of the version updates and upgrades must contain the update content of multiple old versions. Therefore, with the iteration of versions, the update package files of higher versions will become larger and larger. For most users who update the software in a timely manner, the software version they use is close to the latest version. After the new version is released, they only need to update the latest modified files. However, when updating the software, they have to download the software update package of the same size as the update for users with lower software versions. This not only causes too much time to be spent on downloading the software update package, but also increases the download traffic loss.
[0004] Therefore, in order to improve the user experience, a method that can effectively solve the above problems is urgently needed. Summary of the invention
[0005] The main purpose of the present invention is to provide a software update method, device, equipment and storage medium, aiming to effectively control the size of the update package, reduce the update download time, and reduce the software update traffic consumption.
[0006] To achieve the above object, the present invention provides a method for software updating, the method comprising:
[0007] After the software update thread is started, the version configuration information of the currently running target software is obtained, wherein the version configuration information includes the local version number, the latest version number, and at least one intermediate version number of the target software;
[0008] When the local version number is lower than the latest version number, determining that the target software needs to be updated;
[0009] According to the local version number and the intermediate version number, and the multi-level update strategy, the corresponding software update package is downloaded to perform software update.
[0010] Optionally, the step of downloading the corresponding software update package according to the local version number and the intermediate version number and the multi-level update strategy to perform software update includes:
[0011] When the intermediate version number is one, determining whether the local version number is lower than the intermediate version number;
[0012] If the local version number is not lower than the intermediate version number, download the latest version update package to perform software update;
[0013] When there are multiple intermediate version numbers, determining whether the local version number is lower than the latest intermediate version number;
[0014] If the local version number is not lower than the latest intermediate version number, the latest version installation package is downloaded to perform software update.
[0015] Optionally, when the intermediate version number is one, after the step of determining whether the local version number is lower than the intermediate version number, the method further includes:
[0016] If the local version number is lower than the intermediate version number, the intermediate version update package is downloaded for updating and upgrading, and then the latest version update package is downloaded to upgrade to the latest version.
[0017] Optionally, when there are multiple intermediate version numbers, after the step of determining whether the local version number is lower than the latest intermediate version number, the method further includes:
[0018] If the local version number is lower than the latest intermediate version number, the local version number is compared with the remaining intermediate version numbers in order from low to high to determine the first starting update version number higher than the local version number;
[0019] After starting to download and update the update package corresponding to the initial update version number, the update packages with higher versions than the update package with the initial update version number are downloaded in sequence to update and upgrade the software until the new version of the target software is updated.
[0020] To achieve the above object, an embodiment of the present invention further provides a method for updating server software, the method comprising:
[0021] After the software update thread on the terminal side is started, the version configuration information of the currently running target software is obtained, wherein the version configuration information includes the local version number, the latest version number, and at least one intermediate version number of the target software;
[0022] Sending the version configuration information to the terminal so that the terminal can determine that the target software needs to be updated when the local version number is lower than the latest version number; triggering a corresponding software update package download request according to the local version number and the intermediate version number, and a multi-level update strategy;
[0023] A software update package download request sent by the terminal is received, and a corresponding software update package is sent to the terminal according to the software update package download request to perform software update.
[0024] Optionally, after the software update thread is started, before the step of obtaining the version configuration information of the currently running target software, the step further includes:
[0025] After detecting that a new version update package has been uploaded, checking whether the number of version updates has reached a preset threshold;
[0026] If the number of version updates is higher than the version update number threshold, the current updated version is set as an intermediate version, an update package of the corresponding intermediate version is generated, and the corresponding version information is written into the version configuration information.
[0027] Optionally, after the software update thread on the terminal side is started, before the step of obtaining the version configuration information of the currently running target software, the step further includes:
[0028] Detecting whether the size of the latest version update package of the target software exceeds a preset threshold, and if so, setting the latest version as an intermediate version after detecting that the next version update package has been uploaded; or
[0029] During the process of releasing the latest version of the target software, if it is detected that the size of one or more update packages of lower versions than the latest version exceeds a preset threshold, the detected lower versions are set as intermediate versions.
[0030] To achieve the above object, an embodiment of the present invention further provides a software updating device, the software updating device comprising:
[0031] An information acquisition module, used to acquire the version configuration information of the currently running target software after the software update and upgrade thread is started, wherein the version configuration information includes the local version number, the latest version number, and at least one intermediate version number of the target software;
[0032] A determination module, used to determine that the target software needs to be updated when the local version number is lower than the latest version number;
[0033] The update and upgrade module is used to download the corresponding software update package according to the local version number and the intermediate version number and the multi-level update strategy to perform software update.
[0034] To achieve the above-mentioned purpose, an embodiment of the present invention further provides a terminal device, which includes: a memory, a processor, and a software update program stored in the memory and executable on the processor, wherein the software update program, when executed by the processor, implements the steps of the software update method as described in any one of the above items.
[0035] To achieve the above objective, an embodiment of the present invention further provides a storage medium, wherein a software update program is stored in the storage medium, and when the software update program is executed by a processor, the steps of the software update method described above are implemented.
[0036] The software update method, device, equipment and storage medium proposed in the embodiment of the present invention divide the software update version into multiple update intervals by setting an intermediate version, and a multi-level update strategy. After the software update and upgrade thread is started, the version configuration information of the currently running target software is obtained, and the version configuration information includes the local version number, the latest version number, and at least one intermediate version number of the target software. When the local version number is lower than the latest version number, it is determined that the target software needs to be updated, and the corresponding software update package is downloaded according to the local version number and the intermediate version number, and the multi-level update strategy to perform software update. By upgrading the software through the multi-level update strategy, the size of the update package can be effectively controlled, the update download time can be reduced, and the software can be quickly upgraded and updated. Based on the scheme of the present invention, starting from the process of iterating the software version, by setting one or more intermediate versions, the software version is divided into multiple levels, and the size of the software version content that the user needs to update is determined by distinguishing the user's software version. The software is upgraded by introducing a multi-level update strategy, and then the size of the downloaded update package is controlled, the software update time is reduced, and the traffic loss of the software update is reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 This is a functional module diagram of a terminal device to which the software updating device of the present invention belongs;
[0038] Figure 2 A flowchart of an exemplary embodiment of a software updating method of the present invention;
[0039] Figure 3 A flowchart of another exemplary embodiment of the software updating method of the present invention;
[0040] Figure 4 A flowchart of another exemplary embodiment of the software updating method provided by the present invention;
[0041] Figure 5A flowchart of another exemplary embodiment of the software updating method provided by the present invention;
[0042] Figure 6 The present invention is a flowchart of another exemplary embodiment of the software updating method provided by the present invention. DETAILED DESCRIPTION
[0043] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0044] In the subsequent description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present invention, and have no specific meanings. Therefore, "module", "component" or "unit" can be used in a mixed manner.
[0045] The main solution of the embodiment of the present application is: by setting one or more intermediate versions, write the corresponding version configuration information in the configuration file, after the software update and upgrade thread is started, obtain the version configuration information of the currently running target software, the version configuration information includes the local version number of the target software, the latest version number, and at least one intermediate version number, and determine whether the target software needs to be updated by the difference between the local version number and the latest version number. When the software needs to be updated, determine the starting update version of the target software by the difference between the local version number and the intermediate version number, and then download the corresponding software update package according to the starting update version through the set multi-level update strategy to perform the software update. The software version is divided into multiple levels by the set intermediate version, and the size of the software version content that the user needs to update is determined by distinguishing the user's software version, thereby controlling the size of the downloaded update package and reducing the download time of the update package. Based on the solution of the present invention, starting from the process of iterating the software version, the software version is divided into multiple levels by setting one or more intermediate versions. By distinguishing the user's software version, the size of the software version content that the user needs to update is determined. Then, a multi-level update strategy is introduced to perform software upgrades, thereby controlling the size of the downloaded update package, reducing the software update time, and reducing the traffic consumption of the software update.
[0046] Specifically, refer to Figure 1 , Figure 1 This is a functional module diagram of the terminal device to which the software update device of this application belongs. The software update device can be a device independent of the terminal device that can download and update software, and it can be carried on the terminal device in the form of hardware or software. The terminal device can be a smart mobile terminal with data processing functions such as a mobile phone or a tablet computer, or a fixed terminal device or server with data processing functions.
[0047] In this embodiment, the terminal device to which the software updating apparatus belongs includes at least an output module 110 , a processor 120 , a memory 130 and a communication module 140 .
[0048] The memory 130 stores an operating system and a software update program. The software update device can store version configuration information, software update packages, and other information of the currently running target software in the memory 130. The output module 110 can be a display screen, etc. The communication module 140 can include a wired network interface, a WIFI module, a mobile communication module, and a Bluetooth module, etc., and communicates with an external device or server through the communication module 140.
[0049] When the software updating device is a terminal device used by a user, the following steps are implemented when the software updating program in the memory 130 is executed by the processor:
[0050] After the software update thread is started, the version configuration information of the currently running target software is obtained, wherein the version configuration information includes the local version number, the latest version number, and at least one intermediate version number of the target software;
[0051] When the local version number is lower than the latest version number, determining that the target software needs to be updated;
[0052] According to the local version number and the intermediate version number, and the multi-level update strategy, the corresponding software update package is downloaded to perform software update.
[0053] Furthermore, when the software update program in the memory 130 is executed by the processor, the following steps are also implemented:
[0054] When the intermediate version number is one, determining whether the local version number is lower than the intermediate version number;
[0055] If the local version number is not lower than the intermediate version number, download the latest version update package to perform software update;
[0056] When there are multiple intermediate version numbers, determining whether the local version number is lower than the latest intermediate version number;
[0057] If the local version number is not lower than the latest intermediate version number, the latest version installation package is downloaded to perform software update.
[0058] Furthermore, when the software update program in the memory 130 is executed by the processor, the following steps are also implemented:
[0059] If the local version number is lower than the intermediate version number, the intermediate version update package is downloaded for updating and upgrading, and then the latest version update package is downloaded to upgrade to the latest version.
[0060] Furthermore, when the software update program in the memory 130 is executed by the processor, the following steps are also implemented:
[0061] If the local version number is lower than the latest intermediate version number, the local version number is compared with the remaining intermediate version numbers in order from low to high to determine the first starting update version number higher than the local version number;
[0062] After starting to download and update the update package corresponding to the starting update version number, the update packages corresponding to version numbers higher than the starting update version number are downloaded in sequence to update and upgrade the software until the new version of the target software is updated.
[0063] When the terminal device used by the software updating apparatus is a server, the following steps are implemented when the software updating program in the memory 130 is executed by the processor:
[0064] After the software update thread on the terminal side is started, the version configuration information of the currently running target software is obtained, wherein the version configuration information includes the local version number, the latest version number, and at least one intermediate version number of the target software;
[0065] Sending the version configuration information to the terminal so that the terminal can determine that the target software needs to be updated when the local version number is lower than the latest version number; triggering a corresponding software update package download request according to the local version number and the intermediate version number, and a multi-level update strategy;
[0066] A software update package download request sent by the terminal is received, and a corresponding software update package is sent to the terminal according to the software update package download request to perform software update.
[0067] Furthermore, when the software update program in the memory 130 is executed by the processor, the following steps are also implemented:
[0068] After detecting that a new version update package has been uploaded, checking whether the number of version updates has reached a preset threshold;
[0069] If the number of version updates is higher than the version update number threshold, the current updated version is set as an intermediate version, an update package of the corresponding intermediate version is generated, and the corresponding version information is written into the version configuration information.
[0070] Furthermore, when the software update program in the memory 130 is executed by the processor, the following steps are also implemented: when detecting the generation of a new intermediate version, detecting whether the number of the intermediate versions reaches a preset reasonable required number;
[0071] When the number of intermediate versions is not greater than the reasonable required number, retaining the update packages corresponding to all intermediate versions and the version information in the version configuration information;
[0072] When the number of the intermediate versions is greater than the reasonable required number, the first intermediate version and the second intermediate version are merged into the second intermediate version, and the version information of the first intermediate version in the version configuration information is deleted.
[0073] This embodiment uses the above scheme to divide the software update process into multiple levels of different intermediate version numbers by setting the intermediate version. After the software update thread is started, the version configuration information of the currently running target software is obtained, and the version configuration information includes the local version number, the latest version number, and at least one intermediate version number of the target software. When the local version number is lower than the latest version number, it is determined that the target software needs to be updated, and the corresponding software update package is downloaded according to the local version number and the intermediate version number, as well as the multi-level update strategy, so as to perform the software update. By performing the software upgrade through the multi-level update strategy, the size of the update package can be effectively controlled, the update download time can be reduced, and the software can be quickly upgraded and updated. Based on the scheme of the present invention, starting from the process of iterating the software version, by setting one or more intermediate versions, the software version is divided into multiple intermediate version levels, by distinguishing the user's target software version, the starting update version of the target software that the user needs to update is determined, and then the software upgrade is performed by introducing a multi-level update strategy, thereby controlling the size of the downloaded update package, reducing the software update time, and reducing the traffic loss of the software update.
[0074] Based on the above terminal device architecture but not limited to the above architecture, an embodiment of the method of the present application is proposed.
[0075] Reference Figure 2 , Figure 2 The flowchart of an exemplary embodiment of the software updating method of the present application is shown in FIG. 1 when the software updating device is a terminal device used by a user. The software updating method includes:
[0076] Step S10, after the software update thread is started, obtaining the version configuration information of the currently running target software, the version configuration information including the local version number, the latest version number, and at least one intermediate version number of the target software;
[0077] The execution subject of the method of this embodiment can be a software update device, or a software update terminal device or server. This embodiment takes a software update device as an example, and the software update device can be integrated in a terminal device such as a smart phone, a tablet computer, etc. with a data processing function.
[0078] The solution of this embodiment mainly optimizes the upgrade and update process of software, especially the software to be updated, reduces the size of the downloaded update package, shortens the update package download time, and reduces traffic loss.
[0079] The embodiment of the present invention starts from the actual problem that the software update package is too large, introduces the concept of intermediate version, and divides the software update iteration process into one or more levels, and each level version has a corresponding version number. The embodiment of the present invention determines whether the target software needs to be updated by comparing the local version number and the latest version number of the target software. According to the comparison between the local version number and the intermediate version number, it can be determined from which level the target software needs to be updated, thereby achieving the goal of controlling the size of the update package downloaded during the software upgrade and reducing the update download time.
[0080] Specifically, after the software update program of the target software is started, the local version number of the local target software is parsed first. Then, the local terminal establishes a network connection with the server by sending a corresponding network request to the server, and sends a version configuration file download request to the server. After the local terminal establishes a communication connection with the server, the version configuration file is downloaded. The version configuration file contains the configuration information. The version configuration file is parsed to obtain the corresponding version configuration information. The version configuration information contains the latest version number and intermediate version number and other information for the software update and upgrade thread to perform the next step of processing.
[0081] In the embodiment of the present invention, the version configuration file may include version configuration information, which may include: different version numbers of the software, such as the latest version number and one or more intermediate version numbers. When the software needs to be updated, if the version configuration information contains the version information of the intermediate version, the software update thread can quickly perform the software upgrade according to the multi-level update strategy based on the version information of the intermediate version, thereby reducing the update time.
[0082] Step S20, comparing the local version number with the latest version number to obtain a comparison result of whether the currently running software needs to be updated;
[0083] After obtaining the version configuration information, the software update and upgrade thread compares the local version number of the target software with the latest version number in the version configuration information to determine whether the software is lower than the latest version, and then determines whether the software needs to be updated.
[0084] Specifically, after the software update and upgrade thread of the target software in the local terminal is started, the version self-check program starts to run, the local version number of the target software in the local file is parsed, and a communication connection is established with the server or cloud database, and a download request for the version configuration file is sent to the server to obtain the version configuration file, and the version configuration information such as the latest version number and the intermediate version number is obtained according to the version configuration file, and the local version number is compared with the latest version number in the version configuration information to determine whether the software needs to be updated;
[0085] When it is detected that the local version number is not lower than the version number in the latest version configuration information, the target software does not need to be updated;
[0086] On the contrary, when the local version number is lower than the latest version number, the target software needs to be updated.
[0087] For example, a user uses an outdated installation package to install the target software on a local terminal. After the target software program is started, it performs a version self-check to obtain the local version number, then establishes a communication connection with the server or cloud database corresponding to the target software, obtains the version configuration file, and obtains the latest version number and the intermediate version number based on the version configuration file. When it detects that the local version number is lower than the latest version number, it determines that the software needs to be updated. The software program pops up a window indicating that the version needs to be updated, and provides tabs for updating now and updating later for the user to choose. After receiving the instruction to update immediately, the target software is updated and upgraded according to the multi-level update strategy.
[0088] Step S30: Download the corresponding software update package according to the local version number and the intermediate version number and the multi-level update strategy to perform software update.
[0089] After the software update thread of the target software is started, the local version number and the version configuration file in the server corresponding to the target software are obtained, the latest version number and the intermediate version number are obtained according to the version configuration file, and then according to the local version number and the latest version number of the target software, it is determined whether the target software needs to be updated. If it is determined that the software needs to be updated, the local version number of the target software and the intermediate version number in the configuration file are compared again from low to high, and the corresponding software update package is downloaded according to the multi-level update strategy to perform the software update.
[0090] The embodiment of the present invention uses the above scheme to obtain the local version number of the locally running target software and the version configuration information in the server corresponding to the target software after the software update and upgrade thread is started. The version configuration information includes the latest version number of the target software and at least one intermediate version number. When the local version number is lower than the latest version number, it is determined that the target software needs to be updated, and then the corresponding software update package is downloaded according to the local version number and the intermediate version number, as well as the multi-level update strategy, to perform the software update. Based on the scheme of the present invention, from the perspective of the software version iteration process, by setting one or more intermediate versions, the software version is divided into multiple update version levels, the update version level of the target software is determined according to the version of the user's target software, the update version level is determined, and the corresponding software update package is downloaded through the multi-level update strategy to perform the target software update and upgrade, thereby controlling the size of the downloaded update package, reducing the software update time, and reducing the traffic loss of the software update.
[0091] Further, see Figure 3 , Figure 3 FIG. 1 is a flow chart of another exemplary embodiment of the software updating method of the present invention. Figure 2 In the embodiment shown, in this embodiment, step S30, the step of downloading the corresponding software update package according to the local version number and the intermediate version number and the multi-level update strategy to perform software update includes:
[0092] Step S301, determine whether the intermediate version number is one.
[0093] Step S302: When there is one intermediate version number, determine whether the local version number is not lower than the intermediate version number.
[0094] Step S303: If the local version number is not lower than the intermediate version number, then download the latest version update package to perform software update. Step S304: If the local version number is lower than the intermediate version number, then download the intermediate version update package to perform upgrade, then download the latest version update package to perform upgrade to the latest version.
[0095] Specifically, after startup, the software update and upgrade thread sends a version configuration file download request to the server, obtains the version configuration file, and obtains corresponding version configuration information according to the version configuration file. The version configuration information includes information such as the latest version number and at least one intermediate version number. According to the version configuration information, it is determined whether the target software needs to be updated. If the target software needs to be updated, it is determined whether there is only one intermediate version number in the version configuration information. When there is one intermediate version number in the version configuration information, it is determined whether the local version number is not lower than the intermediate version number. If the local version number is not lower than the intermediate version number, the latest version update package can be directly downloaded to update and upgrade the software. If the local version number is lower than the intermediate version number, it can be determined that the version of the local software is relatively low, and it is necessary to download the intermediate version update package for update and upgrade before downloading the latest version update package for software update.
[0096] Specifically, if the local version number is lower than the intermediate version number, the intermediate version number will be marked as the starting update version number. During the target software update process, the update package corresponding to the starting update version number is first downloaded to update the software, and then the latest version of the update package is downloaded to upgrade the target software to the latest version.
[0097] For example, the target software running in the mobile terminal starts the software update thread at a certain moment, and obtains the local version number Vi, the latest version number Vn and the intermediate version number Vx of the target software. After comparing the local version number Vi with the latest version number Vn, if it is determined that the target software needs to be updated, the local version number Vi is compared with the intermediate version number Vx. When the local version number Vi is not lower than the intermediate version number Vx, it can be determined that the target software version is relatively high. During the software update process, the update package corresponding to the latest version number Vn is directly downloaded for version update; when the local version number Vi is lower than the intermediate version number Vx, it can be determined that the target software used by the user is a low version. During the software update process, the update package corresponding to the intermediate version number Vx is first downloaded for upgrade. After the upgrade is completed, the update package corresponding to the latest version number Vn is downloaded to upgrade to the latest version.
[0098] Among them, the update package corresponding to the intermediate version number Vx includes all the contents between version V1 and the intermediate version Vx; the update package corresponding to the latest version number Vn includes all the version update contents between the intermediate version Vx and the latest version Vn.
[0099] Step S305: When there are multiple intermediate version numbers, determine whether the local version number is not lower than the latest intermediate version number.
[0100] Step S306: If the local version number is not lower than the latest intermediate version number, download the latest version update package to perform software update.
[0101] Step S307: If the local version number is lower than the latest intermediate version number, the local version number is compared with the remaining intermediate version numbers from low to high to determine the first starting update version number that is higher than the local version number.
[0102] Step S308, starting from the starting update version number, download the corresponding update package for update and upgrade, and then download the update packages corresponding to the version numbers higher than the starting update version number in sequence for software update and upgrade, until the latest version of the target software is updated.
[0103] After the software update and upgrade thread is started, it sends a version configuration file download request to the server to obtain the version configuration file, and obtains the corresponding version configuration information according to the version configuration file. When the target software needs to be updated, it determines whether there is only one intermediate version number in the version configuration information. If there are multiple intermediate version numbers, it is necessary to compare the local version number with all the intermediate version numbers. The specific implementation is as follows:
[0104] First, find the latest intermediate version number from all the intermediate version numbers, compare the local version number with the latest intermediate version number, and determine whether the local version number is lower than the latest intermediate version number; if the local version number is not lower than the latest intermediate version number, download the latest version installation package to update the software.
[0105] If the local version number is lower than the latest intermediate version number, the local version number is compared with the remaining intermediate version numbers in order from low to high to determine the first starting update version number higher than the local version number;
[0106] Starting from the starting update version number, after downloading the corresponding update package for updating and upgrading, the update packages corresponding to version numbers higher than the starting update version number are downloaded in sequence to update and upgrade the software until the new version of the target software is updated.
[0107] Specifically, after the software upgrade process of the target software is started, the local version number is obtained, and a communication connection is established with the corresponding server of the target software to obtain the version configuration file of the target software. According to the version configuration file, the latest version number and multiple intermediate version numbers are parsed to obtain, and according to the comparison result between the local version number and the latest version number, it is determined whether the target software needs to be updated. If the software needs to be updated, the latest intermediate version number is found out according to the multiple intermediate version numbers, and then according to the comparison result between the local version number and the intermediate version number, it is determined whether the local version number is not lower than the latest intermediate version number; if the local version number is not lower than the latest intermediate version number, the update package of the latest version can be directly downloaded to update the software; if the local version number is lower than the latest intermediate version number, it can be determined that the version of the local software is relatively low, and the local version number needs to be compared with other intermediate version numbers from low to high again, and the first intermediate version number higher than the local version number is determined, and the first intermediate version number higher than the local version number is set as the starting update version number, and the corresponding update package is downloaded according to the starting update version number, and after the update is performed, the update packages corresponding to the version numbers higher than the starting update version number are downloaded in sequence to perform software update and upgrade until the new version of the target software is updated.
[0108] When the local version number is lower than the latest intermediate version number, it is necessary to compare the local version number with the remaining intermediate version numbers from low to high, and determine the first intermediate version number higher than the local version number. The determined first intermediate version number higher than the local version number is marked as the starting update version number. The software update and upgrade thread can download the higher version update package based on the update starting version number as the update starting point, and the lower version update package can be directly skipped, thereby achieving the purpose of controlling the size of the update package and reducing the time spent on software upgrades.
[0109] In some embodiments, the local version of the target software is Vi, and the software update and upgrade thread communicates with the software update server to obtain the version configuration file of the target software. According to the version configuration file, the latest version number of the target software and the intermediate version numbers corresponding to multiple intermediate versions of the target software can be obtained, which are Vx1, Vx2, Vx3 and Vx4 respectively. By comparing the local version number with the latest version number, it is determined whether the target software needs to be updated. If the target software needs to be updated, the local version number Vi is compared with the intermediate version number V4. If the local version number Vi is not lower than the intermediate version number V4, it can be determined that the target software version is relatively high. During the software update process, the update package corresponding to the latest version number Vn is directly downloaded to perform the version update; if the local version number Vi If the local version number Vi is lower than the intermediate version number V4, it is necessary to compare the local version number Vi with other intermediate version numbers from low to high again. When the first intermediate version number higher than the local version number is detected, the intermediate version number higher than the first local version number will be set as the starting update version number of the target software, and the software update and upgrade thread will download the corresponding software update package for software update and upgrade according to the starting update version number; assuming that the intermediate version Vx3 is the first intermediate version higher than the local version Vi, the software version update detection process will mark the intermediate version Vx3 as the starting update version according to the comparison result, download the update package corresponding to the intermediate version Vx3 for update and upgrade, then download the update package corresponding to the intermediate version Vx4 for upgrade, and finally download the latest version update package to upgrade the software to the latest version.
[0110] As can be seen from the above, in the embodiment of the present invention, the software upgrade and update process of the target software obtains the version configuration file from the server or cloud database, and obtains the latest version number and the corresponding intermediate version number according to the version configuration file. When there is only one intermediate version in the version configuration file, if the local version number is not lower than the intermediate version number, the update package of the latest version can be directly downloaded. When the version configuration file contains multiple version numbers, the local version number is compared with the latest intermediate version number to determine whether the local version number is not lower than the latest intermediate version number. If the local version is not lower than the latest intermediate version number, the update package of the latest version is downloaded to perform software upgrade. If the local version is lower than the latest intermediate version number, the local version number is compared with the remaining intermediate version numbers from low to high, and it is concluded that the first intermediate version number higher than the local version number is set as the starting update version number, and the corresponding update package is downloaded and upgraded from the starting update version number from the low version number to the high version number until it is updated to the latest version. Through the above scheme, the size of the update package that the target software needs to download can be quickly determined, the download of the updated version content can be reduced, and the update time can be shortened.
[0111] Reference Figure 4 , Figure 4This is a flowchart of another exemplary embodiment of the software update method of the present application. The software update method is applied to a server, and the software update method includes: step A10, after the software update and upgrade thread on the terminal side is started, obtaining the version configuration information of the currently running target software, the version configuration information includes the local version number of the target software, the latest version number, and at least one intermediate version number;
[0112] Specifically, after the software update and upgrade thread of the target software in the local terminal is started, the version self-check program starts to run, the local version number of the target software in the local file is parsed, and a communication connection is established with the server or cloud database, and a download request for the version configuration file is sent to the server. The download request includes software information of the target software on the user terminal side and information such as the network source address of the terminal. According to the download request, the software information and network address of the target software on the user terminal side are obtained, and the version configuration file of the target software is found according to the software information. The version configuration file includes version configuration information such as the latest version number and the intermediate version number, so that the version configuration file can be sent to the user terminal side.
[0113] Step A20, sending the version configuration information to the terminal, so that the terminal can determine that the target software needs to be updated when the local version number is lower than the latest version number; triggering a corresponding software update package download request according to the local version number and the intermediate version number, and a multi-level update strategy;
[0114] Specifically, after the software update thread of the user terminal side device is started, a download request for the target software download version configuration file will be sent. The download request includes relevant information of the target software on the user terminal side and the network source address of the user terminal side device. After the server receives the corresponding network request, it sends the version configuration file of the corresponding target software to the user terminal side device according to the network source address. The version configuration information includes the local version number, the latest version number, and at least one intermediate version number of the target software to check whether the local version of the terminal needs to be updated. If the user terminal side determines that the target software needs to be updated, the user terminal side will trigger the corresponding software update package download request according to the multi-level update strategy.
[0115] Step A30, receiving a software update package download request sent by the terminal, and sending a corresponding software update package to the terminal according to the software update package download request to perform software update.
[0116] Specifically, after the software update and upgrade thread of the target software on the local terminal side is started, the version self-check program starts to run, the local version number of the target software in the local file is parsed, and a communication connection is established to the server side, and a download request for the version configuration file is sent. After the server side receives the software update package download request sent by the user terminal side device, it obtains the update package version number that the user terminal side device needs to download based on the software update package download request, and sends the update package of the corresponding version to the user terminal side device based on the update package version number for the user terminal side device to update.
[0117] After the user terminal side obtains the version configuration file, it obtains the latest version number and the intermediate version number according to the local version number and the version configuration file, and determines whether the target software needs to be updated. If the target software needs to be updated, it determines whether there is only one intermediate version. When the intermediate version number is one, it determines whether the local version number is lower than the intermediate version number. If the local version number is not lower than the intermediate version number, a request to download the latest version is sent to the server side. After receiving the corresponding request, the server side finds the corresponding latest version update package and sends it to the user terminal side for upgrading to the latest version. If the local version number is lower than the intermediate version number, the multi-level update strategy is triggered to send an intermediate version update package download request and a latest version update package download request to the server side. The server side sends an update package corresponding to the download request for the user terminal side software update and upgrade. When the When there are multiple intermediate version numbers, determine whether the local version number is lower than the latest intermediate version number. If the local version number is not lower than the latest intermediate version number, send a request to download the latest version installation package to the server side, and the server side sends the corresponding update package to the user terminal side according to the request for software update. If the local version number is lower than the latest intermediate version number, compare the local version number with the remaining intermediate version numbers from low to high, and determine the first starting update version number higher than the local version number. The software upgrade update thread on the user terminal side triggers the multi-level update strategy and starts to send update package download requests corresponding to each intermediate version from the starting update version number to the latest version number to the server side one by one. The server side then sends update packages corresponding to the download requests one by one to the user terminal side according to the download requests for software upgrade on the user terminal side. The embodiment of the present invention uses the above scheme to obtain the local version number of the locally running target software and the version configuration information in the server corresponding to the target software after the software update and upgrade thread is started. The version configuration information includes the latest version number of the target software and at least one intermediate version number. When the local version number is lower than the latest version number, it is determined that the target software needs to be updated, and then the corresponding software update package is downloaded according to the local version number and the intermediate version number, as well as the multi-level update strategy, to perform the software update. Based on the scheme of the present invention, from the perspective of the software version iteration process, the update version level of the target software is determined according to the version of the user's target software, the update version level is determined, and the corresponding software update package is downloaded through the multi-level update strategy to perform the target software update and upgrade, thereby controlling the size of the downloaded update package, reducing the software update time, and reducing the traffic loss of the software update.
[0118] Further, such as Figure 5 As shown, after the software update thread on the terminal side is started, the step of obtaining the version configuration information of the currently running target software may include:
[0119] Step A101, after detecting that a new version update package has been uploaded, detecting whether the number of version updates has reached a preset threshold;
[0120] Step A102: if the number of version updates reaches the version update number threshold, the current updated version is set as an intermediate version, an update package of the corresponding intermediate version is generated, and the corresponding version information is written into the version configuration information.
[0121] When the terminal device is a server, the software maintenance personnel can pre-set the intermediate version setting threshold in the server. Assuming that the intermediate version is changed or modified every k versions, when the system detects that a new version has been uploaded, the cumulative number M in the counter will be accumulated once. When the cumulative number M is not higher than the threshold K, there is no need to set the intermediate version. Otherwise, the Kth version will be set as the intermediate version, and the version information and the corresponding version number of the new intermediate version will be written in the version configuration file;
[0122] By setting the intermediate version, the entire version iteration process can be divided into multiple update version levels. The user can determine the update version level to which the local version belongs by comparing the local version number with the intermediate version number, and download the corresponding update package according to the update version level to perform software upgrades.
[0123] For example, when the threshold K=7, that is, starting from version V1, there is no need to set the intermediate version for V1-V7. When version V8 is detected, V7 is set as the intermediate version; wherein, V7 includes all the updated content of versions V1-V7, while the latest version Vn does not need to include the updated content of versions V1-V7; when the latest version Vn is in the range of V7 to V14, the intermediate version is V7. If the user uses a version less than V7, it is necessary to download the update package of the intermediate version V7 and the update package of Vn for updating and upgrading. Conversely, when the user uses a version greater than or equal to V7 and less than Vn, it is only necessary to download the update package of Vn; and the update package of the latest version Vn only includes the files that need to be modified or added from version V7 to Vn, and does not need or optionally include the files modified or added previously such as the V7 version, thereby effectively controlling the size of the update package;
[0124] Further, such as Figure 6 As shown, in the above step A102, if the number of version updates reaches the version update number threshold, setting the current update version as an intermediate version, generating an update package of the corresponding intermediate version, and writing the corresponding version information into the version configuration information, the following steps may be included:
[0125] Step A103, when detecting the generation of a new intermediate version, detecting whether the number of the intermediate versions reaches a preset reasonable required number;
[0126] When setting the intermediate version threshold, the software maintenance personnel also need to set the reasonable number of intermediate versions required. After detecting the generation of an intermediate version, it is necessary to determine whether the number of intermediate versions exceeds the reasonable number of requirements. If it exceeds the reasonable number of requirements, it is determined whether the intermediate version needs to be deleted based on the number of intermediate versions and the preset reasonable number of requirements. Avoid generating too many intermediate versions, which will cause the software update thread to perform too many upgrades and updates, occupy a large amount of memory, and affect the user experience.
[0127] For example, when the number of intermediate versions M=1, if the target software version is updated to V15, V14 can be set as the intermediate version, and the updated content in the intermediate version V7 is merged into the intermediate version V14, and then the intermediate version V7 is deleted.
[0128] When the number of existing intermediate versions M=2, if the target software version is updated to V15, V14 can be set as the second intermediate version, and the intermediate version V7 can be retained as the first intermediate version.
[0129] Step A104, determining whether the number of intermediate versions is not higher than the reasonable required number;
[0130] Step A105: When the number of intermediate versions is not greater than the reasonable required number, retain the update packages corresponding to all intermediate versions and the version information in the version configuration information;
[0131] Step A106: When the number of the intermediate versions is greater than the reasonable required number, the first intermediate version and the second intermediate version are merged into the second intermediate version, and the version information of the first intermediate version in the version configuration information is deleted.
[0132] When the number of intermediate versions is not higher than the reasonable required number, the update packages corresponding to all intermediate versions and the version information in the version configuration information are retained, and a new intermediate version update package and a corresponding version number are generated, and the version number is written into the version configuration file as the latest intermediate version number;
[0133] When the number of the intermediate versions is higher than the reasonable required number, in some embodiments, the first intermediate version and the second intermediate version are merged into the second intermediate version, and the version information of the first intermediate version in the version configuration file is deleted.
[0134] For example, if the target software version is updated to V22, V21 can be set as the intermediate version, and the updated content in the intermediate version V10 is merged into the intermediate version V20, and then the intermediate version V10 is deleted.
[0135] In some other embodiments, when it is detected that the number of intermediate versions is higher than the reasonable required number, the update packages of two adjacent intermediate versions are compared in size, and the two with the largest difference are selected for merging, that is, the update content of the lower intermediate version is merged into the update package of the higher intermediate version, and the version number of the lower intermediate version and other version configuration information about the lower intermediate version in the version configuration file are deleted.
[0136] In the embodiment of the present invention, the more intermediate versions there are, the more applicable users there are. However, the number of intermediate versions will also increase the complexity of updating the target software. Therefore, the number of intermediate versions must be set within a reasonable range.
[0137] In some other embodiments, the software updater may set an intermediate version by presetting an update package size threshold. The specific implementation method is as follows:
[0138] The system automatically detects whether the size of the existing latest version update package exceeds a preset threshold. If it exceeds the preset threshold, after detecting that the next version update package is uploaded, the existing latest version is set as the intermediate version.
[0139] For example, when the software is updated from V1 to V7, it is found that the size of the update package of version V7 exceeds the preset threshold. Then after version V8 is uploaded, version V7 is set as the intermediate version. At this time, the update package of the intermediate version V7 contains the upgrade content of all versions V1 to V7. Users who use version V7 and software higher than V7 only need to download the version upgrade content between V8 and the latest version Vn when updating. By comparing the update package sizes between versions, it can avoid high-version users downloading large files that have been updated.
[0140] In other cases, when the target software is released to version V7, the V5 update package containing files that have been updated, modified or added from V1 to V2, V2 to V3, V3 to V4, and V4 to V5 is large and exceeds the specified threshold, then V5 is set as an intermediate version, where the V5 update package contains all the version update content of V1 to V5, and the V7 update package only needs to contain the smaller files that need to be updated between versions V6 and V7. When users of versions higher than V5 perform software upgrades, they only need to download the smaller V7 update package, thereby effectively controlling the size of the update package, reducing the size of the download update package for users using versions V5 or V6 to upgrade to V7, reducing download time, and saving download traffic.
[0141] In some other embodiments, the generation method of the intermediate version may be a combination of the above two methods, specifically including:
[0142] The software updater presets a larger update package size threshold and a version update number threshold;
[0143] When it is detected that a certain version update package exceeds the update package size threshold, a corresponding intermediate version is generated, and the version update count accumulator M is cleared to 0;
[0144] When the version count reaches the preset threshold, the corresponding intermediate version is generated, and the version update count accumulator M is cleared to 0;
[0145] Similarly, a reasonable number of intermediate versions also needs to be set. When the number of intermediate versions exceeds the reasonable number, the intermediate versions can be deleted and merged according to the setting method of the intermediate versions in step A105 above.
[0146] For example, when the update count threshold K=7, the size of any update package from version V1 to version V12 does not exceed the specified threshold. When the V13 update is released externally, it is found that the size of the V13 update package exceeds the specified threshold. Then, after the V14 version is uploaded, the V13 version is set as the intermediate version, and the V14 version does not set the intermediate version. Similarly, the software updater can also limit the number of intermediate versions by setting a reasonable number of intermediate versions. If the number of intermediate versions M=1, the V13 update package needs to include the file contents that need to be modified or added for the 12 versions V1-12 to be updated to the V13 version. After the V13 intermediate version is generated, the relevant configuration information of the intermediate version V7 needs to be deleted, and the update content of the intermediate version V7 needs to be merged into the V13 version.
[0147] If the reasonable number of intermediate versions M=2, then the V7 intermediate version is retained, and the V13 update package only needs to contain the content required for the V7-12 version to be updated to V13; if the update package size from version V14 to V20 does not exceed the specified threshold, then after the release of version V21, the V20 version will be set as the intermediate version. However, if it exceeds the specified reasonable number of existence, the intermediate version V7 can be merged into the intermediate version V13 to generate a new V13 update package, and the version configuration information of the intermediate version V7 in the version configuration file is deleted.
[0148] This way of setting the intermediate version can keep multiple intermediate versions according to the reasonable number of intermediate versions required. This method of generating intermediate versions is more flexible and more effective, and can avoid users with higher versions who need to update from downloading larger update packages to the greatest extent.
[0149] It can be seen from the above method that the software update method, device, equipment and storage medium proposed in the real-time example of the present invention divides the software update version into multiple update version levels by setting the intermediate version. After the software update and upgrade thread is started, the version configuration information of the currently running target software is obtained, and the version configuration information includes the local version number, the latest version number and at least one intermediate version number of the target software. When the local version number is lower than the latest version number, it is determined that the target software needs to be updated, and the corresponding software update package is downloaded according to the local version number and the intermediate version number, as well as the multi-level update strategy, so as to perform software update. By performing software upgrade through the multi-level update strategy, the size of the update package can be effectively controlled, the update download time can be reduced, and the software can be quickly upgraded and updated. Based on the scheme of the present invention, starting from the process of iterating the software version, by setting one or more intermediate versions, the software version is divided into multiple levels, and by distinguishing the user's software version, the size of the software version content that the user needs to update is determined. By introducing a multi-level update strategy for software upgrade, the size of the downloaded update package is controlled, the software update time is reduced, and the traffic loss of the software update is reduced.
[0150] In addition, the embodiment of the present application also provides a software update device, the software update device comprising:
[0151] An information acquisition module, used to acquire the version configuration information of the currently running target software after the software update and upgrade thread is started, wherein the version configuration information includes the local version number, the latest version number, and at least one intermediate version number of the target software;
[0152] A determination module, used to determine that the target software needs to be updated when the local version number is lower than the latest version number;
[0153] The update and upgrade module is used to download the corresponding software update package according to the local version number and the intermediate version number and the multi-level update strategy to perform software update.
[0154] Furthermore, the software updating device further comprises:
[0155] The intermediate version generation module is used to detect that the number of version updates reaches a preset threshold after detecting that a new version update package has been uploaded, set the current update version as the intermediate version, generate the corresponding intermediate version update package, and write the corresponding version information into the version configuration information.
[0156] For the principle and implementation process of implementing software update in this embodiment, please refer to the above embodiments and will not be repeated here.
[0157] In addition, an embodiment of the present application also proposes a terminal device, which includes a memory, a processor, and a software update program stored in the memory and executable on the processor, and the software update program implements the steps of the software update method described above when executed by the processor.
[0158] Since all the technical solutions of all the aforementioned embodiments are adopted when the software update program is executed by the processor, it has at least all the beneficial effects brought by all the technical solutions of all the aforementioned embodiments, which will not be described one by one here.
[0159] In addition, an embodiment of the present application also proposes a computer-readable storage medium, on which a software update program or an update version division program is stored. When the software update program is executed by a processor, the steps of the software update method described above are implemented; when the update version division program is executed by a processor, the steps of the update version division method described above are implemented.
[0160] Since all the technical solutions of all the aforementioned embodiments are adopted when the software update program is executed by the processor, it has at least all the beneficial effects brought by all the technical solutions of all the aforementioned embodiments, which will not be described one by one here.
[0161] Compared with the prior art, the software update method, device, equipment and storage medium proposed in the present invention divide the software update version into multiple update intervals by setting an intermediate version, and a multi-level update strategy. After the software update and upgrade thread is started, the version configuration information of the currently running target software is obtained, and the version configuration information includes the local version number, the latest version number, and at least one intermediate version number of the target software. When the local version number is lower than the latest version number, it is determined that the target software needs to be updated, and the corresponding software update package is downloaded according to the local version number and the intermediate version number, and the multi-level update strategy to perform software update. By upgrading the software through the multi-level update strategy, the size of the update package can be effectively controlled, the update download time can be reduced, and the software can be quickly upgraded and updated. Based on the scheme of the present invention, starting from the process of iterating the software version, by setting one or more intermediate versions, the software version is divided into multiple levels, and the size of the software version content that the user needs to update is determined by distinguishing the user's software version. The software is upgraded by introducing a multi-level update strategy, thereby controlling the size of the downloaded update package, reducing the software update time, and reducing the traffic loss of the software update.
[0162] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0163] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0164] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as above, and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, a controlled terminal, or a network device, etc.) to execute the method of each embodiment of the present application.
[0165] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A software updating method, characterized in that: Applied to a terminal, the software update method comprises: After the software update and upgrade thread is started, the version configuration information of the currently running target software is obtained, the version configuration information includes the local version number of the target software, the latest version number, and at least one intermediate version number, the intermediate version number is included in the version information of the intermediate version, the intermediate version is obtained by detecting whether the version update number of the uploaded new version update package reaches a preset version update number threshold by the server, and setting the current update version to the intermediate version when the version update number is higher than the preset version update number threshold, the version update number is the upload number of the target software detected by the server; When the local version number is lower than the latest version number, determining that the target software needs to be updated; Downloading the corresponding software update package according to the local version number and the intermediate version number and the multi-level update strategy to perform software update, wherein the multi-level update strategy refers to a strategy for performing software update by periodically setting the intermediate version and the cycle counter; The update package of the latest version number includes the content modified or added from the intermediate version update package to the latest version; The setting method of the intermediate version includes: the version update number is higher than the preset version update number threshold trigger and the latest version update package size exceeds the threshold trigger, and the setting process of the intermediate version includes the merging and deleting operations of the intermediate version update package.
2. The software updating method according to claim 1, characterized in that: The step of downloading the corresponding software update package according to the local version number and the intermediate version number and the multi-level update strategy to perform software update includes: When the intermediate version number is one, determining whether the local version number is lower than the intermediate version number; If the local version number is not lower than the intermediate version number, download the latest version update package to perform software update; When there are multiple intermediate version numbers, determining whether the local version number is lower than the latest intermediate version number; If the local version number is not lower than the latest intermediate version number, the latest version update package is downloaded to perform software update.
3. The software updating method according to claim 2, characterized in that: After the step of determining whether the local version number is lower than the intermediate version number when the intermediate version number is one, the method further includes: If the local version number is lower than the intermediate version number, the intermediate version update package is downloaded for updating and upgrading, and then the latest version update package is downloaded to upgrade to the latest version.
4. The updating method according to claim 2, characterized in that: After the step of determining whether the local version number is lower than the latest intermediate version number when there are multiple intermediate version numbers, the method further includes: If the local version number is lower than the latest intermediate version number, the local version number is compared with the remaining intermediate version numbers from low to high to determine the first starting update version number higher than the local version number; Starting from the starting update version number, after downloading the corresponding update package for updating and upgrading, the update packages corresponding to the version numbers higher than the starting update version number are downloaded in sequence for software updating and upgrading until the new version of the target software is updated.
5. A software updating method, characterized in that: The method is applied to a server, and the software update method comprises: Detecting whether the version update count of the uploaded new version update package reaches a preset version update count threshold, where the version update count is the number of uploads of the target software detected by the server; If the version update count is higher than the preset version update count threshold, the current updated version is set as an intermediate version, and the version information of the intermediate version is written into the version configuration information, wherein the version information of the intermediate version includes the intermediate version number; After the software update and upgrade thread on the terminal side is started, the version configuration information of the currently running target software is obtained, wherein the version configuration information includes the local version number, the latest version number, and at least one intermediate version number of the target software; The version configuration information is sent to the terminal so that the terminal can determine that the target software needs to be updated when the local version number is lower than the latest version number; a corresponding software update package download request is triggered according to the local version number and the intermediate version number, and a multi-level update strategy, wherein the multi-level update strategy refers to a strategy for performing software updates by periodically setting intermediate versions and loop counters, wherein the intermediate version is set in the following manner: the version update number is higher than the preset version update number threshold trigger and the latest version update package size exceeds the threshold trigger, wherein the intermediate version setting process includes merging and deleting operations of intermediate version update packages, and the update package of the latest version number includes the content modified or added from the intermediate version update package to the latest version; A software update package download request sent by the terminal is received, and a corresponding software update package is sent to the terminal according to the software update package download request to perform software update.
6. The software updating method according to claim 5, characterized in that: If the version update count is higher than the preset version update count threshold, the current updated version is set as an intermediate version, and the version information of the intermediate version is written into the version configuration information, and the following steps are further performed: When detecting the generation of a new intermediate version, detecting whether the number of the intermediate versions reaches a preset reasonable required number; Determining whether the number of the intermediate versions is not greater than the reasonable required number; When the number of the intermediate versions is not greater than the reasonable required number, retaining the update packages corresponding to all intermediate versions and the version information in the version configuration information; When the number of the intermediate versions is greater than the reasonable required number, the first intermediate version and the second intermediate version are merged into the second intermediate version, and the version information of the first intermediate version in the version configuration information is deleted.
7. The software updating method according to claim 5, characterized in that: After the software update thread on the terminal side is started, before the step of obtaining the version configuration information of the currently running target software, it also includes: Detect whether the size of the latest version update package of the target software exceeds a preset threshold. If the size exceeds the preset threshold, after detecting that the next version update package is uploaded, set the latest version as an intermediate version; or During the process of releasing the latest version of the target software, if it is detected that the size of one or more update packages of lower versions than the latest version exceeds a preset threshold, the detected lower versions are set as intermediate versions.
8. A software updating device, characterized in that: The software updating device comprises: An information acquisition module, used to acquire the version configuration information of the currently running target software after the software update and upgrade thread is started, the version configuration information includes the local version number of the target software, the latest version number, and at least one intermediate version number, the intermediate version number is included in the version information of the intermediate version, the intermediate version is obtained by detecting whether the version update number of the uploaded new version update package reaches a preset version update number threshold by the server, and setting the current update version to the intermediate version when the version update number is higher than the preset version update number threshold, the version update number is the upload number of the target software detected by the server; A determination module, used to determine that the target software needs to be updated when the local version number is lower than the latest version number; An update and upgrade module is used to download the corresponding software update package according to the local version number and the intermediate version number, and a multi-level update strategy to perform software updates. The multi-level update strategy refers to a strategy for performing software updates by periodically setting intermediate versions and loop counters. The update package of the latest version number contains the content modified or added by the intermediate version update package to the latest version. The setting method of the intermediate version includes: the version update number is higher than the preset version update number threshold trigger and the latest version update package size exceeds the threshold trigger. The setting process of the intermediate version includes the merging and deletion operations of the intermediate version update package.
9. A terminal device, characterized in that: The terminal device includes: a memory, a processor, and a software update program stored in the memory and executable on the processor. When the software update program is executed by the processor, it implements the software update method described in any one of claims 1 to 4, or the software update method described in any one of claims 5 to 7.
10. A storage medium, characterized in that: The storage medium stores a software update program, and when the software update program is executed by the processor, the software update method according to any one of claims 1 to 4, or the software update method according to any one of claims 5 to 7 is implemented.
Citation Information
Patent Citations
Incremental updating method and device, storage medium and electronic equipment
CN110262827A