CN113127021A - Application upgrading method and computer equipment - Google Patents

Application upgrading method and computer equipment Download PDF

Info

Publication number
CN113127021A
CN113127021A CN201911404640.8A CN201911404640A CN113127021A CN 113127021 A CN113127021 A CN 113127021A CN 201911404640 A CN201911404640 A CN 201911404640A CN 113127021 A CN113127021 A CN 113127021A
Authority
CN
China
Prior art keywords
bandwidth
downloading
occupied
terminal
download
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911404640.8A
Other languages
Chinese (zh)
Other versions
CN113127021B (en
Inventor
陈贻斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen TCL New Technology Co Ltd
Original Assignee
Shenzhen TCL New Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen TCL New Technology Co Ltd filed Critical Shenzhen TCL New Technology Co Ltd
Priority to CN201911404640.8A priority Critical patent/CN113127021B/en
Priority to PCT/CN2020/111319 priority patent/WO2021135301A1/en
Publication of CN113127021A publication Critical patent/CN113127021A/en
Application granted granted Critical
Publication of CN113127021B publication Critical patent/CN113127021B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application relates to a method for upgrading application and computer equipment, the method determines the time when a download request is responded through bandwidth, when the download request is received, if the occupied bandwidth is less than or equal to a threshold value, the download instruction is responded immediately, if the occupied bandwidth is greater than the threshold value, the download instruction is put into a waiting queue, the bandwidth occupied by downloading an upgrade file and the bandwidth of the download instruction to be processed in the waiting queue are monitored, and the time for responding the download instruction is determined, therefore, the number of terminals for downloading the upgrade file in parallel is limited through the bandwidth, the difference between the bandwidth occupied by downloading the upgrade file and the threshold value at the same time is reduced, and a manufacturer can limit the current more accurately, so that the cost is saved to the maximum extent.

Description

Application upgrading method and computer equipment
Technical Field
The present application relates to the field of internet application technologies, and in particular, to a method for upgrading an application and a computer device.
Background
The flow is a transmission quantity, in particular to the quantity of data transmitted through a network, and the peak bandwidth is the maximum value of the allowed instantaneous flow of the station; at present, an internet channel is taken as a core way for application release of an intelligent terminal product, and a large number of users acquire upgrade files through a network, so that the brought traffic cost is called as an important element to be considered by an internet enterprise.
The current technology for file Delivery is usually performed by using a Content Delivery Network (CDN), and a charging mechanism of the CDN determines that, when one manufacturer uses the CDN, in the case that the user access volume is stable, the cost of charging according to the peak bandwidth used is much lower than the cost of charging according to the traffic used, so that most manufacturers use the CDN in a peak charging manner. In the mode of charging according to the peak value, different peak value threshold values correspond to different charging standards, and in order to control the cost, a manufacturer needs to control the access bandwidth generated when a user accesses concurrently.
At present, the method of limiting the number of concurrent users is usually adopted, but because the bandwidth occupied by each user when downloading the upgrade file is different, the current occupied instantaneous bandwidth cannot be accurately calculated by simply controlling the download flow through the user amount, and thus, the actual current limiting effect may not be within the current charging standard and the peak bandwidth is not utilized to the maximum extent.
Therefore, the prior art is in need of improvement.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide an application upgrade method and a computer device, which limit the number of concurrent downloads by occupying bandwidth when performing application upgrade, so as to reduce the difference between the bandwidth occupied by a terminal downloading an application upgrade file and the peak bandwidth, so that a manufacturer can more accurately limit the current.
In one aspect, an embodiment of the present invention provides an application upgrading method, which is applied to a server in an application upgrading system, where the application upgrading system further includes a terminal, and the method includes:
receiving a downloading request, and acquiring occupied bandwidth according to the downloading request, wherein the occupied bandwidth is the bandwidth occupied by a terminal downloading an upgrade file;
judging whether the occupied bandwidth is smaller than a preset threshold value or not;
if the occupied bandwidth is less than or equal to the threshold, sending a downloading instruction to the terminal so that the terminal downloads the upgrading file according to the downloading instruction;
if the occupied bandwidth is larger than the threshold value, the download request is added to a waiting queue, a waiting instruction is sent to the terminal, the sum of the bandwidth occupied by the terminal downloading the upgrade file and the bandwidth corresponding to a plurality of candidate download requests in the waiting queue is monitored, and when the sum is smaller than or equal to the threshold value, the download instruction is sent to the terminal, wherein the upgrade sequence of the candidate download requests is prior to the upgrade sequence of the download requests.
As a further improved technical solution, the acquiring occupied bandwidth according to the download request includes:
acquiring a bandwidth to be downloaded corresponding to the downloading request;
and calculating the sum of the bandwidth to be downloaded and the occupied bandwidth, and taking the sum of the bandwidth to be downloaded and the occupied bandwidth as the updated occupied bandwidth.
As a further improved technical solution, the determining whether the occupied bandwidth is smaller than a preset threshold specifically includes:
judging whether the download request waiting for processing exists in the waiting queue or not;
if the download request to be processed is in the waiting queue, adding the download request to the waiting queue, and sending a waiting instruction to the terminal;
and if the waiting queue has no download request to be processed, judging whether the occupied bandwidth is smaller than a preset threshold value.
As a further improved technical solution, the monitoring a sum of a bandwidth occupied by a terminal downloading an upgrade file and a bandwidth corresponding to a plurality of candidate download requests in a waiting queue, and when the sum is less than or equal to the threshold, sending a download instruction to the terminal includes:
monitoring that when any terminal downloading the upgrade file finishes downloading, acquiring the bandwidth occupied by the terminal downloading the upgrade file to obtain the updated occupied bandwidth;
acquiring candidate bandwidths respectively corresponding to a plurality of candidate downloading requests in a waiting queue;
and if the sum of the bandwidth occupied by the updating and each candidate bandwidth is less than or equal to the threshold value, sending a downloading instruction to the terminal.
As a further improved technical solution, monitoring the sum of the bandwidth occupied by the terminal downloading the upgrade file and the bandwidth corresponding to a plurality of candidate download requests in the waiting queue, and when the sum is less than or equal to the threshold, sending a download instruction to the terminal, including:
acquiring the bandwidth occupied by a terminal downloading an upgrade file at preset time intervals to obtain the updated occupied bandwidth;
acquiring candidate bandwidths respectively corresponding to a plurality of candidate downloading requests in a waiting queue;
and if the sum of the bandwidth occupied by the updating and each candidate bandwidth is less than or equal to the threshold value, sending a downloading instruction to the terminal.
In a second aspect, an embodiment of the present invention provides an application upgrading method, which is applied to a terminal in an application upgrading system, where the application upgrading system further includes a server, and the method includes:
sending a download request to the server so that the server can obtain occupied bandwidth according to the download request and judge whether the occupied bandwidth is smaller than a preset threshold value, wherein the occupied bandwidth is the bandwidth occupied by a terminal downloading an upgrade file;
receiving an instruction, wherein the instruction comprises a downloading instruction sent by the server when the occupied bandwidth is less than or equal to the threshold value, or the sum of the bandwidth occupied by the terminal downloading the upgrade file and the bandwidth corresponding to a plurality of candidate downloading requests in the waiting queue is less than or equal to the threshold value, and a waiting instruction sent by the server when the occupied bandwidth is greater than the threshold value.
As a further improved technical solution, the method further comprises:
if the terminal is in the state of downloading the upgrade file, sending the downloading speed of the upgrade file to the server at preset time intervals, so that the server can determine the bandwidth occupied by the terminal downloading the upgrade file according to the downloading speed of the upgrade file to obtain the updated occupied bandwidth.
In a third aspect, an embodiment of the present invention provides an application upgrade system, where the system includes a terminal and a server;
the terminal is used for sending a downloading request to the server so that the server can obtain occupied bandwidth according to the downloading request and judge whether the occupied bandwidth is smaller than a preset threshold value or not, wherein the occupied bandwidth is the bandwidth occupied by the terminal downloading the upgrading file; if the occupied bandwidth is smaller than the threshold value, receiving a downloading instruction sent by the server; if the occupied bandwidth is larger than or equal to the threshold, receiving a waiting instruction sent by the server;
the server is used for receiving a downloading request and acquiring occupied bandwidth according to the downloading request, wherein the occupied bandwidth is the bandwidth occupied by a terminal downloading the upgrade file; judging whether the occupied bandwidth is smaller than a preset threshold value or not; if the occupied bandwidth is less than or equal to the threshold, sending a downloading instruction to the terminal so that the terminal downloads the upgrading file according to the downloading instruction; and if the occupied bandwidth is larger than the threshold value, adding the downloading request to a waiting queue, and sending a waiting instruction to the terminal.
In a fourth aspect, an embodiment of the present invention provides a computer device, including a memory and a processor, where the memory stores a computer program, and the processor implements the following steps when executing the computer program:
receiving a downloading request, and acquiring occupied bandwidth according to the downloading request, wherein the occupied bandwidth is the bandwidth occupied by a terminal downloading an upgrade file;
judging whether the occupied bandwidth is smaller than a preset threshold value or not;
if the occupied bandwidth is less than or equal to the threshold, sending a downloading instruction to the terminal so that the terminal downloads the upgrading file according to the downloading instruction;
if the occupied bandwidth is larger than the threshold value, adding the download request to a waiting queue, sending a waiting instruction to the terminal, monitoring the sum of the bandwidth occupied by the terminal downloading the upgrade file and the bandwidth corresponding to a plurality of candidate download requests in the waiting queue, and sending the download instruction to the terminal when the sum is smaller than or equal to the threshold value, wherein the upgrade sequence of the candidate download requests is prior to the upgrade sequence of the download requests;
or sending a download request to the server so that the server can obtain occupied bandwidth according to the download request and judge whether the occupied bandwidth is smaller than a preset threshold value, wherein the occupied bandwidth is the bandwidth occupied by a terminal downloading an upgrade file;
receiving an instruction, wherein the instruction comprises a downloading instruction sent by the server when the occupied bandwidth is less than or equal to the threshold value, or the sum of the bandwidth occupied by the terminal downloading the upgrade file and the bandwidth corresponding to a plurality of candidate downloading requests in the waiting queue is less than or equal to the threshold value, and a waiting instruction sent by the server when the occupied bandwidth is greater than the threshold value.
In a fifth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the following steps:
receiving a downloading request, and acquiring occupied bandwidth according to the downloading request, wherein the occupied bandwidth is the bandwidth occupied by a terminal downloading an upgrade file;
judging whether the occupied bandwidth is smaller than a preset threshold value or not;
if the occupied bandwidth is less than or equal to the threshold, sending a downloading instruction to the terminal so that the terminal downloads the upgrading file according to the downloading instruction;
if the occupied bandwidth is larger than the threshold value, adding the download request to a waiting queue, sending a waiting instruction to the terminal, monitoring the sum of the bandwidth occupied by the terminal downloading the upgrade file and the bandwidth corresponding to a plurality of candidate download requests in the waiting queue, and sending the download instruction to the terminal when the sum is smaller than or equal to the threshold value, wherein the upgrade sequence of the candidate download requests is prior to the upgrade sequence of the download requests;
or sending a download request to the server so that the server can obtain occupied bandwidth according to the download request and judge whether the occupied bandwidth is smaller than a preset threshold value, wherein the occupied bandwidth is the bandwidth occupied by a terminal downloading an upgrade file;
receiving an instruction, wherein the instruction comprises a downloading instruction sent by the server when the occupied bandwidth is less than or equal to the threshold value, or the sum of the bandwidth occupied by the terminal downloading the upgrade file and the bandwidth corresponding to a plurality of candidate downloading requests in the waiting queue is less than or equal to the threshold value, and a waiting instruction sent by the server when the occupied bandwidth is greater than the threshold value.
Compared with the prior art, the embodiment of the invention has the following advantages:
in the embodiment of the invention, a terminal sends a downloading request to a server, the server receives the downloading request and acquires occupied bandwidth according to the downloading request, wherein the occupied bandwidth is the bandwidth occupied by the terminal downloading an upgrading file; judging whether the occupied bandwidth is smaller than a preset threshold value or not; if the occupied bandwidth is less than or equal to the threshold, sending a downloading instruction to the terminal; if the occupied bandwidth is larger than the threshold value, the download request is added to a waiting queue, a waiting instruction is sent to the terminal, the sum of the bandwidth occupied by the terminal downloading the upgrade file and the bandwidth corresponding to a plurality of candidate download requests in the waiting queue is monitored, and when the sum is smaller than or equal to the threshold value, the download instruction is sent to the terminal, wherein the upgrade sequence of the candidate download requests is prior to the upgrade sequence of the download requests.
The invention determines the time of the response of the download request through the bandwidth, when receiving the download request, if the occupied bandwidth is less than or equal to the threshold, the download instruction is responded immediately, if the occupied bandwidth is more than the threshold, the download instruction is put into the waiting queue, then the bandwidth occupied by downloading the upgrade file and the bandwidth of the download instruction to be processed in the waiting queue are monitored, and the time of responding the download instruction is further determined, thus, the number of terminals for downloading the upgrade file in parallel is limited through the bandwidth, so as to reduce the difference between the bandwidth occupied by downloading the upgrade file and the threshold at the same time, therefore, manufacturers can more accurately limit the current, and the cost is saved to the maximum extent.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic flow chart illustrating a method for upgrading an application according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart illustrating an application upgrade method according to an embodiment of the present invention;
fig. 3 is an internal structural diagram of a computer device in an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The inventor finds that, at present, a manufacturer controls access bandwidth generated when users access concurrently by adopting a mode of limiting the number of concurrent users, but because the bandwidth occupied by each user when downloading an upgrade file is different, the current occupied instantaneous bandwidth cannot be accurately calculated by simply controlling download flow through the user amount, and thus, the actual current limiting effect may not be in the current charging standard and peak bandwidth is not utilized to the maximum extent.
In order to solve the above problem, in the embodiment of the present invention, a terminal sends a download request to a server, and the server receives the download request and obtains an occupied bandwidth according to the download request, where the occupied bandwidth is a bandwidth occupied by the terminal that is downloading an upgrade file; judging whether the occupied bandwidth is smaller than a preset threshold value or not; if the occupied bandwidth is less than or equal to the threshold, sending a downloading instruction to the terminal; if the occupied bandwidth is larger than the threshold value, the download request is added to a waiting queue, a waiting instruction is sent to the terminal, the sum of the bandwidth occupied by the terminal downloading the upgrade file and the bandwidth corresponding to a plurality of candidate download requests in the waiting queue is monitored, and when the sum is smaller than or equal to the threshold value, the download instruction is sent to the terminal, wherein the upgrade sequence of the candidate download requests is prior to the upgrade sequence of the download requests.
The invention determines the time of the response of the download request through the bandwidth, when receiving the download request, if the occupied bandwidth is less than or equal to the threshold, the download instruction is responded immediately, if the occupied bandwidth is more than the threshold, the download instruction is put into the waiting queue, then the bandwidth occupied by downloading the upgrade file and the bandwidth of the download instruction to be processed in the waiting queue are monitored, and the time of responding the download instruction is further determined, thus, the terminal quantity of downloading the upgrade file in parallel is limited through the bandwidth, so as to reduce the difference between the bandwidth occupied by downloading the upgrade file and the threshold at the same time, therefore, the manufacturer can more accurately limit the current, and the cost is saved to the maximum extent.
Various non-limiting embodiments of the present invention are described in detail below with reference to the accompanying drawings.
The application upgrading method can be applied to an application upgrading system, the application upgrading system comprises a terminal and a server, and the terminal can be but is not limited to a computer, a notebook computer, a mobile phone, a tablet computer, a vehicle-mounted computer, a television and a vehicle-mounted computer portable wearable device which need to be upgraded.
Referring to fig. 1, a method for application upgrade in an embodiment of the present invention is shown. In this embodiment, the method may include, for example, the steps of:
and S1, the terminal sends a downloading request to the server.
In the embodiment of the invention, the terminal sending the download request is the terminal needing application upgrade, the server provides the distribution service of the upgrade file, and the download request is used for requesting the server to download the application upgrade file.
S2, the server receives the download request and obtains the occupied bandwidth according to the download request, wherein the occupied bandwidth is the bandwidth occupied by the terminal downloading the upgrade file.
In the embodiment of the invention, the bandwidth is the short term of frequency bandwidth, and in a network, the bandwidth is larger, and the traffic capacity is stronger, wherein the data volume can be transmitted in unit time. The terminal downloading the upgrade file occupies the bandwidth of the server, and when the server receives the downloading request, the occupied bandwidth is obtained, namely the occupied bandwidth for downloading the upgrade file is obtained. Specifically, the server obtains the download speed of each terminal in the download state (the terminal downloading the upgrade file), determines the bandwidth of each terminal in the download state according to the download speed of each terminal in the download state, and further determines the occupied bandwidth. The specific steps for acquiring the occupied bandwidth will be explained in detail later.
S3, the server judges whether the occupied bandwidth is smaller than a preset threshold value.
In the embodiment of the present invention, the bandwidth occupied for downloading the upgrade file in the designated unit time needs to be preset, and if the occupied bandwidth of the terminal in the downloading state is equal to the bandwidth peak value, the cost can be saved to the greatest extent, so the threshold value can be the bandwidth peak value; in order to ensure that the bandwidth occupied by downloading the upgrade file in a unit time does not exceed the bandwidth quota, and meanwhile, reserve a space for dealing with an emergency, the threshold may be 80% of the bandwidth peak value.
And S4, if the occupied bandwidth is less than or equal to the threshold, the server sends a download instruction to the terminal, so that the terminal downloads the upgrade file according to the download instruction.
In the embodiment of the invention, if the occupied bandwidth is smaller than the threshold value, which indicates that the server can also provide the bandwidth for downloading the upgrade file, a downloading instruction is sent to the terminal; if the occupied bandwidth is equal to the threshold, it indicates that the currently occupied bandwidth of the server just meets the threshold, and since the threshold may be 80% of the bandwidth peak value, the download instruction may also be immediately sent to the terminal, so that the terminal starts downloading the upgrade file.
S5, if the occupied bandwidth is larger than the threshold value, the server adds the download request to a waiting queue, sends a waiting instruction to the terminal, monitors the sum of the bandwidth occupied by the terminal downloading the upgrade file and the bandwidth corresponding to a plurality of candidate download requests in the waiting queue, and sends the download instruction to the terminal when the sum is smaller than or equal to the threshold value, wherein the upgrade sequence of the candidate download requests is prior to the upgrade sequence of the download requests.
In the embodiment of the invention, if the occupied bandwidth is larger than the threshold, the terminal sending the download request cannot immediately download the upgrade file, the server adds the download request into the waiting queue, and then the server monitors the occupied bandwidth, the threshold and the bandwidth corresponding to the candidate download request in the waiting queue.
In the embodiment of the invention, the server adds the download request to a waiting queue, the waiting queue comprises at least one download request to be processed, and the candidate download request is the download request to be processed in the waiting queue, and the upgrading sequence of the candidate download request is prior to that of the download request; if the upgrading sequence of the downloading request in the waiting queue is arranged at the first position, no candidate request exists.
In the embodiment of the present invention, the upgrading order in the waiting queue may be determined according to the priority of the to-be-processed download requests, and the upgrading order of the to-be-processed download requests with higher priority is prior to the upgrading order of the to-be-processed download requests with lower priority; or on a time axis, the download request with early sending time is arranged before the download request with late sending time, the download request to be processed can be controlled in a stack form, the stack controls the upgrading sequence of the download request to be processed in a first-in first-out mode, when the download request is put into a waiting queue, the server puts the download request on the top of the stack, and the server firstly sends a download instruction to the terminal corresponding to the download request to be processed at the bottom of the stack.
As to the specific process of monitoring the sum of the bandwidth occupied by the terminal downloading the upgrade file and the bandwidth corresponding to a plurality of candidate download requests in the waiting queue, when the sum is less than or equal to the threshold, sending a download instruction to the terminal, which will be explained in detail later.
S6, the terminal receives an instruction, wherein the instruction comprises a download instruction sent by the server when the occupied bandwidth is less than or equal to the threshold value, or the sum of the bandwidth occupied by the terminal downloading the upgrade file and the bandwidth corresponding to a plurality of candidate download requests in the waiting queue is less than or equal to the threshold value, and a waiting instruction sent by the server when the occupied bandwidth is greater than the threshold value.
In the embodiment of the invention, the downloading instruction comprises a downloading address, and when the terminal receives the downloading instruction, the upgrading file is downloaded from the server according to the downloading address; the terminal receives the waiting instruction to know that the current server can not provide the downloading service.
In the embodiment of the invention, the time for responding the download request is determined by the bandwidth, when the download request is received, if the occupied bandwidth is less than or equal to the threshold, the download instruction is responded immediately, if the occupied bandwidth is greater than the threshold, the download instruction is put into the waiting queue, the bandwidth occupied by downloading the upgrade file and the bandwidth of the download instruction to be processed in the waiting queue are monitored, and the time for responding the download instruction is further determined, so that the number of terminals for downloading the upgrade file in parallel is limited by the bandwidth, the difference between the bandwidth occupied by downloading the upgrade file and the threshold at the same time is reduced, and a manufacturer can more accurately limit the current so as to save the cost to the maximum extent.
Specifically, the details of the bandwidth occupied are obtained, the server obtains the download speed of each terminal in the download state (the terminal downloading the upgrade file), determines the bandwidth of each terminal in the download state according to the download speed of each terminal in the download state, and further determines the bandwidth occupied. Specifically, step S2 includes:
s21, the server obtains download speeds corresponding to the terminals in the download state.
In the embodiment of the invention, when the server receives the downloading request, the server informs the terminals in the downloading state to report the respective downloading speed, and the terminals in the downloading state can measure the downloading speed through the speed measuring server of a third party and send the downloading speed to the server.
And S22, the server determines the occupied bandwidth according to the downloading speed respectively corresponding to each terminal in the downloading state.
In the embodiment of the present invention, first, bandwidth corresponding to each terminal in a downloading state is calculated, and there is a conversion relationship between the bandwidth and the downloading speed, for example, the downloading speed of 20M bandwidth can reach 20Mbit/s, and theoretically, the downloading speed corresponding to 2M (i.e. 2Mb/s) bandwidth is: 256KB/s (i.e., 2048 Kb/s); and calculating the sum of the bandwidths corresponding to the terminals in the downloading state to obtain the occupied bandwidth.
In another implementation, in order that the occupied bandwidth when the server provides the download service is not greater than the threshold, step S2 further includes:
s23, the server obtains the bandwidth to be downloaded corresponding to the downloading request.
In the embodiment of the invention, the download request comprises the test download speed of the terminal, so that the server can know the bandwidth corresponding to the download request according to the test download speed. The terminal has acquired the test download speed before it sends a download request. The test downloading speed can be obtained by the terminal through a speed measuring server of a third party, and before the terminal sends the downloading request, the terminal sends the speed measuring request to the speed measuring server so as to obtain the test downloading speed.
In the embodiment of the invention, before a terminal sends a downloading request to a speed measuring server, the terminal sends a speed measuring request to the speed measuring server, the speed measuring server sends a speed measuring address to the terminal according to the speed measuring request, the terminal downloads a test file according to the address of a tester, the speed of transmitting the test file is the testing downloading speed of the terminal, and the terminal receives the testing downloading speed fed back by the testing server. And when the terminal carries out application upgrading, sending a downloading request comprising the testing downloading speed to the server. And obtaining the bandwidth to be downloaded corresponding to the downloading request according to the testing downloading speed.
S24, calculating the sum of the bandwidth to be downloaded and the occupied bandwidth, and taking the sum of the bandwidth to be downloaded and the occupied bandwidth as the updated occupied bandwidth.
In this embodiment of the present invention, the sum of the bandwidth to be downloaded and the occupied bandwidth is used as the updated occupied bandwidth, so that the step S3 determines whether the occupied bandwidth is smaller than a preset threshold, which is equivalent to determining whether the sum of the bandwidth occupied by downloading the upgrade file and the bandwidth to be downloaded corresponding to the download request is smaller than the threshold, that is, determining whether the difference between the bandwidth occupied by downloading the upgrade file and the threshold is sufficient to provide the download service for the terminal corresponding to the download request. In this implementation, the bandwidth occupied by the server in providing the download service is not greater than a threshold.
Next, a specific process of determining whether the occupied bandwidth is smaller than a preset threshold is introduced, specifically, step S3 includes:
s31, the server judges whether the waiting queue has a download request to be processed.
In the embodiment of the present invention, when a download request to be processed is received in the server, it indicates that before the download request is received in step S2, the server has received another download request, and the server has no idle bandwidth to provide a download service for a terminal corresponding to a partial download request, so theoretically, a terminal corresponding to a download request with a previous sending time should be provided with a download service first, or a terminal corresponding to a download request with a high priority should be provided with a download service, and therefore, it cannot go over the download request to be processed in the waiting queue, and directly determine whether the download service can be provided for the terminal corresponding to the download request received in step S2.
S32, if the download request is waiting for processing in the waiting queue, the server adds the download request to the waiting queue and sends a waiting instruction to the terminal.
In the embodiment of the invention, the server sends the downloading request to the waiting queue and sends the waiting instruction to the terminal to inform the terminal that the server cannot provide the downloading service currently. And if the server determines the upgrading sequence of the to-be-processed downloading requests by a first-in first-out stack, the server puts the downloading requests to the last bit in the waiting queue.
And S33, if the waiting queue has no download request to be processed, judging whether the occupied bandwidth is smaller than a preset threshold value.
In this embodiment of the present invention, when there is no pending download request in the wait queue, it may be directly determined whether to provide a download service for the terminal corresponding to the download instruction received in step S2.
Next, the following is introduced: monitoring the sum of the bandwidth occupied by the terminal downloading the upgrade file and the bandwidth corresponding to a plurality of candidate downloading requests in the waiting queue, and when the sum is less than or equal to the threshold, sending a downloading instruction to the terminal, specifically, step S5 includes:
s51a, when monitoring that any terminal downloading the upgrade file finishes downloading, acquiring the bandwidth occupied by the terminal downloading the upgrade file to obtain the updated occupied bandwidth.
In the embodiment of the invention, when waiting for the download request to be processed in the queue, if any terminal downloading the file finishes downloading, the occupied bandwidth of the server changes, the bandwidth occupied by the terminal downloading the upgrade file is acquired, and the updated occupied bandwidth is obtained. For example, if 10 first terminals downloading the application upgrade file exist at time t1, at this time, the occupied bandwidth is the bandwidth occupied by 10 terminals downloading the upgrade file, and at time t2, 1 terminal completes the downloading, then the bandwidth occupied by 8 terminals downloading the application upgrade file at time t2 is the update occupied bandwidth.
S52a, obtaining each candidate bandwidth corresponding to each of the plurality of candidate download requests in the waiting queue.
In the embodiment of the invention, for the download requests to be processed in the waiting queue, the download requests to be processed, the upgrading sequence of which precedes the received download request, are recorded as candidate download requests, the candidate download requests comprise the test download speed of the corresponding terminal, and the candidate bandwidth is determined according to the test download speed of the terminal corresponding to the candidate download requests. For example, when it is monitored that a terminal downloading the upgrade file completes downloading, the download requests to be processed are sorted according to the priority in the waiting queue, and the following results are obtained: f1, f2, f3, f4, f5, f6, if f4 is the download request received in step S2, f1, f2, f3 are candidate download requests, and candidate bandwidths h3 corresponding to candidate bandwidths h1 and h2 and f3 corresponding to candidate bandwidths h1 and f2 corresponding to f1 and f2 are determined.
S53a, if the sum of the updated occupied bandwidth and each candidate bandwidth is less than or equal to the threshold, sending a downloading instruction to the terminal.
In this embodiment of the present invention, the terminal is a terminal corresponding to the download request received in step S2, and if the sum of each candidate bandwidth and the bandwidth occupied by updating is less than or equal to the threshold, the terminal corresponding to each candidate download request and the download request may download the upgrade file. For example, the updated occupied bandwidth is H, the threshold is G, and it is determined whether H1+ H2+ H3+ H is less than or equal to G, and if H1+ H2+ H3+ H is less than or equal to G, a download instruction is sent to terminals corresponding to f1, f2, f3, and f4, where f4 is the download request received in step S2. It can be seen that, in the embodiment of the present invention, since H1+ H2+ H3+ H is less than or equal to G, and a download instruction is sent to the terminals corresponding to f1, f2, f3, and f4, respectively, a situation that an occupied bandwidth of the server is greater than a threshold may occur, and since the threshold may be set to 80% of a bandwidth peak value, normal operation of the server is not affected.
In another implementation manner, in order to ensure that the occupied bandwidth of the server does not exceed the threshold, it may be determined whether the sum of the updated occupied bandwidth, each candidate bandwidth, and the bandwidth to be downloaded is less than or equal to the threshold, and if the sum of the updated occupied bandwidth, each candidate bandwidth, and the bandwidth to be downloaded is less than or equal to the threshold, a download instruction is sent to the terminal (the terminal corresponding to the download request), and at the same time, a download instruction is sent to the terminal corresponding to each candidate download request; the bandwidth to be downloaded is the bandwidth corresponding to the download request received in step S2.
In another implementation manner, if the sum of the updated occupied bandwidth and each candidate bandwidth is greater than the threshold, at least one target download request is selected from the candidate download requests, a download instruction is sent to the terminal corresponding to each target download request, and step S51a is continuously executed until the sum of the updated occupied bandwidth and each candidate bandwidth is less than or equal to the threshold, so that the terminal corresponding to the download request can download the upgrade file.
Specifically, the selecting at least one target download request from the candidate download requests includes: calculating the difference value between the updated occupied bandwidth and the threshold value; and selecting M target downloading requests from the candidate downloading requests according to the difference and the bandwidths to be processed, wherein the total candidate bandwidth corresponding to the M target downloading requests is less than or equal to the difference, and M is a positive integer.
In the embodiment of the invention, when monitoring that any terminal downloading the upgrade file finishes downloading, the occupied updating occupied bandwidth of the server is H, the threshold value is G, and a difference value is obtained according to the occupied updating bandwidth and the threshold value, wherein the difference value represents the current bandwidth which can be increased. Specifically, a difference j is obtained by calculating G-H, the candidate download requests comprise f1, f2 and f3, the upgrading sequence is that the upgrading sequence of f1 is prior to that of f2, the upgrading sequence of f2 is prior to that of f3, the candidate bandwidths of f1, f2 and f3 are respectively H1, H2 and H3, the size of the difference j and the size of the candidate bandwidth H1 are firstly compared, and if H1 is smaller than or equal to j, the f1 is used as the target download request; further comparing the difference value j between the candidate bandwidth h1 and the candidate bandwidth h2, namely comparing the sizes of j-h1 and h2, and if h2 is smaller than or equal to j-h, taking a candidate request f2 corresponding to h2 as a target downloading request; further, comparing the difference value j with the candidate bandwidth h1, and the difference value of the candidate bandwidth h2 with the candidate bandwidth h3, namely comparing the sizes of j-h1-h2 and h3, if h3 is larger than j-h1-h2, the candidate request f3 corresponding to h3 cannot be used as a target download request; the target download requests obtained in each candidate download request are f1 and f 2.
In another implementation manner, since the downloading speed of the terminal in the downloading state is not fixed, that is, the bandwidth occupied by the terminal in the downloading state is not fixed, when it is not monitored that the terminal completes downloading, the bandwidth occupied by the terminal in the downloading state may also be smaller than the threshold, and the server may provide a downloading service for the terminal corresponding to the to-be-processed downloading request in the waiting queue; in order to improve the downloading efficiency, step S5 includes:
and S51b, acquiring the bandwidth occupied by the terminal downloading the upgrade file at preset time intervals to obtain the updated occupied bandwidth.
In the embodiment of the invention, each terminal in the downloading state reports the own downloading speed at preset time intervals, and the server determines the bandwidth occupied by the terminal in the downloading state according to the downloading speed reported by each terminal in the downloading state so as to obtain the updated occupied bandwidth.
S52b, obtaining each candidate bandwidth corresponding to each of the plurality of candidate download requests in the waiting queue.
In the embodiment of the invention, for the download requests to be processed in the waiting queue, the download requests to be processed, the upgrading sequence of which precedes the received download request, are recorded as candidate download requests, the candidate download requests comprise the test download speed of the corresponding terminal, and the candidate bandwidth is determined according to the test download speed of the terminal corresponding to the candidate download requests. For example, when it is monitored that a terminal downloading the upgrade file completes downloading, the download requests to be processed are sorted according to the priority in the waiting queue, and the following results are obtained: f1, f2, f3, f4, f5 and f6, wherein f4 is the download request received in step S2, and f1, f2 and f3 are candidate download requests, and it is determined that the candidate bandwidth corresponding to f1 is h1, the candidate bandwidth corresponding to f2 is h2, and the candidate bandwidth corresponding to f3 is h 3.
Step S52b is the same as step S52 a.
S53b, if the sum of the updated occupied bandwidth and each candidate bandwidth is less than or equal to the threshold, sending a downloading instruction to the terminal.
In this embodiment of the present invention, the terminal is a terminal corresponding to the download request received in step S2, and if the sum of each candidate bandwidth and the bandwidth occupied by updating is less than or equal to the threshold, the terminal corresponding to each candidate download request and the download request may download the upgrade file. For example, the occupied bandwidth is updated to be H, the threshold is G, and the sum of the candidate bandwidths is less than or equal to the threshold, that is, it is determined whether H1+ H2+ H3+ H is less than or equal to G, and if H1+ H2+ H3+ H is less than or equal to G, a download instruction is sent to the terminal corresponding to each of f1, f2, f3, and f4, where f4 is the download request received in step S2. It can be seen that, in the embodiment of the present invention, since H1+ H2+ H3+ H is less than or equal to G, and a download instruction is sent to the terminals corresponding to f1, f2, f3, and f4, respectively, a situation that an occupied bandwidth of the server is greater than a threshold may occur, and since the threshold may be set to 80% of a bandwidth peak value, normal operation of the server is not affected.
In the embodiment of the invention, for the to-be-processed downloading requests in the waiting queue, after the server provides the downloading service for the terminal corresponding to any to-be-processed downloading request, the to-be-processed downloading request is deleted from the waiting queue.
In another implementation manner, in order to ensure that the occupied bandwidth of the server does not exceed the threshold, it may be determined whether the sum of the updated occupied bandwidth, each candidate bandwidth, and the bandwidth to be downloaded is less than or equal to the threshold, and if the sum of the updated occupied bandwidth, each candidate bandwidth, and the bandwidth to be downloaded is less than or equal to the threshold, a download instruction is sent to the terminal (the terminal corresponding to the download request), and at the same time, a download instruction is sent to the terminal corresponding to each candidate download request; the bandwidth to be downloaded is the bandwidth corresponding to the download request received in step S2.
In another implementation manner, if the sum of the updated occupied bandwidth and each candidate bandwidth is greater than the threshold, at least one target download request is selected from the candidate download requests, a download instruction is sent to the terminal corresponding to each target download request, and step S51b is continuously executed until the sum of the updated occupied bandwidth and each candidate bandwidth is less than or equal to the threshold, so that the terminal corresponding to the download request can download the upgrade file.
Step S53b is the same as step S53 a.
In order to enable the server to obtain the bandwidth occupied by the terminal downloading the upgrade file at preset time intervals to obtain the updated occupied bandwidth, for each terminal in the downloading state, the method for upgrading the application provided by the embodiment of the present invention further includes:
K. and if the terminal is in the state of downloading the upgrade file, sending the downloading speed of the download file to the server at preset time intervals, so that the server determines the bandwidth occupied by the terminal downloading the upgrade file according to the downloading speed of the download file to obtain the updated occupied bandwidth.
In the embodiment of the present invention, the download speed may be measured by a speed measurement server of a third party, the terminal in the download state sends a speed measurement instruction to the speed measurement server at intervals, the speed measurement server feeds back the first download speed to the first terminal according to the speed measurement instruction, and the first terminal sends the received first download speed to the server for distributing the application upgrade file. The time interval may be 1 second, that is, the server acquires the real-time download speed of each first terminal every second.
In another implementation manner, in order to further improve the downloading efficiency, for a terminal downloading an upgrade file, the server may cancel a downloading task of the terminal that does not complete downloading the upgrade file for a long time, and specifically, obtain a downloaded time length of the terminal downloading the upgrade file; and counting from the receiving of the downloading instruction to obtain the downloaded time length. And when any terminal downloading the upgrade file is longer than the preset time length, canceling the downloading task of the terminal.
In the embodiment of the present invention, the preset time duration may be set to 30 minutes, and if the download time duration of a certain terminal downloading the upgrade file reaches the preset time duration and the download is not completed, the download task of the terminal is cancelled, so as to release the bandwidth occupied by the terminal.
In another implementation manner, referring to fig. 2, the method for upgrading an application may further include:
a1, the terminal sends speed measurement instructions to the speed measurement server, and the terminal comprises a terminal which does not send a download request and a terminal which is downloading the upgrade file.
a2, the speed measuring server feeds back the test downloading speed to the terminal which has not sent the downloading request, and sends the downloading speed to the terminal which is downloading the upgrade file.
a3, the terminal sends a download request to the server, wherein the download request comprises the test download speed.
a4, the server obtains the occupied bandwidth, the occupied bandwidth is the bandwidth occupied by the terminal downloading the upgrade file, and the bandwidth to be downloaded is calculated according to the test downloading speed.
a5, the server judges whether the occupied bandwidth is less than the preset threshold value, if yes, the step a6 is entered, and if not, the step a7 is entered.
a6, if the occupied bandwidth is less than or equal to the threshold, the server sends a download instruction to the terminal, so that the terminal downloads the upgrade file according to the download instruction.
a7, if the occupied bandwidth is larger than the threshold value, adding the download request to a waiting queue.
And r, transmitting the downloading speed of the downloaded upgrade file by the terminal in the downloading state at each preset time interval.
a8, monitoring the sum of the bandwidth occupied by the terminal downloading the upgrade file and the bandwidth corresponding to a plurality of candidate downloading requests in the waiting queue.
a9, judging whether the sum is less than or equal to the threshold value, if yes, entering a10, and if not, entering a 8.
a10, the sum being less than or equal to the threshold value, the server sending a download instruction to the terminal.
a11, the terminal downloads the application upgrade file according to the received download instruction.
The invention determines the time of the response of the download request through the bandwidth, when receiving the download request, if the occupied bandwidth is less than or equal to the threshold, the download instruction is responded immediately, if the occupied bandwidth is more than the threshold, the download instruction is put into the waiting queue, then the bandwidth occupied by downloading the upgrade file and the bandwidth of the download instruction to be processed in the waiting queue are monitored, and the time of responding the download instruction is further determined, thus, the terminal quantity of downloading the upgrade file in parallel is limited through the bandwidth, so as to reduce the difference between the bandwidth occupied by downloading the upgrade file and the threshold at the same time, therefore, the manufacturer can more accurately limit the current, and the cost is saved to the maximum extent.
The embodiment of the invention also provides an application upgrading system, which comprises a terminal and a server;
the terminal is used for sending a downloading request to the server so that the server can obtain occupied bandwidth according to the downloading request and judge whether the occupied bandwidth is smaller than a preset threshold value or not, wherein the occupied bandwidth is the bandwidth occupied by the terminal downloading the upgrading file; if the occupied bandwidth is smaller than the threshold value, receiving a downloading instruction sent by the server; if the occupied bandwidth is larger than or equal to the threshold, receiving a waiting instruction sent by the server;
the server is used for receiving a downloading request and acquiring occupied bandwidth according to the downloading request, wherein the occupied bandwidth is the bandwidth occupied by a terminal downloading the upgrade file; judging whether the occupied bandwidth is smaller than a preset threshold value or not; if the occupied bandwidth is less than or equal to the threshold, sending a downloading instruction to the terminal so that the terminal downloads the upgrading file according to the downloading instruction; and if the occupied bandwidth is larger than the threshold value, adding the downloading request to a waiting queue, and sending a waiting instruction to the terminal.
The embodiment of the invention also provides computer equipment which can be a terminal, and the internal structure of the computer equipment is shown in figure 3. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of application upgrade. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the illustration in fig. 3 is merely a block diagram of a portion of the structure associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, there is provided a computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
receiving a downloading request, and acquiring occupied bandwidth according to the downloading request, wherein the occupied bandwidth is the bandwidth occupied by a terminal downloading an upgrade file;
judging whether the occupied bandwidth is smaller than a preset threshold value or not;
if the occupied bandwidth is less than or equal to the threshold, sending a downloading instruction to the terminal so that the terminal downloads the upgrading file according to the downloading instruction;
if the occupied bandwidth is larger than the threshold value, adding the download request to a waiting queue, sending a waiting instruction to the terminal, monitoring the sum of the bandwidth occupied by the terminal downloading the upgrade file and the bandwidth corresponding to a plurality of candidate download requests in the waiting queue, and sending the download instruction to the terminal when the sum is smaller than or equal to the threshold value, wherein the upgrade sequence of the candidate download requests is prior to the upgrade sequence of the download requests;
or sending a download request to the server so that the server can obtain occupied bandwidth according to the download request and judge whether the occupied bandwidth is smaller than a preset threshold value, wherein the occupied bandwidth is the bandwidth occupied by a terminal downloading an upgrade file;
receiving an instruction, wherein the instruction comprises a downloading instruction sent by the server when the occupied bandwidth is less than or equal to the threshold value, or the sum of the bandwidth occupied by the terminal downloading the upgrade file and the bandwidth corresponding to a plurality of candidate downloading requests in the waiting queue is less than or equal to the threshold value, and a waiting instruction sent by the server when the occupied bandwidth is greater than the threshold value.
In one embodiment, a computer-readable storage medium is provided, having stored thereon a computer program which, when executed by a processor, performs the steps of:
receiving a downloading request, and acquiring occupied bandwidth according to the downloading request, wherein the occupied bandwidth is the bandwidth occupied by a terminal downloading an upgrade file;
judging whether the occupied bandwidth is smaller than a preset threshold value or not;
if the occupied bandwidth is less than or equal to the threshold, sending a downloading instruction to the terminal so that the terminal downloads the upgrading file according to the downloading instruction;
if the occupied bandwidth is larger than the threshold value, adding the download request to a waiting queue, sending a waiting instruction to the terminal, monitoring the sum of the bandwidth occupied by the terminal downloading the upgrade file and the bandwidth corresponding to a plurality of candidate download requests in the waiting queue, and sending the download instruction to the terminal when the sum is smaller than or equal to the threshold value, wherein the upgrade sequence of the candidate download requests is prior to the upgrade sequence of the download requests;
or sending a download request to the server so that the server can obtain occupied bandwidth according to the download request and judge whether the occupied bandwidth is smaller than a preset threshold value, wherein the occupied bandwidth is the bandwidth occupied by a terminal downloading an upgrade file;
receiving an instruction, wherein the instruction comprises a downloading instruction sent by the server when the occupied bandwidth is less than or equal to the threshold value, or the sum of the bandwidth occupied by the terminal downloading the upgrade file and the bandwidth corresponding to a plurality of candidate downloading requests in the waiting queue is less than or equal to the threshold value, and a waiting instruction sent by the server when the occupied bandwidth is greater than the threshold value.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.

Claims (10)

1. A method for application upgrade, which is applied to a server in an application upgrade system, the application upgrade system further includes a terminal, and the method includes:
receiving a downloading request, and acquiring occupied bandwidth according to the downloading request, wherein the occupied bandwidth is the bandwidth occupied by a terminal downloading an upgrade file;
judging whether the occupied bandwidth is smaller than a preset threshold value or not;
if the occupied bandwidth is less than or equal to the threshold, sending a downloading instruction to the terminal so that the terminal downloads the upgrading file according to the downloading instruction;
if the occupied bandwidth is larger than the threshold value, the download request is added to a waiting queue, a waiting instruction is sent to the terminal, the sum of the bandwidth occupied by the terminal downloading the upgrade file and the bandwidth corresponding to a plurality of candidate download requests in the waiting queue is monitored, and when the sum is smaller than or equal to the threshold value, the download instruction is sent to the terminal, wherein the upgrade sequence of the candidate download requests is prior to the upgrade sequence of the download requests.
2. The method of claim 1, wherein the obtaining the occupied bandwidth according to the download request comprises:
acquiring a bandwidth to be downloaded corresponding to the downloading request;
and calculating the sum of the bandwidth to be downloaded and the occupied bandwidth, and taking the sum of the bandwidth to be downloaded and the occupied bandwidth as the updated occupied bandwidth.
3. The method according to claim 1, wherein the determining whether the occupied bandwidth is smaller than a preset threshold specifically comprises:
judging whether the download request waiting for processing exists in the waiting queue or not;
if the download request to be processed is in the waiting queue, adding the download request to the waiting queue, and sending a waiting instruction to the terminal;
and if the waiting queue has no download request to be processed, judging whether the occupied bandwidth is smaller than a preset threshold value.
4. The method according to any one of claims 1 to 3, wherein the monitoring a sum of a bandwidth occupied by the terminal downloading the upgrade file and a bandwidth corresponding to a plurality of candidate download requests in the waiting queue, and when the sum is less than or equal to the threshold, sending a download instruction to the terminal includes:
monitoring that when any terminal downloading the upgrade file finishes downloading, acquiring the bandwidth occupied by the terminal downloading the upgrade file to obtain the updated occupied bandwidth;
acquiring candidate bandwidths respectively corresponding to a plurality of candidate downloading requests in a waiting queue;
and if the sum of the bandwidth occupied by the updating and each candidate bandwidth is less than or equal to the threshold value, sending a downloading instruction to the terminal.
5. The method according to any one of claims 1 to 3, wherein monitoring the sum of the bandwidth occupied by the terminal downloading the upgrade file and the bandwidth corresponding to a plurality of candidate download requests in the waiting queue, and when the sum is less than or equal to the threshold, sending a download instruction to the terminal comprises:
acquiring the bandwidth occupied by a terminal downloading an upgrade file at preset time intervals to obtain the updated occupied bandwidth;
acquiring candidate bandwidths respectively corresponding to a plurality of candidate downloading requests in a waiting queue;
and if the sum of the bandwidth occupied by the updating and each candidate bandwidth is less than or equal to the threshold value, sending a downloading instruction to the terminal.
6. A method for upgrading an application, the method being applied to a terminal in an application upgrading system, the application upgrading system further comprising a server, the method comprising:
sending a download request to the server so that the server can obtain occupied bandwidth according to the download request and judge whether the occupied bandwidth is smaller than a preset threshold value, wherein the occupied bandwidth is the bandwidth occupied by a terminal downloading an upgrade file;
receiving an instruction, wherein the instruction comprises a downloading instruction sent by the server when the occupied bandwidth is less than or equal to the threshold value, or the sum of the bandwidth occupied by the terminal downloading the upgrade file and the bandwidth corresponding to a plurality of candidate downloading requests in the waiting queue is less than or equal to the threshold value, and a waiting instruction sent by the server when the occupied bandwidth is greater than the threshold value.
7. The method of claim 6, further comprising:
if the terminal is in the state of downloading the upgrade file, sending the downloading speed of the upgrade file to the server at preset time intervals, so that the server can determine the bandwidth occupied by the terminal downloading the upgrade file according to the downloading speed of the upgrade file to obtain the updated occupied bandwidth.
8. An application upgrading system is characterized by comprising a terminal and a server;
the terminal is used for sending a downloading request to the server so that the server can obtain occupied bandwidth according to the downloading request and judge whether the occupied bandwidth is smaller than a preset threshold value or not, wherein the occupied bandwidth is the bandwidth occupied by the terminal downloading the upgrading file; if the occupied bandwidth is smaller than the threshold value, receiving a downloading instruction sent by the server; if the occupied bandwidth is larger than or equal to the threshold, receiving a waiting instruction sent by the server;
the server is used for receiving a downloading request and acquiring occupied bandwidth according to the downloading request, wherein the occupied bandwidth is the bandwidth occupied by a terminal downloading the upgrade file; judging whether the occupied bandwidth is smaller than a preset threshold value or not; if the occupied bandwidth is less than or equal to the threshold, sending a downloading instruction to the terminal so that the terminal downloads the upgrading file according to the downloading instruction; and if the occupied bandwidth is larger than the threshold value, adding the downloading request to a waiting queue, and sending a waiting instruction to the terminal.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN201911404640.8A 2019-12-30 2019-12-30 Application upgrading method and computer equipment Active CN113127021B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201911404640.8A CN113127021B (en) 2019-12-30 2019-12-30 Application upgrading method and computer equipment
PCT/CN2020/111319 WO2021135301A1 (en) 2019-12-30 2020-08-26 Application upgrade method and computer device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911404640.8A CN113127021B (en) 2019-12-30 2019-12-30 Application upgrading method and computer equipment

Publications (2)

Publication Number Publication Date
CN113127021A true CN113127021A (en) 2021-07-16
CN113127021B CN113127021B (en) 2023-06-23

Family

ID=76687074

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911404640.8A Active CN113127021B (en) 2019-12-30 2019-12-30 Application upgrading method and computer equipment

Country Status (2)

Country Link
CN (1) CN113127021B (en)
WO (1) WO2021135301A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115733833A (en) * 2022-10-31 2023-03-03 成都赛力斯科技有限公司 File time-sharing downloading method and device, computer equipment and storage medium
CN115811413A (en) * 2022-07-15 2023-03-17 北京金朗维科技有限公司 Online upgrading method and device for wireless code scanning equipment

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114338533B (en) * 2021-12-30 2024-05-28 广东明创软件科技有限公司 Adjustment method, electronic equipment and computer storage medium
CN115913946B (en) * 2022-11-03 2024-06-25 赣州师范高等专科学校 Vending machine app system upgrading processing method
CN115941316B (en) * 2022-12-05 2023-08-08 广州力麒智能科技有限公司 Intelligent self-service terminal middleware calling method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040059827A1 (en) * 2002-09-20 2004-03-25 Industrial Technology Research Institute System for controlling network flow by monitoring download bandwidth
CN103259672A (en) * 2012-02-17 2013-08-21 阿里巴巴集团控股有限公司 Software upgrading method and software upgrading system
WO2016019725A1 (en) * 2014-08-04 2016-02-11 中兴通讯股份有限公司 Software upgrade management method, device, system and computer storage medium
CN105681073A (en) * 2015-12-25 2016-06-15 北京奇虎科技有限公司 Application program updating method and device
CN108599997A (en) * 2018-04-04 2018-09-28 北京奇艺世纪科技有限公司 Upgrade control method and device
CN110022364A (en) * 2019-04-04 2019-07-16 北京北信源信息安全技术有限公司 A kind of document down loading method and server

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9542172B2 (en) * 2013-02-05 2017-01-10 Apple Inc. Automatic updating of applications
CN104978335B (en) * 2014-04-04 2018-12-07 阿里巴巴集团控股有限公司 Data access control method and device
CN106550044B (en) * 2016-11-24 2020-03-03 腾讯科技(深圳)有限公司 Application downloading method, downloading server, downloading client and application downloading system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040059827A1 (en) * 2002-09-20 2004-03-25 Industrial Technology Research Institute System for controlling network flow by monitoring download bandwidth
CN103259672A (en) * 2012-02-17 2013-08-21 阿里巴巴集团控股有限公司 Software upgrading method and software upgrading system
WO2016019725A1 (en) * 2014-08-04 2016-02-11 中兴通讯股份有限公司 Software upgrade management method, device, system and computer storage medium
CN105681073A (en) * 2015-12-25 2016-06-15 北京奇虎科技有限公司 Application program updating method and device
CN108599997A (en) * 2018-04-04 2018-09-28 北京奇艺世纪科技有限公司 Upgrade control method and device
CN110022364A (en) * 2019-04-04 2019-07-16 北京北信源信息安全技术有限公司 A kind of document down loading method and server

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115811413A (en) * 2022-07-15 2023-03-17 北京金朗维科技有限公司 Online upgrading method and device for wireless code scanning equipment
CN115811413B (en) * 2022-07-15 2023-07-25 北京金朗维科技有限公司 Online upgrading method and device for wireless code scanning equipment
CN115733833A (en) * 2022-10-31 2023-03-03 成都赛力斯科技有限公司 File time-sharing downloading method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
WO2021135301A1 (en) 2021-07-08
CN113127021B (en) 2023-06-23

Similar Documents

Publication Publication Date Title
CN113127021B (en) Application upgrading method and computer equipment
CN109246229B (en) Method and device for distributing resource acquisition request
WO2021142609A1 (en) Information reporting method, apparatus and device, and storage medium
US20100049570A1 (en) Method and system for determining resource usage of each tenant in a multi-tenant architecture
CN111447577B (en) Quota management method and device
CN110166523B (en) Content updating method, device, equipment and computer readable storage medium
CN110888658B (en) Method and device for dynamically changing function modules in application program and storage medium
CN110933140B (en) CDN storage allocation method, system and electronic equipment
CN109996125A (en) Generate method, apparatus, electronic equipment and the storage medium of video list
CN108353200A (en) Quality settings suggestion based on data plan and its use to manage content provider server
CN112379982A (en) Task processing method and device, electronic equipment and computer readable storage medium
CN110336713B (en) Method for detecting end-to-end time delay and rate of cellular Internet of things and terminal equipment
JP4887999B2 (en) Super schedule device, process execution system, process request method, and super scheduler program
CN115017030A (en) Resource allocation method, device, electronic equipment and storage medium
CN111273939B (en) Information processing method, information processing device and terminal equipment
CN108418730B (en) Network flow testing method, device, equipment and computer readable storage medium
US20140012921A1 (en) File sharing method and terminal
CN110019372B (en) Data monitoring method, device, server and storage medium
CN114647497A (en) Kshear-based batch processing method, device, equipment and medium
CN113840313B (en) Network mode control method and device of mobile terminal and computer equipment
CN113329377A (en) Bandwidth resource scheduling method and device, electronic device and computer equipment
CN105142130B (en) A kind of information processing method and electronic equipment
JP6943318B1 (en) Programs, information processing methods, and information processing equipment
CN113049968B (en) Method, device, electronic equipment and storage medium for determining average current of battery
CN110309344B (en) Data resource acquisition method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant