CN112866985A - Flow control method, resource downloading method, device, equipment and storage medium - Google Patents

Flow control method, resource downloading method, device, equipment and storage medium Download PDF

Info

Publication number
CN112866985A
CN112866985A CN202110193965.7A CN202110193965A CN112866985A CN 112866985 A CN112866985 A CN 112866985A CN 202110193965 A CN202110193965 A CN 202110193965A CN 112866985 A CN112866985 A CN 112866985A
Authority
CN
China
Prior art keywords
product line
peer
flow rate
available flow
download
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110193965.7A
Other languages
Chinese (zh)
Other versions
CN112866985B (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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202110193965.7A priority Critical patent/CN112866985B/en
Publication of CN112866985A publication Critical patent/CN112866985A/en
Application granted granted Critical
Publication of CN112866985B publication Critical patent/CN112866985B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/22Processing or transfer of terminal data, e.g. status or physical capabilities
    • H04W8/24Transfer of terminal data
    • H04W8/245Transfer of terminal data from a network towards a terminal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/10Flow control between communication endpoints

Abstract

The disclosure discloses a flow control method, a resource downloading device, equipment and a storage medium, and relates to the technical field of computers, in particular to the technical field of resource scheduling. The specific implementation scheme is as follows: determining a number of target peer nodes in a peer-to-peer content distribution network; wherein the target peer node has synchronized resource data of the product line; and distributing available flow rate quota for the product line according to the number of the target peer nodes, and providing resource downloading service for the product line according to the available flow rate quota. According to the embodiment of the application, the resource downloading cost and the resource downloading efficiency can be considered.

Description

Flow control method, resource downloading method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to the field of resource scheduling technologies, and in particular, to a flow control method, a resource downloading method, an apparatus, a device, and a storage medium.
Background
Over-the-Air Technology (OTA) refers to a Technology for remotely managing mobile terminal equipment and SIM card data Over the Air interface of mobile communications. The OTA technology can be used for distributing the upgrade package, and the user equipment needing to be upgraded utilizes the upgrade package to realize equipment upgrade.
In the OTA project, a Content Delivery Network (CDN) can be used to deliver the upgrade package, but the CDN Network is expensive to service, so that adjustment is needed.
Disclosure of Invention
The disclosure provides a method, a device, equipment and a storage medium for flow control and resource downloading.
According to an aspect of the present disclosure, there is provided a flow control method including:
determining a number of target peer nodes in a peer-to-peer content distribution network; wherein the target peer node has synchronized resource data of the product line;
and distributing available flow rate quota for the product line according to the number of the target peer nodes, and providing resource downloading service for the product line according to the available flow rate quota.
According to another aspect of the present disclosure, there is provided a resource downloading method, including:
acquiring a downloading request of user equipment to a product line;
responding to the downloading request according to the available flow limit of the product line;
wherein, the available flow rate limit of the product line is distributed to the product line according to the number of target peer nodes in the peer-to-peer content distribution network; the target peer node has synchronized resource data for the product line.
According to still another aspect of the present disclosure, there is provided a flow control device including:
a target node determination module for determining the number of target peer nodes in the peer-to-peer content distribution network; wherein the target peer node has synchronized resource data of the product line;
and the flow distribution module is used for distributing available flow quota for the product line according to the number of the target peer nodes and providing resource downloading service for the product line according to the available flow quota.
According to still another aspect of the present disclosure, there is provided a resource downloading apparatus including:
the request acquisition module is used for acquiring a downloading request of the user equipment to a product line;
the request response module is used for responding to the downloading request according to the available flow rate limit of the product line;
wherein, the available flow rate limit of the product line is distributed to the product line according to the number of target peer nodes in the peer-to-peer content distribution network; the target peer node has synchronized resource data for the product line.
According to still another aspect of the present disclosure, there is provided an electronic device including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a traffic control method or a resource download method as provided in any of the embodiments of the present application.
According to yet another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium storing computer instructions for causing a computer to execute a traffic control method or a resource download method provided in any embodiment of the present application.
According to yet another aspect of the present disclosure, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the method of task scheduling provided by any of the embodiments of the present application.
According to the technology of the application, the resource downloading cost and the resource downloading efficiency can be considered.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1a is a schematic diagram of a flow control method according to an embodiment of the present disclosure;
FIG. 1b is a schematic diagram of a peer-to-peer content distribution network provided in accordance with an embodiment of the present application;
FIG. 2 is a schematic diagram of another flow control method according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram of a resource downloading method according to an embodiment of the present application;
FIG. 4 is a flowchart illustrating another resource downloading method according to an embodiment of the present application;
FIG. 5 is a schematic view of a flow control device according to an embodiment of the present disclosure;
FIG. 6 is a schematic diagram of a resource downloading device according to an embodiment of the present disclosure;
fig. 7 is a block diagram of an electronic device for implementing a flow control method or a resource downloading method according to an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1a is a schematic diagram of a flow control method according to an embodiment of the present application, which is applicable to a case where a flow control service allocates an available flow rate to a product line. The method may be performed by a flow control device, which may be implemented in hardware and/or software, and may be configured in a flow control service. Referring to fig. 1a, the method specifically includes the following:
s110, determining the number of target peer nodes in a peer-to-peer content distribution network; wherein the target peer node has synchronized resource data for the product line.
S120, distributing available flow rate limit for the product line according to the number of the target peer-to-peer nodes, and providing resource downloading service for the product line according to the available flow rate limit.
Fig. 1b is a schematic diagram of a Peer-to-Peer Content distribution Network according to an embodiment of the present application, and referring to fig. 1b, the Peer-to-Peer Content distribution Network may include a Content Delivery Network (CDN) and a Peer-to-Peer Network (P2P). The service side of the product line can upload the resource data of the product line to the resource center, the resource center deploys the resource data of the product line to the CDN, part of P2P nodes in the P2P network can synchronize the resource data of the product line from the CDN, and part of P2P nodes can synchronize the resource data of the product line from other P2P nodes, that is, the resource data of the product line can also be synchronized between different P2P nodes, so that the transmission efficiency of the resource data is improved. The resource data may be an upgrade package, a client application program, or a network resource, which is not specifically limited in this embodiment of the present application.
In the implementation of the application, the flow control service may periodically determine the number of target peer nodes in the peer-to-peer content distribution network, and dynamically allocate an available flow rate limit for the product line according to the number of the target peer nodes. The available flow rate limit of the product line can be positively correlated with the number of the target peer nodes, namely, the more the number of the target peer nodes is, the more the available flow rate limit of the product line is. Specifically, in different charging periods, the number of target peer nodes is different, and the available flow rate limit of the product line is different. The duration of the charging period may be set according to service needs, for example, may be 300S, and this is not specifically limited in this embodiment of the present application.
The method comprises the steps of dynamically determining the number of target peer nodes in the process of synchronizing the resource data of the product line in the peer-to-peer network, and dynamically allocating available flow rate quota for the product line according to the number of the target peer nodes, so that in the process of synchronizing the resource data of the product line, the resource downloading service for the product line is provided according to the available flow rate quota of the product line. And the available flow rate limit of the product line is dynamically determined according to the number of the target peer nodes, and the stability of the resource downloading service of the product line can be kept.
Moreover, providing the resource download service to the user equipment through the peer-to-peer content delivery network can reduce the resource download cost compared with providing the resource download service to the user equipment only by using the CDN. Specifically, for example, if the user equipment needs n resource data of product lines, and the P2P network needs m resource data of product lines as seeds, the CDN traffic is charged as F × F/TB, and the P2P traffic is charged as a × F/TB (where a is a ratio of the peer-to-peer network service cost to the content delivery network service cost), the cost of providing the resource download service using the peer-to-peer content delivery network is n × a × F + m × F, and the cost of providing the resource download service using only the CDN is n × F, so that the cost of providing the resource download service using the peer-to-peer content delivery network is saved by using the peer-to-peer content delivery network as compared with providing the resource download service using only the CDN
Figure BDA0002945792740000041
Figure BDA0002945792740000042
As can be seen from the cost saving, when the peer-to-peer network service cost is a proportion of the content distribution network service cost and the number n of resources required by the user equipment is fixed, the smaller the number m of seeds is, the more the cost can be saved.
According to the technical scheme of the embodiment of the application, in the process of synchronizing the resource data of the product line to the P2P node, namely before partial P2P nodes are not synchronized, the available flow rate limit is dynamically distributed to the product line according to the number of the target peer nodes, so that the target peer nodes are used for providing resource downloading service for the product line for user equipment, the resource downloading efficiency can be improved, and the waiting time of product line manufacturers is greatly shortened; in addition, the resource downloading cost of the product line can be reduced.
Fig. 2 is a schematic flow chart of another flow control method according to an embodiment of the present application. The present embodiment is an alternative proposed on the basis of the above-described embodiments. Referring to fig. 2, the flow control method provided in this embodiment includes:
s210, determining the number of target peer nodes in a peer-to-peer content distribution network; wherein the target peer node has synchronized resource data for the product line.
S220, determining the available flow of the product line in unit time according to the expected bandwidth of the peer node and the task weight of the product line.
S230, determining the available flow rate limit of the product line in a single charging period according to the number of the target peer nodes, the unit time available flow rate of the product line and the duration of the single charging period, and providing resource downloading service for the product line according to the available flow rate limit.
The expected bandwidth of a node to be treated may refer to the maximum bandwidth that a single node to be treated can provide, the task weight of a product line may refer to a ratio of the bandwidth provided for the task of the product line to the expected bandwidth, and may be determined according to the task parameters of the product line, and the task weights of different product lines may be different, for example, may be 10%. Wherein the task parameters of the product line may include at least one of: the method comprises the following steps of a task issuing area, the size of a task issuing package, the number of issued tasks, product line identification corresponding to the tasks, the number of active product lines corresponding to the tasks, the per-second query rate of the product lines corresponding to the tasks and the like.
Specifically, the available flow rate allocated to the product line may be determined by the following formula:
D′USER=X′×DALL×w;
wherein, D'USERIs the available traffic quota of the product line, X' is the number of target peer nodes, DALLW is the task weight of the product line for the desired bandwidth of the peer node.
By the method, the available flow rate limit is dynamically distributed for the product line, and the accuracy of the available flow rate limit can be further improved.
Specifically, after the flow control service dynamically allocates the available flow rate limit to the resource data of the product line, the available flow rate limit of the product line can be synchronized to the resource issuing node, and the resource issuing node provides the download service for the resource data of the product line for the user equipment according to the available flow rate limit of the product line.
According to the technical scheme of the embodiment of the application, the available flow rate limit of the product line in a single charging period is determined according to the number of the target peer nodes, the available flow rate of the product line in unit time and the duration of the single charging period, so that the accuracy of the available flow rate limit can be further improved, and the stability of resource downloading service of the product line is improved.
In the above technical solution, the target peer node may include a first type peer node and/or a second type peer node; wherein the first type of peer node is configured to synchronize resource data of a product line from a content distribution network; the second type of peer node is used for synchronizing resource data of a product line from the first type of peer node.
The peer-to-peer network can comprise a first type peer node and a second type peer node, wherein the first type peer node is used for synchronizing the resource data of the product line from the content distribution network; the second type of peer node is used for synchronizing resource data of a product line from the first type of peer node. That is, the resource links of the peer nodes of the first type are synchronized using the resources of the content distribution network, and the resource links of the peer nodes of the second type are synchronized using the resources of the peer nodes of the first type. Compared with the first-class peer nodes and the second-class peer nodes which use the resources of the content distribution network for synchronization, the method can improve the resource synchronization efficiency and further shorten the waiting time of product line manufacturers.
In the above technical solution, the number of the first type of peer nodes is determined according to at least one of the following: the download speed of a single task of a product line, the available flow per unit time of the product line, the ratio of the expected download cost of the product line to the original download cost, and the ratio of the peer-to-peer network service cost to the content distribution network service cost.
The speed of downloading a single task of a product line may be a default value, and may be determined according to a QPS (query per second) of the product line. Specifically, the method can be determined according to the QPS of the product line and the maximum supportable number of user equipments for the task of the product line.
In order to meet the downloading requirement of the product line, a first relation among the total number of peer nodes, the downloading speed of a single task of the product line and the available flow per unit time of the product line is as follows:
Figure BDA0002945792740000071
wherein X is the total number of peer nodes, DUSERThe downloading speed of a single task of a product line is shown, and D is the unit time available flow of the product line;
and, X ═ X1+X2
Wherein, X1Is the number of peer nodes of the first kind, X2Is the number of peer nodes of the second type.
And, to meet the cost saving requirement, the expected download cost of the product line accounts for the ratio of the original download cost, the total number of peer nodes, the total number of the peer nodes,
A second relationship between the speed of downloading a single task of a product line, the available traffic per unit time of the product line, and the proportion of peer-to-peer network service charges to content distribution network service charges is as follows:
Figure BDA0002945792740000072
wherein b is the ratio of the expected download cost of the product line to the original download cost, and the value range is (0,1), for example, may be 0.2; f is CDN flow charging, a is the ratio of peer-to-peer network service charge to content delivery network service charge, i.e. P2P flow charging is a multiplied by F; x1Is the number of peer nodes of the first kind, X2The number of peer nodes of the second type; and X is the total number of the peer nodes. Combining the first relationship and the second relationship to know:
Figure BDA0002945792740000073
by setting the number of peer-to-peer nodes of the first kind to
Figure BDA0002945792740000074
The actual downloading cost of the product line can be equal to the expected downloading cost of the product line, so that the ratio of the actual downloading cost of the product line to the original downloading cost is b, and the number of the first-class peer nodes can be flexibly adjusted according to the downloading cost control requirement.
In the above technical solution, when the charging period is detected to be switched, the allocation operation of the available traffic quota is triggered to be executed.
And determining the number of the target peer nodes in each charging period, and dynamically allocating the available flow quota of the charging period according to the number of the target peer nodes. And the number of the target peer nodes is increased along with the increase of time until the flow of the target peer nodes is equal to the total number of the peer nodes, and the regulation and control are finished to realize the control requirement of the download cost.
Fig. 3 is a schematic diagram of a resource downloading method according to an embodiment of the present application, which is applicable to a case where an issuing node provides a resource downloading service for a product line for a user equipment. The method can be executed by a resource downloading device, which can be realized by adopting a hardware and/or software mode and can be configured in a sending down node. Referring to fig. 3, the method specifically includes the following steps:
s310, a downloading request of the user equipment to the product line is obtained.
And S320, responding to the downloading request according to the available flow limit of the product line.
Wherein, the available flow rate limit of the product line is distributed to the product line according to the number of target peer nodes in the peer-to-peer content distribution network; the target peer node has synchronized resource data for the product line.
The user equipment refers to a terminal device which has a downloading requirement on the resource data of the product line. The download request to the product line is used to download the upgrade package, the client application, the network resource download, etc. of the product line.
The flow control service can periodically determine the number of target peer nodes in the peer-to-peer content distribution network, and dynamically allocate the available flow rate limit for the product line according to the number of the target peer nodes. The available flow rate limit of the product line can be positively correlated with the number of the target peer nodes, namely, the more the number of the target peer nodes is, the more the available flow rate limit of the product line is. Specifically, in different charging periods, the number of target peer nodes is different, and the available flow rate limit of the product line is different. The duration of the charging period may be set according to service needs, for example, may be 300S, and this is not specifically limited in this embodiment of the present application.
The method comprises the steps of dynamically determining the number of target peer nodes in the process of synchronizing the resource data of the product line in the peer-to-peer network, and dynamically allocating available flow rate quota for the product line according to the number of the target peer nodes, so that in the process of synchronizing the resource data of the product line, the resource downloading service for the product line is provided according to the available flow rate quota of the product line.
Moreover, providing the resource download service to the user equipment through the peer-to-peer content delivery network can reduce the resource download cost compared with providing the resource download service to the user equipment only by using the CDN. Specifically, for example, when the user equipment needs n resource data of product lines, the P2P network needs m resource data of product lines as seeds, the CDN traffic is charged as F element/TB, and the P2P traffic is charged as a × F element/TB, the cost of providing the resource download service by using the peer-to-peer content delivery network is saved as compared with providing the resource download service by using only the CDN
Figure BDA0002945792740000091
From the cost saving, in pairsAnd when the network service cost accounts for the content distribution network service cost and the number n of the resources required by the user equipment is fixed, the smaller the number m of the seeds is, the more the cost can be saved.
In an optional implementation, responding to the download request according to an available flow rate limit of the product line includes: determining a used flow rate limit of the product line; and comparing the used flow rate limit of the product line with the available flow rate limit, and responding to the downloading request according to the comparison result.
Specifically, under the condition that the existing traffic limit of the product line is smaller than the available traffic limit, the downloading request can be executed, and the resource link of the peer-to-peer network is fed back to the user equipment, so that the user equipment downloads the resource data of the product line from the peer-to-peer network; otherwise, the download request may be rejected, and the user equipment may download the resource data of the product line again in the next billing period.
According to the technical scheme of the embodiment of the application, before partial P2P nodes do not complete synchronization of the resource data of the product line, the downloading request is responded according to the available flow quota dynamically allocated to the product line, and compared with the method that the downloading request is responded after all P2P nodes complete synchronization, the resource downloading efficiency can be improved, and the waiting time of product line manufacturers can be greatly shortened; in addition, the resource downloading cost of the product line can be reduced.
Fig. 4 is a flowchart illustrating another resource downloading method according to an embodiment of the present application. The present embodiment is an alternative proposed on the basis of the above-described embodiments. Referring to fig. 4, the resource downloading method provided in this embodiment includes:
s410, a downloading request of the user equipment to the product line is obtained.
And S420, responding to the downloading request according to the available flow limit of the product line.
Wherein, the available flow rate limit of the product line is distributed to the product line according to the number of target peer nodes in the peer-to-peer content distribution network; the target peer node has synchronized resource data for the product line.
S430, under the condition that the user equipment fails to download the resources of the product line from the peer-to-peer network, feeding back the resource link of the content distribution network to the user equipment, and enabling the user equipment to download again from the content distribution network.
And under the condition that the used flow rate limit of the product line is smaller than the available flow rate limit of the product line, the resource downloading service of the product line can be provided for the user equipment. Specifically, a link of a peer-to-peer network can be provided for the user equipment, and a download task can be issued to the P2P node closest to the user equipment through the peer-to-peer network for the user equipment to download, so as to improve the download speed.
Under the condition that the user equipment fails to download from the peer-to-peer network, resource links of a content distribution network can be provided for the user equipment, and a downloading task is issued to a content distribution node closest to the user equipment through the content distribution network for the user equipment to download, so that the downloading success rate is improved.
In an alternative embodiment, the available traffic credits are determined by: determining the available flow of the product line in unit time according to the expected bandwidth of the peer node and the task weight of the product line; and determining the available flow rate quota of the product line in a single charging period according to the number of the target peer nodes, the available flow rate of the product line in unit time and the duration of the single charging period.
The expected bandwidth of a node to be treated may refer to the maximum bandwidth that a single node to be treated can provide, the task weight of a product line may refer to a ratio of the bandwidth provided for the task of the product line to the expected bandwidth, and may be determined according to the task parameters of the product line, and the task weights of different product lines may be different, for example, may be 10%. Wherein the task parameters of the product line may include at least one of: the method comprises the following steps of a task issuing area, the size of a task issuing package, the number of issued tasks, product line identification corresponding to the tasks, the number of active product lines corresponding to the tasks, the per-second query rate of the product lines corresponding to the tasks and the like.
Specifically, the available flow rate allocated to the product line may be determined by the following formula:
D′USER=X′×DALL×w;
wherein, D'USERIs the available traffic quota of the product line, X' is the number of target peer nodes, DALLW is the task weight of the product line for the desired bandwidth of the peer node.
By the method, the available flow rate limit is dynamically distributed for the product line, and the accuracy of the available flow rate limit can be further improved.
According to the technical scheme of the embodiment of the application, the downloading service is provided for the user equipment through the mutual cooperation of the peer-to-peer network and the content publishing network, and the resource downloading cost and the success rate of a product line can be considered.
In the above technical solution, the target peer node includes a first type peer node and/or a second type peer node; wherein the first type of peer node is configured to synchronize resource data of a product line from a content distribution network; the second type of peer node is used for synchronizing resource data of a product line from the first type of peer node.
The peer-to-peer network can comprise a first type peer node and a second type peer node, wherein the first type peer node is used for synchronizing the resource data of the product line from the content distribution network; the second type of peer node is used for synchronizing resource data of a product line from the first type of peer node. That is, the resource links of the peer nodes of the first type are synchronized using the resources of the content distribution network, and the resource links of the peer nodes of the second type are synchronized using the resources of the peer nodes of the first type. Compared with the first-class peer nodes and the second-class peer nodes which use the resources of the content distribution network for synchronization, the method can improve the resource synchronization efficiency and further shorten the waiting time of product line manufacturers.
In the above technical solution, the number of the first type of peer nodes is determined according to at least one of the following: the download speed of a single task of a product line, the available flow per unit time of the product line, the ratio of the expected download cost of the product line to the original download cost, and the ratio of the peer-to-peer network service cost to the content distribution network service cost.
The speed of downloading a single task of a product line may be a default value, and may be determined according to a QPS (query per second) of the product line. Specifically, the method can be determined according to the QPS of the product line and the maximum supportable number of user equipments for the task of the product line.
In order to meet the downloading requirement of the product line, a first relation among the total number of peer nodes, the downloading speed of a single task of the product line and the available flow per unit time of the product line is as follows:
Figure BDA0002945792740000111
wherein X is the total number of peer nodes, DUSERThe downloading speed of a single task of a product line is shown, and D is the unit time available flow of the product line;
and, X ═ X1+X2
Wherein, X1Is the number of peer nodes of the first kind, X2Is the number of peer nodes of the second type.
And, to meet the cost saving requirement, the expected download cost of the product line accounts for the ratio of the original download cost, the total number of peer nodes, the total number of the peer nodes,
A second relationship between the speed of downloading a single task of a product line, the available traffic per unit time of the product line, and the proportion of peer-to-peer network service charges to content distribution network service charges is as follows:
Figure BDA0002945792740000112
wherein b is the ratio of the expected download cost of the product line to the original download cost, and the value range is (0,1), for example, may be 0.2; f is CDN flow charging, a is the ratio of peer-to-peer network service charge to content delivery network service charge, i.e. P2P flow charging is a multiplied by F; x1Is the number of peer nodes of the first kind, X2The number of peer nodes of the second type; and X is the total number of the peer nodes. Combining the first relationship and the second relationship mayKnowing:
Figure BDA0002945792740000121
by setting the number of peer-to-peer nodes of the first kind to
Figure BDA0002945792740000122
The actual downloading cost of the product line can be equal to the expected downloading cost of the product line, so that the ratio of the actual downloading cost of the product line to the original downloading cost is b, and the number of the first-class peer nodes can be flexibly adjusted according to the downloading cost control requirement.
Fig. 5 is a schematic diagram of a flow control device according to an embodiment of the present application, where the embodiment is applicable to a situation where a flow control service allocates an available flow rate to a product line. The flow control device 500 specifically includes the following:
a target node determining module 501, configured to determine the number of target peer nodes in a peer-to-peer content distribution network; wherein the target peer node has synchronized resource data of the product line;
a traffic distribution module 502, configured to distribute an available traffic quota for a product line according to the number of the target peer nodes, and provide a resource downloading service for the product line according to the available traffic quota.
In an alternative embodiment, the traffic distribution module 502 includes:
a unit flow determining unit, configured to determine an available flow per unit time of a product line according to an expected bandwidth of a peer node and a task weight of the product line;
and the flow distribution unit is used for determining the available flow quota of the product line in a single charging period according to the number of the target peer nodes, the available flow per unit time of the product line and the duration of the single charging period.
In an optional embodiment, the target peer node comprises a first class of peer nodes and/or a second class of peer nodes; wherein the first type of peer node is configured to synchronize resource data of a product line from a content distribution network; the second type of peer node is used for synchronizing resource data of a product line from the first type of peer node.
In an alternative embodiment, the number of peer nodes of the first type is determined according to at least one of: the download speed of a single task of a product line, the available flow per unit time of the product line, the ratio of the expected download cost of the product line to the original download cost, and the ratio of the peer-to-peer network service cost to the content distribution network service cost.
In an alternative embodiment, the flow control device 500 further comprises:
and the flow distribution triggering module is used for triggering and executing the distribution operation of the available flow quota under the condition of detecting the charging period switching.
According to the technical scheme of the embodiment, before partial P2P nodes are not synchronized, the available flow quota is dynamically distributed to the product line according to the number of the target peer nodes, so that the target peer nodes are used for providing resource downloading service for the product line for the user equipment, the resource downloading efficiency can be improved, and the waiting time of product line manufacturers can be greatly shortened; in addition, the resource downloading cost of the product line can be reduced.
Fig. 6 is a schematic diagram of a resource downloading apparatus according to an embodiment of the present application, where the present application is applicable to a case where an issuing node provides a resource downloading service for a product line for a user equipment, and the apparatus is configured in the issuing node, and can implement a resource downloading method according to any embodiment of the present application. The resource downloading apparatus 600 specifically includes the following:
a request obtaining module 601, configured to obtain a download request of a product line from a user equipment;
a request response module 602, configured to respond to the download request according to the available flow rate limit of the product line;
wherein, the available flow rate limit of the product line is distributed to the product line according to the number of target peer nodes in the peer-to-peer content distribution network; the target peer node has synchronized resource data for the product line.
In an alternative embodiment, the request response module 602 includes:
a used flow rate determination unit for determining a used flow rate limit of the product line;
and the request response unit is used for comparing the used flow rate limit of the product line with the available flow rate limit and responding to the downloading request according to the comparison result.
In an alternative embodiment, the available traffic quota is determined by: determining the available flow of the product line in unit time according to the expected bandwidth of the peer node and the task weight of the product line; and determining the available flow rate quota of the product line in a single charging period according to the number of the target peer nodes, the available flow rate of the product line in unit time and the duration of the single charging period.
In an optional embodiment, the target peer node comprises a first class of peer nodes and/or a second class of peer nodes; wherein the first type of peer node is configured to synchronize resource data of a product line from a content distribution network; the second type of peer node is used for synchronizing resource data of a product line from the first type of peer node.
In an alternative embodiment, the number of peer nodes of the first type is determined according to at least one of: the download speed of a single task of a product line, the available flow per unit time of the product line, the ratio of the expected download cost of the product line to the original download cost, and the ratio of the peer-to-peer network service cost to the content distribution network service cost.
In an optional implementation manner, the resource downloading apparatus 600 further includes:
and the link feedback module is used for feeding back the resource link of the content distribution network to the user equipment to enable the user equipment to download again from the content distribution network under the condition that the user equipment fails to download the resources of the product line from the peer-to-peer network.
According to the technical scheme of the embodiment, before partial P2P nodes are not synchronized, the available flow quota is dynamically distributed to the product line according to the number of the target peer nodes, so that the target peer nodes are used for providing resource downloading service for the product line for the user equipment, the resource downloading efficiency can be improved, and the waiting time of product line manufacturers can be greatly shortened; in addition, the resource downloading cost of the product line can be reduced.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure. The electronic device may be a flow control service or a distribution node.
FIG. 7 illustrates a schematic block diagram of an example electronic device 700 that can be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 7, the device 700 comprises a computing unit 701, which may perform various suitable actions and processes according to a computer program stored in a Read Only Memory (ROM)702 or a computer program loaded from a storage unit 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other by a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
Various components in the device 700 are connected to the I/O interface 705, including: an input unit 706 such as a keyboard, a mouse, or the like; an output unit 707 such as various types of displays, speakers, and the like; a storage unit 708 such as a magnetic disk, optical disk, or the like; and a communication unit 709 such as a network card, modem, wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
Computing unit 701 may be a variety of general purpose and/or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units that perform machine learning model algorithms, a digital information processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 701 executes the respective methods and processes described above, such as the flow control method or the resource download method. For example, in some embodiments, the flow control method or resource download method may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 708. In some embodiments, part or all of a computer program may be loaded onto and/or installed onto device 700 via ROM 702 and/or communications unit 709. When loaded into RAM 703 and executed by the computing unit 701, may perform one or more of the steps of the flow control method or the resource download method described above. Alternatively, in other embodiments, the computing unit 701 may be configured to perform the flow control method or the resource download method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), blockchain networks, and the internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs executing on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and the present disclosure is not limited herein.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (25)

