[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN112866985B - 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
CN112866985B
CN112866985B CN202110193965.7A CN202110193965A CN112866985B CN 112866985 B CN112866985 B CN 112866985B CN 202110193965 A CN202110193965 A CN 202110193965A CN 112866985 B CN112866985 B CN 112866985B
Authority
CN
China
Prior art keywords
product line
peer
resource
available
content distribution
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110193965.7A
Other languages
Chinese (zh)
Other versions
CN112866985A (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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Information Transfer Between Computers (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The disclosure discloses a flow control method, a resource downloading method, a 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 the resource data of the product line; and 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. The embodiment of the application can give consideration to the resource downloading cost and the resource downloading efficiency.

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, a device, equipment, and a storage medium.
Background
The Over-the-Air Technology (OTA) refers to a Technology for implementing remote management of mobile terminal devices and SIM card data through an Air interface of mobile communication. The OTA technology can be used for distributing the upgrade package, and the user equipment needing to be upgraded realizes equipment upgrade by using the upgrade package.
In OTA projects, the content delivery network (Content Delivery Network, CDN) can be used for upgrade package delivery, however, the CDN network is expensive to service and thus requires adjustments.
Disclosure of Invention
The present disclosure provides a method, apparatus, device and storage medium for flow control, resource download.
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 the resource data of the product line;
and 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 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;
the available flow 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 the resource data of the product line.
According to yet another aspect of the present disclosure, there is provided a flow control device including:
a target node determining module for determining the number of target peer nodes in the peer-to-peer content distribution network; wherein the target peer node has synchronized the 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 the product line;
the request response module is used for responding to the downloading request according to the available flow limit of the product line;
the available flow 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 the resource data of the product line.
According to still another aspect of the present disclosure, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the flow control method or the resource download method provided by 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 the flow control method or the resource downloading method provided by any embodiment of the present application.
According to yet another aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the task scheduling method 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 description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for 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 illustration of another flow control method according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a method for downloading resources according to an embodiment of the present application;
FIG. 4 is a flow chart of another method for downloading resources according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a flow control device according to an embodiment of the present disclosure;
FIG. 6 is a schematic diagram of a resource downloading apparatus according to an embodiment of the present disclosure;
fig. 7 is a block diagram of an electronic device used to implement a flow control method or a resource download method of an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one 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, where the embodiment of the present application is applicable to a case where a flow control service allocates an available flow credit 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 comprises the following steps:
s110, determining the number of target peer nodes in the peer-to-peer content distribution network; wherein the target peer node has synchronized the resource data of the product line.
And S120, 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.
Fig. 1b is a schematic diagram of a peer-to-peer content delivery network provided according to an embodiment of the present application, and referring to fig. 1b, the peer-to-peer content delivery network may include a content delivery network (Content Delivery Network, CDN) and a peer-to-peer network (Peer to Peer Network, P2P). The business 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, namely, different P2P nodes can synchronize the resource data of the product line, so that the transmission efficiency of the resource data is accelerated. The resource data may be an upgrade package, a client application program, or a network resource, which is not specifically limited in the embodiment of the present application.
In the implementation of the present 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 credit to the product line according to the number of target peer nodes. The available traffic quota of the product line may be positively correlated with the number of the target peer nodes, that is, the greater the number of the target peer nodes, the greater the available traffic quota of the product line. 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 requirements, for example, may be 300S, which is not specifically limited in the embodiment of the present application.
The number of the target peer nodes is dynamically determined in the process of synchronizing the resource data of the product line in the peer-to-peer network, and the available flow limit is dynamically distributed to 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 of the product line is provided according to the available flow limit of the product line, and compared with the method that the resource data downloading service of the product line is provided after the resource data of the product line is synchronized, the resource downloading efficiency can be improved, and the waiting time of manufacturers of the product line is shortened. And the available flow limit of the product line is dynamically determined according to the number of target peer nodes, and the stability of the resource downloading service of the product line can be maintained.
And, providing the resource download service to the user device through the peer-to-peer content delivery network can also reduce the resource download cost as compared to providing the resource download service to the user device using only the CDN. Specifically, taking the resource data of n product lines needed by the user equipment, the resource data of m product lines needed by the P2P network as seeds, the CDN traffic charging is F element/TB, the P2P traffic charging is a×f element/TB (where a is the ratio of the peer-to-peer network service cost to the content delivery network service cost), the cost of providing the resource download service by adopting the peer-to-peer content delivery network is n×a×f+m×f, and the cost of providing the resource download service by adopting only the CDN is n×f, so that the peer-to-peer content delivery network is adopted to provide the resourceThe source download service is cost-effective compared to using only CDN to provide the resource download service
Figure BDA0002945792740000041
Figure BDA0002945792740000042
As can be seen from the cost saving, when the peer-to-peer network service cost occupies the content distribution network service cost, and the number of resources n required by the user equipment is fixed, the smaller the seed number m, the more the cost can be saved.
According to the technical scheme, in the process of synchronizing the resource data of the product line to the P2P nodes, namely before part of P2P nodes do not complete synchronization, the available flow limit is dynamically distributed to the product line according to the number of 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 manufacturers of the product line can be greatly shortened; in addition, the resource downloading cost of the product line can be reduced.
Fig. 2 is a flow chart of another flow control method according to an embodiment of the present application. This embodiment is an alternative to the embodiments described above. Referring to fig. 2, the flow control method provided in this embodiment includes:
s210, determining the number of target peer nodes in the peer-to-peer content distribution network; wherein the target peer node has synchronized the resource data of the product line.
S220, determining available flow per unit time of the product line according to the expected bandwidth of the peer node and the task weight of the product line.
S230, determining the available flow limit of the product line in a single charging period according to the number of the target peer nodes, the available flow of the product line in unit time and the duration of the single charging period, wherein the available flow limit is used for providing resource downloading service for the product line according to the available flow limit.
The expected bandwidth of the to-be-node may refer to the maximum bandwidth that a single to-be-node can provide, the task weight of the product line may refer to the duty ratio of the bandwidth provided for the task of the product line to the expected bandwidth, 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 steps of task issuing areas, task issuing package sizes, task issuing quantity, product line identifiers corresponding to tasks, active numbers of product lines corresponding to tasks, query rate per second of product lines corresponding to tasks and the like.
Specifically, the available flow credit allocated for a product line may be determined by the following formula:
D′ USER =X′×D ALL ×w;
wherein D' USER For the available traffic limit of the product line, X' is the number of target peer nodes, D ALL For the desired bandwidth of the peer, w is the task weight of the product line.
By the method, the available flow limit is dynamically distributed for the product line, and the accuracy of the available flow limit can be further improved.
Specifically, after the flow control service dynamically allocates the available flow limit for the resource data of the product line, the available flow limit of the product line can be synchronized to the resource issuing node, and the resource issuing node provides the downloading service for the resource data of the product line for the user equipment according to the available flow limit of the product line.
According to the technical scheme, the available flow limit of the product line in the single charging period is determined according to the number of target peer nodes, the available flow of the product line in unit time and the duration of the single charging period, so that the accuracy of the available flow limit can be further improved, and the stability of the resource downloading service of the product line is improved.
In the above technical solution, the target peer node may include a first class peer node and/or a second class peer node; wherein the first class of peer nodes are used for synchronizing resource data of the product line from the content distribution network; the second class of peer nodes is used for synchronizing resource data of a product line from the first class of peer nodes.
Wherein the peer-to-peer network may include a first type of peer node and a second type of peer node, wherein the first type of peer node is configured to synchronize resource data of a product line from the content distribution network; the second class of peer nodes is used for synchronizing resource data of a product line from the first class of peer nodes. That is, the resource links of the first type of peer are synchronized using the resources of the content distribution network and the resource links of the second type of peer are synchronized using the resources of the first type of peer. 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 resource synchronization efficiency can be improved, and the waiting time of product line manufacturers is further shortened.
In the above technical solution, the number of peer nodes of the first class is determined according to at least one of the following: the rate of single task download for the product line, the available flow per unit time for the product line, the desired download cost for the product line versus the original download cost, and the peer-to-peer network service cost versus the content distribution network service cost.
Wherein, the single task downloading speed of the product line can be a default value, and can be determined according to the 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 user equipment number of the product line task.
To meet the downloading requirements of the product line, a first relationship between the total number of peer nodes, the downloading speed of a single task of the product line and the available flow rate per unit time of the product line is as follows:
Figure BDA0002945792740000071
wherein X is the total number of peer nodes, D USER The downloading speed of a single task of a product line is represented by D, which is the available flow rate of the product line in unit time;
and x=x 1 +X 2
Wherein X is 1 For the number of peer nodes of the first type,X 2 is the number of peer nodes of the second class.
And, to meet the cost savings, the desired download cost of the product line is a ratio of the original download cost, the total number of peer nodes,
The second relationship between the single task download speed of the product line, the available flow per unit time of the product line, and the ratio 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 interval is (0, 1), for example, can 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, namely P2P flow charging is a multiplied by F; x is X 1 X is the number of peer nodes of the first class 2 The number of peer nodes of the second class; x is the total number of peer nodes. The first relationship and the second relationship are combined to know that:
Figure BDA0002945792740000073
By setting the number of peer nodes of the first type 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 type of peer nodes can be flexibly adjusted according to the downloading cost control requirement.
In the above technical solution, when the charging period switch is detected, 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 distributing the available flow limit of the charging period according to the number of the target peer nodes. 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, the regulation is finished, and the downloading cost control requirement is realized.
Fig. 3 is a schematic diagram of a resource downloading method according to an embodiment of the present application, where the embodiment of the present application may be applicable to a case where a sending node provides a resource downloading service to a product line for a user equipment. The method can be performed by a resource downloading device, which can be implemented in hardware and/or software and can be configured in a delivery node. Referring to fig. 3, the method specifically includes the following steps:
S310, obtaining a downloading request of the user equipment to the product line.
S320, responding to the downloading request according to the available flow limit of the product line.
The available flow 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 the resource data of the product line.
The user equipment refers to terminal equipment with downloading requirements for resource data of the product line. The download request to the product line is used to download upgrade packages, client applications, network resource downloads, etc. of the product line.
The available traffic quota of the product line may be periodically determined by the traffic control service, and the available traffic quota may be dynamically allocated to the product line according to the number of target peer nodes in the peer-to-peer content distribution network. The available traffic quota of the product line may be positively correlated with the number of the target peer nodes, that is, the greater the number of the target peer nodes, the greater the available traffic quota of the product line. 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 requirements, for example, may be 300S, which is not specifically limited in the embodiment of the present application.
The number of the target peer nodes is dynamically determined in the process of synchronizing the resource data of the product line in the peer-to-peer network, and the available flow limit is dynamically distributed to 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 of the product line is provided according to the available flow limit of the product line, and compared with the method that the resource data downloading service of the product line is provided after the resource data of the product line is synchronized, the resource downloading efficiency can be improved, and the waiting time of manufacturers of the product line is shortened.
And, providing the resource download service to the user device through the peer-to-peer content delivery network can also reduce the resource download cost as compared to providing the resource download service to the user device using only the CDN. Specifically, taking the resource data of n product lines needed by the user equipment, the resource data of m product lines needed by the P2P network as seeds, the CDN flow charging is F element/TB, the P2P flow charging is a xF element/TB as an example, and compared with the use of CDN alone, the cost saving of providing the resource downloading service by adopting the peer-to-peer content distribution network is that
Figure BDA0002945792740000091
As can be seen from the cost saving, when the peer-to-peer network service cost occupies the content distribution network service cost, and the number of resources n required by the user equipment is fixed, the smaller the seed number m, the more the cost can be saved.
In an alternative embodiment, responding to the download request according to the available traffic credit of the product line includes: determining a used flow credit for the product line; and comparing the used flow limit of the product line with the available flow limit, and responding to the downloading request according to a comparison result.
Specifically, under the condition that the existing flow limit of the product line is smaller than the available flow limit, a downloading request can be executed, and a resource link of the peer-to-peer network is fed back to the user equipment, so that the user equipment downloads resource data of the product line from the peer-to-peer network; otherwise, the downloading request can be refused, and the user equipment can download the resource data of the product line again in the next charging period.
According to the technical scheme, before the synchronization of the product line resource data is not completed by part of P2P nodes, the downloading request is responded according to the available flow limit dynamically distributed to the product line, and compared with the downloading request responded after the synchronization is completed by all P2P nodes, the resource downloading efficiency can be improved, and the waiting time of a product line manufacturer is greatly shortened; in addition, the resource downloading cost of the product line can be reduced.
Fig. 4 is a flowchart of another resource downloading method according to an embodiment of the present application. This embodiment is an alternative to the embodiments described above. Referring to fig. 4, the resource downloading method provided in this embodiment includes:
s410, obtaining a downloading request of the user equipment to the product line.
S420, responding to the downloading request according to the available flow limit of the product line.
The available flow 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 the resource data of the product line.
And S430, feeding back the resource link of the content distribution network to the user equipment to enable the user equipment to re-download from the content distribution network under the condition that the user equipment fails to download the resource of the product line from the peer-to-peer network.
In the case that the used traffic quota of the product line is smaller than the available traffic quota of the product line, the user equipment may be provided with a resource download service to the product line. Specifically, a link of a peer-to-peer network may be provided to the ue, and the downloading task may be issued to a P2P node closest to the ue through the peer-to-peer network for the ue to download, so as to improve the downloading speed.
In case that the user equipment fails to download from the peer-to-peer network, the resource link of the content distribution network can be provided for the user equipment, and the download task is issued to the content distribution node closest to the user equipment through the content distribution network for the user equipment to download, so that the download success rate is improved.
In an alternative embodiment, the available flow credit is determined by: determining available flow per unit time of a product line according to expected bandwidth of a peer node and task weight of the product line; and determining the available flow limit of the product line in a single charging period according to the number of the target peer nodes, the available flow of the product line in unit time and the duration of the single charging period.
The expected bandwidth of the to-be-node may refer to the maximum bandwidth that a single to-be-node can provide, the task weight of the product line may refer to the duty ratio of the bandwidth provided for the task of the product line to the expected bandwidth, 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 steps of task issuing areas, task issuing package sizes, task issuing quantity, product line identifiers corresponding to tasks, active numbers of product lines corresponding to tasks, query rate per second of product lines corresponding to tasks and the like.
Specifically, the available flow credit allocated for a product line may be determined by the following formula:
D′ USER =X′×D ALL ×w;
wherein D' USER For the available traffic limit of the product line, X' is the number of target peer nodes, D ALL For the desired bandwidth of the peer, w is the task weight of the product line.
By the method, the available flow limit is dynamically distributed for the product line, and the accuracy of the available flow limit can be further improved.
According to the technical scheme, the peer-to-peer network and the content release network are matched with each other to provide the downloading service for the user equipment, so that the resource downloading cost and the success rate of the product line can be considered.
In the above technical solution, the target peer node includes a first class peer node and/or a second class peer node; wherein the first class of peer nodes are used for synchronizing resource data of the product line from the content distribution network; the second class of peer nodes is used for synchronizing resource data of a product line from the first class of peer nodes.
Wherein the peer-to-peer network may include a first type of peer node and a second type of peer node, wherein the first type of peer node is configured to synchronize resource data of a product line from the content distribution network; the second class of peer nodes is used for synchronizing resource data of a product line from the first class of peer nodes. That is, the resource links of the first type of peer are synchronized using the resources of the content distribution network and the resource links of the second type of peer are synchronized using the resources of the first type of peer. 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 resource synchronization efficiency can be improved, and the waiting time of product line manufacturers is further shortened.
In the above technical solution, the number of peer nodes of the first class is determined according to at least one of the following: the rate of single task download for the product line, the available flow per unit time for the product line, the desired download cost for the product line versus the original download cost, and the peer-to-peer network service cost versus the content distribution network service cost.
Wherein, the single task downloading speed of the product line can be a default value, and can be determined according to the 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 user equipment number of the product line task.
To meet the downloading requirements of the product line, a first relationship between the total number of peer nodes, the downloading speed of a single task of the product line and the available flow rate per unit time of the product line is as follows:
Figure BDA0002945792740000111
wherein X is the total number of peer nodes, D USER The downloading speed of a single task of a product line is represented by D, which is the available flow rate of the product line in unit time;
and x=x 1 +X 2
Wherein X is 1 Is the firstThe number of peer nodes, X 2 Is the number of peer nodes of the second class.
And, to meet the cost savings, the desired download cost of the product line is a ratio of the original download cost, the total number of peer nodes,
The second relationship between the single task download speed of the product line, the available flow per unit time of the product line, and the ratio 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 interval is (0, 1), for example, can 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, namely P2P flow charging is a multiplied by F; x is X 1 X is the number of peer nodes of the first class 2 The number of peer nodes of the second class; x is the total number of peer nodes. The first relationship and the second relationship are combined to know that:
Figure BDA0002945792740000121
by setting the number of peer nodes of the first type 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 type of 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 case where a flow control service allocates an available flow quota for a product line, and the device is configured in the flow control service, so as to implement the flow control method according to any embodiment of the present application. The flow control device 500 specifically includes the following:
A target node determining module 501 configured to determine a number of target peer nodes in a peer-to-peer content distribution network; wherein the target peer node has synchronized the resource data of the product line;
the traffic distribution module 502 is configured to distribute an available traffic quota for a product line according to the number of the target peer nodes, and provide a resource download service for the product line according to the available traffic quota.
In an alternative embodiment, the flow distribution module 502 includes:
a unit flow determining unit, configured to determine a unit time available flow of a product line according to a desired 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 limit of the product line in a single charging period according to the number of the target peer nodes, the available flow of the product line in unit time and the duration of the single charging period.
In an alternative embodiment, the target peer node comprises a first class peer node and/or a second class peer node; wherein the first class of peer nodes are used for synchronizing resource data of the product line from the content distribution network; the second class of peer nodes is used for synchronizing resource data of a product line from the first class of peer nodes.
In an alternative embodiment, the number of peer nodes of the first type is determined according to at least one of: the rate of single task download for the product line, the available flow per unit time for the product line, the desired download cost for the product line versus the original download cost, and the peer-to-peer network service cost versus the content distribution network service cost.
In an alternative embodiment, the flow control device 500 further includes:
and the flow allocation triggering module is used for triggering and executing the allocation operation of the available flow limit under the condition that the charging period switching is detected.
According to the technical scheme, before partial P2P nodes do not complete synchronization, available flow limit is dynamically distributed to the product line according to the number of 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 manufacturers of the product line 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 device provided according to an embodiment of the present application, where the embodiment of the present application is applicable to a case where a sending node provides a service of downloading a resource to a product line for a user equipment, where the device is configured in the sending node, and the resource downloading method described in any embodiment of the present application may be implemented. The resource downloading device 600 specifically includes the following:
A request acquisition module 601, configured to acquire a download request of a user equipment to a product line;
a request response module 602, configured to respond to the download request according to the available traffic quota of the product line;
the available flow 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 the resource data of the product line.
In an alternative embodiment, the request response module 602 includes:
a used flow rate determining unit, configured to determine a used flow rate limit of the product line;
and the request response unit is used for comparing the used flow limit of the product line with the available flow limit and responding to the downloading request according to a comparison result.
In an alternative embodiment, the available flow credit is determined by: determining available flow per unit time of a product line according to expected bandwidth of a peer node and task weight of the product line; and determining the available flow limit of the product line in a single charging period according to the number of the target peer nodes, the available flow of the product line in unit time and the duration of the single charging period.
In an alternative embodiment, the target peer node comprises a first class peer node and/or a second class peer node; wherein the first class of peer nodes are used for synchronizing resource data of the product line from the content distribution network; the second class of peer nodes is used for synchronizing resource data of a product line from the first class of peer nodes.
In an alternative embodiment, the number of peer nodes of the first type is determined according to at least one of: the rate of single task download for the product line, the available flow per unit time for the product line, the desired download cost for the product line versus the original download cost, and the peer-to-peer network service cost versus the content distribution network service cost.
In an alternative embodiment, the resource downloading device 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 under the condition that the user equipment fails to download the resource of the product line from the peer-to-peer network, so that the user equipment can re-download the resource link from the content distribution network.
According to the technical scheme, before partial P2P nodes do not complete synchronization, available flow limit is dynamically distributed to the product line according to the number of 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 manufacturers of the product line can be greatly shortened; in addition, the resource downloading cost of the product line can be reduced.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product. The electronic device may be a flow control service or a downstream node.
Fig. 7 illustrates a schematic block diagram of an example electronic device 700 that may 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 telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 7, the apparatus 700 includes a computing unit 701 that can perform various appropriate 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 may also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
Various components in device 700 are connected to I/O interface 705, including: an input unit 706 such as a keyboard, a mouse, etc.; an output unit 707 such as various types of displays, speakers, and the like; a storage unit 708 such as a magnetic disk, an 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.
The computing unit 701 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of 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 executing machine learning model algorithms, a digital information processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 701 performs the respective methods and processes described above, such as a flow control method or a 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 the storage unit 708. In some embodiments, part or all of the computer program may be loaded and/or installed onto device 700 via ROM 702 and/or communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the flow control method or the resource download method described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform the flow control method or the resource download method in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On 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, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code 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 code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. 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. The 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 pointing device (e.g., a mouse or 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 may 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 input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background 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 background, 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 a client and a server. The client and server are typically 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 hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel or sequentially or in a different order, provided that the desired results of the technical solutions of the present disclosure are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (20)

1. A flow control method, comprising:
periodically determining the number of target peer nodes in a peer-to-peer content distribution network in the process of synchronizing resource data of a product line by the peer-to-peer content distribution network; wherein the target peer node has synchronized the resource data of the product line; the resource data is a client application program or a network resource; the target peer node comprises a first type peer node and a second type peer node; the first class peer node is used for synchronizing resource data of a product line from a content distribution network; the second class peer node is used for synchronizing resource data of a product line from the first class peer node;
Dynamically distributing available flow limit for the product line according to the number of the target peer nodes, wherein the available flow limit is used for providing resource downloading service for the product line according to the available flow limit; wherein a positive correlation is made between the available traffic credit and the number of target peer nodes.
2. The method of claim 1, wherein the allocating an available traffic credit for a product line according to the number of target peer nodes comprises:
determining available flow per unit time of a product line according to expected bandwidth of a peer node and task weight of the product line;
and determining the available flow limit of the product line in a single charging period according to the number of the target peer nodes, the available flow of the product line in unit time and the duration of the single charging period.
3. The method of claim 1, wherein the number of peer nodes of the first type is determined according to at least one of: the rate of single task download for the product line, the available flow per unit time for the product line, the desired download cost for the product line versus the original download cost, and the peer-to-peer network service cost versus the content distribution network service cost.
4. The method of claim 1, further comprising:
and triggering to execute the allocation operation of the available flow quota under the condition that the charging period switching is detected.
5. A method of resource download, 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;
the available flow limit of the product line is dynamically allocated to the product line according to the number of target peer nodes in the peer-to-peer content distribution network determined periodically in the process of synchronizing the resource data of the product line by the peer-to-peer content distribution network; the target peer node has synchronized the resource data of the product line; the resource data is a client application program or a network resource; the target peer node comprises a first type peer node and a second type peer node; the first class peer node is used for synchronizing resource data of a product line from a content distribution network; the second class of peer nodes is used for synchronizing resource data of a product line from the first class of peer nodes.
6. The method of claim 5, wherein said responding to the download request according to the available traffic credits of the product line comprises:
Determining a used flow credit for the product line;
and comparing the used flow limit of the product line with the available flow limit, and responding to the downloading request according to a comparison result.
7. The method of claim 5, wherein the available traffic volume is determined by: determining available flow per unit time of a product line according to expected bandwidth of a peer node and task weight of the product line; and determining the available flow limit of the product line in a single charging period according to the number of the target peer nodes, the available flow of the product line in unit time and the duration of the single charging period.
8. The method of claim 5, wherein the number of first class peer nodes is determined according to at least one of: the rate of single task download for the product line, the available flow per unit time for the product line, the desired download cost for the product line versus the original download cost, and the peer-to-peer network service cost versus the content distribution network service cost.
9. The method of claim 5, wherein after responding to the download request according to the available traffic credit of the product line, further comprising:
And under the condition that the resource downloading of the product line from the peer-to-peer network by the user equipment fails, feeding back the resource link of the content distribution network to the user equipment so as to enable the user equipment to be downloaded again from the content distribution network.
10. A flow control device, comprising:
the target node determining module is used for periodically determining the number of target peer nodes in the peer-to-peer content distribution network in the process of synchronizing the resource data of the product line of the peer-to-peer content distribution network; wherein the target peer node has synchronized the resource data of the product line; the resource data is a client application program or a network resource; the target peer node comprises a first type peer node and a second type peer node; the first class peer node is used for synchronizing resource data of a product line from a content distribution network; the second class peer node is used for synchronizing resource data of a product line from the first class peer node;
the traffic distribution module is used for dynamically distributing available traffic limits 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 traffic limits; wherein a positive correlation is made between the available traffic credit and the number of target peer nodes.
11. The apparatus of claim 10, wherein the flow distribution module comprises:
a unit flow determining unit, configured to determine a unit time available flow of a product line according to a desired 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 limit of the product line in a single charging period according to the number of the target peer nodes, the available flow of the product line in unit time and the duration of the single charging period.
12. The apparatus of claim 10, wherein the number of first class peer nodes is determined according to at least one of: the rate of single task download for the product line, the available flow per unit time for the product line, the desired download cost for the product line versus the original download cost, and the peer-to-peer network service cost versus the content distribution network service cost.
13. The apparatus of claim 10, further comprising:
and the flow allocation triggering module is used for triggering and executing the allocation operation of the available flow limit under the condition that the charging period switching is detected.
14. A resource downloading apparatus, comprising:
the request acquisition module is used for acquiring a downloading request of the user equipment to the product line;
The request response module is used for responding to the downloading request according to the available flow limit of the product line;
the available flow limit of the product line is dynamically allocated to the product line according to the number of target peer nodes in the peer-to-peer content distribution network determined periodically in the process of synchronizing the resource data of the product line by the peer-to-peer content distribution network; the target peer node has synchronized the resource data of the product line; the resource data is a client application program or a network resource; the target peer node comprises a first type peer node and a second type peer node; the first class peer node is used for synchronizing resource data of a product line from a content distribution network; the second class of peer nodes is used for synchronizing resource data of a product line from the first class of peer nodes.
15. The apparatus of claim 14, wherein the request response module comprises:
a used flow rate determining unit, configured to determine a used flow rate limit of the product line;
and the request response unit is used for comparing the used flow limit of the product line with the available flow limit and responding to the downloading request according to a comparison result.
16. The apparatus of claim 14, wherein the available traffic volume is determined by: determining available flow per unit time of a product line according to expected bandwidth of a peer node and task weight of the product line; and determining the available flow limit of the product line in a single charging period according to the number of the target peer nodes, the available flow of the product line in unit time and the duration of the single charging period.
17. The apparatus of claim 14, wherein the number of first class of peer nodes is determined according to at least one of: the rate of single task download for the product line, the available flow per unit time for the product line, the desired download cost for the product line versus the original download cost, and the peer-to-peer network service cost versus the content distribution network service cost.
18. The apparatus of claim 14, further comprising:
and the link feedback module is used for feeding back the resource link of the content distribution network to the user equipment under the condition that the user equipment fails to download the resource of the product line from the peer-to-peer network, so that the user equipment can re-download the resource link from the content distribution network.
19. An electronic device, comprising:
At least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
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-9.
20. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-9.
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 CN112866985A (en) 2021-05-28
CN112866985B true 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)

Families Citing this family (2)

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

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103384259B (en) * 2012-05-04 2017-10-10 上海聚力传媒技术有限公司 A kind of method, device, equipment and the system of the transmission speed for adjusting peer node
US10116740B2 (en) * 2013-12-27 2018-10-30 Microsoft Technology Licensing, Llc Peer-to-peer network prioritizing propagation of objects through the network
CN104333816B (en) * 2014-11-26 2017-10-27 北京奇艺世纪科技有限公司 The determination method and device of downloading mode in a kind of P2P networks
CN109348257B (en) * 2018-11-14 2021-02-26 广州虎牙信息科技有限公司 Pull stream control method and 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

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Also Published As

Publication number Publication date
CN112866985A (en) 2021-05-28

Similar Documents

Publication Publication Date Title
US20240259327A1 (en) Software load balancer to maximize utilization
CN109949111B (en) Electronic bill identification distribution method, electronic bill generation method, device and system
CN106201661B (en) Method and apparatus for elastic telescopic cluster virtual machine
CN112866985B (en) Flow control method, resource downloading method, device, equipment and storage medium
CN111970132B (en) Control method, device and server for OTA data packet issuing flow
CN105163135B (en) Method for down loading, apparatus and system and the mobile terminal of Internet resources
CN113656176B (en) Cloud equipment distribution method, device and system, electronic equipment, medium and product
CN112839067B (en) Data synchronization method and device
CN103685496A (en) Transmission method and device of file data
CN111586140A (en) Data interaction method and server
CN112506584B (en) Resource file loading method, device, equipment, storage medium and product
CN111988817B (en) Method and device for controlling OTA data packet issuing flow
CN111970320B (en) Control method and device for OTA data packet issuing flow
CN110290009B (en) Data scheduling method and device and computer readable storage medium
CN104780120A (en) Method and device for transmitting files in local area network
CN113596920B (en) Flow control method, device, electronic equipment and storage medium
CN105656794A (en) Data distribution method and device
CN113783914A (en) Data processing method, device and equipment
CN113726881B (en) Communication connection establishment method, related device and computer readable storage medium
CN108683608B (en) Method and device for distributing flow
CN105025042B (en) A kind of method and system of determining data information, proxy server
CN111988403A (en) Request processing method and system of electronic equipment, storage medium and electronic equipment
CN117082073A (en) File storage method, file downloading method, device, equipment and storage medium
US9654650B1 (en) Data quotas based on online charging server load
CN114401267B (en) Cloud application login method, device, equipment, medium and program product

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