[go: up one dir, main page]

CN113296808B - Application download control method and server - Google Patents

Application download control method and server Download PDF

Info

Publication number
CN113296808B
CN113296808B CN202110555339.8A CN202110555339A CN113296808B CN 113296808 B CN113296808 B CN 113296808B CN 202110555339 A CN202110555339 A CN 202110555339A CN 113296808 B CN113296808 B CN 113296808B
Authority
CN
China
Prior art keywords
sub
time period
period
flow
preset time
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.)
Active
Application number
CN202110555339.8A
Other languages
Chinese (zh)
Other versions
CN113296808A (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.)
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/CN113296808B/en
Publication of CN113296808A publication Critical patent/CN113296808A/en
Application granted granted Critical
Publication of CN113296808B publication Critical patent/CN113296808B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation

Landscapes

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

Abstract

本申请公开了一种应用程序的下载控制方法和服务器,属于电子设备技术领域。该应用程序的下载控制方法包括:接收第一电子设备发送的应用程序的版本更新请求;响应于版本更新请求,在应用程序存在更新版本的情况下,确定下载更新版本所需的目标流量;在目标流量小于或等于预设时间段内允许使用流量的情况下,向第一电子设备推送更新版本。

The present application discloses a download control method and server for an application, belonging to the technical field of electronic devices. The download control method for the application includes: receiving a version update request for the application sent by a first electronic device; in response to the version update request, if there is an updated version of the application, determining the target flow required for downloading the updated version; if the target flow is less than or equal to the flow allowed to be used within a preset time period, pushing the updated version to the first electronic device.

Description

