Client software upgrading method and client software upgrading system

By setting up the upgrade queue and waiting queue on the server, calculating priority scores based on the upgrade requirements of the client, and reasonably arranging the order of upgrade requests, the problem of inability to reasonably allocate upgrade bandwidth resources in the existing technology is solved, and the user's upgrade experience and efficiency.

CN119105781APending Publication Date: 2024-12-10中国邮政储蓄银行股份有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411123669.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-15
Publication Date
2024-12-10

AI Technical Summary

Technical Problem

The existing technology cannot reasonably allocate limited upgrade bandwidth resources according to client upgrade needs, resulting in poor user upgrade experience and low upgrade efficiency.

Method used

Set up the upgrade queue and waiting queue on the server. The upgrade queue is first-in, first-out, and the waiting queue is a priority queue. The priority score is calculated based on the average bandwidth of the client, the difference in version number and the number of upgrade rejections, and the order of upgrade requests is reasonably arranged. Client software upgrade is realized through patch file information list.

Benefits of technology

It realizes the rational allocation of upgrade bandwidth resources according to client upgrade needs, improves user upgrade experience and upgrade efficiency, and solves the problem of unreasonable allocation of upgrade bandwidth resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119105781A_ABST
    Figure CN119105781A_ABST
Patent Text Reader

Abstract

The invention provides a client software upgrading method and a client software upgrading system. The method comprises the following steps: sending a patch file information list to a client to which first upgrade request information in an upgrade queue belongs, deleting the first upgrade request information in the upgrade queue from the upgrade queue, and adding the first upgrade request information in a waiting queue to the tail of the upgrade queue, and when the priority score of the first target client is greater than the priority score of the second target client, deleting the last upgrade request information in the waiting queue from the waiting queue, and adding the upgrade request information of the first target client into the waiting queue. The method solves the problem that in the prior art, limited upgrading bandwidth resources cannot be reasonably distributed according to upgrading requirements of the client.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of client software upgrade, and in particular to a client software upgrade method and a client software upgrade system. Background Art

[0002] With the continuous development of the software industry, the size of software continues to increase, and software versions are frequently iterated and updated. Given the limited network bandwidth resources and the limited number of client requests that the server can respond to at the same time, how to reasonably allocate limited upgrade bandwidth resources according to client upgrade requirements to improve user upgrade experience, and how to reduce the traffic occupied by software upgrades to improve upgrade efficiency have become urgent issues to be solved.

[0003] Currently, there is no solution to the above problem. Summary of the invention

[0004] The main purpose of the present application is to provide a client software upgrade method and a client software upgrade system, so as to at least solve the problem in the prior art that limited upgrade bandwidth resources cannot be reasonably allocated according to client upgrade requirements.

[0005] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a client software upgrade method is provided, wherein an upgrade queue and a waiting queue are set in the server, the upgrade queue is a first-in-first-out queue, and the waiting queue is a priority queue, the upgrade queue and the priority queue are used to store the client's upgrade request information, the upgrade request information is used to represent the request to upgrade the client's software, the server is respectively connected to each of the clients for communication, and the method is applied to the server, the method comprising: sending a patch file information list to the client to which the first upgrade request information in the upgrade queue belongs, and deleting the first upgrade request information in the upgrade queue from the upgrade queue, and adding the first upgrade request information in the waiting queue to the end of the upgrade queue, and when the priority score of the first target client is greater than the priority score of the second target client, deleting the last upgrade request information in the waiting queue from the waiting queue, and adding the first The upgrade request information of a target client is added to the waiting queue, and the upgrade request information includes: average bandwidth, version number difference, and number of upgrade rejections. The average bandwidth is the average value of the bandwidth occupied by the client in multiple upgrade processes within a historical time period, the version number difference is the difference between the latest version number of the client's software and the current version number of the client's software, and the number of upgrade rejections is the number of times the client is rejected for upgrading within the historical time period. The first target client is the client whose upgrade request information is not located in the upgrade queue and is not located in the waiting queue. The second target client is the client whose upgrade request information is located in the waiting queue and has the smallest priority score. The priority score represents the priority of the client's software upgrade. The priority score is determined based on the upgrade request information of the client. The higher the priority score, the higher the priority of the client's software upgrade. The patch file information list at least includes: the download address of the patch file.

[0006] Optionally, before sending a patch file information list to the client to which the first upgrade request information in the upgrade queue belongs, deleting the first upgrade request information in the upgrade queue from the upgrade queue, and adding the first upgrade request information in the waiting queue to the end of the upgrade queue, and when the priority score of the first target client is greater than the priority score of the second target client, deleting the last upgrade request information in the waiting queue from the waiting queue, and adding the upgrade request information of the first target client to the waiting queue, the method also includes: when the upgrade request information of S clients is received, adding the upgrade request information of the first N clients to the upgrade queue and adding the upgrade request information of the last M clients to the waiting queue in the order of receipt, the order of receipt being the time order of receiving the upgrade request information of the S clients, S=N+M, S, N and M are all positive integers.

