CN113296808A - Application program downloading control method and server - Google Patents

Application program downloading control method and server Download PDF

Info

Publication number
CN113296808A
CN113296808A CN202110555339.8A CN202110555339A CN113296808A CN 113296808 A CN113296808 A CN 113296808A CN 202110555339 A CN202110555339 A CN 202110555339A CN 113296808 A CN113296808 A CN 113296808A
Authority
CN
China
Prior art keywords
sub
time period
flow
preset time
period
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.)
Pending
Application number
CN202110555339.8A
Other languages
Chinese (zh)
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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202110555339.8A priority Critical patent/CN113296808A/en
Publication of CN113296808A publication Critical patent/CN113296808A/en
Pending legal-status Critical Current

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
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation

Abstract

The application discloses a download control method and a server of an application program, and belongs to the technical field of electronic equipment. The download control method of the application program comprises the following steps: receiving a version updating request of an application program sent by first electronic equipment; in response to the version updating request, determining target flow required for downloading an updating version under the condition that the updating version exists in the application program; and pushing an updated version to the first electronic equipment under the condition that the target flow is less than or equal to the preset time period and the flow is allowed to be used.

Description

Application program downloading control method and server
Technical Field
The application belongs to the technical field of electronic equipment, and particularly relates to a download control method and a server of an application program.
Background
When an electronic device of a user updates an Application (APP), a provider of the APP needs to pay a Content Delivery Network (CDN) fee corresponding to a CDN manufacturer. In the related art, CDN manufacturers all use an algorithm of daily peak-monthly averaging for charging, that is, peak CDN traffic of each day in the month is averaged, and the total traffic is calculated and then multiplied by unit price for charging.
If each user perceives that the update upgrade is immediately performed after the new version APP is released, a peak of CDN traffic appears instantly, and the CDN traffic is very low or even close to zero in a time period without the version update. In the above charging mode, the provider of APP needs to pay expensive CDN fees.
Disclosure of Invention
The embodiment of the application aims to provide a download control method and a server of an application program, and the problem that in the related art, an APP provider needs to pay expensive CDN cost when software is updated and upgraded can be solved.
In a first aspect, an embodiment of the present application provides a method for controlling downloading of an application program, where the method includes:
receiving a version updating request of an application program sent by first electronic equipment;
in response to the version updating request, determining target flow required for downloading an updating version under the condition that the updating version exists in the application program;
and pushing an updated version to the first electronic equipment under the condition that the target flow is less than or equal to the preset time period and the flow is allowed to be used.
In a second aspect, an embodiment of the present application provides a server, where the server includes:
the receiving module is used for receiving a version updating request of an application program sent by first electronic equipment;
the acquisition module is used for responding to the version updating request, and determining the target flow required by downloading the updating version under the condition that the updating version exists in the application program;
the pushing module is used for pushing the updated version to the first electronic equipment under the condition that the target flow is less than or equal to the preset time period and the use flow is allowed.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instructions stored on the memory and executable on the processor, where the program or instructions, when executed by the processor, implement the steps of the download control method according to the first aspect.
In a fourth aspect, embodiments of the present application provide a readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps of the download control method according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the download control method according to the first aspect.
In the embodiment of the application, when receiving a version update request of an application sent by a first electronic device, a second electronic device (e.g., a server) determines that the first electronic device needs to perform version update of the application. In this case, whether the application program has an updated version is determined, and if the application program has the updated version, it is determined whether a target flow rate for downloading the updated version by the first electronic device exceeds an allowable usage flow rate within a preset time period. If the target flow exceeds the allowed use flow in the preset time period, feeding back information without an updated version to the first electronic equipment; and if the target flow does not exceed the allowed use flow in the preset time period, pushing the updated version to the first electronic equipment so that the first electronic equipment downloads the updated version, thereby updating the version of the application program. By the mode, the idea of peak clipping and valley filling is adopted, the control is carried out in the preset time period, only the updated version which does not exceed the flow control set value (namely the flow is allowed to be used) is allowed to be downloaded, so that the CDN flow in unit time is controlled, the situation that peaks appear on CDN flow waveforms is avoided, the original CDN flow waveforms which are suddenly high and suddenly low are changed into stable, after the daily peak value is reduced, the cost of the CDN is reduced along with the daily peak value according to the charging rule, the corresponding saved bandwidth flow can also be used by other users, and the purpose of saving flow and reducing cost is fully achieved.
Drawings
Fig. 1 is a flowchart illustrating an application download control method according to an embodiment of the present application;
FIG. 2 is a second flowchart illustrating a method for controlling downloading of an application according to an embodiment of the present application;
FIG. 3 is a schematic diagram of the double configuration rate problem of an embodiment of the present application;
FIG. 4 is a schematic diagram of window movement in an embodiment of the present application;
FIG. 5 is an interactive schematic diagram of configuring total usage traffic for a period of time according to an embodiment of the present application;
FIG. 6 is a schematic block diagram of a server of an embodiment of the present application;
FIG. 7 is one of the schematic block diagrams of an electronic device of an embodiment of the present application;
fig. 8 is a second schematic block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described clearly below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments that can be derived by one of ordinary skill in the art from the embodiments given herein are intended to be within the scope of the present disclosure.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application are capable of operation in sequences other than those illustrated or described herein. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
The following describes in detail a download control method, a server, an electronic device, and a readable storage medium of an application program provided in the embodiments of the present application through specific embodiments and application scenarios thereof with reference to the accompanying drawings.
An embodiment of the present application provides a method for controlling downloading of an application program, and as shown in fig. 1, the method for controlling downloading includes:
102, receiving a version updating request of an application program sent by first electronic equipment;
104, responding to the version updating request, and determining the target flow required by downloading the updated version under the condition that the updated version exists in the application program;
and 106, pushing an updated version to the first electronic device under the condition that the target flow is less than or equal to the preset time period and the flow is allowed to be used.
The first electronic device can be a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted electronic device, a wearable device and the like.
In this embodiment, the second electronic device (e.g., a server) determines that the first electronic device needs to perform the version update of the application program when receiving the version update request of the application program sent by the first electronic device. In this case, it is determined whether the application program has an updated version, and if the application program has an updated version, it is determined whether a target flow rate required by the first electronic device to download the updated version exceeds an allowable usage flow rate in a preset time period (e.g., a current time period). If the target flow exceeds the allowed use flow in the preset time period, feeding back information without an updated version to the first electronic equipment; and if the target flow does not exceed the allowed use flow in the preset time period, pushing the updated version to the first electronic equipment so that the first electronic equipment downloads the updated version, thereby updating the version of the application program.
By the mode, the idea of peak clipping and valley filling is adopted, the control is carried out in the preset time period, only the updated version which does not exceed the flow control set value (namely the flow is allowed to be used) is allowed to be downloaded, so that the CDN flow in unit time is controlled, the situation that peaks appear on CDN flow waveforms is avoided, the original CDN flow waveforms which are suddenly high and suddenly low are changed into stable, after the daily peak value is reduced, the cost of the CDN is reduced along with the daily peak value according to the charging rule, the corresponding saved bandwidth flow can also be used by other users, and the purpose of saving flow and reducing cost is fully achieved.
It should be noted that, when the application program of the first electronic device has a bug problem and needs to be repaired in time, the specific version of the APP needs to be controlled not to perform flow control, so that the user can perform program upgrade in time without performing flow control. Specifically, the version update request carries a current version number of the application program, and whether the application program needs to be version-upgraded or version-repaired is determined according to the current version number, so that traffic control is performed during version upgrading, and traffic control is not performed during version repairing.
Further, in an embodiment of the present application, after determining a target traffic required for downloading the updated version, the method further includes: and determining the allowable use flow in the preset time period according to the total use flow and the used flow in the preset time period.
In this embodiment, a way of determining the allowed usage flow rate within a preset time period is defined.
First, a total usage flow rate within a preset time period is determined. Specifically, the larger the CDN bandwidth is, the faster the APP upgrade speed will be, and according to the CDN cost calculation rule, that is, the daily peak-monthly average, the higher the cost is. A compromise between time and cost is made to determine how much bandwidth is to be used (i.e., total used traffic) for a certain period of time, e.g., to calculate how much traffic is allowed to be downloaded in total per second (Mbps). Assuming that the result of the calculation is now 5000Mbps, a total of 5000M is allowed to be downloaded in one second. Calculated as 1Mb equals 1 token, there are 5000 tokens per second. Of course, if finer grained control is desired, the calculation can also be done as 1Kb or 1b equals 1 token.
After 5000 tokens per second are determined, 5000 tokens per second need to be issued within the system for standby, 5000 tokens are issued at the current time (e.g., 26/3/26/2021: 19:46:48), and 5000 tokens are again issued the next second (26/3/26/2021: 19:46: 49).
Because multiple applications may be downloaded over a period of time, a portion of the traffic may have been used to download other applications before the application currently needing downloading. Therefore, it is necessary to further determine the used flow rate within the preset time period. And calculating the difference between the total used flow and the used flow to obtain the allowed used flow in the preset time period.
In this embodiment, an implementable process of the download control method of the application program according to the embodiment of the present application is shown in fig. 2, and includes:
step 202, an APP of a client side initiates a version updating request at intervals;
step 204, the server detects whether an updated version of the APP exists, if not, step 206 is entered, and if so, step 208 is entered;
step 206, feeding back information without updated version to the client;
step 208, judging whether the token in the current time period is enough for downloading the update version, if so, entering step 210, and if not, entering step 206;
step 210, updating the number of the current consumed tokens;
step 212, feeding back a download address of the updated version to the client;
in step 214, the client downloads the updated version and performs version update of the APP.
In this embodiment, the APP of the client (i.e. the first electronic device) needs to set a timer, and periodically sends a version update request, such as a request every 1 minute, as the server (i.e. the server), where the current version number of the APP needs to be carried. And after receiving the version updating request, the server compares the current version number carried in the version updating request with the latest version number to judge whether the APP of the client needs to be updated. If the updating is not needed, returning the information of the version which is not updated; if the update is needed, the size of the update version of the APP to be downloaded currently is obtained, and then rounding is performed upwards, for example, the size of the update version is 17.5M, 18M is obtained, and it is determined that 18 tokens are needed for the current download according to the token 1M-1.
Further, it is determined how many tokens remain to be used in 5000 tokens issued at the current time (e.g., 3/26/19/46: 48 in 2021), and it is then determined whether the remaining token minus 18 is greater than zero, and if less than zero, it indicates that the token is exceeded and the download cannot be performed, the process ends. Otherwise, the download address of the updated version is fed back to the client by subtracting 18 from the number of remaining tokens. And after receiving the download address, the client initiates downloading of the update version, and then installation is carried out until the APP update is completed.
By the mode, the idea of peak clipping and valley filling is adopted, and the flow size available for downloading in a certain time period is controlled, so that the CDN cost required to be paid is reduced.
Further, in an embodiment of the present application, determining the usage flow rate allowed in the preset time period includes: and under the condition that the number of the application programs is multiple, determining the allowed use flow within the preset time period corresponding to the application programs according to the sequence of the receiving time of the version updating requests.
In this embodiment, in actual use, one first electronic device may download and update multiple applications at the same time, and multiple first electronic devices may update one application at the same time, which is more complicated and thus requires concurrent control. Specifically, queuing processing is performed according to the sequence of the version updating requests, so that errors in calculation of the allowed use flow are prevented. For example, the size of the application program corresponding to the version-update request received first is 15M, and the size of the application program corresponding to the version-update request received later is 18M, so that when deducting, 15 tokens need to be deducted first, and then 18 tokens need to be deducted, so as to obtain the allowable usage traffic of the application program corresponding to the version-update request received later.
By the method, the accuracy of calculating the allowable usage flow of the downloaded application program is improved, so that the accuracy of judging whether the application program is downloaded is ensured, and the purposes of saving flow and reducing cost are achieved.
Further, in an embodiment of the present application, before receiving a version update request of an application program sent by a first electronic device, the method further includes: dividing a preset time period into a preset number of sub-time periods, and setting corresponding sub-flow for each sub-time period according to the total use flow in the preset time period; after determining the target flow needed for downloading the updated version, the method further comprises the following steps: determining a first sub-time period corresponding to the receiving time of the version updating request, wherein the first sub-time period is one of the sub-time periods with the preset number; under the condition that the first sub-time period is a first sub-time period of a preset time period, taking the sub-allowable use flow corresponding to the first sub-time period as the allowable use flow in the preset time period; under the condition that the first sub-time period is the Nth sub-time period of the preset time period, accumulating the sub-allowable usage flow corresponding to the second sub-time period to the first sub-time period, and taking the sub-allowable usage flow corresponding to the first sub-time period as the allowable usage flow in the preset time period; wherein, N is a positive integer greater than 1, the second sub-period is N-1 sub-periods before the first sub-period in the preset period, the sub-permitted usage flow of the first sub-period is an unused flow in the sub-flows of the first sub-period, and the sub-permitted usage flow of the second sub-period is an unused flow in the sub-flows of the second sub-period.
In this embodiment, another way of determining the allowable usage flow rate for the preset time period is defined.
It should be noted that, in the above embodiment, how many tokens are generated every second, there is no relationship between the previous second and the next second, and this control manner is referred to as a fixed window token generation policy. If the generation rule of the current token is set to 1000 tokens in 1 second, and as shown in fig. 3, 1000 tokens are used by the APP requested by the first electronic device for updating in the last 100ms of the 1 st second and the first 100ms of the 2 nd second, it may occur that CDN traffic corresponding to 2000 tokens needs to be downloaded in this 200ms period. This results in a double configuration rate problem at 2 seconds due to network communication delays, i.e., the 1 st and 2 nd second traffic is used up to 2 seconds. Or, 100 tokens are used by the APP requested to be updated by the first electronic device in the last 100ms and the last 100ms of the 1 st second, and then CDN traffic corresponding to 200 tokens needs to be downloaded in the 200ms period. This results in a double configuration rate problem at the last 100ms of the 1 st second because of network traffic delays, i.e., the last 100ms and last 100ms of traffic are used in their entirety.
In the embodiment of the application, the sliding window token generation strategy is used for controlling the bandwidth of the CDN, so that the dynamic token generation service is improved, and the problem is solved.
Specifically, a preset time period is divided into a preset number of sub-time periods, and corresponding sub-flow is set for each sub-time period according to the total usage flow in the preset time period. For example, an original window (i.e., a preset time period) is divided into a plurality of equally divided small windows (i.e., sub-time periods), each small window corresponds to a different time point and has an independent counter, and each small window is provided with a certain number of tokens. When the time point of receipt of the version-update request is greater than the maximum time point of the current window, the window is shifted forward by one small window (the data of the first small window is discarded, the second small window becomes the first small window, and the current version-update request is placed in the last small window). It is worth noting that the sum of all requests for the entire window cannot be greater than the total number of tokens generated per second configured.
Further, a first sub-time period corresponding to the receiving time of the version updating request is determined, and when the first sub-time period is a first sub-time period of the preset time period, the sub-permitted usage flow of the first sub-time period is used as the permitted usage flow in the preset time period. It should be noted that the sub permitted usage flow rate of the first sub time period is an unused flow rate in the sub flow rates of the first sub time period, and if the first sub time period is not used, all the sub flow rates of the first sub time period are the sub permitted usage flow rate of the first sub time period.
When the first sub-period is the nth sub-period of the preset time period, the sub-allowable usage flow rates corresponding to N-1 sub-periods before the first sub-period in the preset time period are accumulated to the first sub-period, and it should be noted that the sub-allowable usage flow rates corresponding to N-1 sub-periods are the unused portions of the sub-flow rates corresponding to each sub-period in the N-1 sub-periods.
At this time, the sub permitted usage flow rate corresponding to the first sub time period includes the sub permitted usage flow rate of the first sub time period itself, and also includes the sub permitted usage flow rate corresponding to N-1 sub time periods before the first sub time period. And taking the sub-allowable use flow corresponding to the first sub-time period as the allowable use flow in the preset time period.
As shown in fig. 4, a one second window is divided into 6 widgets, each of which takes 1/6 seconds and slides forward when the user request exceeds the first 1/6 seconds. It is noted that it is necessary to control that after each sliding in figure 4, the size of the tokens within a 1 second window cannot exceed the total number of tokens generated per second.
The time span of the small window can be set arbitrarily, and can be between 1 millisecond and 1000 milliseconds.
The example is given with the size of the small window set to 1 millisecond. If the generation rule of the token is set to 1000 tokens in 1 second, the corresponding token window is 1 token, and if the current user requests to download the 18M application, 18 tokens are needed. If the number of accumulated tokens in the current small window is only 1, enough tokens cannot be acquired, and the downloading fails.
If the next user requests at the time point of the 18 th small window, the small window slides forward 17 times, and the 18 th small window accumulates 18 tokens, the downloading is allowed just meeting the user's requirement for the tokens, and the corresponding number of tokens is subtracted, and then the accumulated tokens of the next small window starts from 1. If the current portlet accumulates 18 tokens and the user requests a 15M application to be downloaded, the user is allowed to download and deduct 15 tokens and pass the excess tokens to the next portlet, the number of tokens accumulated for the next portlet is 4(3+1, 3 is left over from the previous portlet and 1 is for the portlet itself). It should be noted that the number of tokens accumulated in the next window cannot exceed the total number of tokens in 1 second, that is, cannot exceed 1000 tokens, and if the number of tokens exceeds the total number of tokens, the zero clearing is performed directly.
According to the embodiment of the application, the generation of the allowable traffic is improved through the idea of sliding the window, the traffic is accumulated to the sub-time period corresponding to the receiving time of the version updating request, the traffic can be provided for downloading the updated version in a timing manner, and the problem of double configuration rate in a certain second which may occur is solved.
Further, in an embodiment of the present application, the method for controlling downloading of the application program further includes: determining the total usage flow within a preset time period according to the historical download times of the first electronic equipment within the preset time period; the preset time period corresponds to the preset time period, and the more the historical download times are, the larger the total use flow is.
In this embodiment, the total usage traffic in the preset time period may be a fixed value, for example, the total usage traffic per second is calculated by dividing the total CDN amount required for one day by 24 × 3600, and this embodiment is not changed once the total usage traffic in a certain time period is set. However, this embodiment does not allow fine control, and in practical applications, the number of downloads may vary from one time period to another, for example, the peak period of the user's downloads may be 19:00 to 24: 00, and the other times are download low peak periods. For another example, in the case of holidays, the number of downloads by the user may be higher than usual. Therefore, the embodiment of the application provides a function of dynamically adjusting the total usage flow within a certain time period according to the historical download times.
In particular, there is a need for a configuration service that can configure the total usage traffic for a certain period of time according to a specific time interval.
It should be noted that, the configurator can adjust the total usage flow of a certain time period in a large period at any time according to the development condition of the service. Illustratively, the total usage flow rate per second is set according to the granularity of one hour, i.e. the same total usage flow rate is issued every second during the one hour. For example, if the download amount is small, the number of tokens is limited to 500 tokens per second (i.e., the total usage traffic per second) within one hour, and if the download amount is large, the number of tokens is increased, the number of tokens is limited to 1500 tokens per second (i.e., the total usage traffic per second) within one hour.
If finer granularity control is also desired, granularity to the order of minutes may be supported. The optimization can also be performed in combination with the actual situation, for example, the control is performed according to the granularity of 3 hours or 4 hours, and the workload of the configuration is optimized.
And generating the number of tokens per second in real time according to the rule of configuration personnel in configuration service configuration for the APP update service. As shown in fig. 5, the configurator configures the size of the number of tokens per time period to the configuration service. The token dynamic generation service obtains configuration data and generates a number of tokens per second. The client (i.e., the first electronic device) sends a version update request to the APP update service. The APP updating service dynamically generates a token size of a service request preset time period to the token, judges whether the token number is allowed to be downloaded, and updates the consumed token number. When the downloading is allowed, the APP updating service returns the downloading address of the APP to the client, and the client carries out downloading and installation.
The configuration service, the token dynamic generation service and the APP update service are service terminals (namely servers).
Through the mode, the bandwidth use of the CDN can be controlled in a finer granularity mode by adding the configuration service and the token dynamic generation service, and the total use flow can be adjusted according to different time intervals, so that the purpose of flexibly controlling the total use flow in a certain time interval is achieved.
An embodiment of the present application further provides a server, as shown in fig. 6, where the server 600 includes:
a receiving module 602, configured to receive a version update request of an application program sent by a first electronic device;
an obtaining module 604, configured to determine, in response to a version update request, a target traffic required for downloading an update version when the update version exists in an application;
the pushing module 606 is configured to push an updated version to the first electronic device when the target traffic is less than or equal to the usage traffic allowed within the preset time period.
In this embodiment, when receiving a version update request of an application sent by a first electronic device, a server determines that the first electronic device needs to perform version update of the application. In this case, whether the application program has an updated version is determined, and if the application program has the updated version, it is determined whether a target flow rate for downloading the updated version by the first electronic device exceeds an allowable usage flow rate within a preset time period. If the target flow exceeds the allowed use flow in the preset time period, feeding back information without an updated version to the first electronic equipment; and if the target flow does not exceed the allowed use flow in the preset time period, pushing the updated version to the first electronic equipment so that the first electronic equipment downloads the updated version, thereby updating the version of the application program.
By the mode, the idea of peak clipping and valley filling is adopted, the control is carried out in the preset time period, only the updated version which does not exceed the flow control set value (namely the flow is allowed to be used) is allowed to be downloaded, so that the CDN flow in unit time is controlled, the situation that peaks appear on CDN flow waveforms is avoided, the original CDN flow waveforms which are suddenly high and suddenly low are changed into stable, after the daily peak value is reduced, the cost of the CDN is reduced along with the daily peak value according to the charging rule, the corresponding saved bandwidth flow can also be used by other users, and the purpose of saving flow and reducing cost is fully achieved.
Further, in an embodiment of the present application, the server 600 further includes: the first determining module is used for determining the allowed use flow in the preset time period according to the total use flow and the used flow in the preset time period.
Further, in an embodiment of the application, the first determining module is specifically configured to determine, when the number of the application programs includes multiple applications, that the flow is allowed to be used within a preset time period corresponding to the application program according to a sequence of receiving times of the version update requests.
Further, in an embodiment of the present application, the server 600 further includes: the dividing module is used for dividing the preset time period into a preset number of sub-time periods and setting corresponding sub-flow for each sub-time period according to the total use flow in the preset time period; a second determination module to: determining a first sub-time period corresponding to the receiving time of the version updating request, wherein the first sub-time period is one of the sub-time periods with the preset number; under the condition that the first sub-time period is a first sub-time period of a preset time period, taking the sub-allowable use flow corresponding to the first sub-time period as the allowable use flow in the preset time period; under the condition that the first sub-time period is the Nth sub-time period of the preset time period, accumulating the sub-allowable usage flow corresponding to the second sub-time period to the first sub-time period, and taking the sub-allowable usage flow corresponding to the first sub-time period as the allowable usage flow in the preset time period; wherein, N is a positive integer greater than 1, the second sub-period is N-1 sub-periods before the first sub-period in the preset period, the sub-permitted usage flow of the first sub-period is an unused flow in the sub-flows of the first sub-period, and the sub-permitted usage flow of the second sub-period is an unused flow in the sub-flows of the second sub-period.
Further, in an embodiment of the present application, the server 600 further includes: the third determining module is used for determining the total usage flow in the preset time period according to the historical download times of the first electronic equipment in the preset time period; the preset time period corresponds to the preset time period, and the more the historical download times are, the larger the total use flow is.
The first electronic device in the embodiment of the present application may be an apparatus, or may be a component, an integrated circuit, or a chip in a terminal. The first electronic device may be a mobile electronic device or a non-mobile electronic device. By way of example, the Mobile electronic device may be a Mobile phone, a tablet Computer, a notebook Computer, a palm top Computer, a vehicle-mounted electronic device, a wearable device, an Ultra-Mobile Personal Computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-Mobile electronic device may be a Network Attached Storage (NAS), a Personal Computer (Personal Computer, PC), a Television (TV), a teller machine, a self-service machine, and the like, and the embodiments of the present application are not limited in particular.
The first electronic device in the embodiment of the present application may be an apparatus having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, and embodiments of the present application are not limited specifically.
The server 600 provided in this embodiment of the application can implement each process implemented in the method embodiments of fig. 1 to fig. 5, and is not described here again to avoid repetition.
Optionally, as shown in fig. 7, an electronic device 700 is further provided in this embodiment, where the electronic device 700 is a server in the foregoing embodiment, and the electronic device 700 includes a processor 702, a memory 704, and a program or an instruction that is stored in the memory 704 and can be run on the processor 702, and when the program or the instruction is executed by the processor 702, the process of the embodiment of the download control method of the application program is implemented, and the same technical effect can be achieved, and details are not described here to avoid repetition.
It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and the non-mobile electronic devices described above.
Fig. 8 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
The electronic device 800 includes, but is not limited to: radio frequency unit 802, network module 804, audio output unit 806, input unit 808, sensors 810, display unit 812, user input unit 814, interface unit 816, memory 818, and processor 820, among other components.
Those skilled in the art will appreciate that the electronic device 800 may further include a power supply (e.g., a battery) for supplying power to the various components, and the power supply may be logically connected to the processor 820 via a power management system, so as to manage charging, discharging, and power consumption management functions via the power management system. The electronic device structure shown in fig. 8 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than those shown, or combine some components, or arrange different components, and thus, the description is omitted here.
In this embodiment, the electronic device 800 is a server in the foregoing embodiment, where the radio frequency unit 802 is configured to receive a version update request of an application program sent by a first electronic device; a processor 820, configured to determine, in response to a version update request, a target traffic required to download an updated version in a case where the updated version exists in an application; the radio frequency unit 802 is further configured to push an updated version to the first electronic device when the target traffic is less than or equal to a preset time period and the usage traffic is allowed.
In this embodiment, when receiving a version update request of an application program sent by a first electronic device, a second electronic device determines that the first electronic device needs to perform version update of the application program. In this case, whether the application program has an updated version is determined, and if the application program has the updated version, it is determined whether a target flow rate for downloading the updated version by the first electronic device exceeds an allowable usage flow rate within a preset time period. If the target flow exceeds the allowed use flow in the preset time period, feeding back information without an updated version to the first electronic equipment; and if the target flow does not exceed the allowed use flow in the preset time period, pushing the updated version to the first electronic equipment so that the first electronic equipment downloads the updated version, thereby updating the version of the application program.
By the mode, the idea of peak clipping and valley filling is adopted, the control is carried out in the preset time period, only the updated version which does not exceed the flow control set value (namely the flow is allowed to be used) is allowed to be downloaded, so that the CDN flow in unit time is controlled, the situation that peaks appear on CDN flow waveforms is avoided, the original CDN flow waveforms which are suddenly high and suddenly low are changed into stable, after the daily peak value is reduced, the cost of the CDN is reduced along with the daily peak value according to the charging rule, the corresponding saved bandwidth flow can also be used by other users, and the purpose of saving flow and reducing cost is fully achieved.
Further, the processor 820 is further configured to determine an allowable usage flow rate in the preset time period according to the total usage flow rate and the used flow rate in the preset time period.
Further, in an embodiment of the present application, the processor 820 is specifically configured to determine, when the number of the application programs includes multiple applications, that the flow is allowed to be used within a preset time period corresponding to the application program according to a sequence of receiving times of the version update requests.
Further, in an embodiment of the present application, the processor 820 is further configured to: dividing a preset time period into a preset number of sub-time periods, and setting corresponding sub-flow for each sub-time period according to the total use flow in the preset time period; determining a first sub-time period corresponding to the receiving time of the version updating request, wherein the first sub-time period is one of the sub-time periods with the preset number; under the condition that the first sub-time period is a first sub-time period of a preset time period, taking the sub-allowable use flow corresponding to the first sub-time period as the allowable use flow in the preset time period; under the condition that the first sub-time period is the Nth sub-time period of the preset time period, accumulating the sub-allowable usage flow corresponding to the second sub-time period to the first sub-time period, and taking the sub-allowable usage flow corresponding to the first sub-time period as the allowable usage flow in the preset time period; wherein, N is a positive integer greater than 1, the second sub-period is N-1 sub-periods before the first sub-period in the preset period, the sub-permitted usage flow of the first sub-period is an unused flow in the sub-flows of the first sub-period, and the sub-permitted usage flow of the second sub-period is an unused flow in the sub-flows of the second sub-period.
Further, in an embodiment of the present application, the processor 820 is further configured to determine a total usage flow rate in a preset time period according to a historical download number of the first electronic device in the preset time period; the preset time period corresponds to the preset time period, and the more the historical download times are, the larger the total use flow is.
It should be understood that, in the embodiment of the present application, the radio frequency unit 802 may be used for transceiving information or transceiving signals during a call, and in particular, receiving downlink data of a base station or sending uplink data to the base station. The radio frequency unit 802 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like.
The network module 804 provides wireless broadband internet access to the user, such as assisting the user in emailing, browsing web pages, and accessing streaming media.
The audio output unit 806 may convert audio data received by the radio frequency unit 802 or the network module 804 or stored in the memory 818 into an audio signal and output as sound. Also, the audio output unit 806 may also provide audio output related to a specific function performed by the electronic device 800 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 806 includes a speaker, a buzzer, a receiver, and the like.
The input unit 808 is used to receive audio or video signals. The input Unit 808 may include a Graphics Processing Unit (GPU) 8082 and a microphone 8084, and the Graphics processor 8082 processes image data of still pictures or video obtained by an image capturing device (such as a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 812, or stored in the memory 818 (or other storage medium), or transmitted via the radio unit 802 or the network module 804. The microphone 8084 can receive sound and can process the sound into audio data, which can be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 802 in the case of a phone call mode.
The electronic device 800 also includes at least one sensor 810, such as a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, a light sensor, a motion sensor, and others.
The display unit 812 is used to display information input by the user or information provided to the user. The display unit 812 may include a display panel 8122, and the display panel 8122 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like.
The user input unit 814 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device. Specifically, the user input unit 814 includes a touch panel 8142 and other input devices 8144. Touch panel 8142, also referred to as a touch screen, may collect touch operations by a user on or near it. The touch panel 8142 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 820, and receives and executes commands sent by the processor 820. Other input devices 8144 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein.
Further, the touch panel 8142 can be overlaid on the display panel 8122, and when the touch panel 8142 detects a touch operation thereon or nearby, the touch operation is transmitted to the processor 820 to determine the type of the touch event, and then the processor 820 provides a corresponding visual output on the display panel 8122 according to the type of the touch event. The touch panel 8142 and the display panel 8122 may be provided as two separate components or may be integrated into one component.
The interface unit 816 is an interface for connecting an external device to the electronic apparatus 800. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 816 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the electronic device 800 or may be used to transmit data between the electronic device 800 and external devices.
The memory 818 may be used to store software programs as well as various data. The memory 818 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the mobile terminal, and the like. Additionally, the memory 818 may include high speed random access memory and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 820 performs various functions of the electronic device 800 and processes data by executing or executing software programs and/or modules stored in the memory 818 and invoking the data stored in the memory 818 to thereby perform overall monitoring of the electronic device 800. Processor 820 may include one or more processing units; preferably, the processor 820 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements the processes of the foregoing application program download control embodiment, and can achieve the same technical effects, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device in the above embodiment. Readable storage media, including computer-readable storage media, such as Read-Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, etc.
The embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement each process of the above-mentioned application download control embodiment, and can achieve the same technical effect, and in order to avoid repetition, the description is omitted here.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as system-on-chip, system-on-chip or system-on-chip, etc.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A method for controlling downloading of an application program, comprising:
receiving a version updating request of an application program sent by first electronic equipment;
in response to the version update request, determining a target flow required for downloading an updated version in the case that the updated version exists in the application program;
and pushing the updated version to the first electronic equipment under the condition that the target flow is less than or equal to the flow allowed to be used in a preset time period.
2. The method for controlling downloading of an application program according to claim 1, further comprising, after the determining a target traffic required for downloading the updated version:
and determining the allowed use flow in the preset time period according to the total use flow and the used flow in the preset time period.
3. The method for controlling downloading of an application program according to claim 2, wherein the determining that the traffic is allowed to be used within the preset time period includes:
and under the condition that the number of the application programs is multiple, determining the allowed traffic within the preset time period corresponding to the application programs according to the sequence of the receiving time of the version updating requests.
4. The method for controlling downloading of an application program according to claim 1, prior to receiving a version update request of the application program sent by the first electronic device, further comprising:
dividing the preset time period into a preset number of sub-time periods, and setting corresponding sub-flow for each sub-time period according to the total use flow in the preset time period;
after the determining the target traffic required for downloading the updated version, further comprising:
determining a first sub-time period corresponding to the receiving time of the version updating request, wherein the first sub-time period is one of the sub-time periods with the preset number;
when the first sub-time period is a first sub-time period of the preset time period, taking a sub-permitted usage flow corresponding to the first sub-time period as a permitted usage flow in the preset time period;
when the first sub-time period is the Nth sub-time period of the preset time period, accumulating the sub-allowable usage flow corresponding to the second sub-time period to the first sub-time period, and taking the sub-allowable usage flow corresponding to the first sub-time period as the allowable usage flow in the preset time period;
wherein N is a positive integer greater than 1, the second sub-period is N-1 sub-periods before the first sub-period in the preset period, the sub-permitted usage flow rate of the first sub-period is an unused flow rate in the sub-flow rate of the first sub-period, and the sub-permitted usage flow rate of the second sub-period is an unused flow rate in the sub-flow rate of the second sub-period.
5. The method for controlling download of an application program according to any of claims 2 to 4, further comprising:
determining the total usage flow in a preset time period according to the historical download times of the first electronic equipment in the preset time period;
the preset time period corresponds to the preset time period, and the more the historical download times are, the larger the total usage flow is.
6. A server, comprising:
the receiving module is used for receiving a version updating request of an application program sent by first electronic equipment;
the acquisition module is used for responding to the version updating request, and determining target flow required for downloading an updated version under the condition that the updated version exists in the application program;
the pushing module is used for pushing the updated version to the first electronic equipment under the condition that the target flow is less than or equal to the preset time period and the use flow is allowed.
7. The server of claim 6, further comprising:
and the first determining module is used for determining the allowed use flow in the preset time period according to the total use flow and the used flow in the preset time period.
8. The server according to claim 7,
the first determining module is specifically configured to determine, when the number of the application programs includes multiple, a usage permission flow rate within the preset time period corresponding to the application program according to a sequence of receiving times of the version update requests.
9. The server of claim 6, further comprising:
the dividing module is used for dividing the preset time period into a preset number of sub-time periods and setting corresponding sub-flow for each sub-time period according to the total use flow in the preset time period;
a second determination module to:
determining a first sub-time period corresponding to the receiving time of the version updating request, wherein the first sub-time period is one of the sub-time periods with the preset number;
when the first sub-time period is a first sub-time period of the preset time period, taking a sub-permitted usage flow corresponding to the first sub-time period as a permitted usage flow in the preset time period;
when the first sub-time period is the Nth sub-time period of the preset time period, accumulating the sub-allowable usage flow corresponding to the second sub-time period to the first sub-time period, and taking the sub-allowable usage flow corresponding to the first sub-time period as the allowable usage flow in the preset time period;
wherein N is a positive integer greater than 1, the second sub-period is N-1 sub-periods before the first sub-period in the preset period, the sub-permitted usage flow rate of the first sub-period is an unused flow rate in the sub-flow rate of the first sub-period, and the sub-permitted usage flow rate of the second sub-period is an unused flow rate in the sub-flow rate of the second sub-period.
10. The server according to any one of claims 7 to 9, further comprising:
the third determining module is used for determining the total usage flow in a preset time period according to the historical download times of the first electronic equipment in the preset time period;
the preset time period corresponds to the preset time period, and the more the historical download times are, the larger the total usage flow is.
CN202110555339.8A 2021-05-21 2021-05-21 Application program downloading control method and server Pending CN113296808A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110555339.8A CN113296808A (en) 2021-05-21 2021-05-21 Application program downloading control method and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110555339.8A CN113296808A (en) 2021-05-21 2021-05-21 Application program downloading control method and server

Publications (1)

Publication Number Publication Date
CN113296808A true CN113296808A (en) 2021-08-24

Family

ID=77323381

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110555339.8A Pending CN113296808A (en) 2021-05-21 2021-05-21 Application program downloading control method and server

Country Status (1)

Country Link
CN (1) CN113296808A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114301843A (en) * 2021-12-29 2022-04-08 广东明创软件科技有限公司 Traffic scheduling method and device and storage medium
CN114338531A (en) * 2021-12-22 2022-04-12 广东明创软件科技有限公司 Flow control method, device and storage medium
CN114401449A (en) * 2021-12-27 2022-04-26 中国电信股份有限公司 Version upgrading method and device and readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120108200A1 (en) * 2010-11-01 2012-05-03 Google Inc. Mobile device-based bandwidth throttling
CN103023941A (en) * 2011-09-26 2013-04-03 腾讯科技(深圳)有限公司 Terminal application program updating method and system based on Web page
US20160316388A1 (en) * 2015-04-22 2016-10-27 At&T Intellectual Property I, Lp System and method for scheduling time-shifting traffic in a mobile cellular network
CN106454953A (en) * 2016-10-09 2017-02-22 广东欧珀移动通信有限公司 Flow control method and apparatus, and terminal
CN107908730A (en) * 2017-11-14 2018-04-13 网宿科技股份有限公司 A kind of method and apparatus of downloading data
CN111726749A (en) * 2020-06-11 2020-09-29 广州小鹏车联网科技有限公司 Vehicle over-the-air OTA processing method and device
CN111970132A (en) * 2020-06-29 2020-11-20 百度在线网络技术(北京)有限公司 OTA data packet issuing flow control method, device and server

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120108200A1 (en) * 2010-11-01 2012-05-03 Google Inc. Mobile device-based bandwidth throttling
CN103023941A (en) * 2011-09-26 2013-04-03 腾讯科技(深圳)有限公司 Terminal application program updating method and system based on Web page
US20160316388A1 (en) * 2015-04-22 2016-10-27 At&T Intellectual Property I, Lp System and method for scheduling time-shifting traffic in a mobile cellular network
CN106454953A (en) * 2016-10-09 2017-02-22 广东欧珀移动通信有限公司 Flow control method and apparatus, and terminal
CN107908730A (en) * 2017-11-14 2018-04-13 网宿科技股份有限公司 A kind of method and apparatus of downloading data
CN111726749A (en) * 2020-06-11 2020-09-29 广州小鹏车联网科技有限公司 Vehicle over-the-air OTA processing method and device
CN111970132A (en) * 2020-06-29 2020-11-20 百度在线网络技术(北京)有限公司 OTA data packet issuing flow control method, device and server

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114338531A (en) * 2021-12-22 2022-04-12 广东明创软件科技有限公司 Flow control method, device and storage medium
CN114338531B (en) * 2021-12-22 2024-04-05 广东明创软件科技有限公司 Flow control method, device and storage medium
CN114401449A (en) * 2021-12-27 2022-04-26 中国电信股份有限公司 Version upgrading method and device and readable storage medium
CN114301843A (en) * 2021-12-29 2022-04-08 广东明创软件科技有限公司 Traffic scheduling method and device and storage medium

Similar Documents

Publication Publication Date Title
CN113296808A (en) Application program downloading control method and server
CN112165691B (en) Content delivery network scheduling method, device, server and medium
EP3131266B1 (en) Method and apparatus for presenting multimedia information
AU2022200464B2 (en) Method for reducing power consumption of terminal, and terminal
KR101332814B1 (en) Apparatus and Method for Controlling Polling
US11160052B2 (en) Method for adjusting broadcast receiver queue, storage medium and electronic device
CN105024947A (en) Method and device for monitoring network traffic
CN110780940A (en) Application program loading method, electronic device and storage medium
CN111651339B (en) Request quantity control method and related device
CN111988817A (en) Control method and device for OTA data packet issuing flow
CN113722105B (en) Cloud application operation method, device, equipment, medium and product
CN110708747A (en) Data transmission rate adjusting method, system, storage medium and mobile terminal
CN112866985A (en) Flow control method, resource downloading method, device, equipment and storage medium
CN111970320A (en) Control method and device for OTA data packet issuing flow
CN113873003B (en) Data transmission control method and system between storage end and communication end in Internet of things
CN116545929A (en) Congestion state detection method, device, server and storage medium for network link
EP2720151B1 (en) Communication terminal and content update method
CN113596920B (en) Flow control method, device, electronic equipment and storage medium
CN112312542B (en) Ephemeris information collection method, device, storage medium and mobile terminal
CN111818509B (en) Resource conversion method, device and equipment
CN112583706A (en) Gateway service processing method, gateway, receiving end, system and storage medium
CN110278232B (en) Method, device and system for controlling data downloading
CN111240729A (en) Software updating method, electronic device and medium
CN107483315B (en) Expression obtaining method, device and system
CN110213435A (en) A kind of function shows condition processing method and system

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