1. A method of flow control, comprising:
determining a number of target peer nodes in a peer-to-peer content distribution network; wherein the target peer node has synchronized resource data of the product line;
and distributing available flow rate quota for the product line according to the number of the target peer nodes, and providing resource downloading service for the product line according to the available flow rate quota.
2. The method of claim 1, wherein the allocating available traffic credits for a product line based on the number of target peer nodes comprises:
determining the available flow of the product line in unit time according to the expected bandwidth of the peer node and the task weight of the product line;
and determining the available flow rate quota of the product line in a single charging period according to the number of the target peer nodes, the available flow rate of the product line in unit time and the duration of the single charging period.
3. The method of claim 1, wherein the target peer node comprises a first class of peer nodes and/or a second class of peer nodes; wherein the first type of peer node is configured to synchronize resource data of a product line from a content distribution network; the second type of peer node is used for synchronizing resource data of a product line from the first type of peer node.
4. The method of claim 3, wherein the number of peer nodes of the first type is determined according to at least one of: the download speed of a single task of a product line, the available flow per unit time of the product line, the ratio of the expected download cost of the product line to the original download cost, and the ratio of the peer-to-peer network service cost to the content distribution network service cost.
5. The method of claim 1, further comprising:
and triggering and executing the distribution operation of the available flow rate limit under the condition of detecting the charging period switching.
6. A resource downloading method, comprising:
acquiring a downloading request of user equipment to a product line;
responding to the downloading request according to the available flow limit of the product line;
wherein, the available flow rate limit of the product line is distributed to the product line according to the number of target peer nodes in the peer-to-peer content distribution network; the target peer node has synchronized resource data for the product line.
7. The method of claim 6, wherein responding to the download request according to an available traffic limit of the product line comprises:
determining a used flow rate limit of the product line;
and comparing the used flow rate limit of the product line with the available flow rate limit, and responding to the downloading request according to the comparison result.
8. The method of claim 6, wherein the available traffic credits are determined by: determining the available flow of the product line in unit time according to the expected bandwidth of the peer node and the task weight of the product line; and determining the available flow rate quota of the product line in a single charging period according to the number of the target peer nodes, the available flow rate of the product line in unit time and the duration of the single charging period.
9. The method of claim 6, wherein the target peer node comprises a first class of peer nodes and/or a second class of peer nodes; wherein the first type of peer node is configured to synchronize resource data of a product line from a content distribution network; the second type of peer node is used for synchronizing resource data of a product line from the first type of peer node.
10. The method of claim 9, wherein the number of peer nodes of the first type is determined according to at least one of: the download speed of a single task of a product line, the available flow per unit time of the product line, the ratio of the expected download cost of the product line to the original download cost, and the ratio of the peer-to-peer network service cost to the content distribution network service cost.
11. The method of claim 6, after responding to the download request according to the available flow rate limit of the product line, further comprising:
and under the condition that the user equipment fails to download the resources of the product line from the peer-to-peer network, feeding back the resource link of the content distribution network to the user equipment, and enabling the user equipment to download again from the content distribution network.
12. A flow control device comprising:
a target node determination module for determining the number of target peer nodes in the peer-to-peer content distribution network; wherein the target peer node has synchronized resource data of the product line;
and the flow distribution module is used for distributing available flow quota for the product line according to the number of the target peer nodes and providing resource downloading service for the product line according to the available flow quota.
13. The apparatus of claim 12, wherein the traffic distribution module comprises:
a unit flow determining unit, configured to determine an available flow per unit time of a product line according to an expected bandwidth of a peer node and a task weight of the product line;
and the flow distribution unit is used for determining the available flow quota of the product line in a single charging period according to the number of the target peer nodes, the available flow per unit time of the product line and the duration of the single charging period.
14. The apparatus of claim 12, wherein the target peer node comprises a first class of peer nodes and/or a second class of peer nodes; wherein the first type of peer node is configured to synchronize resource data of a product line from a content distribution network; the second type of peer node is used for synchronizing resource data of a product line from the first type of peer node.
15. The apparatus of claim 14, wherein the number of peer nodes of the first type is determined according to at least one of: the download speed of a single task of a product line, the available flow per unit time of the product line, the ratio of the expected download cost of the product line to the original download cost, and the ratio of the peer-to-peer network service cost to the content distribution network service cost.
16. The apparatus of claim 12, further comprising:
and the flow distribution triggering module is used for triggering and executing the distribution operation of the available flow quota under the condition of detecting the charging period switching.
17. A resource downloading apparatus comprising:
the request acquisition module is used for acquiring a downloading request of the user equipment to a product line;
the request response module is used for responding to the downloading request according to the available flow rate limit of the product line;
wherein, the available flow rate limit of the product line is distributed to the product line according to the number of target peer nodes in the peer-to-peer content distribution network; the target peer node has synchronized resource data for the product line.
18. The apparatus of claim 17, wherein the request response module comprises:
a used flow rate determination unit for determining a used flow rate limit of the product line;
and the request response unit is used for comparing the used flow rate limit of the product line with the available flow rate limit and responding to the downloading request according to the comparison result.
19. The apparatus of claim 17, wherein the available traffic credits are determined by: determining the available flow of the product line in unit time according to the expected bandwidth of the peer node and the task weight of the product line; and determining the available flow rate quota of the product line in a single charging period according to the number of the target peer nodes, the available flow rate of the product line in unit time and the duration of the single charging period.
20. The apparatus of claim 17, wherein the target peer node comprises a first class of peer nodes and/or a second class of peer nodes; wherein the first type of peer node is configured to synchronize resource data of a product line from a content distribution network; the second type of peer node is used for synchronizing resource data of a product line from the first type of peer node.
21. The apparatus of claim 20, wherein the number of peer nodes of the first type is determined according to at least one of: the download speed of a single task of a product line, the available flow per unit time of the product line, the ratio of the expected download cost of the product line to the original download cost, and the ratio of the peer-to-peer network service cost to the content distribution network service cost.
22. The apparatus of claim 17, further comprising:
and the link feedback module is used for feeding back the resource link of the content distribution network to the user equipment to enable the user equipment to download again from the content distribution network under the condition that the user equipment fails to download the resources of the product line from the peer-to-peer network.
23. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-11.
24. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-11.
25. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-11.
CN202110193965.7A 2021-02-20 2021-02-20 Flow control method, resource downloading method, device, equipment and storage medium Active CN112866985B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110193965.7A CN112866985B (en) 2021-02-20 2021-02-20 Flow control method, resource downloading method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110193965.7A CN112866985B (en) 2021-02-20 2021-02-20 Flow control method, resource downloading method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112866985A true CN112866985A (en) 2021-05-28
CN112866985B CN112866985B (en) 2023-06-23