[0007] Optionally, before deleting the last upgrade request information in the waiting queue from the waiting queue and adding the upgrade request information of the first target client to the waiting queue, the method further includes: determining the normalized average bandwidth of the first target client according to the average bandwidth of the first target client and Bi'=(Bi-Bmin) / (Bmax-Bmin), wherein Bi' is the normalized average bandwidth of the first target client, Bi is the average bandwidth of the first target client, Bmin is the minimum value of the average bandwidth, and Bmax is the maximum value of the average bandwidth of the first target client; determining the normalized version number difference of the first target client according to the version number difference ΔVi'=(ΔVi-ΔVmin) / (ΔVmax-ΔVmin) of the first target client, wherein ΔVi' is the normalized version number difference of the first target client. value, ΔVi is the version number difference of the first target client, ΔVmin is the minimum value of the version number difference, and ΔVmax is the maximum value of the version number difference of the first target client; according to the upgrade rejection number Ni'=(Ni-Nmin) / (Nmax-Nmin) of the first target client, determine the normalized upgrade rejection number of the first target client, wherein ΔVi' is the normalized upgrade rejection number of the first target client, ΔVi is the upgrade rejection number of the first target client, ΔVmin is the minimum value of the upgrade rejection number, and ΔVmax is the maximum value of the upgrade rejection number of the first target client; perform weighted summation on the normalized average bandwidth of the first target client, the normalized version number difference of the first target client, and the normalized upgrade rejection number of the first target client to obtain the priority score of the first target client.

[0008] Optionally, performing weighted summation on the normalized average bandwidth of the first target client, the normalized version number difference of the first target client, and the normalized number of upgrade rejections of the first target client to obtain the priority score of the first target client includes: determining the priority score of the first target client according to the normalized average bandwidth of the first target client, the normalized version number difference of the first target client, the normalized number of upgrade rejections of the first target client, and Scorei=a×Bi'+b×ΔVi'+c×Ni', wherein Scorei is the priority score of the first target client, Bi' is the normalized average bandwidth of the first target client, ΔVi' is the normalized version number difference of the first target client, Ni' is the normalized number of upgrade rejections of the first target client, a is a first predetermined weight coefficient, b is a second predetermined weight coefficient, c is a third predetermined weight coefficient, a>0, b>0, c>0, and a+b+c=1.

[0009] Optionally, adding the upgrade request information of the first target client to the waiting queue includes: inserting the upgrade request information of the first target client into the waiting queue in descending order of the priority scores.

[0010] Optionally, the method includes: when the priority score of the first target client is less than or equal to the priority score of the second target client, sending upgrade rejection information to the first target client, the upgrade rejection information is used to indicate a rejection of upgrading the client's software.

[0011] According to another aspect of the present application, a client software upgrade method is provided, in which a client is communicatively connected to a server, and the method is applied to the client, and the method includes: receiving a patch file list sent by the server, the patch file list including at least: a download address of the patch file; downloading the patch file according to the download address of the patch file; and upgrading the software of the client using at least the patch file.

[0012] Optionally, the patch file information list also includes: a patch file verification code, at least using the patch file to upgrade the client's software, including: a first processing step, using a hash algorithm to process the patch file to obtain a first target verification code; a downloading step, when the first target verification code is different from the patch file verification code, re-downloading the patch file according to the download address of the patch file; a first repetition step, repeating the first processing step and the downloading step until the first target verification code is the same as the patch file verification code or the first repetition number is equal to P, the first repetition number is the number of times the first processing step and the downloading step are repeated, and P is a positive integer; a first upgrading step, when the first target verification code is the same as the patch file verification code, merging the patch file with the client's software file to obtain a new version of the software file, and at least using the new version of the software file to upgrade the client's software.

[0013] Optionally, the patch file information list also includes: a software file verification code, at least using the new version of the software file to upgrade the client's software, including: a second processing step, using a hash algorithm to process the new version of the software file to obtain a second target verification code; a merging step, when the second target verification code is different from the software file verification code, re-merging the patch file with the client's software file to obtain the new version of the software file; a second repetition step, repeating the second processing step and the merging step until the second target verification code is the same as the software file verification code or the second repetition number is equal to Q, the second repetition number is the number of times the second processing step and the merging step are repeated, and Q is a positive integer; a second upgrading step, when the second target verification code is the same as the software file verification code, storing the new version of the software file to a target storage location, and deleting the client's software file from the target storage location, the target storage location being the storage location where the client's software file is stored.

[0014] According to another aspect of the present application, a client software upgrade system is provided, the system comprising: a plurality of the clients, the clients being used to execute any one of the client software upgrade methods; and a server, the server being communicatively connected to each of the clients, the server being used to execute any one of the client software upgrade methods.

[0015] By applying the technical solution of the present application, an upgrade queue and a waiting queue are set on the server side. The server side sends a patch file information list to the client for upgrading according to the order of the upgrade request information in the upgrade queue. If the server side has completed sending the patch file information list to the client to which the first upgrade request information in the upgrade queue belongs, the server side deletes the first upgrade request information in the upgrade queue from the upgrade queue, and adds the upgrade request information of the first client in the waiting queue to the end of the upgrade queue. If the priority score of the new client is higher than the priority score of the last client in the waiting queue, that is, if the priority score of the first target client is higher than the priority score of the second target client, the server side deletes the upgrade request information of the second target client from the waiting queue, and adds the upgrade request information of the first target client to the waiting queue, wherein the priority score is determined based on the upgrade request information of the client, and the upgrade request information includes data reflecting the client upgrade requirements such as average bandwidth, version number difference, and upgrade rejection times, thereby realizing reasonable allocation of limited upgrade bandwidth resources according to the client upgrade requirements, improving the user upgrade experience, and thus solving the problem that limited upgrade bandwidth resources cannot be reasonably allocated according to the client upgrade requirements in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A schematic diagram of a process of upgrading a client software running on a server provided in an embodiment of the present application is shown;

[0017] Figure 2 A schematic diagram of a process of another client software upgrade method running on a server provided in an embodiment of the present application is shown;

[0018] Figure 3 A schematic diagram of a process of upgrading a client software running on a client provided in an embodiment of the present application is shown;

[0019] Figure 4 A schematic flow chart of another client software upgrade method running on a client provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0020] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

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

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

[0023] For the convenience of description, some nouns or terms involved in the embodiments of the present application are explained below:

[0024] First-In-First-Out Queue: is a data structure in which the element that enters the queue first is also the first to be removed, which means the order of elements in the queue is the same as the order in which they entered the queue.

[0025] Priority queue: is a data structure in which elements are inserted and removed according to their priority. Elements with higher priority are processed first in the queue. Priority queues can be implemented using various data structures, such as a heap or a binary search tree.

[0026] Patch file: A file generated based on the difference between the new and old versions of software files.

[0027] Software files: are files stored on computers or mobile devices used to install, run, and manage software programs. These files include installers, executable files, library files, configuration files, data files, etc.

[0028] As introduced in the background technology, the existing technology is unable to reasonably allocate limited upgrade bandwidth resources according to the client upgrade requirements. In order to solve the problem that the existing technology is unable to reasonably allocate limited upgrade bandwidth resources according to the client upgrade requirements, the embodiments of the present application provide a client software upgrade method and a client software upgrade system.

[0029] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0030] In this embodiment, a client software upgrade system is provided, and the system includes:

[0031] A plurality of the above-mentioned clients, wherein the above-mentioned clients are used to execute the above-mentioned client software upgrade method;

[0032] The server is connected to each of the clients for communication, and is used to execute the client software upgrade method.

[0033] In this embodiment, a client software upgrade method running on a server is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0034] Figure 1 Flowchart of the client software upgrade method according to the embodiment of the present application. Figure 1 As shown, the method comprises the following steps:

[0035] Step S101, sending a patch file information list to the client to which the first upgrade request information in the upgrade queue belongs, deleting the first upgrade request information in the upgrade queue from the upgrade queue, adding the first upgrade request information in the waiting queue to the end of the upgrade queue, and in the case where the priority score of the first target client is greater than the priority score of the second target client, deleting the last upgrade request information in the waiting queue from the waiting queue, and adding the upgrade request information of the first target client to the waiting queue;

[0036] Among them, the above-mentioned upgrade request information includes: average bandwidth, version number difference, and number of upgrade rejections. The above-mentioned average bandwidth is the average value of the bandwidth occupied by the above-mentioned client during multiple upgrade processes within the historical time period. The above-mentioned version number difference is the difference between the latest version number of the above-mentioned client's software and the current version number of the above-mentioned client's software. The above-mentioned number of upgrade rejections is the number of times the above-mentioned client was rejected for upgrading within the above-mentioned historical time period. The above-mentioned first target client is the above-mentioned client whose upgrade request information is not located in the above-mentioned upgrade queue and is not located in the above-mentioned waiting queue. The above-mentioned second target client is the above-mentioned client whose upgrade request information is located in the above-mentioned waiting queue and whose above-mentioned priority score is the smallest. The above-mentioned priority score represents the priority of the upgrade of the above-mentioned client's software. The above-mentioned priority score is determined based on the above-mentioned upgrade request information of the above-mentioned client. The higher the above-mentioned priority score, the higher the priority of the above-mentioned client's software upgrade. The above-mentioned patch file information list at least includes: the download address of the patch file.