Download control method of application program 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 a user's electronic device updates an Application (APP), the APP provider needs to pay the corresponding CDN fee from the content delivery network (Content Delivery Network, CDN) vendor. In the related art, the CDN manufacturer uses an algorithm that averages the peak daily CDN traffic over months, that is, takes the peak daily CDN traffic over the month to average, calculates the total traffic, and multiplies the total traffic by the unit price to perform the billing.
If each user perceives that the new version APP is updated and upgraded by the vertical horse after being released, a peak of CDN traffic appears instantaneously, and the CDN traffic is very low or even close to zero in the period of no version update. In the billing mode described above, the APP provider needs to pay the expensive CDN fee.
Disclosure of Invention
The embodiment of the application aims to provide a download control method and a server of an application program, which can solve the problem that an APP provider needs to pay expensive CDN cost when software updating and upgrading are carried out in the related technology.
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 update request of an application program sent by first electronic equipment;
In response to the version update request, determining a target flow required for downloading the updated version under the condition 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 traffic is less than or equal to the allowable usage traffic in the preset time period.
In a second aspect, an embodiment of the present application provides a server, including:
The receiving module is used for receiving a version update request of the application program sent by the first electronic equipment;
the acquisition module is used for responding to the version update 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 the pushing module is used for pushing the updated version to the first electronic equipment under the condition that the target flow is smaller than or equal to the allowable use flow in the preset time period.
In a third aspect, an embodiment of the present application provides an electronic device including a processor, a memory, and a program or instructions stored on the memory and executable on the processor, the program or instructions implementing the steps of the download control method as in the first aspect when executed by the processor.
In a fourth aspect, embodiments of the present application provide a readable storage medium having stored thereon a program or instructions which, when executed by a processor, implement the steps of the download control method as in 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 a download control method as in the first aspect.
In the embodiment of the application, when receiving the version update request of the application program sent by the first electronic device, the second electronic device (such as a server) determines that the first electronic device needs to update the version of the application program. In this case, whether the application program has an updated version is determined, and if the updated version exists, it is required to determine whether the target traffic of the first electronic device for downloading the updated version exceeds the allowable usage traffic within the preset time period. If the target flow exceeds the allowable use flow in the preset time period, feeding back information of no updated version to the first electronic equipment; and if the target traffic does not exceed the allowable usage traffic within the preset time period, pushing the updated version to the first electronic equipment so that the first electronic equipment downloads the updated version, and thus version updating is carried out on the application program. By adopting the mode, the idea of peak clipping and valley filling is adopted, and only the updated version which does not exceed the flow control set value (namely the allowed flow) is allowed to be downloaded in the preset time period, so that the CDN flow in unit time is controlled, the situation that the CDN flow waveform is spiked is avoided, the original CDN flow waveform which is suddenly high or low is stabilized, after the peak value of the day is reduced, the cost of the CDN is reduced according to the charging rule, the corresponding saved bandwidth flow can be used for other users, and the purpose of saving flow and reducing cost is fully achieved.
Drawings
FIG. 1 is a flowchart of a method for controlling downloading of an application program according to an embodiment of the present application;
FIG. 2 is a second flowchart of a method for controlling downloading of an application program according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a double configuration rate problem of an embodiment of the present application;
FIG. 4 is a schematic diagram of window movement in accordance with an embodiment of the present application;
FIG. 5 is an interactive schematic diagram of configuring total usage traffic over a period of time in accordance with 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 application.
Detailed Description
The technical solutions of the embodiments of the present application will be clearly described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which are obtained by a person skilled in the art based on the embodiments of the present application, fall within the scope of protection of the present application.
The terms first, second and the like in the description and in the claims, 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 may be interchanged where appropriate such that embodiments of the application may be practiced otherwise than as specifically illustrated or described herein. Furthermore, in the description and claims, "and/or" means at least one of the connected objects, and the character "/", generally means that the associated object is an "or" relationship.
The method for controlling downloading of an application program, a server, an electronic device and a readable storage medium according to the embodiments of the present application are described in detail below with reference to the accompanying drawings.
The embodiment of the application provides a download control method of an application program, as shown in fig. 1, the download control method comprises the following steps:
step 102, receiving a version update request of an application program sent by first electronic equipment;
Step 104, in response to the version update request, determining a target flow required for downloading the updated version when the updated version exists in the application program;
And step 106, pushing the updated version to the first electronic equipment under the condition that the target flow is smaller than or equal to the allowable use flow in the preset time period.
The first electronic device may 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 an application version update when receiving a version update request of the application sent by the first electronic device. In this case, it is determined whether the application program has an updated version, and if so, it is necessary to determine whether the target traffic required for the first electronic device to download the updated version exceeds the allowable usage traffic within a preset period of time (for example, the current period of time). If the target flow exceeds the allowable use flow in the preset time period, feeding back information of no updated version to the first electronic equipment; and if the target traffic does not exceed the allowable usage traffic within the preset time period, pushing the updated version to the first electronic equipment so that the first electronic equipment downloads the updated version, and thus version updating is carried out on the application program.
By adopting the mode, the idea of peak clipping and valley filling is adopted, and only the updated version which does not exceed the flow control set value (namely the allowed flow) is allowed to be downloaded in the preset time period, so that the CDN flow in unit time is controlled, the situation that the CDN flow waveform is spiked is avoided, the original CDN flow waveform which is suddenly high or low is stabilized, after the peak value of the day is reduced, the cost of the CDN is reduced according to the charging rule, the corresponding saved bandwidth flow can be used for other users, and the purpose of saving flow and reducing cost is fully achieved.
It should be noted that, when a vulnerability problem occurs to an application program of the first electronic device and repair needs to be performed in time, a specific version of the APP needs to be controlled not to perform flow control, so that a user can perform program upgrading in time and not to perform flow control. Specifically, the version update request carries a current version number of the application program, and whether the application program needs to be subjected to version update or version repair is determined according to the current version number, so that flow control is performed when the version update is performed, and flow control is not performed when the version repair is performed.
Further, in one embodiment of the present application, after determining the 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 allowable usage flow rate for a preset period of time is defined.
First, the total usage flow rate for a preset period of time is determined. Specifically, the greater the CDN bandwidth, the faster the APP will be upgraded, and the higher the cost to spend according to CDN cost calculation rules, i.e., peak-to-month average. A compromise needs to be made in both the time and cost dimensions to determine how much bandwidth (i.e., total traffic used) to use for a given period of time, e.g., to calculate how much traffic (Mbps) to download in total per second. Assuming that the result of the calculation is 5000Mbps, a total of one second allows 5000M to be downloaded. Calculated as 1Mb equals 1 token, there are 5000 tokens per second. Of course, if finer granularity control is desired, the calculation may be performed with 1Kb or 1b equal to 1 token.
After 5000 tokens per second are determined, 5000 tokens per second need to be issued in the system for standby, 5000 tokens are issued at the current time (e.g. 2021, 3, 26, 19:46:48), and 5000 tokens are issued again at the next second (2021, 3, 26, 19:46:49).
Because multiple applications may be downloaded within a period of time, a portion of the traffic may already be used for downloading other applications before the application currently needs to be downloaded. Therefore, it is necessary to further determine the used flow rate within the preset period. And obtaining the allowable use flow in the preset time period by calculating the difference between the total use flow and the used flow.
In this embodiment, an implementation procedure of the method for controlling downloading of an application program according to the embodiment of the present application is shown in fig. 2, and includes:
Step 202, initiating a version update request by an APP of a client at intervals;
Step 204, the server detects whether there is an updated version of the APP, if not, step 206 is entered, and if so, step 208 is entered;
step 206, feeding back the information without updated version to the client;
Step 208, judging whether the token in the current time period is enough to download the updated version, if so, entering step 210, and if not, entering step 206;
step 210, updating the number of currently consumed tokens;
step 212, feeding back the download address of the updated version to the client;
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 to send a version update request like the server (i.e. the server) at regular intervals, for example, once every 1 minute, in which the current version number of the APP needs to be carried. After receiving the version update request, the server compares the current version number carried in the version update request with the latest version number to judge whether the APP of the client needs to be updated. If no update is needed, returning information of no updated version; if the update is needed, the size of the update version of the APP to be downloaded is obtained, and then the update version is rounded up, for example, the size of the update version is 17.5M, 18M is taken, and 18 tokens are needed for the current download according to 1 M=1 token.
Further, it is determined how many of 5000 tokens issued at the current time (e.g., 2021, 3, 26, 19:46: 48) remain available, then it is determined whether the remaining tokens minus 18 are greater than zero, if they are less than zero, it indicates that the tokens are exceeded and cannot be downloaded, and the process ends. Otherwise, subtracting 18 from the remaining token number, and feeding back the download address of the updated version to the client. And after receiving the download address, the client initiates downloading of the update version, then installs the update version and completes the APP update.
By adopting the mode, the flow for downloading in a certain time period is controlled by adopting the peak clipping and valley filling thought, so that CDN cost to be paid is reduced.
Further, in one embodiment of the present application, determining the allowable usage flow rate for the preset time period includes: and under the condition that the number of the application programs comprises a plurality of application programs, determining the allowable use flow in a preset time period corresponding to the application programs according to the sequence of the receiving moments of the version update 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, so that concurrency control is required. Specifically, queuing is performed according to the sequence of version update requests, so that traffic calculation errors are prevented from being allowed to be used. 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, then when deducting, it is necessary to deduct 15 tokens first and then deduct 18 tokens, so as to obtain the allowed usage flow of the application program corresponding to the version update request received later.
By the method, the accuracy of calculation of the allowable use flow of the downloaded application program is improved, so that the accuracy of judgment on whether to download the application program is ensured, and the purposes of saving flow and reducing cost are achieved.
Further, in one embodiment of the present application, before receiving the version update request of the application program sent by the 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 total usage flow in the preset time period; after determining the target traffic required to download the updated version, further comprising: determining a first sub-time period corresponding to the receiving time of the version update request, wherein the first sub-time period is one of a preset number of sub-time periods; under the condition that the first sub-time period is the first sub-time period of the preset time period, the sub-allowed use flow corresponding to the first sub-time period is used as the allowed use flow in the preset time period; under the condition that the first sub-time period is the N-th sub-time period of the preset time period, accumulating the sub-allowed use flow corresponding to the second sub-time period to the first sub-time period, and taking the sub-allowed use flow corresponding to the first sub-time period as the allowed use 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-allowed used traffic of the first sub-period is unused traffic in the sub-traffic of the first sub-period, and the sub-allowed used traffic of the second sub-period is unused traffic in the sub-traffic of the second sub-period.
In this embodiment, another way of determining the allowable usage flow rate for a preset period of time is defined.
It should be noted that, in the above embodiment, it is defined how many tokens are generated every second, and there is no relation between the previous second and the next second, and this control manner is referred to as a fixed window token generation policy. If the current token generation rule is set to 1000 tokens in 1 second, as shown in fig. 3, 1000 tokens are used by the APP that the first electronic device requests to update in the last 100ms of the 1 st second and the first 100ms of the 2 nd second, then a CDN traffic corresponding to 2000 tokens needs to be downloaded in the 200ms period. Because of the network communication delay, this results in a double configuration rate problem at 2 seconds, i.e., using both the 1 st and 2 nd second traffic for 2 nd seconds. Or 100 tokens are used by the APP that the first electronic device requests the update in the last 100ms and the next to last 100ms of the 1 st second, then CDN traffic corresponding to 200 tokens needs to be downloaded in the 200ms period will occur. Because of the network communication delay, this can lead to a double configuration rate problem at the last 100ms of the 1 st second, i.e. the penultimate 100ms and last 100ms traffic are all used within the last 100 ms.
In the embodiment of the application, the CDN bandwidth is controlled by utilizing the sliding window token generation strategy, so that the improvement of the token dynamic generation service is realized, and the problems are solved.
Specifically, the preset time period is divided into a preset number of sub-time periods, and corresponding sub-flows are 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 equal parts of small windows (i.e. sub-time periods), each small window corresponds to a different time point and is provided with an independent counter, and a certain number of tokens are correspondingly arranged in each small window. When the receiving time point of the version update request is greater than the maximum time point of the current window, the window is shifted forward by one widget (the data of the first widget is discarded, the second widget becomes the first widget, and the current version update request is placed in the last widget). Notably, all requests of the entire window add up to no more than the total number of tokens generated per second of the configuration.
Further, a first sub-time period corresponding to the receiving time of the version update request is determined, and when the first sub-time period is the first sub-time period of the preset time period, the sub-allowed use flow of the first sub-time period is used as the allowed use flow in the preset time period. Note that, the sub-allowable usage flow rate of the first sub-period is an unused flow rate in the sub-flows of the first sub-period, and if the first sub-period is unused, all the sub-flows of the first sub-period are the sub-allowable usage flow rates of the first sub-period.
Under the condition that the first sub-time period is the N-th sub-time period of the preset time period, the sub-allowable use flow corresponding to the N-1 sub-time periods positioned before the first sub-time period in the preset time period is accumulated to the first sub-time period, and the sub-allowable use flow corresponding to the N-1 sub-time periods is the unused part of the sub-flow corresponding to each of the N-1 sub-time periods.
The sub-allowed use flow corresponding to the first sub-time period comprises the sub-allowed use flow of the first sub-time period, and the sub-allowed use flow corresponding to N-1 sub-time periods before the first sub-time period. And taking the sub-allowed use flow corresponding to the first sub-time period at the moment as the allowed use flow in the preset time period.
As shown in FIG. 4, a one second window is divided into 6 portlets, each taking 1/6 second, which are slid forward when the user request exceeds the first 1/6 second. Notably, the size of tokens within a window of 1 second after each slide in FIG. 4 needs to be controlled so that the total number of tokens generated per second cannot be exceeded.
The time span of the widget may be arbitrarily set, and may be between 1 ms and 1000 ms.
The example is given with the small window set to 1 millisecond in size. If the generation rule of the present token is set to 1000 tokens for 1 second, then the corresponding one widget is 1 token, and if the current user requests to download an 18M application, 18 tokens are needed. If the number of accumulated tokens in the current small window is only 1, enough tokens are not 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 for 17 times, the 18 th small window accumulates 18 tokens, the user is just satisfied with the requirement of the tokens, the downloading is allowed, the corresponding token number is subtracted, and then the accumulated tokens of the next small window start from 1. If the current portlet accumulates 18 tokens and the user requests to download a 15M application, the user is allowed to download and deduct 15 tokens and pass the excess tokens to the next portlet, the number of tokens accumulated by the next portlet is 4 (3+1, 3 is left by the last portlet and 1 is by itself). It should be noted that the number of tokens accumulated in the next window cannot exceed the total number of tokens for 1 second, that is, cannot exceed 1000 tokens, and if so, the method is directly cleared.
The embodiment of the application improves the generation of the allowed use flow through the idea of sliding window, accumulates the flow to the sub-time period corresponding to the receiving time of the version update request, can provide the flow for downloading the update version in a timing manner, and solves the problem of double configuration rate in a certain second possibly occurring.
Further, in one embodiment of the present application, the method for controlling downloading of an application program further includes: determining total usage flow in a preset time period according to the historical downloading times 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 downloading times are, the larger the total usage flow is.
In this embodiment, the total usage flow in the preset time period may be a fixed value, for example, the total usage flow per second is calculated according to the total CDN amount required in one day divided by 24×3600, and this embodiment is not changed once the total usage flow in a certain time period is set. However, this embodiment cannot achieve fine control, and in practical applications, the number of downloads may vary between different time periods per day, for example, the peak download time of the user may be 19:00 to 24:00, 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 use flow in a certain time period according to the historical download times.
Specifically, a configuration service is required that can configure the total usage flow for a certain period of time according to a specific time interval.
It should be noted that, the configuration personnel can adjust the total usage flow in a certain period of time in a large period at any time according to the development condition of the service. The setting of the total usage flow per second is illustratively done according to a granularity of one hour, i.e. the same total usage flow is issued per second during this one hour. For example, a small download of 00:00 to 01:00 limits the issue of 500 tokens per second (i.e., total usage flow per second) for the one hour, while a large download of 20:00 to 21:00 increases the number of tokens, limiting the issue of 1500 tokens per second (i.e., total usage flow per second) for the one hour.
If finer granularity control is also desired, granularity up to the minute scale may be supported. The optimization can also be carried out according to actual conditions, such as control according to granularity of 3 hours or 4 hours, and the workload of configuration is optimized.
And generating the number of tokens per second in real time for the APP update service according to the rule of the configuration personnel in the configuration service configuration. As shown in fig. 5, the configurator configures the size of the number of tokens per period to configure the service. The token dynamic generation service obtains configuration data and generates the 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 update service requests the token dynamic generation service for the token size of a preset time period, judges whether the number of tokens is allowed to be downloaded or not, and updates the number of consumed tokens. When downloading is allowed, the APP update service returns the downloading address of the APP to the client, and the client performs downloading installation.
The configuration service, the token dynamic generation service and the APP update service are service ends (i.e. servers).
By the mode, the bandwidth use of the CDN can be controlled in a finer granularity through the newly added configuration service and token dynamic generation service, and the total use flow can be adjusted according to different time periods, so that the purpose of flexibly controlling the total use flow in a certain time period is achieved.
The 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 the version update request, a target flow required for downloading the updated version if the updated version exists in the application program;
And the pushing module 606 is configured to push the updated version to the first electronic device if the target traffic is less than or equal to the allowed usage traffic within a preset period of time.
In this embodiment, the server determines that the first electronic device needs to perform version update of the application program when receiving a version update request of the application program sent by the first electronic device. In this case, whether the application program has an updated version is determined, and if the updated version exists, it is required to determine whether the target traffic of the first electronic device for downloading the updated version exceeds the allowable usage traffic within the preset time period. If the target flow exceeds the allowable use flow in the preset time period, feeding back information of no updated version to the first electronic equipment; and if the target traffic does not exceed the allowable usage traffic within the preset time period, pushing the updated version to the first electronic equipment so that the first electronic equipment downloads the updated version, and thus version updating is carried out on the application program.
By adopting the mode, the idea of peak clipping and valley filling is adopted, and only the updated version which does not exceed the flow control set value (namely the allowed flow) is allowed to be downloaded in the preset time period, so that the CDN flow in unit time is controlled, the situation that the CDN flow waveform is spiked is avoided, the original CDN flow waveform which is suddenly high or low is stabilized, after the peak value of the day is reduced, the cost of the CDN is reduced according to the charging rule, the corresponding saved bandwidth flow can be used for other users, and the purpose of saving flow and reducing cost is fully achieved.
Further, in one embodiment of the present application, the server 600 further includes: the first determining module is used for 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.
Further, in an embodiment of the present application, the first determining module is specifically configured to determine, when the number of application programs includes a plurality of application programs, that the usage flow is allowed in a preset time period corresponding to the application program according to a sequence of receiving moments of the version update requests.
Further, in one 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 usage flow in the preset time period; a second determining module, configured to: determining a first sub-time period corresponding to the receiving time of the version update request, wherein the first sub-time period is one of a preset number of sub-time periods; under the condition that the first sub-time period is the first sub-time period of the preset time period, the sub-allowed use flow corresponding to the first sub-time period is used as the allowed use flow in the preset time period; under the condition that the first sub-time period is the N-th sub-time period of the preset time period, accumulating the sub-allowed use flow corresponding to the second sub-time period to the first sub-time period, and taking the sub-allowed use flow corresponding to the first sub-time period as the allowed use 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-allowed used traffic of the first sub-period is unused traffic in the sub-traffic of the first sub-period, and the sub-allowed used traffic of the second sub-period is unused traffic in the sub-traffic of the second sub-period.
Further, in one embodiment of the present application, the server 600 further includes: the third determining module is used for determining total use flow in a preset time period according to the historical downloading times 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 downloading times are, the larger the total usage flow is.
The first electronic device in the embodiment of the application may be a device, 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 computer, a vehicle-mounted electronic device, a wearable device, an Ultra-mobile Personal computer (Ultra-Mobile Personal Computer, UMPC), a netbook or Personal digital assistant (Personal DIGITAL ASSISTANT, PDA), etc., and the non-mobile electronic device may be a network attached storage (Network Attached Storage, NAS), a Personal computer (Personal Computer, PC), a Television (Television, TV), a teller machine, a self-service machine, etc., 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 a device having an operating system. The operating system may be an Android operating system, an ios operating system, or other possible operating systems, and the embodiment of the present application is not limited specifically.
The server 600 provided in the embodiment of the present application can implement each process implemented in the method embodiments of fig. 1 to 5, and in order to avoid repetition, a description is omitted here.
Optionally, as shown in fig. 7, an embodiment of the present application further provides an electronic device 700, 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 stored in the memory 704 and capable of running on the processor 702, where the program or the instruction is executed by the processor 702 to implement each process of the foregoing embodiment of the download control method of an application program, and the process can achieve the same technical effects, so that repetition is avoided and no further description is given here.
It should be noted that, the electronic device in the embodiment of the present application includes the mobile electronic device and the non-mobile electronic device 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, sensor 810, display unit 812, user input unit 814, interface unit 816, memory 818, and processor 820.
Those skilled in the art will appreciate that the electronic device 800 may also include a power source (e.g., a battery) for powering the various components, which may be logically connected to the processor 820 via a power management system so as to perform functions such as managing charge, discharge, and power consumption 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 shown, or may combine certain components, or may be arranged in different components, which are not described in detail herein.
In the embodiment of the present application, the electronic device 800 is a server in the above 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 for determining a target traffic required for downloading an updated version in case the updated version exists in the application in response to the version update request; the radio frequency unit 802 is further configured to push the updated version to the first electronic device if the target traffic is less than or equal to the allowed usage traffic within a preset period of time.
In this embodiment, the second electronic device determines that the first electronic device needs to perform 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, whether the application program has an updated version is determined, and if the updated version exists, it is required to determine whether the target traffic of the first electronic device for downloading the updated version exceeds the allowable usage traffic within the preset time period. If the target flow exceeds the allowable use flow in the preset time period, feeding back information of no updated version to the first electronic equipment; and if the target traffic does not exceed the allowable usage traffic within the preset time period, pushing the updated version to the first electronic equipment so that the first electronic equipment downloads the updated version, and thus version updating is carried out on the application program.
By adopting the mode, the idea of peak clipping and valley filling is adopted, and only the updated version which does not exceed the flow control set value (namely the allowed flow) is allowed to be downloaded in the preset time period, so that the CDN flow in unit time is controlled, the situation that the CDN flow waveform is spiked is avoided, the original CDN flow waveform which is suddenly high or low is stabilized, after the peak value of the day is reduced, the cost of the CDN is reduced according to the charging rule, the corresponding saved bandwidth flow can be used for other users, and the purpose of saving flow and reducing cost is fully achieved.
Further, the processor 820 is further configured to determine the 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 application programs includes a plurality of application programs, that the usage flow is allowed in a preset period corresponding to the application program according to the sequence of the receiving moments of the version update requests.
Further, in one embodiment of the application, 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 total usage flow in the preset time period; determining a first sub-time period corresponding to the receiving time of the version update request, wherein the first sub-time period is one of a preset number of sub-time periods; under the condition that the first sub-time period is the first sub-time period of the preset time period, the sub-allowed use flow corresponding to the first sub-time period is used as the allowed use flow in the preset time period; under the condition that the first sub-time period is the N-th sub-time period of the preset time period, accumulating the sub-allowed use flow corresponding to the second sub-time period to the first sub-time period, and taking the sub-allowed use flow corresponding to the first sub-time period as the allowed use 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-allowed used traffic of the first sub-period is unused traffic in the sub-traffic of the first sub-period, and the sub-allowed used traffic of the second sub-period is unused traffic in the sub-traffic of the second sub-period.
Further, in one embodiment of the present application, the processor 820 is further configured to determine the total usage flow in the preset time period according to the historical download times 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 downloading times are, the larger the total usage flow is.
It should be understood that, in the embodiment of the present application, the radio frequency unit 802 may be configured to receive and transmit information or signals during a call, and specifically, receive downlink data of a base station or send 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 helping the user send and receive e-mail, browse web pages, and access streaming media, etc.
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 (e.g., call signal reception sound, message reception sound, etc.) related to a particular function performed by the electronic device 800. The audio output unit 806 includes a speaker, a buzzer, a receiver, and the like.
The input unit 808 is for receiving an audio or video signal. The input unit 808 may include a graphics processor (Graphics Processing Unit, GPU) 8082 and a microphone 8084, the graphics processor 8082 processing 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 frequency unit 802 or the network module 804. The microphone 8084 may receive sound and may be capable of processing the sound into audio data, which may be converted into a format output that may be transmitted to a mobile communication base station via the radio frequency unit 802 in case of a phone call mode.
The electronic device 800 also includes at least one sensor 810, such as a fingerprint sensor, pressure sensor, iris sensor, molecular sensor, gyroscope, barometer, hygrometer, thermometer, infrared sensor, light sensor, motion sensor, and other sensors.
The display unit 812 is used to display information input by a 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 to 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. The touch panel 8142, also referred to as a touch screen, may collect touch operations on or near the user. The touch panel 8142 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch azimuth 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 detection device, converts it into touch point coordinates, sends the touch point coordinates to the processor 820, and receives and executes commands sent from 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, a joystick, and so forth, which are not described in detail herein.
Further, the touch panel 8142 may be overlaid on the display panel 8122, and when the touch panel 8142 detects a touch operation thereon or thereabout, the touch operation is transferred to the processor 820 to determine a type of touch event, and then the processor 820 provides a corresponding visual output on the display panel 8122 according to the type of touch event. The touch panel 8142 and the display panel 8122 may be two independent components or may be integrated into one component.
The interface unit 816 is an interface to which an external device is connected to the electronic apparatus 800. For example, the external devices may include a wired or wireless headset port, an external power (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 an external device and transmit the received input to one or more elements within the electronic apparatus 800 or may be used to transmit data between the electronic apparatus 800 and an external device.
Memory 818 may be used to store software programs as well as various data. The memory 818 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, application programs 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, phonebooks, etc.) created according to the use of the mobile terminal, etc. In addition, memory 818 may include high-speed random access memory, and may include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
Processor 820 performs various functions of electronic device 800 and processes data by executing or executing software programs and/or modules stored in memory 818 and invoking data stored in memory 818 to thereby monitor electronic device 800 as a whole. Processor 820 may include one or more processing units; preferably, processor 820 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications.
The embodiment of the application also provides a readable storage medium, and the readable storage medium stores a program or an instruction, which when executed by a processor, implements each process of the application program downloading control embodiment, and can achieve the same technical effects, and is not repeated here.
The processor is a processor in the electronic device in the above embodiment. Readable storage media include computer readable storage media such as Read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic or optical disks, and the like.
The embodiment of the application further provides a chip, the chip comprises a processor and a communication interface, the communication interface is coupled with the processor, the processor is used for running programs or instructions, the processes of the application program downloading control embodiment can be realized, the same technical effects can be achieved, and the repetition is avoided, and the description is omitted here.
It should be understood that the chips referred to in the embodiments of the present application may also be referred to as system-on-chip chips, chip systems, or system-on-chip chips, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Furthermore, it should be noted that the scope of the methods and apparatus in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but may also include performing the functions in a substantially simultaneous manner or in an opposite order depending on the functions involved, e.g., the described methods may be performed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a computer software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present application.
The embodiments of the present application have been described above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present application and the scope of the claims, which are to be protected by the present application.

