Flow control method for online upgrade, electronic equipment and storage medium
By configuring network resource quotas for silent and non-silent upgrade modes respectively, and dynamically adjusting them under high concurrency, the stability and continuity issues of online upgrade services are resolved, and the download service quality of non-silent upgrade mode is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZTE CORP
- Filing Date
- 2024-10-21
- Publication Date
- 2026-04-21
AI Technical Summary
In high-concurrency scenarios, existing technologies lack effective traffic control strategies, making it difficult to guarantee the stability and continuity of online upgrade services, especially resulting in a poor user experience in non-silent upgrade modes.
By configuring network resource quotas for silent and non-silent upgrade modes on the download server side, and reallocating a portion of the network resource quotas from the silent upgrade mode to the non-silent upgrade mode during high concurrency in the non-silent upgrade mode, the download time of the silent upgrade mode is extended, ensuring the stability of the download service in the non-silent upgrade mode.
It achieves stability and continuity of download service in non-silent upgrade mode under high concurrency, avoids poor user experience, and ensures that download tasks in silent upgrade mode are not affected.
Smart Images

Figure CN121907796A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to an online-upgraded flow control method, electronic device, and storage medium. Background Technology
[0002] Online upgrade functionality typically refers to downloading and installing update files from a download server when connected to the internet to ensure that software, systems, and other hardware are up-to-date. For example, if a terminal device's system version is faulty, an online upgrade can be used to update the version and fix the problem.
[0003] Currently, download servers lack traffic control strategies for online upgrade requests from terminal devices. In high-concurrency scenarios, how to provide stable and continuous online upgrade services is a technical problem that urgently needs to be solved. Summary of the Invention
[0004] The purpose of this application is to provide a flow control method, electronic device, and storage medium for online upgrades, which can implement flow control in response to online upgrade requests from terminal devices.
[0005] To achieve the above objectives, the embodiments of this application are implemented as follows: Firstly, a traffic control method for online upgrades is provided, applied to a download server, wherein the download server allocates corresponding network resource quotas for silent upgrade mode and non-silent upgrade mode, and the method includes: Based on the upgrade request initiated by the terminal device, a corresponding target download task is established for the terminal device, and the upgrade request carries the target upgrade mode adopted by the terminal device; If the target upgrade mode belongs to the non-silent upgrade mode, and the idle network resources of the target upgrade mode cannot meet the network resource requirements of the target download task, a portion of the network resource quota of the silent upgrade mode will be reallocated to the target upgrade mode.
[0006] Secondly, an online upgrade traffic control method is provided, applied to a terminal management server, the method comprising: Determine the terminal device that needs to be upgraded and the target upgrade mode that the terminal device needs to adopt, wherein the target upgrade mode is a silent upgrade mode or a non-silent upgrade mode; An upgrade notification is sent to the terminal device, causing the terminal device to initiate an upgrade request to the download server. The upgrade request carries the target upgrade mode, and the download server allocates corresponding network resource quotas for silent upgrade mode and non-silent upgrade mode.
[0007] Thirdly, embodiments of this application provide an electronic device, including: a processor; and a memory configured to store computer-executable instructions, which, when executed, cause the processor to perform the method described in the first or second aspect.
[0008] Fourthly, a computer-readable storage medium is provided for storing computer-executable instructions that, when executed by a processor, implement the method described in the first or second aspect.
[0009] In this embodiment, considering that the upgrade request in silent upgrade mode is initiated by the terminal device in the background without the user's awareness, the user usually does not have high requirements for download speed. Therefore, on the download server side, network resource quotas are configured separately for silent upgrade mode and non-silent upgrade mode. When the download server creates a target download task in non-silent upgrade mode, if the idle network resources in non-silent upgrade mode cannot meet the network resource requirements of the target download task, a portion of the network resource quota for silent upgrade mode is reallocated to the target upgrade mode. That is, under high concurrency of download tasks in non-silent upgrade mode, the download time of silent upgrade mode is appropriately extended through traffic control means of network resource quota reallocation to speed up the processing of download tasks in non-silent upgrade mode. Since download tasks in non-silent upgrade mode are usually initiated by the user, the solution in this embodiment can ensure the stability and continuity of download service in non-silent upgrade mode and avoid poor user experience. Attached Figure Description
[0010] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 This is a schematic diagram of the architecture of the online upgrade traffic control method according to an embodiment of this application.
[0012] Figure 2 This is a schematic diagram of the first process of applying the online upgrade traffic control method of this application to the download server side.
[0013] Figure 3 This is a second flowchart illustrating the online upgrade traffic control method applied to the download server side, as an embodiment of this application.
[0014] Figure 4This is a schematic diagram illustrating the allocation of network resource quotas on the download server side using the online upgrade traffic control method according to an embodiment of this application.
[0015] Figure 5 This is a schematic diagram of the first process of applying the online upgrade traffic control method of this application to the terminal management server side.
[0016] Figure 6 This is a second flowchart illustrating the online upgrade traffic control method of this application applied to the terminal management server side.
[0017] Figure 7 This is a schematic diagram of the download server structure according to an embodiment of this application.
[0018] Figure 8 This is a schematic diagram of the terminal management server in an embodiment of this application.
[0019] Figure 9 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Detailed Implementation
[0020] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this specification.
[0021] This application aims to provide a traffic control scheme for online upgrades, which initiates traffic control for online upgrade requests from terminal devices to ensure the stability and continuity of online upgrade services. Specifically, Figure 1 This is a schematic diagram of the architecture of the online upgrade service of this application, including: terminal devices, terminal management server and download server.
[0022] in: Terminal devices can be, but are not limited to, mobile phones, tablets, vehicles, and other devices that use online upgrade services.
[0023] The download server has a network resource (mainly bandwidth) quota and is the provider of online upgrade services. That is, terminal devices need to download the online upgrade data packets from the download server.
[0024] The terminal management server acts as a proxy node between the terminal device and the download server. It monitors the network resource status of the download server to determine whether it's appropriate to allow the terminal device's upgrade request to be sent to the download server. Furthermore, the terminal management server can also function as a firewall or other gateway.
[0025] exist Figure 1 Based on the architecture shown, considering that the upgrade request in silent upgrade mode is initiated by the terminal device in the background without the user's awareness, and users usually do not have high requirements for download speed, network resource quotas are configured separately for silent upgrade mode and non-silent upgrade mode on the download server side. When the download server creates a target download task in non-silent upgrade mode, if the idle network resources in non-silent upgrade mode cannot meet the network resource requirements of the target download task, a portion of the network resource quota for silent upgrade mode is reallocated to the target upgrade mode. That is, under high concurrency of download tasks in non-silent upgrade mode, the download time of silent upgrade mode is appropriately extended through traffic control means of network resource quota reallocation to speed up the processing of download tasks in non-silent upgrade mode. Since download tasks in non-silent upgrade mode are usually initiated by the user, the solution in this embodiment can ensure the stability and continuity of download service in non-silent upgrade mode and avoid poor user experience.
[0026] The following section provides a detailed description of the online upgrade traffic control scheme proposed in this application.
[0027] One embodiment of this application provides a method for online upgrade of traffic control. Figure 2 This is a flowchart illustrating the application of this flow control method to the download server side, including the following steps: S202: Based on the upgrade request initiated by the terminal device, establish a corresponding target download task for the terminal device. The upgrade request carries the target upgrade mode adopted by the terminal device.
[0028] In this embodiment, the target upgrade mode of the terminal device can be a silent upgrade mode or a non-silent upgrade mode.
[0029] Silent upgrade requests are typically initiated in the background of the terminal device without the user's awareness. Since the user is unaware of when the upgrade will occur, there are naturally no high demands on download speed. In contrast, non-silent upgrade requests are generally initiated by the user, and slow download speeds can negatively impact the user experience. Therefore, as a reasonable traffic control strategy, download servers should utilize idle network resources as much as possible, prioritizing download tasks in non-silent upgrade mode.
[0030] Correspondingly, the upgrade request initiated by the terminal device needs to indicate the target upgrade mode to the download server so that the download server can formulate a traffic control policy.
[0031] It should be noted that once a download task is established, it means that the terminal device has begun downloading the corresponding data package. Therefore, the download tasks mentioned in this article refer to the tasks that the download server is currently processing.
[0032] S204, if the target upgrade mode is a non-silent upgrade mode and the idle network resources of the target upgrade mode cannot meet the network resource requirements of the target download task, a portion of the network resource quota of the silent upgrade mode will be reallocated to the target upgrade mode.
[0033] In this embodiment, network resource quota specifically refers to bandwidth resource quota. The bandwidth resource quota allocated to non-silent upgrade mode in silent upgrade mode should be idle bandwidth resource, thereby avoiding impacting the download task currently being processed in silent upgrade mode.
[0034] In one feasible implementation, the download server is configured with a fixed bandwidth allocation for each download task in silent upgrade mode. This fixed bandwidth allocation only needs to ensure that each download task does not time out. For example, if a system version's data package is 30GB, and considering that silent upgrades typically occur between 1 AM and 5 AM, a suitable download speed in silent upgrade mode would be 30GB ÷ 5 hours = 6GB / hour. Correspondingly, the fixed bandwidth allocation only needs to ensure that the download speed is not less than 6GB / hour.
[0035] After determining the fixed bandwidth resources occupied, this embodiment can determine the idle bandwidth resource quota of the silent upgrade mode based on the fixed bandwidth resources occupied by a single download task in the silent upgrade mode, the bandwidth resource quota, and the current download task flow control number (i.e., the total number of current download tasks), and reallocate at least a portion of the idle bandwidth resource quota of the silent upgrade mode to the target upgrade mode.
[0036] As an example, the idle bandwidth resource in silent upgrade mode = bandwidth resource quota of silent upgrade mode - current download task flow control number in silent upgrade mode × fixed bandwidth resource occupied by a single download task in silent upgrade mode. For example, if the bandwidth resource quota of silent upgrade mode is 100M, and the fixed bandwidth resource occupied by a single download task is 5M, and if the current download task flow control number is 10, then the idle bandwidth resource quota of silent upgrade mode is 100M - 10 × 5M = 50M. Therefore, up to 50M of idle bandwidth resource quota can be reallocated to the target upgrade mode. Furthermore, if the network resource requirement of a newly established target download task (non-silent upgrade mode) is 20M, and the current download server's bandwidth resource quota for non-silent upgrade mode is 200M, and 190M of it has already been used, then 10M of idle bandwidth resource quota can be allocated from the 50M idle bandwidth resource quota of silent upgrade mode to non-silent upgrade mode to support the normal processing of the target download task.
[0037] It should be noted that after the target download task is created, if the available bandwidth resources in the non-silent upgrade mode cannot meet the network resource requirements of the target download task, it does not mean that the target download task will stop. The download server will still use the limited bandwidth resources in the non-silent upgrade mode to process the target download task. However, by adjusting the bandwidth resources, when the non-silent upgrade mode obtains sufficient bandwidth resources, the download speed of the target download task can be improved.
[0038] Furthermore, to avoid uneven bandwidth resource usage in non-silent upgrade mode, this embodiment further sets the bandwidth resource quota for each download task in non-silent upgrade mode to be evenly distributed. For example, if the bandwidth resource quota for non-silent upgrade mode is 200M and the current download task has 2 flow control operations, then each download task occupies 100M of bandwidth resource quota; or, for another example, if the bandwidth resource quota for non-silent upgrade mode is 200M and the current download task has 100 flow control operations, then each download task occupies 2M of bandwidth resource quota.
[0039] It can be seen that the advantage of sharing bandwidth resource quotas equally among each download task in non-silent upgrade mode is: 1) In non-silent upgrade mode with sufficient bandwidth resources, each download task can make full use of bandwidth resources to accelerate the download of data packets, thereby reducing the probability of high concurrency caused by subsequent newly established download tasks; 2) In the case of insufficient bandwidth resources in non-silent upgrade mode, each download task can get a certain amount of bandwidth resources, avoiding interruptions that would lead to a poor user experience.
[0040] Furthermore, since the non-silent upgrade mode needs to maintain a certain download speed, this embodiment can also configure a minimum bandwidth resource for a single download task in the non-silent upgrade mode. This minimum bandwidth resource must ensure that the download time of the task does not exceed the user's tolerable limit. For example, if the data package for a certain system version is 30G, and the user can wait a maximum of 1 hour to complete the system update, then the minimum bandwidth resource must ensure a download speed of no less than 30 G / H.
[0041] Correspondingly, when determining whether the idle network resources in the non-silent upgrade mode can meet the network resource requirements of the download task, the bandwidth resources allocated to each download task in the non-silent upgrade mode can be determined based on the bandwidth resource quota of the non-silent upgrade mode and the current number of flow control functions for download tasks. If the bandwidth resources allocated to each download task do not reach the minimum bandwidth usage, it can be determined that the idle network resources in the non-silent upgrade mode cannot meet the network resource requirements of the download task. For example, if the bandwidth resource quota of the target upgrade mode is 90M, and the minimum bandwidth usage for a single download task in the target upgrade mode is 20M, then after creating the target download task, the current number of flow control functions for the download task in the target upgrade mode increases to 6, and the bandwidth resources allocated to each download task are 15M (90M ÷ 6), which is lower than the minimum bandwidth usage standard of 20M. In this case, it can be determined that the network resource requirements of the target download task cannot be met.
[0042] Furthermore, after determining the minimum bandwidth resource required for a single download task in non-silent upgrade mode, the upper limit of the flow control count for non-silent upgrade mode (the upper limit of the flow control count represents the maximum number of download tasks that can be carried simultaneously) can also be determined. That is, the upper limit of the flow control count for non-silent upgrade mode = bandwidth resource quota for non-silent upgrade mode ÷ minimum bandwidth resource required for a single download task. After the target download task is created, if the current flow control count for download tasks in non-silent upgrade mode reaches the upper limit of the flow control count for non-silent upgrade mode, it can also be determined that the idle network resources of non-silent upgrade mode cannot meet the network resource requirements of the target download task. For example: if the bandwidth resource quota for the target upgrade mode is 100M and the minimum bandwidth resource required for a single download task is 20M, then the upper limit of the flow control count is 5 (100M ÷ 20M). If the flow control count for download tasks increases to 5 after the target download task is created, it can be determined that the idle network resources of the target upgrade mode cannot meet the network resource requirements of the target download task.
[0043] The above is an introduction to redistributing a portion of the network resource quota from the silent upgrade mode to the target upgrade mode.
[0044] In practical applications, the non-silent upgrade mode that a download server can be set to is not limited to one.
[0045] When the idle network resources in the target upgrade mode (one of the non-silent upgrade modes) are insufficient to meet the network resource requirements of the target download task, some network resource quotas can be allocated from other non-silent upgrade modes to the target upgrade mode.
[0046] In one feasible implementation, this embodiment can set a priority for each non-silent upgrade mode to differentiate between different network resource requirements. That is, the network resource requirements of a high-priority non-silent upgrade mode are higher than those of a low-priority non-silent upgrade mode. After creating a target download task for the target upgrade mode, if there are no network resource quotas belonging to the silent upgrade mode that can be reallocated to the target upgrade mode, or if reallocation still cannot meet the network resource requirements of the target download task due to insufficient idle network resource quotas available for the silent upgrade mode, a borrowed non-silent upgrade mode with a lower priority than the target upgrade mode can be identified among other non-silent upgrade modes, and a portion of the network resource quotas of the borrowed non-silent upgrade mode can be reallocated to the target upgrade mode.
[0047] For example, the non-silent upgrade mode in this embodiment can include two types: normal non-silent upgrade mode and emergency non-silent upgrade mode. When a target download task is created in emergency non-silent upgrade mode, if all the idle bandwidth resources of the silent upgrade mode are allocated to the emergency non-silent upgrade mode, and it is still insufficient to meet the network resource requirements of the target download task, then the idle bandwidth resources of the normal non-silent upgrade mode can be allocated to the emergency non-silent upgrade mode. This normal non-silent upgrade mode is the borrowed non-silent upgrade mode described above.
[0048] Similarly, the bandwidth resource quota allocated to the target upgrade mode from the borrowed non-silent upgrade mode should be idle bandwidth resource to avoid affecting the download tasks being processed in the borrowed non-silent upgrade mode. Therefore, this embodiment can determine the idle bandwidth resource quota of the borrowed non-silent upgrade mode based on the minimum bandwidth resource occupied by a single download task in the borrowed non-silent upgrade mode, the bandwidth resource quota, and the current download task flow control count (refer to the calculation formula for the idle bandwidth resource quota of the non-silent upgrade mode described above), and then reallocate at least a portion of the idle bandwidth resource quota of the borrowed non-silent upgrade mode to the target upgrade mode.
[0049] In addition, when the idle bandwidth resource quota of the borrowed non-silent upgrade mode is allocated to the target upgrade mode, the bandwidth resource allocated to each download task of the borrowed non-silent upgrade mode needs to be adjusted based on the reallocated bandwidth resource quota of the borrowed upgrade mode; and the upper limit of the flow control number of the borrowed upgrade mode needs to be adjusted based on the reallocated bandwidth resource quota of the borrowed upgrade mode and the minimum bandwidth resource occupied by a single download task.
[0050] Similarly, for the target upgrade mode, the bandwidth resources allocated to each download task in the target upgrade mode need to be adjusted based on the bandwidth resource quota of the target upgrade mode after reallocation; and the upper limit of the flow control number of the target upgrade mode needs to be adjusted based on the bandwidth resource quota of the target upgrade mode after reallocation and the minimum bandwidth resource occupied by a single download task.
[0051] For example: Before the target download task is created, the bandwidth quota for the target upgrade mode is 100M, the minimum bandwidth required for a single download task is 20M, the maximum number of flow control parameters is 5, and the current download task also has 5 flow control parameters. Therefore, the bandwidth allocated to each download task is the minimum required bandwidth of 20M, and there is no available bandwidth quota. Meanwhile, the bandwidth quota for the borrowed non-silent upgrade mode is 100M, the minimum bandwidth required for a single download task is 10M, the maximum number of flow control parameters is 10, and the current download task has 4 flow control parameters, leaving 60M of available bandwidth. The bandwidth allocated to each download task is greater than the minimum required bandwidth, at 25M (100M ÷ 4). After the target download task is created, its network resource requirement is 20M (i.e., the minimum bandwidth required for a single download task in the target upgrade mode). Therefore, 20M of available bandwidth quota needs to be taken from the borrowed non-silent upgrade mode and reallocated to the target upgrade mode. After reallocation, the bandwidth resource quota for the target upgrade mode is 120M, the upper limit of the flow control number should be adjusted to 6 (120M ÷ 20M), and the bandwidth resource allocated to each download task remains the minimum occupied bandwidth resource of 20M; while the bandwidth resource quota for the borrowed non-silent upgrade mode is 80M, the upper limit of the flow control number should be adjusted from the original 10 to 8 (80M ÷ 10M), and the bandwidth resource allocated to each download task should be adjusted from the original 25M to 20M (80M ÷ 4).
[0052] It should be understood that after readjusting the bandwidth resources and flow control limit allocated to each download task in the non-silent upgrade mode (both the borrowed non-silent upgrade mode and the target upgrade mode), if a new download task is subsequently created in the non-silent upgrade mode, the availability of idle network resources in the non-silent upgrade mode should be determined based on the adjusted bandwidth resources allocated to each download task in the current non-silent upgrade mode and / or the adjusted flow control limit in the non-silent upgrade mode. Since the principle behind this determination has already been explained, it will not be repeated here.
[0053] In addition, the bandwidth resources borrowed by the target upgrade mode from other upgrade modes (silent upgrade mode and low-priority borrowed non-silent upgrade mode) must be returned.
[0054] As an example, this embodiment sets the following two return conditions: Condition 1: In the target upgrade mode, the bandwidth resources allocated to each download task are greater than the minimum bandwidth resources required by a single download task and this continues for a first preset duration; Condition 2: The current number of download tasks in the target upgrade mode is less than the upper limit of the number of flow control tasks in the target upgrade mode and this continues for the second preset duration.
[0055] Both conditions 1 and 2 above indicate that the target upgrade mode has had idle bandwidth resource quota for a period of time. If either condition is met, the idle bandwidth resource quota of the target upgrade mode can be determined based on the minimum bandwidth resource occupied by a single download task, the bandwidth resource quota, and the current download task flow control count. At least a portion of the idle bandwidth resource quota of the target upgrade mode will then be reallocated to the borrowed non-silent upgrade mode. Specifically, the idle bandwidth resource reallocated from the target upgrade mode to the borrowed non-silent upgrade mode will not exceed the idle network resource previously reallocated from the borrowed non-silent upgrade mode to the target upgrade mode.
[0056] Based on the above traffic control logic, assuming the download server is configured with one silent upgrade mode and two non-silent upgrade modes (normal non-silent upgrade mode and emergency non-silent upgrade mode), then refer to... Figure 3 As shown, when a download server creates a download task, if the network resource requirements of the download task cannot be met, then according to its upgrade mode, there are the following three branch processes.
[0057] Branch 1: If the download task is in silent upgrade mode, it means that the available bandwidth resources in silent upgrade mode cannot meet the fixed bandwidth resources occupied by the download task. Since silent upgrade mode cannot borrow bandwidth resources from non-silent upgrade mode, the download task cannot complete the upgrade.
[0058] Branch 2: If the download task belongs to the normal non-silent upgrade mode, this download task will share the bandwidth resource quota of the normal non-silent upgrade mode with other download tasks in the normal non-silent upgrade mode to ensure uninterrupted operation.
[0059] Meanwhile, the download server will determine whether there is available bandwidth resource quota in the silent upgrade mode. If so, it will allocate a portion of the available bandwidth resource quota in the silent upgrade mode to the normal non-silent upgrade mode to improve the download speed of each download task.
[0060] Branch 3: If a download task belongs to the emergency non-silent upgrade mode, this download task will share the bandwidth resource quota of the emergency non-silent upgrade mode with other download tasks in the emergency non-silent upgrade mode to ensure uninterrupted operation.
[0061] Meanwhile, the download server determines whether there is available bandwidth quota in the silent upgrade mode; if so, it allocates at least a portion of the available bandwidth quota in the silent upgrade mode to the emergency non-silent upgrade mode to improve the download speed of each download task; otherwise, the download server determines whether there is available bandwidth quota in the normal non-silent upgrade mode, and if so, it allocates the available bandwidth quota in the normal non-silent upgrade mode to the emergency non-silent upgrade mode.
[0062] Furthermore, if the download server allocates at least a portion of the idle bandwidth resource quota from the silent upgrade mode to the normal non-silent upgrade mode, and the bandwidth resources occupied by each download task in the emergency non-silent upgrade mode are still insufficient to meet the minimum bandwidth resource requirements, then the download server determines whether the normal non-silent upgrade mode has any idle bandwidth resource quota. If so, it further allocates the idle bandwidth resource quota from the normal non-silent upgrade mode to the emergency non-silent upgrade mode.
[0063] As can be seen, the silent upgrade mode is the upgrade mode that is given the highest priority in lending bandwidth resources. Therefore, its bandwidth resource quota changes the most frequently. Once a fixed bandwidth resource is set for all download tasks in the silent upgrade mode, no further adjustments are needed. Download tasks in the normal non-silent upgrade mode and the emergency non-silent upgrade mode share the bandwidth resource quota equally. On the one hand, when bandwidth resources are insufficient, each download task receives a certain amount of bandwidth, avoiding interruptions and a poor user experience. On the other hand, when bandwidth resources are sufficient, each download task can fully utilize bandwidth to accelerate data packet downloads, thereby reducing the probability of high concurrency with newly established download tasks. Furthermore, the goal of adjusting the bandwidth resource quota in the normal non-silent upgrade mode and the emergency non-silent upgrade mode is to ensure that the bandwidth resources occupied by all download tasks are minimized, thus preventing excessively long download times that could negatively impact the user experience.
[0064] For ease of understanding, please refer to Figure 4 .
[0065] Figure 4 'a' represents the resource quota of the download server before the target download task is created. The silent upgrade mode has a bandwidth quota of 50M, with a fixed bandwidth usage of 10M. It has 4 download tasks, each of which occupies 10M of bandwidth. The silent upgrade mode has an unused idle bandwidth quota of 10M.
[0066] The bandwidth quota for the normal non-silent upgrade mode is 120M, the minimum bandwidth occupied is 20M, the maximum number of flow control is 6, and there are 3 download tasks. These 3 download tasks share 120M equally, so each download task occupies 40M of bandwidth resources. The idle bandwidth quota for the normal non-silent upgrade mode is 60M, but it has been fully occupied.
[0067] The bandwidth quota for the emergency non-silent upgrade mode is 120M, the minimum bandwidth usage is 30M, the maximum number of flow control is 4, and there are 4 download tasks. These 4 download tasks share the 120M bandwidth quota equally, so each download task occupies 30M bandwidth resources. The idle bandwidth quota for the emergency non-silent upgrade mode is 0M.
[0068] Figure 4 'a' represents the resource quota of the download server after the target download task is created: Assuming the target download task uses the emergency non-silent upgrade mode, in order to ensure that the target download task can occupy the minimum bandwidth of 20M, the silent upgrade mode allocates 10M of idle bandwidth resources to the emergency non-silent upgrade mode, and the normal non-silent upgrade mode allocates 20M of idle bandwidth resources to the emergency non-silent upgrade mode.
[0069] At this point, the bandwidth quota for the silent upgrade mode is reduced to 40M, while its four download tasks still occupy 10M of bandwidth resources each, and its idle bandwidth quota is 0M.
[0070] In the normal non-silent upgrade mode, the bandwidth resource quota is reduced to 100M and the flow control limit is reduced to 5. The 3 download tasks share the 100M bandwidth resource quota equally, so each download task occupies 33.33M of bandwidth resources, which still meets the minimum bandwidth requirement of 20M.
[0071] In the emergency non-silent upgrade mode, the bandwidth quota is increased to 150M, the flow control limit is increased to 5, there are a total of 5 download tasks, and each download task still occupies 30M of bandwidth resources, which meets the minimum bandwidth usage requirement of 30M.
[0072] also, Figure 5 This is a flowchart illustrating the application of the flow control method of this embodiment to the terminal management server side, including the following steps: S502, determine the terminal device that needs to be upgraded and the target upgrade mode that the terminal device needs to adopt, the target upgrade mode is a silent upgrade mode or a non-silent upgrade mode.
[0073] In this embodiment, when the terminal device needs to be upgraded online, it notifies the terminal management server.
[0074] If the terminal device sends an automatic notification in the background, the terminal management server determines the target upgrade mode as silent upgrade mode. If the notification is sent by a user operation on the terminal device, the terminal management server determines the target upgrade mode as non-silent upgrade mode.
[0075] S504 sends an upgrade notification to the terminal device, causing the terminal device to initiate an upgrade request to the download server. The upgrade request carries the target upgrade mode, and the download server allocates corresponding network resource quotas for silent upgrade mode and non-silent upgrade mode.
[0076] In this embodiment, the terminal management server will only send an upgrade notification to the terminal device after accepting the online upgrade request.
[0077] Specifically, the terminal management server will check the network resource quota status of the download server in real time.
[0078] If the target upgrade mode is a non-silent upgrade mode, and the download server's idle network resources for the target upgrade mode are insufficient to meet the network resource requirements of the target download task, then a portion of the download server's network resource quota for the silent upgrade mode will be reallocated to the target upgrade mode.
[0079] As described above, the network resource quota in this embodiment includes a bandwidth resource quota. In the download server, each download task in the non-silent upgrade mode equally shares the bandwidth resource quota of the non-silent upgrade mode, and the non-silent upgrade mode is configured with a minimum bandwidth resource usage for a single download task; Therefore, the terminal management server can determine that the idle network resources in the non-silent upgrade mode cannot meet the network resource requirements of the download task under the following circumstances: Scenario 1: In non-silent upgrade mode, the bandwidth resources allocated to each download task do not exceed the minimum bandwidth resources required for a single download task; Scenario 2: In non-silent upgrade mode, the current number of download task flow control operations has reached the upper limit of the flow control operations in non-silent upgrade mode.
[0080] In addition, if the download server does not have any network resource quotas belonging to the silent upgrade mode that can be reallocated to the target upgrade mode, or if reallocation still fails to meet the network resource requirements of the target upgrade mode, the terminal management server will identify the borrowed non-silent upgrade mode with lower priority than the target upgrade mode among other non-silent upgrade modes, and reallocate a portion of the network resource quotas of the download server for the borrowed non-silent upgrade mode to the target upgrade mode.
[0081] Specifically, after determining that the idle network resources in the non-silent upgrade mode cannot meet the network resource requirements of the download task, the terminal management server can first determine the idle bandwidth resource quota of the silent upgrade mode based on the fixed bandwidth resources occupied by the download server for a single download task in the silent upgrade mode, the bandwidth resource quota, and the current download task flow control number; then, it will reallocate at least a portion of the idle bandwidth resource quota of the silent upgrade mode to the target upgrade mode.
[0082] It should be noted that the aforementioned adjustment of network resource quotas is performed by the terminal management server before the upgrade request is initiated, primarily to decide whether to issue an upgrade notification. The download server can then create corresponding target download tasks based on the upgrade notification from the terminal device. If the terminal management server's adjustment of the download server's network resource quotas cannot guarantee the network resource requirements of the target download task, the terminal management server may choose not to send an upgrade notification to the terminal device or postpone sending the upgrade notification to avoid overloading the download server.
[0083] Correspondingly, Figure 6 This is a flowchart illustrating the process by which the terminal management server decides whether to send an upgrade notification, including: The terminal device notifies the terminal management server that an online upgrade is required.
[0084] When the target upgrade mode is non-silent upgrade mode, the terminal management server determines the idle network resources set by the download server for the target upgrade mode, and judges whether the idle network resources set by the target upgrade mode meet the network resource requirements of the target download task (the judgment criteria are described above).
[0085] If the available network resources in the target upgrade mode setting can meet the network resource requirements of the target download task, the terminal management server sends an upgrade notification to the terminal device; otherwise, the terminal management server notifies the terminal device that it will refuse to provide download services.
[0086] Based on feedback from the terminal management server, the terminal device determines whether to initiate an upgrade request to the download server. The subsequent download server process can be found in [reference needed]. Figure 1 As shown, this article will not elaborate further.
[0087] In addition, another embodiment of this application provides a download server. Figure 7 This is a schematic diagram of the download server's structure, including the following steps: The download task creation module 710 is used to create a corresponding target download task for the terminal device based on the upgrade request initiated by the terminal device, wherein the upgrade request carries the target upgrade mode adopted by the terminal device. The resource quota adjustment module 720 is used to reallocate a portion of the network resource quota of the silent upgrade mode to the target upgrade mode when the target upgrade mode belongs to the non-silent upgrade mode and the idle network resources of the target upgrade mode cannot meet the network resource requirements of the target download task.
[0088] Optionally, the number of non-silent upgrade modes is at least two, and each non-silent upgrade mode has its own priority; the resource quota adjustment module 720 is further configured to: when there is no network resource quota belonging to the silent upgrade mode that can be reallocated to the target upgrade mode, or when reallocation still fails to meet the network resource requirements of the target download task, determine a borrowed non-silent upgrade mode with a lower priority than the target upgrade mode among the other non-silent upgrade modes; and reallocate a portion of the network resource quota of the borrowed non-silent upgrade mode to the target upgrade mode.
[0089] Optionally, the network resource quota includes a bandwidth resource quota, and each download task in the non-silent upgrade mode equally shares the bandwidth resource quota of the non-silent upgrade mode, and the non-silent upgrade mode is configured with a minimum bandwidth resource usage for a single download task; the inability of idle network resources in the non-silent upgrade mode to meet the network resource requirements of the download task refers to at least one of the following situations: Case 1: The bandwidth resources allocated to each download task in the non-silent upgrade mode do not exceed the minimum bandwidth resources required for a single download task; Scenario 2: The current number of download tasks in the non-silent upgrade mode has reached the upper limit of the number of flow control tasks in the non-silent upgrade mode. The upper limit of the number of flow control tasks in the non-silent upgrade mode is determined based on the bandwidth resource quota of the non-silent upgrade mode and the minimum bandwidth resource occupied by a single download task.
[0090] Optionally, the resource quota adjustment module 720 reallocates a portion of the network resource quota of the borrowed non-silent upgrade mode to the target upgrade mode, including: determining the idle bandwidth resource quota of the borrowed non-silent upgrade mode based on the minimum bandwidth resource occupied by a single download task in the borrowed non-silent upgrade mode, the bandwidth resource quota, and the current download task flow control number, and reallocating at least a portion of the idle bandwidth resource quota of the borrowed non-silent upgrade mode to the target upgrade mode.
[0091] Optionally, after reallocating a portion of the network resource quota of the borrowed non-silent upgrade mode to the target upgrade mode, the resource quota adjustment module 720 is further configured to: adjust the bandwidth resources allocated to each download task of the borrowed non-silent upgrade mode based on the reallocated bandwidth resource quota of the borrowed upgrade mode; and adjust the upper limit of the flow control number of the borrowed upgrade mode based on the reallocated bandwidth resource quota of the borrowed upgrade mode and the minimum bandwidth resource occupied by a single download task; and / or adjust the bandwidth resources allocated to each download task of the target upgrade mode based on the reallocated bandwidth resource quota of the target upgrade mode; and adjust the upper limit of the flow control number of the target upgrade mode based on the reallocated bandwidth resource quota of the target upgrade mode and the minimum bandwidth resource occupied by a single download task.
[0092] Optionally, after adjusting the upper limit of the flow control number and the bandwidth resources allocated to each download task in the non-silent upgrade mode, the resource quota adjustment module 720 is further configured to: when a new download task is established for the non-silent upgrade mode, determine whether the idle network resources of the non-silent upgrade mode can meet the network resource requirements of the new download task based on the adjusted bandwidth resources allocated to each download task in the current non-silent upgrade mode and / or the adjusted upper limit of the flow control number in the non-silent upgrade mode.
[0093] Optionally, after reallocating a portion of the local network resource quota for the borrowed non-silent upgrade mode to the target upgrade mode, the resource quota adjustment module 720 is further configured to: determine the idle bandwidth resource quota of the target upgrade mode based on the minimum bandwidth resource occupied by each download task in the target upgrade mode for a first preset duration, and / or, the current flow control number of the download tasks in the target upgrade mode is less than the upper limit of the flow control number of the target upgrade mode for a second preset duration, and / or, the current flow control number of the download tasks in the target upgrade mode for a second preset duration. At least a portion of the idle bandwidth resource quota of the target upgrade mode is then reallocated to the borrowed non-silent upgrade mode; wherein the at least a portion of the idle bandwidth resource reallocated from the target upgrade mode to the borrowed non-silent upgrade mode does not exceed the idle network resource previously reallocated from the borrowed non-silent upgrade mode to the target upgrade mode.
[0094] Optionally, the silent upgrade mode is configured with a fixed bandwidth resource for a single download task; the resource quota adjustment module 720 reallocates a portion of the network resource quota allocated locally for the silent upgrade mode to the target upgrade mode, including: determining the idle bandwidth resource quota of the silent upgrade mode based on the fixed bandwidth resource for a single download task in the silent upgrade mode, the bandwidth resource quota, and the current download task flow control number, and reallocating at least a portion of the idle bandwidth resource quota of the silent upgrade mode to the target upgrade mode.
[0095] It should be noted that the download server in this embodiment can be used as... Figure 2 The execution body of the method shown is therefore able to achieve... Figure 1 The steps and functions of the method shown are illustrated.
[0096] In addition, another embodiment of this application provides a terminal management server. Figure 8 This is a schematic diagram of the terminal management server, including the following steps: The upgrade mode determination module 810 determines the terminal device that needs to be upgraded and the target upgrade mode that the terminal device needs to adopt, wherein the target upgrade mode is either a silent upgrade mode or a non-silent upgrade mode. The upgrade notification sending module 820 sends an upgrade notification to the terminal device, causing the terminal device to initiate an upgrade request to the download server. The upgrade request carries the target upgrade mode, and the download server allocates corresponding network resource quotas for silent upgrade mode and non-silent upgrade mode.
[0097] Optionally, before sending an upgrade notification to the terminal device, the upgrade notification sending module 820 is further configured to: reallocate a portion of the network resource quota of the download server for the silent upgrade mode to the target upgrade mode when the target upgrade mode is a non-silent upgrade mode and the download server's idle network resources for the target upgrade mode cannot meet the network resource requirements of the target download task; and, when the download server has no network resource quota belonging to the silent upgrade mode that can be reallocated to the target upgrade mode, or when reallocation still cannot make the idle network resources of the target upgrade mode meet the network resource requirements of the target download task, among the other non-silent upgrade modes, determine a borrowed non-silent upgrade mode with a lower priority than the target upgrade mode, and reallocate a portion of the network resource quota of the download server for the borrowed non-silent upgrade mode to the target upgrade mode.
[0098] The network resource quota includes bandwidth resource quota. In the download server, each download task in the non-silent upgrade mode equally shares the bandwidth resource quota of the non-silent upgrade mode, and the non-silent upgrade mode is configured with a minimum bandwidth resource usage for a single download task. The inability of idle network resources in the non-silent upgrade mode to meet the network resource requirements of the download task refers to at least one of the following situations: Case 1: The bandwidth resources allocated to each download task in the non-silent upgrade mode do not exceed the minimum bandwidth resources required for a single download task; Scenario 2: The current number of download tasks in the non-silent upgrade mode has reached the upper limit of the number of flow control tasks in the non-silent upgrade mode. The upper limit of the number of flow control tasks in the non-silent upgrade mode is determined based on the bandwidth resource quota of the non-silent upgrade mode and the minimum bandwidth resource occupied by a single download task.
[0099] Optionally, the upgrade notification delivery module 820 reallocates a portion of the network resource quota of the download server for the borrowed non-silent upgrade mode to the target upgrade mode, including: determining the idle bandwidth resource quota of the download server for the borrowed non-silent upgrade mode based on the minimum bandwidth resource occupied by the download server for a single download task in the borrowed non-silent upgrade mode, the bandwidth resource quota, and the current download task flow control number, and reallocating at least a portion of the idle bandwidth resource quota of the download server for the borrowed non-silent upgrade mode to the target upgrade mode.
[0100] Optionally, the silent upgrade mode is configured with a fixed bandwidth resource for each download task; the upgrade notification delivery module 820 The method of reallocating a portion of the network resource quota allocated by the download server for the silent upgrade mode to the target upgrade mode includes: determining the idle bandwidth resource quota of the silent upgrade mode based on the fixed bandwidth resource occupied by the download server for a single download task in the silent upgrade mode, the bandwidth resource quota, and the current download task flow control number, and reallocating at least a portion of the idle bandwidth resource quota of the silent upgrade mode to the target upgrade mode.
[0101] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Please refer to it. Figure 9 At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and memory. The memory may include main memory, such as high-speed random-access memory (RAM), or non-volatile memory, such as at least one disk drive. Of course, the electronic device may also include other hardware required for other business operations.
[0102] The processor, network interface, and memory can be interconnected via an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 9 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0103] Memory is used to store computer programs. Specifically, a computer program may include program code, which includes computer operation instructions. Memory may include main memory and non-volatile memory, and provides the computer program to the processor.
[0104] Specifically, the processor reads the corresponding computer program from non-volatile memory into memory and then runs it, forming the above-mentioned logical structure. Figure 7 The download server is shown. Correspondingly, the processor executes the program stored in memory, specifically for performing the following operations: Based on the upgrade request initiated by the terminal device, a corresponding target download task is established for the terminal device, and the upgrade request carries the target upgrade mode adopted by the terminal device.
[0105] If the target upgrade mode belongs to the non-silent upgrade mode, and the idle network resources of the target upgrade mode cannot meet the network resource requirements of the target download task, a portion of the network resource quota of the silent upgrade mode will be reallocated to the target upgrade mode.
[0106] Alternatively, the processor reads the corresponding computer program from non-volatile memory into memory and then runs it, forming the above at the logical level. Figure 8 The terminal management server is shown. Correspondingly, the processor executes the program stored in memory and specifically performs the following operations: The terminal device that needs to be upgraded and the target upgrade mode that the terminal device needs to adopt are determined. The target upgrade mode is either a silent upgrade mode or a non-silent upgrade mode.
[0107] An upgrade notification is sent to the terminal device, causing the terminal device to initiate an upgrade request to the download server. The upgrade request carries the target upgrade mode, and the download server allocates corresponding network resource quotas for silent upgrade mode and non-silent upgrade mode.
[0108] The above is as described in this instruction manual. Figure 2 or Figure 5The communication encryption control method disclosed in the illustrated embodiments can be applied to a processor and implemented by the processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit in the processor or by instructions in the form of software. The processor mentioned above can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this application can be directly embodied as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.
[0109] Of course, in addition to software implementation, the electronic device described in this specification does not exclude other implementation methods, such as logic devices or a combination of hardware and software. In other words, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0110] Furthermore, embodiments of this application also propose a computer-readable storage medium that stores one or more computer programs, the one or more computer programs including instructions.
[0111] When the aforementioned instructions are executed by a portable electronic device that includes multiple applications, they enable the portable electronic device to perform... Figure 2 The steps in the method shown include: Based on the upgrade request initiated by the terminal device, a corresponding target download task is established for the terminal device, and the upgrade request carries the target upgrade mode adopted by the terminal device.
[0112] If the target upgrade mode belongs to the non-silent upgrade mode, and the idle network resources of the target upgrade mode cannot meet the network resource requirements of the target download task, a portion of the network resource quota of the silent upgrade mode will be reallocated to the target upgrade mode.
[0113] Alternatively, when the above instructions are executed by a portable electronic device that includes multiple applications, they can enable the portable electronic device to perform... Figure 6 The steps in the method shown include: The terminal device that needs to be upgraded and the target upgrade mode that the terminal device needs to adopt are determined. The target upgrade mode is either a silent upgrade mode or a non-silent upgrade mode.
[0114] An upgrade notification is sent to the terminal device, causing the terminal device to initiate an upgrade request to the download server. The upgrade request carries the target upgrade mode, and the download server allocates corresponding network resource quotas for silent upgrade mode and non-silent upgrade mode.
[0115] Those skilled in the art will understand that the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this specification may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0116] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0117] The above are merely embodiments of this specification and are not intended to limit the scope of this specification. Various modifications and variations can be made to this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of the claims of this specification. Furthermore, all other embodiments obtained by those skilled in the art without inventive effort should fall within the protection scope of this document.
Claims
1. A traffic control method for online upgrades, applied to a download server, wherein the download server allocates corresponding network resource quotas for silent upgrade mode and non-silent upgrade mode, the method comprising: Based on the upgrade request initiated by the terminal device, a corresponding target download task is established for the terminal device, and the upgrade request carries the target upgrade mode adopted by the terminal device; If the target upgrade mode belongs to the non-silent upgrade mode, and the idle network resources of the target upgrade mode cannot meet the network resource requirements of the target download task, a portion of the network resource quota of the silent upgrade mode will be reallocated to the target upgrade mode.
2. The method according to claim 1, The number of non-silent upgrade modes is at least two, and each non-silent upgrade mode has its own priority; the method further includes: If there is no network resource quota belonging to the silent upgrade mode that can be reallocated to the target upgrade mode, or if reallocation still fails to meet the network resource requirements of the target download task due to the lack of available network resources for the target upgrade mode, then among the other non-silent upgrade modes, the borrowed non-silent upgrade mode with a lower priority than the target upgrade mode is identified. The portion of the network resource quota borrowed from the non-silent upgrade mode is redistributed to the target upgrade mode.
3. The method according to claim 2, The network resource quota includes bandwidth resource quota. Each download task in the non-silent upgrade mode shares the bandwidth resource quota of the non-silent upgrade mode equally, and the non-silent upgrade mode is configured with a minimum bandwidth resource usage for a single download task. The inability of idle network resources in the non-silent upgrade mode to meet the network resource requirements of the download task refers to at least one of the following situations: In the non-silent upgrade mode, the bandwidth resources allocated to each download task do not exceed the minimum bandwidth resources required for a single download task. The current number of download tasks in the non-silent upgrade mode has reached the upper limit of the number of flow control tasks in the non-silent upgrade mode. The upper limit of the number of flow control tasks in the non-silent upgrade mode is determined based on the bandwidth resource quota of the non-silent upgrade mode and the minimum bandwidth resource occupied by a single download task.
4. The method according to claim 3, Reallocating a portion of the network resource quota borrowed from the non-silent upgrade mode to the target upgrade mode includes: Based on the minimum bandwidth resource occupied, bandwidth resource quota, and current download task flow control number of a single download task in the borrowed non-silent upgrade mode, the idle bandwidth resource quota of the borrowed non-silent upgrade mode is determined, and at least a portion of the idle bandwidth resource quota of the borrowed non-silent upgrade mode is reallocated to the target upgrade mode.
5. The method according to claim 3, After reallocating a portion of the network resource quota borrowed from the non-silent upgrade mode to the target upgrade mode, the method further includes: Based on the reallocated bandwidth resource quota of the borrowed upgrade mode, the bandwidth resources allocated to each download task in the current borrowed non-silent upgrade mode are adjusted. Furthermore, based on the reallocated bandwidth resource quota of the borrowed upgrade mode and the minimum bandwidth resource occupied by a single download task, the upper limit of the flow control number of the borrowed upgrade mode is adjusted. And / or, Based on the reallocated bandwidth resource quota of the target upgrade mode, the bandwidth resources allocated to each download task of the target upgrade mode are adjusted. Furthermore, based on the reallocated bandwidth resource quota of the target upgrade mode and the minimum bandwidth resource occupied by a single download task, the upper limit of the flow control number of the target upgrade mode is adjusted.
6. The method according to claim 5, After adjusting the upper limit of the flow control number and the bandwidth resources allocated to each download task in the non-silent upgrade mode, the method further includes: When a new download task is created for the non-silent upgrade mode, based on the bandwidth resources currently allocated to each download task in the adjusted non-silent upgrade mode and / or the upper limit of the flow control number in the adjusted non-silent upgrade mode, it is determined whether the idle network resources of the non-silent upgrade mode can meet the network resource requirements of the new download task.
7. The method according to claim 3, After reallocating a portion of the local network resource quota for the borrowed non-silent upgrade mode to the target upgrade mode, the method further includes: If the bandwidth resources allocated to each download task in the current target upgrade mode are greater than the minimum bandwidth resources occupied by a single download task for a first preset duration, and / or the current flow control number of download tasks in the target upgrade mode is less than the upper limit of the flow control number of the target upgrade mode for a second preset duration, then based on the minimum bandwidth resources occupied by a single download task in the target upgrade mode, the bandwidth resource quota, and the current flow control number of download tasks, the idle bandwidth resource quota of the target upgrade mode is determined, and at least a portion of the idle bandwidth resource quota of the target upgrade mode is reallocated to the borrowed non-silent upgrade mode; wherein, the at least portion of the idle bandwidth resources reallocated from the target upgrade mode to the borrowed non-silent upgrade mode does not exceed the idle network resources previously reallocated from the borrowed non-silent upgrade mode to the target upgrade mode.
8. The method according to claim 2, The silent upgrade mode is configured with a fixed bandwidth resource for a single download task; Reallocating a portion of the network resource quota allocated locally for the silent upgrade mode to the target upgrade mode includes: Based on the fixed bandwidth resources occupied by a single download task in the silent upgrade mode, the bandwidth resource quota, and the current download task flow control number, the idle bandwidth resource quota of the silent upgrade mode is determined, and at least a portion of the idle bandwidth resource quota of the silent upgrade mode is reallocated to the target upgrade mode.
9. A method for online upgrade traffic control, applied to a terminal management server, the method comprising: Determine the terminal device that needs to be upgraded and the target upgrade mode that the terminal device needs to adopt, wherein the target upgrade mode is a silent upgrade mode or a non-silent upgrade mode; An upgrade notification is sent to the terminal device, causing the terminal device to initiate an upgrade request to the download server. The upgrade request carries the target upgrade mode, and the download server allocates corresponding network resource quotas for silent upgrade mode and non-silent upgrade mode.
10. The method according to claim 9, Before sending an upgrade notification to the terminal device, the method further includes: If the target upgrade mode is a non-silent upgrade mode, and the download server's idle network resources for the target upgrade mode cannot meet the network resource requirements of the target download task, then the download server will reallocate a portion of the network resource quota for the silent upgrade mode to the target upgrade mode. as well as, If the download server has no network resource quota belonging to the silent upgrade mode that can be reallocated to the target upgrade mode, or if reallocation still fails to meet the network resource requirements of the target download task due to insufficient idle network resources of the target upgrade mode, then among the other non-silent upgrade modes, a borrowed non-silent upgrade mode with a lower priority than the target upgrade mode is identified, and a portion of the network resource quota of the download server for the borrowed non-silent upgrade mode is reallocated to the target upgrade mode.
11. The method according to claim 10, The network resource quota includes bandwidth resource quota. In the download server, each download task in the non-silent upgrade mode equally shares the bandwidth resource quota of the non-silent upgrade mode, and the non-silent upgrade mode is configured with a minimum bandwidth resource usage for a single download task. The inability of idle network resources in the non-silent upgrade mode to meet the network resource requirements of the download task refers to at least one of the following situations: In the non-silent upgrade mode, the bandwidth resources allocated to each download task do not exceed the minimum bandwidth resources required for a single download task. The current number of download tasks in the non-silent upgrade mode has reached the upper limit of the number of flow control tasks in the non-silent upgrade mode. The upper limit of the number of flow control tasks in the non-silent upgrade mode is determined based on the bandwidth resource quota of the non-silent upgrade mode and the minimum bandwidth resource occupied by a single download task.
12. The method according to claim 11, The download server reallocates a portion of its network resource quota for the borrowed non-silent upgrade mode to the target upgrade mode, including: Based on the minimum bandwidth resources occupied, bandwidth resource quota, and current download task flow control number of the download server for a single download task in the borrowed non-silent upgrade mode, the idle bandwidth resource quota of the download server for the borrowed non-silent upgrade mode is determined, and at least a portion of the idle bandwidth resource quota of the download server for the borrowed non-silent upgrade mode is reallocated to the target upgrade mode.
13. The method according to claim 10, The silent upgrade mode is configured with a fixed bandwidth resource for a single download task; Reallocating a portion of the network resource quota allocated by the download server for the silent upgrade mode to the target upgrade mode includes: Based on the fixed bandwidth resources occupied by the download server for a single download task in the silent upgrade mode, the bandwidth resource quota, and the current download task flow control number, the idle bandwidth resource quota of the silent upgrade mode is determined, and at least a portion of the idle bandwidth resource quota of the silent upgrade mode is reallocated to the target upgrade mode.
14. An electronic device comprising: processor; And a memory arranged to store computer-executable instructions, which, when executed, cause the processor to perform the method as described in any one of claims 1 to 13.
15. A computer program product comprising a computer-readable storage medium storing a computer program operable to cause a computer to perform the method as claimed in any one of claims 1 to 13.