[0037] Specifically, an upgrade queue and a waiting queue are provided in the server. The upgrade queue is a first-in-first-out queue, and the waiting queue is a priority queue. The upgrade queue and the priority queue are used to store the upgrade request information of the client. The upgrade request information is used to represent the request to upgrade the software of the client. The server is respectively connected to each of the clients for communication.

[0038] Specifically, the version number of the software is in numerical form.

[0039] Specifically, if the priority score of the first target client is higher than the smallest priority score in the waiting queue, the server rejects the upgrade request of the client with the smallest priority score in the waiting queue, that is, deletes the upgrade request information of this client from the waiting queue, and adds the upgrade request information of the first target client to the waiting queue, so that the client with higher priority has higher priority in upgrading.

[0040] In an optional solution, before the above step S101, the above method further includes:

[0041] When the upgrade request information from S clients is received, the upgrade request information from the first N clients is added to the upgrade queue, and the upgrade request information from the last M clients is added to the waiting queue in the order of reception. The order of reception is the time order in which the upgrade request information from the S clients is received, S=N+M, and S, N and M are all positive integers.

[0042] Specifically, the values ​​of N and M are determined according to the actual network bandwidth resources and the response capability of the server, and the upgrade request information of the first N clients is added to the upgrade queue in the order of receipt, and the upgrade request information of the last M clients is added to the waiting queue.

[0043] In an optional solution, after the above step S101, the above method further includes:

[0044] When the priority score of the first target client is less than or equal to the priority score of the second target client, an upgrade rejection message is sent to the first target client, where the upgrade rejection message is used to indicate that the software of the client is rejected for upgrading.

[0045] Specifically, if the priority score of the first target client is less than or equal to the minimum priority score in the waiting queue, the server rejects the upgrade request of the first target client, that is, sends a rejection upgrade message to the first target client, so that clients with higher priorities are upgraded first.

[0046] In an optional solution, before deleting the last upgrade request information in the waiting queue from the waiting queue and adding the upgrade request information of the first target client to the waiting queue in step S101, the method further includes:

[0047] According to the average bandwidth of the first target client and Bi'=(Bi-Bmin) / (Bmax-Bmin), determine the normalized average bandwidth of the first target client, wherein Bi' is the normalized average bandwidth of the first target client, Bi is the average bandwidth of the first target client, Bmin is the minimum value of the average bandwidth, and Bmax is the maximum value of the average bandwidth of the first target client;

[0048] Specifically, the minimum value of the average bandwidth and the maximum value of the average bandwidth may be determined by the average bandwidth of a large number of clients, or may be set by the user based on experience.

[0049] According to the version number difference ΔVi' of the first target client = (ΔVi-ΔVmin) / (ΔVmax-ΔVmin), determine the normalized version number difference of the first target client, wherein ΔVi' is the normalized version number difference of the first target client, ΔVi is the version number difference of the first target client, ΔVmin is the minimum value of the version number difference, and ΔVmax is the maximum value of the version number difference of the first target client;

[0050] Specifically, the minimum value of the version number difference and the maximum value of the version number difference can be determined by the version number differences of a large number of clients, or can be set by the user based on experience.

[0051] According to the upgrade rejection number Ni'+(Ni-Nmin) / (Nmax-Nmin) of the first target client, determine the normalized upgrade rejection number of the first target client, wherein ΔVi' is the normalized upgrade rejection number of the first target client, ΔVi is the upgrade rejection number of the first target client, ΔVmin is the minimum value of the upgrade rejection number, and ΔVmax is the maximum value of the upgrade rejection number of the first target client;

[0052] Specifically, the minimum value of the upgrade rejection times and the maximum value of the upgrade rejection times can be determined by the upgrade rejection times of a large number of clients, or can be set by the user based on experience.

[0053] The priority score of the first target client is obtained by performing a weighted summation on the normalized average bandwidth of the first target client, the normalized version number difference of the first target client, and the normalized upgrade rejection count of the first target client.

[0054] Specifically, the method for determining the priority scores of other clients is similar.

[0055] In an optional solution, the weighted sum of the normalized average bandwidth of the first target client, the normalized version number difference of the first target client, and the normalized upgrade rejection times of the first target client is performed to obtain the priority score of the first target client, which can be implemented as follows:

[0056] The priority score of the first target client is determined according to the normalized average bandwidth of the first target client, the normalized version number difference of the first target client, the normalized upgrade rejection times of the first target client and Scorei=a×Bi'+b×ΔVi'+c×Ni', wherein Scorei is the priority score of the first target client, Bi' is the normalized average bandwidth of the first target client, ΔVi' is the normalized version number difference of the first target client, Ni' is the normalized upgrade rejection times of the first target client, a is a first predetermined weight coefficient, b is a second predetermined weight coefficient, c is a third predetermined weight coefficient, a>0, b>0, c>0, a+b+c=1.