Claims (6)

1. A download control method of an application program, comprising:
Receiving a version update 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 of the application program when the updated version exists;
Pushing the updated version to the first electronic device under the condition that the target flow is smaller than or equal to the allowable use flow in a preset time period;
Before receiving the version update request of the application program sent by the first electronic device, the method further comprises the following steps:
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 usage flow in the preset time period;
after 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 update request, wherein the first sub-time period is one of the preset number of sub-time periods;
When the first sub-time period is the first sub-time period of the preset time period, the sub-allowed use flow corresponding to the first sub-time period is used as the allowed use flow in the preset time period;
accumulating the sub-allowable use flow corresponding to the second sub-time period to 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 under the condition that the first sub-time period is the Nth sub-time period of the preset time period;
Wherein N is a positive integer greater than 1, the second sub-period is N-1 sub-period before the first sub-period in the preset period, the sub-allowable traffic of the first sub-period is unused traffic in the sub-traffic of the first sub-period, and the sub-allowable traffic of the second sub-period is unused traffic in the sub-traffic of the second sub-period.
2. The method according to claim 1, wherein when the number of the application programs includes a plurality of application programs, the allowable use flow rate in the preset time period corresponding to the application program is determined according to the order of the reception timings of the version update requests.
3. The download control method for an application program according to claim 1 or 2, further comprising:
determining the total usage flow in a preset time period according to the historical downloading times of the first electronic device in the preset time period;
Wherein, the more the historical download times are, the larger the total usage flow is.
4. A server for a server, which comprises a server and a server, characterized by comprising the following steps:
The receiving module is used for receiving a version update request of the application program sent by the first electronic equipment;
the acquisition module is used for responding to the version update request and determining target flow required by downloading the update version under the condition that the update version exists in the application program;
The pushing module is used for pushing the updated version to the first electronic device under the condition that the target flow is smaller than or equal to the allowable use flow in a preset time period;
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 usage flow in the preset time period;
a second determining module, configured to:
Determining a first sub-time period corresponding to the receiving time of the version update request, wherein the first sub-time period is one of the preset number of sub-time periods;
When the first sub-time period is the first sub-time period of the preset time period, the sub-allowed use flow corresponding to the first sub-time period is used as the allowed use flow in the preset time period;
accumulating the sub-allowable use flow corresponding to the second sub-time period to 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 under the condition that the first sub-time period is the Nth sub-time period of the preset time period;
Wherein N is a positive integer greater than 1, the second sub-period is N-1 sub-period before the first sub-period in the preset period, the sub-allowable traffic of the first sub-period is unused traffic in the sub-traffic of the first sub-period, and the sub-allowable traffic of the second sub-period is unused traffic in the sub-traffic of the second sub-period.
5. The server according to claim 4, wherein in the case where the number of the application programs includes a plurality of application programs, the allowable use flow rate in the preset time period corresponding to the application program is determined in accordance with the order of the reception timings of the version update requests.
6. The server according to claim 4 or 5, further comprising:
a third determining module, configured to determine a total usage flow in a preset time period according to a historical download number of the first electronic device in the preset time period;
Wherein, the more the historical download times are, the larger the total usage flow is.
CN202110555339.8A 2021-05-21 2021-05-21 Application download control method and server Active CN113296808B (en)