Family

ID=75988380

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110193965.7A Active CN112866985B (en) 2021-02-20 2021-02-20 Flow control method, resource downloading method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112866985B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113839888A (en) * 2021-09-22 2021-12-24 唯品会(广州)软件有限公司 Current limiting method, device, equipment and readable storage medium
CN114338705A (en) * 2021-11-24 2022-04-12 阿里巴巴(中国)有限公司 Resource water level control method, device and medium for content delivery network CDN node

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103384259A (en) * 2012-05-04 2013-11-06 上海聚力传媒技术有限公司 Method, device, equipment and system for adjusting transmission speed of peer nodes
CN104333816A (en) * 2014-11-26 2015-02-04 北京奇艺世纪科技有限公司 Method and device for determining download mode in P2P network
WO2015100190A1 (en) * 2013-12-27 2015-07-02 Microsoft Technology Licensing, Llc Peer-to-peer network prioritizing propagation of objects through the network
CN109348257A (en) * 2018-11-14 2019-02-15 广州虎牙信息科技有限公司 Draw method of flow control, device and live broadcast system
CN110198344A (en) * 2019-05-05 2019-09-03 网宿科技股份有限公司 A kind of resource regulating method and system
CN110808919A (en) * 2019-10-21 2020-02-18 新华三信息安全技术有限公司 Flow control method and device, network equipment and storage medium
CN111083058A (en) * 2019-12-04 2020-04-28 百度在线网络技术(北京)有限公司 Content distribution network service current limiting method and electronic equipment
CN111970320A (en) * 2020-06-30 2020-11-20 百度在线网络技术(北京)有限公司 Control method and device for OTA data packet issuing flow
CN112165691A (en) * 2020-09-24 2021-01-01 百度在线网络技术(北京)有限公司 Content delivery network scheduling method, device, server and medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103384259A (en) * 2012-05-04 2013-11-06 上海聚力传媒技术有限公司 Method, device, equipment and system for adjusting transmission speed of peer nodes
WO2015100190A1 (en) * 2013-12-27 2015-07-02 Microsoft Technology Licensing, Llc Peer-to-peer network prioritizing propagation of objects through the network
CN104333816A (en) * 2014-11-26 2015-02-04 北京奇艺世纪科技有限公司 Method and device for determining download mode in P2P network
CN109348257A (en) * 2018-11-14 2019-02-15 广州虎牙信息科技有限公司 Draw method of flow control, device and live broadcast system
CN110198344A (en) * 2019-05-05 2019-09-03 网宿科技股份有限公司 A kind of resource regulating method and system
CN110808919A (en) * 2019-10-21 2020-02-18 新华三信息安全技术有限公司 Flow control method and device, network equipment and storage medium
CN111083058A (en) * 2019-12-04 2020-04-28 百度在线网络技术(北京)有限公司 Content distribution network service current limiting method and electronic equipment
CN111970320A (en) * 2020-06-30 2020-11-20 百度在线网络技术(北京)有限公司 Control method and device for OTA data packet issuing flow
CN112165691A (en) * 2020-09-24 2021-01-01 百度在线网络技术(北京)有限公司 Content delivery network scheduling method, device, server and medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113839888A (en) * 2021-09-22 2021-12-24 唯品会(广州)软件有限公司 Current limiting method, device, equipment and readable storage medium
CN113839888B (en) * 2021-09-22 2024-02-27 唯品会(广州)软件有限公司 Current limiting method, device, equipment and readable storage medium
CN114338705A (en) * 2021-11-24 2022-04-12 阿里巴巴(中国)有限公司 Resource water level control method, device and medium for content delivery network CDN node
CN114338705B (en) * 2021-11-24 2023-12-01 阿里巴巴(中国)有限公司 Resource water level control method, equipment and medium for CDN node of content delivery network