[0057] Specifically, when setting the first predetermined weight coefficient, the second predetermined weight coefficient and the third predetermined weight coefficient, they can be flexibly adjusted according to actual conditions. For example, in order to allow clients with old versions to upgrade first as much as possible, the second predetermined weight coefficient b can be increased, such as taking a=0.2, b=0.6, c=0.2. If you want to give priority to upgrading clients with a large number of rejections (such clients have been waiting for a long time), you can increase the third predetermined weight coefficient c, such as taking a=0.25, b=0.25, c=0.5.

[0058] In an optional solution, adding the upgrade request information of the first target client to the waiting queue may be implemented as follows:

[0059] The upgrade request information of the first target client is inserted into the waiting queue in descending order of the priority scores.

[0060] Specifically, if the priority score of the first target client is higher than the smallest priority score in the waiting queue, the server rejects the upgrade request of the client with the smallest priority score in the waiting queue, that is, deletes the upgrade request information of this client from the waiting queue, and inserts the upgrade request information of the first target client into the waiting queue in descending order of priority scores, so that the client with a higher priority has higher priority to be upgraded, so as to further realize the reasonable allocation of limited upgrade bandwidth resources according to the client upgrade requirements.

[0061] Through the above embodiment, an upgrade queue and a waiting queue are set at the server end. The server end performs an upgrade to the client in the order of the upgrade request information in the upgrade queue. The client sends a patch file information list. If the server end sends the patch file information list to the client to which the first upgrade request information in the upgrade queue belongs, the server end deletes the first upgrade request information in the upgrade queue from the upgrade queue, and adds the upgrade request information of the first client in the waiting queue to the end of the upgrade queue. If the priority score of the new client is higher than the priority score of the last client in the waiting queue, that is, if the priority score of the first target client is higher than the priority score of the second target client, the server end deletes the upgrade request information of the second target client from the waiting queue, and adds the upgrade request information of the first target client to the waiting queue, wherein the priority score is determined based on the upgrade request information of the client, and the upgrade request information includes data reflecting the client upgrade requirements such as average bandwidth, version number difference, and upgrade rejection times, thereby realizing reasonable allocation of limited upgrade bandwidth resources according to the client upgrade requirements, improving the user upgrade experience, and solving the problem that limited upgrade bandwidth resources cannot be reasonably allocated according to the client upgrade requirements in the prior art.

[0062] In order to enable those skilled in the art to more clearly understand the technical solution of the present application, the implementation process of the client software upgrade method of the present application will be described in detail below in conjunction with specific embodiments.

[0063] This embodiment relates to a specific client software upgrade method, such as Figure 2 As shown, the following steps are included:

[0064] Step S1: Determine the priority score (Score_i) of the first target client;

[0065] Step S2: when the priority score (Score_i) of the first target client is greater than the priority score (Score_min) of the second target client, the last upgrade request information in the waiting queue is deleted from the waiting queue, and the upgrade request information of the first target client is inserted into the waiting queue in descending order of the priority scores;

[0066] The first target client is the client whose upgrade request information is not in the upgrade queue and is not in the waiting queue, the second target client is the client whose upgrade request information is in the waiting queue and whose priority score is the smallest, the priority score represents the priority of the software upgrade of the client, the priority score is determined based on the upgrade request information of the client, the higher the priority score is, the higher the priority of the software upgrade of the client, and the patch file information list at least includes: a download address of the patch file;

[0067] Step S3: When the priority score of the first target client is less than or equal to the priority score of the second target client, sending an upgrade rejection message to the first target client;

[0068] The above-mentioned upgrade rejection information is used to indicate the rejection of upgrading the software of the above-mentioned client.

[0069] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0070] In this embodiment, a client software upgrade method running on a client is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0071] Figure 3 Flowchart of the client software upgrade method according to the embodiment of the present application. Figure 3 As shown, the method comprises the following steps:

[0072] Step S201, receiving the patch file list sent by the server;

[0073] The patch file list at least includes: a download address of the patch file;

[0074] Step S202, downloading the patch file according to the download address of the patch file;

[0075] Step S203: using at least the patch file to upgrade the software of the client.

[0076] Specifically, the client is connected to the server for communication.

[0077] Through the above embodiment, the client only needs to download a relatively small patch file and use the downloaded patch file to complete the client software upgrade, which reduces the traffic occupied by the software upgrade and improves the upgrade efficiency, thereby solving the problem of large traffic occupied by the software upgrade in the prior art.

[0078] In an optional solution, the patch file information list further includes: a patch file verification code, and the step S203 can be implemented as follows:

[0079] Step S2031, a first processing step, using a hash algorithm to process the patch file to obtain a first target check code;

[0080] Specifically, the patch file verification code is obtained by processing the patch file on the server side using a hash algorithm.

[0081] Specifically, the check code is obtained by using a cyclic redundancy check algorithm, a checksum algorithm, a message authentication code algorithm, etc.

[0082] Step S2032, a downloading step, in which, when the first target verification code is different from the patch file verification code, the patch file is re-downloaded according to the download address of the patch file;

[0083] Specifically, when the first target verification code is different from the patch file verification code in the patch file information list, it indicates that the downloaded patch file is incomplete. At this time, the patch file is downloaded again according to the download address of the patch file.

[0084] Step S2033, a first repetition step, repeating the first processing step and the downloading step until the first target verification code is the same as the patch file verification code or the first repetition number is equal to P, where the first repetition number is the number of times the first processing step and the downloading step are repeated, and P is a positive integer;

[0085] Step S2034, the first upgrade step, when the first target verification code is the same as the patch file verification code, merge the patch file with the client's software file to obtain a new version of the software file, and use at least the new version of the software file to upgrade the client's software.

[0086] Specifically, the first repetition number is equal to P. At this time, if the first target verification code is still different from the patch file verification code, the current upgrade is terminated, waiting for the next trigger, and an error prompt message is generated, and the error prompt message is used to indicate that the upgrade has failed.

[0087] Specifically, during one upgrade process of the client software, multiple patch files may need to be downloaded, and the upgrade will continue only when each patch file is verified successfully.

[0088] In an optional solution, the patch file information list further includes: a software file verification code, and the step S2034 can be implemented as follows:

[0089] The second processing step is to process the new version of the software file using a hash algorithm to obtain a second target verification code;

[0090] Specifically, the software file verification code is obtained by processing the new version of the software file on the server side using a hash algorithm.

[0091] Specifically, the check code is obtained by using a cyclic redundancy check algorithm, a checksum algorithm, a message authentication code algorithm, etc.

[0092] a merging step, in which, when the second target verification code is different from the verification code of the software file, the patch file is re-merged with the software file of the client to obtain the new version of the software file;

[0093] Specifically, when the second target verification code is different from the software file verification code in the patch file information list, it indicates that the new version of the software file is incomplete. At this time, the patch file is re-merged with the client's software file to obtain the new version of the software file.

[0094] a second repetition step, repeating the second processing step and the merging step until the second target verification code is the same as the software file verification code or the second repetition number is equal to Q, where the second repetition number is the number of times the second processing step and the merging step are repeated, and Q is a positive integer;

[0095] The second upgrade step is to store the new version of the software file in a target storage location when the second target verification code is the same as the software file verification code, and delete the client's software file from the target storage location. The target storage location is the storage location for storing the client's software file.

[0096] Specifically, the second repetition number is equal to Q. At this time, if the second target verification code is still different from the software file verification code, the current upgrade is terminated, waiting for the next trigger, and an error prompt message is generated, and the error prompt message is used to indicate that the upgrade failed.

[0097] Specifically, during one upgrade process of the client software, multiple patch files may need to be downloaded, and the upgrade will continue only when the new version of the software file obtained by merging each patch file with the corresponding software file is successfully verified.

[0098] Specifically, the upgrade process uses two-level verification to ensure the integrity of the downloaded patch file and the generated new version of the software file, thereby reducing the probability of errors in the upgrade process.

[0099] In order to enable those skilled in the art to more clearly understand the technical solution of the present application, the implementation process of the client software upgrade method of the present application will be described in detail below in conjunction with specific embodiments.

[0100] This embodiment relates to a specific client software upgrade method, such as Figure 4 As shown, the following steps are included:

[0101] Step S1: receiving a patch file list sent by the server, wherein the patch file list at least includes: a download address of the patch file, a patch file verification code (A2), and a software file verification code (B2);

[0102] Step S2: downloading the patch file according to the download address of the patch file;

[0103] Step S3: a first processing step, using a hash algorithm to process the patch file to obtain a first target check code (A1);

[0104] Step S4: downloading step, when the first target verification code (A1) is different from the patch file verification code (A2), re-downloading the patch file according to the download address of the patch file;

[0105] Step S5: a first repetition step, repeating the first processing step and the downloading step until the first target verification code (A1) is the same as the patch file verification code (A2) or the first repetition number (X) is equal to P, the first repetition number (X) is the number of times the first processing step and the downloading step are repeated, and P is a positive integer;

[0106] Step S6: a first upgrade step, in which, when the first target verification code (A1) is the same as the patch file verification code (A2), the patch file is merged with the client software file to obtain a new version of the software file; in which, when the first target verification code (A1) is different from the patch file verification code (A2), an error prompt message is generated;