Priority Applications (1)

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

Applications Claiming Priority (1)

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

Publications (2)

Publication Number Publication Date
CN113296808A CN113296808A (en) 2021-08-24
CN113296808B true CN113296808B (en) 2024-10-29

Family

ID=77323381

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110555339.8A Active CN113296808B (en) 2021-05-21 2021-05-21 Application download control method and server

Country Status (1)

Country Link
CN (1) CN113296808B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114338531B (en) * 2021-12-22 2024-04-05 广东明创软件科技有限公司 Flow control method, device and storage medium
CN114401449B (en) * 2021-12-27 2025-05-02 中国电信股份有限公司 A version upgrade method, device and readable storage medium
CN114301843B (en) * 2021-12-29 2024-06-07 广东明创软件科技有限公司 Traffic scheduling method and device and storage medium
US12541345B2 (en) * 2024-07-15 2026-02-03 Morgan Stanley Services Group Inc. Dynamic program code analyzer to improve code quality

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103023941A (en) * 2011-09-26 2013-04-03 腾讯科技(深圳)有限公司 Terminal application program updating method and system based on Web page
CN111970132A (en) * 2020-06-29 2020-11-20 百度在线网络技术(北京)有限公司 OTA data packet issuing flow control method, device and server

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8285250B2 (en) * 2010-11-01 2012-10-09 Google Inc. Mobile device-based bandwidth throttling
US9813936B2 (en) * 2015-04-22 2017-11-07 At&T Intellectual Property I, L.P. System and method for scheduling time-shifting traffic in a mobile cellular network
CN106454953B (en) * 2016-10-09 2020-01-14 Oppo广东移动通信有限公司 Flow control method, device and terminal
CN107908730B (en) * 2017-11-14 2021-02-02 网宿科技股份有限公司 Method and device for downloading data
CN111726749A (en) * 2020-06-11 2020-09-29 广州小鹏车联网科技有限公司 Vehicle over-the-air OTA processing method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103023941A (en) * 2011-09-26 2013-04-03 腾讯科技(深圳)有限公司 Terminal application program updating method and system based on Web page
CN111970132A (en) * 2020-06-29 2020-11-20 百度在线网络技术(北京)有限公司 OTA data packet issuing flow control method, device and server