Also Published As

Publication number Publication date
CN112866985B (en) 2023-06-23

Similar Documents

Publication Publication Date Title
US11888756B2 (en) Software load balancer to maximize utilization
CN109949111B (en) Electronic bill identification distribution method, electronic bill generation method, device and system
CN112165691B (en) Content delivery network scheduling method, device, server and medium
CN108776934B (en) Distributed data calculation method and device, computer equipment and readable storage medium
CN111083058B (en) Content distribution network service flow limiting method and electronic equipment
CN112866985B (en) Flow control method, resource downloading method, device, equipment and storage medium
CN104092756A (en) Cloud storage system resource dynamic allocation method based on DHT mechanism
CN112839067B (en) Data synchronization method and device
CN105323106A (en) Software upgrade management method, equipment and system
CN111970132A (en) OTA data packet issuing flow control method, device and server
CN113656176B (en) Cloud equipment distribution method, device and system, electronic equipment, medium and product
CN114155026A (en) Resource allocation method, device, server and storage medium
CN111988817A (en) Control method and device for OTA data packet issuing flow
CN103248636A (en) Offline download system and method
CN110909978A (en) Resource processing method, device, server and computer readable storage medium
CN110113176B (en) Information synchronization method and device for configuration server
CN111770026B (en) Network flow control method and device
CN113596920B (en) Flow control method, device, electronic equipment and storage medium
CN113726881B (en) Communication connection establishment method, related device and computer readable storage medium
CN107689979B (en) method and equipment for processing download request
CN113568706A (en) Container adjusting method and device for service, electronic equipment and storage medium
CN107371263A (en) The dispatching method and device of ascending resource
CN103368862B (en) Load balance dispatching method and load balance dispatching device
US9369592B1 (en) Accurate user data information
CN113014656B (en) Private cloud information synchronization method and device

Legal Events

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