[0107] Step S7: a second processing step, using a hash algorithm to process the new version of the software file to obtain a second target verification code (B1);

[0108] Step S8: a merging step, in which, when the second target verification code (B1) is different from the software file verification code (B2), the patch file is re-merged with the client software file to obtain the new version software file;

[0109] Step S9: a second repetition step, repeating the second processing step and the merging step until the second target verification code (B1) is the same as the software file verification code (B2) or the second repetition number (Y) is equal to Q, where the second repetition number (Y) is the number of times the second processing step and the merging step are repeated, and Q is a positive integer;

[0110] Step S10: The second upgrade step. When the second target verification code (B1) is the same as the software file verification code (B2), the new version of the software file is stored in the target storage location, and the software file of the client is deleted from the target storage location. The target storage location is the storage location for storing the software file of the client. When the second target verification code (B1) is different from the software file verification code (B2), an error prompt message is generated.

[0111] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0112] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device 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, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0113] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:

[0114] 1) In the client software upgrade method running on the server of the present application, an upgrade queue and a waiting queue are set on the server. The server upgrades the client in the order of the upgrade request information in the upgrade queue. The client sends a patch file information list. If the server sends the patch file information list to the client to which the first upgrade request information in the upgrade queue belongs, the server deletes the first upgrade request information in the upgrade queue from the upgrade queue, and adds the upgrade request information of the first client in the waiting queue to the end of the upgrade queue. If the priority score of the new client is higher than the priority score of the last client in the waiting queue, that is, if the priority score of the first target client is higher than the priority score of the second target client, the server deletes the upgrade request information of the second target client from the waiting queue, and adds the upgrade request information of the first target client to the waiting queue, wherein the priority score is determined based on the upgrade request information of the client, and the upgrade request information includes data reflecting the client upgrade requirements such as average bandwidth, version number difference, and upgrade rejection times, thereby realizing reasonable allocation of limited upgrade bandwidth resources according to the client upgrade requirements, improving the user upgrade experience, and solving the problem that limited upgrade bandwidth resources cannot be reasonably allocated according to the client upgrade requirements in the prior art.

[0115] 2) In the client software upgrade method running on the client of the present application, the client only needs to download a small patch file and use the downloaded patch file to complete the client software upgrade, which reduces the traffic occupied by the software upgrade and improves the upgrade efficiency, thereby solving the problem of large traffic occupied by software upgrade in the prior art.

[0116] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for upgrading client software, characterized in that: The server is provided with an upgrade queue and a waiting queue, the upgrade queue is a first-in-first-out queue, the waiting queue is a priority queue, the upgrade queue and the priority queue are used to store the upgrade request information of the client, the upgrade request information is used to represent the request to upgrade the software of the client, the server is respectively connected with each of the clients, the method is applied to the server, and the method includes: Send a patch file information list to the client to which the first upgrade request information in the upgrade queue belongs, delete the first upgrade request information in the upgrade queue from the upgrade queue, add the first upgrade request information in the waiting queue to the end of the upgrade queue, and if the priority score of the first target client is greater than the priority score of the second target client, delete the last upgrade request information in the waiting queue from the waiting queue, and add the upgrade request information of the first target client to the waiting queue, the upgrade request information includes: average bandwidth, version number difference, and upgrade rejection times, the average bandwidth is the average bandwidth occupied by the client in multiple upgrade processes in a historical time period value, the version number difference is the difference between the latest version number of the client's software and the current version number of the client's software, the number of upgrade rejections is the number of times the client has been rejected for upgrading within the historical time period, the first target client is the client whose upgrade request information is not located in the upgrade queue and is not located in the waiting queue, the second target client is the client whose upgrade request information is located in the waiting queue and whose priority score is the smallest, the priority score represents the priority of the client's software upgrade, the priority score is determined based on the upgrade request information of the client, the higher the priority score is, the higher the priority of the client's software upgrade is, and the patch file information list includes at least: the download address of the patch file.

2. The method according to claim 1, characterized in that Before sending a patch file information list to the client to which the first upgrade request information in the upgrade queue belongs, deleting the first upgrade request information in the upgrade queue from the upgrade queue, and adding the first upgrade request information in the waiting queue to the end of the upgrade queue, and deleting the last upgrade request information in the waiting queue from the waiting queue and adding the upgrade request information of the first target client to the waiting queue when the priority score of the first target client is greater than the priority score of the second target client, the method further includes: When the upgrade request information of S clients is received, the upgrade request information of the first N clients is added to the upgrade queue, and the upgrade request information of the last M clients is added to the waiting queue in the order of reception. The order of reception is the time order in which the upgrade request information of the S clients is received, S=N+M, and S, N and M are all positive integers.