Also Published As

Publication number Publication date
CN113296808A (en) 2021-08-24

Similar Documents

Publication Publication Date Title
CN113296808B (en) Application download control method and server
US11847576B2 (en) Methods and system for managing predictive models
US11403353B2 (en) Information sending method, apparatus, and storage medium
EP3131266B1 (en) Method and apparatus for presenting multimedia information
CN112165691B (en) Content delivery network scheduling method, device, server and medium
CN110681155A (en) Game optimization method, game optimization device and mobile terminal
WO2014198116A1 (en) Method, apparatus and system for short message-based information push and mobile client supporting the same
CN112087725B (en) Push message display method and device and storage medium
CN105898606B (en) A kind of method, apparatus and system voted
CN106656743A (en) Message display method, device and system
CN110135139B (en) Privilege attribute acquisition method and device, electronic equipment and storage medium
CN111970320B (en) Control method and device for OTA data packet issuing flow
CN111988817A (en) Control method and device for OTA data packet issuing flow
CN110223615B (en) Advertisement display control method, device, medium and advertisement push server
CN110278232B (en) Method, device and system for controlling data downloading
CN103631621A (en) Method and device for prompting information
EP2720151B1 (en) Communication terminal and content update method
CN106296246B (en) Service processing method and device
CN113098761B (en) Communication method, communication apparatus, electronic device, and storage medium
WO2015183442A1 (en) Methods and system for managing predictive models
CN112788101A (en) Control method, device, terminal and storage medium of server cluster
CN113674056B (en) Application information display method and device
CN116755736A (en) Application update methods and electronic devices
CN117014421A (en) Resource preloading method and device, electronic equipment and storage medium
CN115759695A (en) Business management method, device, storage medium and electronic 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