3. The method according to claim 1, characterized in that: Before deleting the last upgrade request information in the waiting queue from the waiting queue and adding the upgrade request information of the first target client to the waiting queue, the method further includes: Determine the normalized average bandwidth of the first target client according to the average bandwidth of the first target client and Bi'=(Bi-Bmin) / (Bmax-Bmin), wherein Bi' is the normalized average bandwidth of the first target client, Bi is the average bandwidth of the first target client, Bmin is the minimum value of the average bandwidth, and Bmax is the maximum value of the average bandwidth of the first target client; According to the version number difference ΔVi'=(ΔVi-ΔVmin) / (ΔVmax-ΔVmin) of the first target client, a normalized version number difference of the first target client is determined, wherein ΔVi' is the normalized version number difference of the first target client, ΔVi is the version number difference of the first target client, and ΔVmin is the minimum value of the version number difference. ΔVmax is the maximum value of the version number difference of the first target client; According to the upgrade rejection number Ni'=(Ni-Nmin) / (Nmax-Nmin) of the first target client, determine the normalized upgrade rejection number of the first target client, wherein ΔVi' is the normalized upgrade rejection number of the first target client, ΔVi is the upgrade rejection number of the first target client, ΔVmin is the minimum value of the upgrade rejection number, and ΔVmax is the maximum value of the upgrade rejection number of the first target client; The priority score of the first target client is obtained by performing a weighted summation on the normalized average bandwidth of the first target client, the normalized version number difference of the first target client, and the normalized upgrade rejection count of the first target client.

4. The method according to claim 3, characterized in that The priority score of the first target client is obtained by weighted summing the normalized average bandwidth of the first target client, the normalized version number difference of the first target client, and the normalized upgrade rejection count of the first target client, including: The priority score of the first target client is determined according to the normalized average bandwidth of the first target client, the normalized version number difference of the first target client, the normalized number of upgrade rejections of the first target client and Scorei=a×Bi'+b×ΔVi'+c×Ni', wherein Scorei is the priority score of the first target client, Bi' is the normalized average bandwidth of the first target client, ΔVi' is the normalized version number difference of the first target client, Ni' is the normalized number of upgrade rejections of the first target client, a is a first predetermined weight coefficient, b is a second predetermined weight coefficient, c is a third predetermined weight coefficient, a>0, b>0, c>0, a+b+c=1.

5. The method according to claim 1, characterized in that Adding the upgrade request information of the first target client to the waiting queue includes: The upgrade request information of the first target client is inserted into the waiting queue in descending order of the priority scores.

6. The method according to claim 1, characterized in that The method comprises: When the priority score of the first target client is less than or equal to the priority score of the second target client, an upgrade rejection information is sent to the first target client, where the upgrade rejection information is used to indicate a rejection of upgrading the software of the client.

7. A method for upgrading client software, characterized in that: The client is connected to the server for communication, and the method is applied to the client, and the method includes: Receiving a patch file list sent by the server, the patch file list at least including: a download address of the patch file; Download the patch file according to the download address of the patch file; At least the patch file is used to upgrade the software of the client.

8. The method according to claim 7, characterized in that The patch file information list also includes: a patch file verification code, and at least using the patch file to upgrade the software of the client includes: In a first processing step, the patch file is processed using a hash algorithm to obtain a first target check code; A downloading step, re-downloading the patch file according to the download address of the patch file when the first target verification code is different from the patch file verification code; a first repetition step, repeating the first processing step and the downloading step until the first target check code is the same as the patch file check code or a first repetition number is equal to P, where the first repetition number is the number of times the first processing step and the downloading step are repeated, and P is a positive integer; The first upgrade step is to merge the patch file with the client's software file to obtain a new version of the software file when the first target verification code is the same as the patch file verification code, and at least use the new version of the software file to upgrade the client's software.

9. The method according to claim 8, characterized in that The patch file information list also includes: a software file verification code, at least using the new version of the software file to upgrade the software of the client, including: The second processing step is to process the new version of the software file using a hash algorithm to obtain a second target verification code; a merging step, in which, when the second target verification code is different from the verification code of the software file, the patch file is re-merged with the software file of the client to obtain the new version of the software file; a second repetition step, repeating the second processing step and the merging step until the second target verification code is the same as the software file verification code or a second repetition number is equal to Q, where the second repetition number is the number of times the second processing step and the merging step are repeated, and Q is a positive integer; The second upgrade step is to store the new version of the software file in a target storage location and delete the client's software file from the target storage location when the second target verification code is the same as the software file verification code. The target storage location is the storage location for storing the client's software file.

10. A client software upgrade system, characterized in that: The system comprises: A plurality of said clients, wherein said clients are used to execute the client software upgrade method according to any one of claims 7 to 9; A server, the server is respectively connected to each of the clients for communication, and the server is used to execute the client software upgrade method described in any one of claims 1 to 6.