CN111385315A - Point-to-point resource downloading method and device - Google Patents

Point-to-point resource downloading method and device Download PDF

Info

Publication number
CN111385315A
CN111385315A CN201811609382.2A CN201811609382A CN111385315A CN 111385315 A CN111385315 A CN 111385315A CN 201811609382 A CN201811609382 A CN 201811609382A CN 111385315 A CN111385315 A CN 111385315A
Authority
CN
China
Prior art keywords
node
downloading
resource
target
target resource
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
CN201811609382.2A
Other languages
Chinese (zh)
Other versions
CN111385315B (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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201811609382.2A priority Critical patent/CN111385315B/en
Publication of CN111385315A publication Critical patent/CN111385315A/en
Application granted granted Critical
Publication of CN111385315B publication Critical patent/CN111385315B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1074Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
    • H04L67/1078Resource delivery mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/61Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources taking into account QoS or priority requirements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a point-to-point resource downloading method, which is applied to downloading nodes and comprises the following steps: determining a target resource node corresponding to the target resource, wherein the target resource node is used for providing the target resource; determining a target downloading strategy from a plurality of downloading strategies based on at least one of a playable area of the target resource and a downloadable area of the downloading node, wherein the downloading strategy is used for reflecting the correlation between the priority degree of the resource node and the uploading parameter; determining the priority degree of the target resource node based on the target downloading strategy and the uploading parameter of the target resource node; and determining at least one uploading node from the target resource nodes based on the priority degree of the target resource nodes, and downloading the resource to be downloaded from the at least one uploading node, wherein the priority degree of the uploading node meets the preset condition. By adopting the scheme to download the resources, different resource downloading strategies can be adopted under different conditions, so that the consideration of user requirements and operation cost becomes possible.

Description

Point-to-point resource downloading method and device
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for downloading peer-to-peer resources.
Background
With the development of internet technology, various resource sharing modes emerge endlessly. The downloading mode based on the Peer-to-Peer P2P (named Peer-to-Peer) technology can directly link the provider and the demander of the resource, so that the two parties can directly transmit data without data transmission through a server, and therefore, resource sharing among network users is easier and interaction is more convenient.
Because the capabilities of different resource providers for providing resources are different, and the generated operating costs are also different, a peer-to-peer resource downloading method is urgently needed, different resource downloading strategies can be adopted under different conditions, and the consideration of user requirements and operating costs is possible.
Disclosure of Invention
The embodiment of the application provides a point-to-point resource downloading method and device, and different resource downloading strategies can be adopted under different conditions, so that the consideration of user requirements and operation cost becomes possible.
The embodiment of the application adopts the following technical scheme:
in a first aspect, an embodiment of the present application provides a peer-to-peer resource downloading method, which is applied to a downloading node, where the method includes:
determining a target resource node corresponding to a target resource, wherein the target resource node is used for providing the target resource;
determining a target downloading strategy from a plurality of downloading strategies based on at least one of the playable area of the target resource and the downloadable area of the downloading node, wherein the downloading strategy is used for reflecting the correlation between the priority degree of the resource node and the uploading parameter;
determining the priority degree of the target resource node based on the target downloading strategy and the uploading parameter of the target resource node;
and determining at least one uploading node from the target resource nodes based on the priority degree of the target resource nodes, and downloading the resource to be downloaded from the at least one uploading node, wherein the priority degree of the uploading node meets a preset condition.
Optionally, in the method provided in the first aspect of the embodiment of the present application, determining a target download policy from a plurality of download policies based on the playable area of the target resource, includes:
determining a first download policy as the target download policy if the playable area is less than a first threshold;
determining a second download policy as the target download policy if the playable area is between the first threshold and a second threshold;
determining a third download policy as the target download policy if the playable area is greater than the second threshold;
the downloading emergency level corresponding to the first downloading strategy is higher than the downloading emergency level corresponding to the second downloading strategy, and the downloading emergency level corresponding to the second downloading strategy is higher than the downloading emergency level corresponding to the third downloading strategy.
Optionally, in the method provided in the first aspect of the embodiment of the present application, determining a target download policy from a plurality of download policies based on the downloadable area of the download node includes:
determining a third download policy as the target download policy if the downloadable area is less than a fourth threshold;
determining a second download policy as the target download policy if the downloadable region is between the fourth threshold and a fifth threshold;
determining a first download policy as the target download policy if the downloadable area is greater than the fifth threshold;
the downloading emergency level corresponding to the first downloading strategy is higher than the downloading emergency level corresponding to the second downloading strategy, and the downloading emergency level corresponding to the second downloading strategy is higher than the downloading emergency level corresponding to the third downloading strategy.
Optionally, in the method provided in the first aspect of the embodiment of the present application, the upload parameter includes payment attribute information of the resource node, and the payment attribute information is payment or non-payment;
determining the priority of the target resource node based on the target downloading strategy and the uploading parameter of the target resource node, wherein the priority comprises at least one of the following items:
under the condition that the target downloading strategy is the first downloading strategy, the priority degree of the target resource node with the payment attribute information as payment is determined to be higher than that of the target resource node with the payment attribute information as non-payment;
under the condition that the target downloading strategy is the second downloading strategy, the priority degree of the target resource node with the payment attribute information as payment is lower than that of the target resource node with the payment attribute information as non-payment;
and under the condition that the target downloading strategy is the third downloading strategy, determining that the priority degree of the target resource node with the payment attribute information as payment is lower than that of the target resource node with the payment attribute information as non-payment.
Optionally, in the method provided in the first aspect of the embodiment of the present application, the upload parameter includes a capability parameter of a resource node, where the capability parameter corresponds to the target resource;
determining the priority of the target resource node based on the target downloading strategy and the uploading parameter of the target resource node, wherein the priority comprises at least one of the following items:
determining that the priority degree of the target resource node is positively correlated with the capability parameter of the target resource node under the condition that the target downloading strategy is the first downloading strategy;
determining that the priority degree of the target resource node is positively correlated with the capability parameter of the target resource node under the condition that the target downloading strategy is the second downloading strategy;
and under the condition that the target downloading strategy is the third downloading strategy, determining that the priority degree of the target resource node is negatively correlated with the capability parameter of the target resource node.
Optionally, in the method provided in the first aspect of the embodiment of the present application, the method further includes:
acquiring an initial capacity parameter of the target resource node from a server, wherein the initial capacity parameter is determined by the server based on historical task processing information of the target resource node;
determining the priority degree of the target resource node based on the target downloading strategy and the uploading parameter of the target resource node, specifically as follows:
and determining the priority degree of the target resource node based on the target downloading strategy and the initial capability parameter of the target resource node.
Optionally, in the method provided in the first aspect of the embodiment of the present application, after downloading the resource to be downloaded from the at least one upload node, the method further includes:
determining current task processing information corresponding to each uploading node in the at least one uploading node, wherein the current task processing information is used for reflecting the condition that the corresponding uploading node provides the resource to be downloaded;
and re-determining the capacity parameters of the corresponding uploading nodes based on the current task processing information, and determining the re-determined capacity parameters as the capacity parameters of the corresponding uploading nodes.
Optionally, in the method provided in the first aspect of the embodiment of the present application, the current task processing information includes a task completion number, an uncompleted task number, and a current task number of the corresponding upload node when providing the resource to be downloaded;
re-determining the capability parameter of the corresponding uploading node based on the current task processing information, wherein the step of re-determining the capability parameter comprises the following steps:
performing linear weighting on the task completion number and the current task number to obtain a linear weighted sum;
calculating a difference between the linear weighted sum and the number of uncompleted tasks;
and determining the capacity parameter of the corresponding uploading node based on the difference.
Optionally, in the method provided in the first aspect of the embodiment of the present application, downloading the resource to be downloaded from the at least one upload node includes:
determining a plurality of resource downloading tasks based on the resources to be downloaded;
and distributing the plurality of resource downloading tasks to the at least one uploading node so that each uploading node provides the resources corresponding to the resource downloading tasks.
Optionally, in the method provided in the first aspect of the embodiment of the present application, the distributing the multiple resource downloading tasks to the at least one uploading node includes:
taking any uploading node as a current node, and under the condition that the current node completes a first downloading task within a preset task time, determining the number of second downloading tasks to be distributed to the current node according to the time consumed by the current node to complete the first downloading task, wherein the first downloading task is any resource downloading task distributed to the current node;
and distributing the second downloading task to the current node.
Optionally, in the method provided in the first aspect of the embodiment of the present application, determining, according to time consumed by the current node to complete the first download task, the number of second download tasks to be distributed to the current node, includes:
and determining the number of the second downloading tasks according to the proportional relation between the time consumed by the current node to complete the first downloading task and the preset task time, wherein the number of the second downloading tasks is inversely related to the proportional relation.
Optionally, in the method provided in the first aspect of the embodiment of the present application, determining, according to time consumed by the current node to complete the first download task, the number of second download tasks to be distributed to the current node, includes:
determining that the number of the second downloading tasks is twice of the number of the first downloading tasks under the condition that the time consumed by the current node for completing the first downloading tasks is less than or equal to half of the preset task time;
and under the condition that the time consumed by the current node for completing the first downloading task is more than half of the preset task time, determining that the number of the second downloading tasks is equal to the number of the first downloading tasks.
Optionally, in the method provided in the first aspect of the embodiment of the present application, the distributing the multiple resource downloading tasks to the at least one uploading node includes:
taking any uploading node as a current node, and determining the number of second downloading tasks to be distributed to the current node according to the number of the first downloading tasks under the condition that the current node does not finish the first downloading tasks within the preset task time, wherein the first downloading tasks are any batch of resource downloading tasks distributed to the current node;
and distributing the second downloading task to the current node.
Optionally, in the method provided in the first aspect of the embodiment of the present application, determining, according to the number of the first download tasks, the number of second download tasks to be distributed to the current node, includes:
determining the number of the second downloading tasks to be 1 under the condition that the number of the first downloading tasks is greater than 1;
and under the condition that the number of the first downloading tasks is equal to 1, determining that the number of the second downloading tasks is 0, and stopping distributing the resource downloading tasks to the current node within a preset time period.
Optionally, in the method provided in the first aspect of the embodiment of the present application, determining a plurality of resource downloading tasks based on the resource to be downloaded includes:
determining a task segmentation step length;
and segmenting the resources to be downloaded based on the task segmentation step length to obtain a plurality of resource downloading tasks.
Optionally, in the method provided in the first aspect of the embodiment of the present application, determining the task segmentation step size includes at least one of:
determining the task segmentation step length according to the capacity parameter of the uploading node;
and determining the task segmentation step length according to the time consumed by the uploading node for completing the downloading task.
Optionally, in the method provided in the first aspect of the embodiment of the present application, determining a target resource node corresponding to a target resource includes:
sending a resource acquisition request to a server, wherein the resource acquisition request comprises a target resource identifier;
and receiving target resource node information returned by the server based on the resource acquisition request, wherein the target resource node information comprises the uploading parameters of the target resource node.
Optionally, in the method provided in the first aspect of the embodiment of the present application, the target resource is a live resource and/or an on-demand resource.
In a second aspect, an embodiment of the present application provides a peer-to-peer resource downloading method, which is applied to a server, where the method includes:
and providing target resource node information corresponding to a target resource, wherein the target resource node information comprises an uploading parameter of the target resource node, and the target resource node is used for providing the target resource.
Optionally, in the method provided by the second aspect of the embodiment of the present application, providing target resource node information corresponding to a target resource includes:
receiving a resource acquisition request sent by a download node, wherein the resource acquisition request comprises a target resource identifier;
determining a target resource corresponding to the target resource identifier based on the resource acquisition request, and determining a candidate resource node corresponding to the target resource;
and determining the target resource node based on the uploading parameters of the candidate resource nodes, and returning the target resource node information to the downloading node.
Optionally, in the method provided by the second aspect of the embodiment of the present application, the resource obtaining request further includes at least one of regional information and operator information of the download node;
determining a candidate resource node corresponding to the target resource, specifically:
and determining the candidate resource node based on at least one of the regional information and the operator information of the download node.
Optionally, in the method provided by the second aspect of the embodiment of the present application, the upload parameter includes an initial capability parameter of the candidate resource node;
before providing the target resource node information corresponding to the target resource, the method further includes:
acquiring historical task processing information of the candidate resource node, wherein the historical task processing information comprises the historical task completion number, the historical task completion number and the current residual task number of the candidate resource node when the candidate resource node provides the target resource;
and determining an initial capability parameter of the candidate resource node based on the historical task processing information.
Optionally, in the method provided by the second aspect of the embodiment of the present application, the upload parameter includes payment attribute information of the candidate resource node, where the payment attribute information is payment or non-payment;
before providing the target resource node information corresponding to the target resource, the method further includes:
and determining the payment attribute information of the candidate resource node.
In a third aspect, an embodiment of the present application provides a peer-to-peer resource downloading method, which is applied to a downloading node, where the method includes:
determining an uploading node corresponding to a target resource, wherein the uploading node is used for providing the target resource;
determining a plurality of resource downloading tasks based on the resources to be downloaded in the target resources;
and distributing the plurality of resource downloading tasks to the uploading node so that the uploading node provides resources corresponding to the resource downloading tasks.
In a fourth aspect, an embodiment of the present application provides a peer-to-peer resource downloading device, which is applied to a downloading node, where the device includes:
a target resource node determining module, configured to determine a target resource node corresponding to a target resource, where the target resource node is used to provide the target resource;
a downloading strategy determining module, configured to determine a target downloading strategy from multiple downloading strategies based on at least one of a playable area of the target resource and a downloadable area of the downloading node, where the downloading strategy is used to reflect a correlation between a priority degree of the resource node and an uploading parameter;
the priority degree determining module is used for determining the priority degree of the target resource node based on the target downloading strategy and the uploading parameter of the target resource node;
and the resource downloading module is used for determining at least one uploading node from the target resource nodes based on the priority degree of the target resource nodes, and downloading the resource to be downloaded from the at least one uploading node, wherein the priority degree of the uploading node meets the preset condition.
In a fifth aspect, an embodiment of the present application provides a peer-to-peer resource downloading device, which is applied to a server, where the device includes:
the target resource node information determining module is used for providing target resource node information corresponding to a target resource, the target resource node information comprises an uploading parameter of the target resource node, and the target resource node is used for providing the target resource.
In a sixth aspect, an embodiment of the present application provides a peer-to-peer resource downloading device, which is applied to a downloading node, where the device includes:
the uploading node determining module is used for determining an uploading node corresponding to a target resource, and the uploading node is used for providing the target resource;
the task determining module is used for determining a plurality of resource downloading tasks based on the resources to be downloaded in the target resources;
and the task distribution module is used for distributing the resource downloading tasks to the uploading node so as to enable the uploading node to provide the resources corresponding to the resource downloading tasks.
In a seventh aspect, an embodiment of the present application provides an electronic device, including:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to perform the peer-to-peer resource downloading method as provided in the first aspect of an embodiment of the present application.
In an eighth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores one or more programs that, when executed by an electronic device including a plurality of application programs, cause the electronic device to perform the peer-to-peer resource downloading method provided in the first aspect of the embodiment of the present application.
In a ninth aspect, an embodiment of the present application provides an electronic device, including:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to perform the peer-to-peer resource downloading method as provided by the second aspect of an embodiment of the present application.
In a tenth aspect, embodiments of the present application provide a computer-readable storage medium storing one or more programs that, when executed by an electronic device including a plurality of application programs, cause the electronic device to perform the peer-to-peer resource downloading method provided in the second aspect of the present application.
In an eleventh aspect, an embodiment of the present application provides an electronic device, including:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to perform the peer-to-peer resource downloading method as provided in the third aspect of embodiments of the present application.
In a twelfth aspect, embodiments of the present application provide a computer-readable storage medium storing one or more programs that, when executed by an electronic device including a plurality of application programs, cause the electronic device to perform the peer-to-peer resource downloading method provided in the third aspect of the present application.
The embodiment of the application adopts at least one technical scheme which can achieve the following beneficial effects:
in the embodiment of the application, the download node may determine the target download policy from the multiple download policies according to the playable area of the target resource and/or the downloadable area of the download node, and may further determine the priority of each target resource node according to the upload parameter of the target resource node. On the basis, the downloading node can determine the uploading node with the priority degree meeting the preset condition based on the priority degree of the target resource node, so that the resource to be downloaded can be downloaded from the uploading node.
By adopting the technical scheme provided by the embodiment of the application, the downloading node can select different resource downloading strategies according to different conditions of the playable area of the target resource and/or the downloadable area of the downloading node, and can determine to acquire the resource to be downloaded from different uploading nodes under different downloading strategies in combination with different conditions of uploading parameters of the resource node. Therefore, the method can meet the requirements of the user on the resource acquisition speed and timeliness, and can also give consideration to the control of the operation cost, so that the consideration of the user requirements and the operation cost becomes possible.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a schematic view of a scenario to which a resource downloading method provided in an embodiment of the present application is applied;
fig. 2 is a flowchart illustrating a peer-to-peer resource downloading method according to an embodiment of the present disclosure;
FIG. 3 is a diagram illustrating playable areas in an embodiment of the present application;
FIG. 4 is a diagram illustrating a downloadable area in an embodiment of the present application;
fig. 5 is a flowchart illustrating a second peer-to-peer resource downloading method according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a peer-to-peer resource downloading device according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of a second peer-to-peer resource downloading device according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a third peer-to-peer resource downloading device according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
Fig. 1 is a schematic view of a scene to which the resource downloading method provided in the embodiment of the present application is applied. The resource download system shown in fig. 1 includes a server, a download node, and a resource node. The downloading node is used for initiating a downloading process of the target resource and downloading the target resource from the selected resource node. The server is used for providing the downloading node with the related information of the resource node, such as the connection information of the resource node, and the like, so that the downloading node can download the target resource from the resource node. The resource node is used for providing target resources for the download node according to the scheduling of the download node.
In the related art, in order to meet user experience, when the user has higher requirements on the speed and timeliness of resource acquisition in live and on-demand scenes, the downloading nodes are generally only sorted according to the node quality of the resource nodes, and preferentially select the resource nodes with high node quality to acquire target resources, so as to meet the user requirements. However, most of the paid nodes (such as CDN nodes, routing nodes, mining nodes, etc.) belonging to the production end have higher node quality than non-paid nodes (such as OTT nodes, PC nodes, Android nodes, and IPhone nodes, etc.) belonging to the consumption end, so the operation and maintenance cost of the P2P platform is high and difficult to control.
In view of this, the embodiment of the present application provides a peer-to-peer resource downloading method based on a peer-to-peer technology, so as to meet both the requirements of a user on resource acquisition speed and timeliness and control the operation cost, so that it is possible to take both the user requirements and the operation cost into consideration.
Referring to fig. 2, an embodiment of the present application provides a peer-to-peer resource downloading method, which is applied to a downloading node. Wherein, the method may specifically comprise:
s101: and determining a target resource node corresponding to the target resource.
It is understood that the target resource refers to any resource that the user wishes to acquire. Specifically, the resources may be multimedia resources such as picture resources, video resources, and audio resources, in terms of types of the resources. The data size of the resources and the requirements of the user on the resource acquisition speed and timeliness are comprehensively considered, and the target resources applicable to the embodiment of the application particularly refer to live broadcast resources and/or on-demand resources which the user wants to acquire.
It is understood that the target resource node refers to a resource node capable of providing a target resource, and may be understood as a resource node storing the target resource and capable of providing part or all of the target resource to a download node based on the P2P technology.
Optionally, when the download node determines the target resource node corresponding to the target resource, the download node may first send a resource obtaining request to the server, where the resource obtaining request includes a target resource identifier, so as to inform the server of which resource the server desires to obtain.
Correspondingly, when providing the target resource node information corresponding to the target resource to the download node, the server may also receive a resource acquisition request including the target resource identifier, which is sent by the download node. On the basis, the server can determine the target resource based on the target resource identifier, further determine target resource node information corresponding to the target resource and containing the uploading parameter of the target resource node, and return the target resource node information to the downloading node.
Correspondingly, the downloading node also receives the target resource node information which is returned by the server based on the resource acquisition request and comprises the uploading parameters of the target resource node, so that the target resource node can be determined.
It should be noted that, the target resource node information returned by the server to the downloading node may further include connection information of the target resource node, for example, an IP address of the target resource node, so that the downloading node establishes a connection with the target resource node to obtain the target resource.
It should be further noted that, when the server provides the target resource node information corresponding to the target resource to the download node based on the resource obtaining request, the process may be performed in two stages: in the first stage, a server determines a target resource corresponding to a target resource identifier based on a resource acquisition request, and determines a candidate resource node corresponding to the target resource; and in the second stage, the server further determines a target resource node based on the uploading parameters of the candidate resource nodes. It is understood that the candidate resource nodes may be all resource nodes capable of providing the target resource, and the target resource nodes are some resource nodes screened from the candidate resource nodes based on the uploading parameters of the candidate resource nodes.
During the first phase, optionally, the resource obtaining request sent by the downloading node to the server may further include at least one of regional information and operator information of the downloading node. Correspondingly, when the server determines the candidate resource node corresponding to the target resource based on the resource acquisition request, the server may also determine the candidate resource node based on at least one of the regional information and the operator information of the download node.
For example, the server may determine, as the candidate resource node, a resource node that is closer to the download node and that can provide the target resource, according to the region information of the download node. Specifically, the resource node whose distance from the download node is smaller than the preset threshold may be determined as a candidate resource node.
For another example, the server may determine, as the candidate resource node, a resource node that can provide the target resource and belongs to the same operator as the download node, based on the operator information of the download node.
In the second stage, one condition is that the uploading parameter of the candidate resource node is specifically the initial capability parameter of the candidate resource node, and when the server determines the target resource node based on the uploading parameter, the server may select the candidate resource node whose initial capability parameter falls into different range intervals according to a preset proportion or numerical value, and return the candidate resource node as the target resource node to the download node for scheduling by the download node.
In the second stage, if the uploading parameter of the candidate resource node is the payment attribute information of the candidate resource node, the server may select, according to a preset ratio or a preset numerical value, the candidate resource nodes with different payment attribute information, or even different node types, as the target resource node to return to the download node for scheduling by the download node when determining the target resource node based on the uploading parameter.
It can be understood that, when the server selects the target resource node from the candidate resource nodes, the preset proportion or value, the range of the initial capability parameter, and the partition of the payment attribute information or the node type may be determined according to factors such as the total data amount of the target resource, the total playing time, and the like, or may be determined according to the user level corresponding to the download node.
For example, if the total data amount of the target resource is large, the total playing time is long, or the user level corresponding to the download node is high (for example, a super VIP user), when the server screens the target resource node from the candidate resource nodes, in the target resource node, the initial capability parameter is strong, the payment attribute information is payment, or the proportion of the candidate resource node whose node type is a cooperative node (such as a CDN node) may be high, and the number may be large.
For another example, if the total data amount of the target resource is small, the total playing time is short, or the user level corresponding to the download node is low (for example, a common user), when the server screens the target resource nodes from the candidate resource nodes, the initial capability parameter is strong, the payment attribute information is payment, or the proportion of the candidate resource nodes whose node types are cooperative nodes (such as CDN nodes) may be low, and the number may be small.
S103: a target download policy is determined from the plurality of download policies based on at least one of the playable area of the target resource and the downloadable area of the download node.
It should be noted that the playable area of the target resource refers to the resource portion that has been downloaded and has not been played in the download node, and is shown by the hatched area in fig. 3. The playable area of the target resource can be understood as the "distance" between the current download point and the current play point. The "distance" referred to herein may be a difference in playback time or a difference in data amount.
An optional case is that when the playable area is measured by the playing time, the first time information corresponding to the current playing point and the second time information corresponding to the current downloading point at a certain time may be determined, and the duration information corresponding to the playable area at the certain time may be determined by calculating the difference between the first time information and the second time information. It can be understood that the duration information corresponding to the playable area may reflect the length of the playing time that can be supported by the downloaded resource in the target resource at the time.
As another alternative, when the playable area is measured by the data amount, a first data amount that the download node has downloaded at a certain time and a second data amount that the player has played may be determined first, and the data amount information corresponding to the playable area at the certain time may be determined by calculating a difference between the first data amount and the second data amount. It can be understood that the data size information corresponding to the playable area may reflect the playback data size that can be supported by the downloaded resource in the target resource at that time.
It should be noted that, according to the code rate of the target resource, i.e. the binary data amount transmitted in a unit time, the conversion between the playing time length and the playing data amount can be performed.
Optionally, when the target download policy is determined from the multiple download policies based on the playable area of the target resource, the following manner may be adopted:
in a first mode, under the condition that the playable area is smaller than a first threshold value, a first downloading strategy is determined as a target downloading strategy;
in a second mode, under the condition that the playable area is between a first threshold value and a second threshold value, the second downloading strategy is determined as a target downloading strategy;
in a third mode, under the condition that the playable area is larger than the second threshold value, a third downloading strategy is determined as a target downloading strategy;
the downloading emergency level corresponding to the first downloading strategy is higher than the downloading emergency level corresponding to the second downloading strategy, and the downloading emergency level corresponding to the second downloading strategy is higher than the downloading emergency level corresponding to the third downloading strategy.
It will be appreciated that when the playable area is measured in terms of play time, both the first threshold and the second threshold will also be configured in units of play time length (e.g., seconds). In measuring playable area in terms of data volume, both the first threshold and the second threshold will also be configured in units of data volume (e.g., megabits).
The following illustrates a process for determining a target download policy based on the playable area of the target resource.
Corresponding to the first method, it is assumed that at time 08:00:00, the downloading node receives a resource playing request from the player and requests to start playing a target resource, and the code rate of the target resource is 1Mbps (megabits per second). At this time, the resource download progress and the resource play progress in the download node are both 0, and the playable area is 0 (no matter the play time length or the play data amount corresponding to the playable area is 0).
Assuming that the first threshold is 10s (seconds) in playable time length or 10MB (megabits) in playable data size, it may be determined that the playable area at this time is smaller than the first threshold, and it may be understood that the playable area at the current time is probably not enough to support the player to normally play the target resource, and therefore, the target resource needs to be downloaded urgently. Therefore, in this case, the first download policy corresponding to the highest download urgency level may be determined as the target resource.
Corresponding to the second way, assuming that at time 08:00:08, the data amount of the downloaded resource (i.e. the resource portion before the current downloading point in the resource downloading progress in fig. 3) in the downloading node is 20MB, the data amount is converted into the playing time length by about 20s according to the code rate. The data size of the played resource (i.e. the resource part located before the current playing point in the resource playing progress in fig. 3) in the player is 8MB, and is converted into the playing time length of about 8s according to the code rate. At this time, the data size corresponding to the playable area is 12MB, and the corresponding playing time length is 12 s.
Assuming that the first threshold is 10s for the playable time length, or 10MB for the playable data amount, and the second threshold is 20s for the playable time length, or 20MB for the playable data amount, it may be determined that the playable area at this time is between the first threshold and the second threshold, and it may be understood that the playable area at the current time may support normal playing of the player in a short time, but may not support normal playing of the target resource for a long time. Therefore, it is sufficient to stably and continuously download the target resource. Therefore, in this case, the second download policy corresponding to a moderate download urgency level may be determined as the target policy.
Corresponding to the third way, assuming that the data amount of the downloaded resource (i.e. the resource portion before the current downloading point in the resource downloading progress in fig. 3) in the downloading node is 50MB at time 08:00:15, the data amount is converted into the playing time length by about 50s according to the code rate. The data size of the played resource (i.e. the resource part located before the current playing point in the resource playing progress in fig. 3) in the player is 15MB, and is converted into the playing time length of about 15s according to the code rate. At this time, the data size corresponding to the playable area is 35MB, and the corresponding playing time length is 35 s.
Assuming that the second threshold is 20s or 20MB of playable time length, it may be determined that the playable area at this time is greater than the second threshold, and it may be understood that the playable area at the current time can support the player to play normally for a long time, so that the target resource may be downloaded smoothly and slowly. Therefore, in this case, the third download policy corresponding to the lower download urgency level may be determined as the target policy.
It should be noted that the downloadable area of the downloading node refers to the portion of the downloading node that can still accept resources, as shown by the hatched area in fig. 4. The downloadable area of the download node may be understood as the "distance" between the full download capability of the download node and the currently used download capability. The "distance" referred to herein may be the remaining capacity on the buffer space or the remaining capacity on the download speed/download bandwidth.
Alternatively, when measuring the downloadable area by the cache space, the size of the maximum cache space allowed by the download node may be determined first. Then, the size of the buffer space that has been occupied at a certain time is determined. Further, by calculating the difference or ratio between the occupied buffer space and the maximum buffer space, the remaining buffer space at that time, i.e. the size of the downloadable area in the buffer area of fig. 4, can be determined. It can be understood that the remaining cache space corresponding to the downloadable area may reflect how many resources that are still acceptable in the downloading node at that time.
In another alternative, when the downloadable area is measured by the download speed, the upper limit value of the download speed of the download node may be determined according to the configuration information of the download node or the historical download condition. Then, the current download speed at a certain moment is determined. Further, by calculating the difference or ratio between the current download speed and the upper limit of the download speed, the remaining download speed at that moment, i.e., the size of the downloadable area in the download speed in fig. 4, can be determined. It will be appreciated that the remaining download speed for the downloadable area may reflect the download speed that is still acceptable at the download node at that time.
Optionally, when the target downloading policy is determined from the multiple downloading policies based on the downloadable area of the downloading node, the following manner may be adopted:
the first way is that in case the downloadable area is smaller than the fourth threshold, the third download policy is determined as the target download policy;
the second way is that in the case where the downloadable area is between the fourth threshold and the fifth threshold, the second download policy is determined as the target download policy;
the third way is that the first downloading strategy is determined as the target downloading strategy under the condition that the downloadable area is larger than the fifth threshold value;
the downloading emergency level corresponding to the first downloading strategy is higher than the downloading emergency level corresponding to the second downloading strategy, and the downloading emergency level corresponding to the second downloading strategy is higher than the downloading emergency level corresponding to the third downloading strategy.
It is to be appreciated that in measuring the downloadable areas in terms of cache space, the fourth threshold and the fifth threshold may also be configured in units of size of cache space (e.g., megabits). The fourth and fifth thresholds may also be configured in units of download speed (e.g., megabits per second) when measuring downloadable areas in download speed. The fourth and fifth thresholds may also be configured based on the proportion of the current downloadable area in the total cache space or upper limit of the allowed download speed.
In the multiple downloading strategies, the downloading emergency levels corresponding to the downloading strategies are ranked from high to low, and the first downloading strategy, the second downloading strategy and the third downloading strategy are sequentially arranged.
If the downloadable area is greater than the fifth threshold, it indicates that the downloadable area in the downloading node is larger (it may be understood that the remaining cache space capacity is larger, or the liftable extent of the downloading speed is larger), and therefore, the downloading node may adopt the first downloading policy with higher downloading urgency level, so as to fully utilize the downloading capability of the downloading node.
If the downloadable area is smaller than the fourth threshold, it means that the downloadable area in the downloading node is smaller (it can be understood that the remaining buffer space capacity is smaller, or the promotion range of the downloading speed is smaller), therefore, the downloading node may adopt the third downloading strategy with a lower downloading urgency level, so as to smoothly and slowly download the target resource, so as to avoid exceeding the downloading capability of the downloading node.
If the downloadable area is between the fourth threshold and the fifth threshold, it means that the downloadable area in the downloading node is moderate (it can be understood that the remaining buffer space capacity is moderate, or the promotion range of the downloading speed is moderate), therefore, the downloading node can also adopt the second downloading strategy with moderate downloading emergency level, so as to continuously download the target resource, and maintain the moderate utilization of the downloading capability of the downloading node.
It should be particularly noted that, in the embodiment of the present application, the downloading policy can reflect a correlation between the priority level of the resource node and the upload parameter. It can be understood that there are many different types of uploading parameters of the resource node, and different types of uploading parameters can reflect different aspects of providing the target resource by the resource node, and may have different influences on the process of providing the target resource by the resource node. Besides, the priority of the resource node and the correlation of the uploading parameter may be different in different downloading strategies. This will be described below with reference to step S105.
S105: and determining the priority degree of the target resource node based on the target downloading strategy and the uploading parameter of the target resource node.
It is understood that the priority of the target resource node may be different under different target download policies determined by step S105 based on different types of upload parameters of the target resource node. The priority of the target resource node in different cases will be exemplified below.
Optionally, the upload parameter may include payment attribute information of the resource node, where the payment attribute information is divided into payment and non-payment. Generally, a resource node whose payment attribute information is payment (may be simply referred to as a payment node) can better provide a target resource than a resource node whose payment attribute information is non-payment (may be simply referred to as a non-payment node), for example, the resource node has higher speed, wider bandwidth, more stable connection, richer resources, and the like. Therefore, in the downloading strategy corresponding to the higher downloading emergency level, the priority degree of the paid node is higher than that of the non-paid node, so that the downloading node can download resources more quickly and better; in the downloading strategy corresponding to the lower downloading emergency level, the priority degree of the paid node is lower than that of the non-paid node, so that the basic requirements of the user are met and the operation cost is reduced.
Therefore, in this case, when determining the priority of the target resource node based on the target download policy and the upload parameter of the target resource node, at least one of the following may be included:
under the condition that the target downloading strategy is a first downloading strategy (the downloading emergency level corresponding to the downloading strategy is the highest), the priority degree of the target resource node with the payment attribute information as payment is determined to be higher than that of the target resource node with the payment attribute information as non-payment;
under the condition that the target downloading strategy is a second downloading strategy (the downloading emergency level corresponding to the downloading strategy is in the middle), the priority degree of the target resource node with the payment attribute information as payment is determined to be lower than that of the target resource node with the payment attribute information as non-payment;
and under the condition that the target downloading strategy is the third downloading strategy (the downloading emergency level corresponding to the downloading strategy is the lowest), determining that the priority degree of the target resource node with the payment attribute information as payment is lower than that of the target resource node with the payment attribute information as non-payment.
Optionally, the above upload parameters may include capability parameters of the resource node, where the capability parameters referred to herein are corresponding to the target resource, that is, the capability parameters of the resource node when providing the target resource. It can be understood that the larger the capability parameter is, the stronger the capability of the resource node in providing the target resource is, and the faster and more stable the target resource can be provided to the download node. Therefore, in the downloading strategy corresponding to the higher downloading emergency level, the priority degree of the resource node with higher capability parameter is higher than that of the resource node with lower capability parameter, so that the downloading node can acquire the resource more quickly and better; in the downloading strategy corresponding to the lower downloading emergency level, the priority degree of the resource node with the lower capability parameter can be higher than that of the resource node with the higher capability parameter, as long as the requirement of the user for obtaining the target resource can be met.
Therefore, in this case, when determining the priority of the target resource node based on the target download policy and the upload parameter of the target resource node, at least one of the following may be included:
under the condition that the target downloading strategy is the first downloading strategy, determining that the priority degree of the target resource node is positively correlated with the capability parameter of the target resource node;
under the condition that the target downloading strategy is a second downloading strategy, determining that the priority degree of the target resource node is positively correlated with the capability parameter of the target resource node;
and under the condition that the target downloading strategy is the third downloading strategy, determining that the priority degree of the target resource node is negatively correlated with the capability parameter of the target resource node.
Before determining the priority degree of the resource node by using the capability parameter of the resource node, the download node may obtain the initial capability parameter of the target resource node from the server, and further determine the priority degree of the target resource node based on the target download policy and the initial capability parameter of the target resource node. The initial capacity parameter is determined by the server based on historical task processing information of the target resource node, and the initial capacity parameter is used for reflecting the capacity condition of the target resource node for providing the target resource historically.
In addition, in addition to determining the priority based on the initial capability parameters acquired from the server, the download node may also re-determine the capability parameters of the upload nodes that have been determined as upload nodes and that provide resources to be downloaded for the current download node.
Specifically, the downloading node may determine current task processing information corresponding to each of the at least one uploading node, where the current task processing information is used to reflect a situation that the corresponding uploading node provides the resource to be downloaded to the current downloading node in the current downloading process. Then, the download node may re-determine the capability parameter of the corresponding upload node based on the current task processing information, and determine the re-determined capability parameter as the capability parameter of the corresponding upload node. On the basis, the downloading node can re-determine the uploading node based on the new capability parameters of all target resource nodes (including the uploading node) so as to optimize the downloading process of the target resource.
Optionally, the current task processing information may include a task completion number (denoted as ∑ TC), an incomplete task number (denoted as ∑ UC), and a current task number (denoted as TN) of the corresponding upload node when providing the resource to be downloaded, and when the download node re-determines the capability parameter of the corresponding upload node based on the current task processing information, the download node may perform linear weighting on the task completion number ∑ TC and the current task number TN to obtain a linear weighted sum, then calculate a difference between the linear weighted sum and the incomplete task number ∑ UC, and further determine the capability parameter of the corresponding upload node based on the difference.
Specifically, the formula for calculating the capability parameter (denoted as Q) of the upload node may be expressed as:
Q=∑TC–p*∑UC+q*TN
wherein TC represents the number of tasks completed each time, ∑ TC represents the total number of tasks completed by the upload node when providing the resource to be downloaded, UC represents the number of tasks not completed, ∑ UC represents the total number of tasks not completed by the upload node when providing the resource to be downloaded, TN represents the current number of tasks, and p and q are two weighting coefficients.
It can be understood that, with the above-mentioned method, the downloading node may determine the priority of the target resource node according to the historical condition (reflected by the initial capability parameter) of the target resource provided by the target resource node, and may also re-determine the priority of each target resource node in combination with the actual condition (reflected by the re-determined capability parameter) of the uploading node (a part of the target resource node) of the target resource provided in the present downloading process, so as to determine the uploading node better meeting the current actual requirement from the target resource nodes, so as to better provide the target resource.
It can be understood that the payment attribute information of the resource node can reflect the operation cost consumed by using the resource node to provide the target resource; the capability parameter of the resource node can reflect the task completion quality of the resource node when the target resource is provided. Therefore, based on any one of the two aspects as the uploading parameter of the target resource node, the priority degree of each target resource node under different downloading strategies can be determined, and then the uploading node meeting the specific requirement is determined.
In addition to the above examples, the upload parameters may also include the storage capacity of the resource node, and/or the distance from the download node. It can be understood that the stronger the storage capacity of the resource node, the more resources can be provided; the closer the distance between the resource node and the download node, the more efficient the resource is provided. Therefore, under the same condition, for example, when the payment attribute information of the node is the same or the capability parameter of providing the target resource is comparable, the target resource node with strong storage capability and/or closer distance to the downloading node has higher priority. It can be understood that the priority of the target resource node is positively correlated with the storage capacity and negatively correlated with the distance between the resource node and the download node.
The correlation between various upload parameters and the priority levels of resource nodes is exemplified above. It should be noted that, when determining the priority degree by combining the uploading parameters of multiple dimensions, different uploading parameters may be respectively scored, and different weights may be configured for different uploading parameters according to the correlation between the uploading parameters and the priority degree, so as to determine the priority degree of the target resource node according to different standards and different downloading policy requirements, and match the priority degree with different downloading emergency levels.
S107: and determining at least one uploading node from the target resource nodes based on the priority degree of the target resource nodes.
It can be understood that, based on the priority of the target resource node, the target resource node whose priority satisfies the preset condition is determined as an upload node for the download node to obtain the target resource in the resource downloading process.
Alternatively, a preset number (e.g., 10) or a preset proportion (e.g., 20%) of target resource nodes with the highest priority may be determined as the uploading nodes. The embodiment of the present application does not limit this.
S109: and downloading the resource to be downloaded from the at least one uploading node.
It is understood that the resource to be downloaded referred to herein refers to a part of the target resource that has not been downloaded, as shown in fig. 3. It can be understood that, during the downloading process of the target resource by the downloading node, the playable area of the target resource, the downloadable area of the downloading node, and the uploading parameter of the resource node may change. Therefore, the downloading node can periodically and repeatedly execute the resource downloading method, so as to timely re-determine the target downloading strategy according to the changed playable area and/or the downloadable area, and re-determine the priority degree of each target resource node by combining the changed uploading parameters of the target resource nodes, thereby determining a new uploading node which is more in line with the current actual requirement.
In addition, the downloading node may also repeatedly execute the resource downloading method when a preset trigger condition is met. For example, when a reconnection instruction of a user is received, or when it is monitored that a download speed is less than a preset threshold, or when it is monitored that a playable area is less than a preset threshold (for example, the first threshold may be taken), or when it is monitored that a playable area is less than a preset threshold (for example, the fourth threshold may be taken), a target download policy matched with the playable area and/or the downloadable area at the current time (which may be understood as a time satisfying a trigger condition) may be re-determined, and the priority of each target resource node may be re-determined in combination with a new upload parameter of the target resource node, so as to determine a new upload node that better meets the current actual demand.
In the embodiment of the application, the download node may determine the target download policy from the multiple download policies according to the playable area of the target resource and/or the downloadable area of the download node, and may further determine the priority of each target resource node according to the upload parameter of the target resource node. On the basis, the downloading node can determine the uploading node with the priority degree meeting the preset condition based on the priority degree of the target resource node, so that the resource to be downloaded can be downloaded from the uploading node.
By adopting the technical scheme provided by the embodiment of the application, the downloading node can select different resource downloading strategies according to different conditions of the playable area of the target resource and/or the downloadable area of the downloading node, and can determine to acquire the resource to be downloaded from different uploading nodes under different downloading strategies in combination with different conditions of uploading parameters of the resource node. Therefore, the method can meet the requirements of the user on the resource acquisition speed and timeliness, and can also give consideration to the control of the operation cost, so that the consideration of the user requirements and the operation cost becomes possible.
It should be noted that, when the downloading node executes step S109 and downloads the resource to be downloaded from at least one uploading node, on the basis of the uploading node corresponding to the determined target resource, a plurality of resource downloading tasks may be determined based on the resource to be downloaded; and then distributing the plurality of resource downloading tasks to at least one uploading node so that each uploading node provides the resources corresponding to the resource downloading tasks.
It will be appreciated that, regardless of the manner in which the upload node is determined, the download node may download the resource to be downloaded from the upload node in the manner described above. Therefore, an embodiment of the present application further provides a peer-to-peer resource downloading method, which is shown in fig. 5.
The following describes in detail the downloading process of the downloading node executing step S109 with reference to fig. 5, which also corresponds to another peer-to-peer resource downloading method provided in the embodiment of the present application.
Referring to fig. 5, the peer-to-peer resource downloading method, applied to a downloading node, may specifically include:
s201: determining an uploading node corresponding to the target resource, wherein the uploading node is used for providing the target resource;
optionally, when the downloading node executes step S201, the specific manner of steps S101 to S107 in the foregoing embodiment may be adopted.
Optionally, when executing step S201, the downloading node may also directly send a resource obtaining request to the server, where the resource obtaining request includes a target resource identifier; and receiving target resource node information returned by the server based on the resource acquisition request, wherein the target resource node information comprises uploading parameters of the target resource node.
It can be understood that, the process of the server determining the target resource node information based on the resource obtaining request is the same as in the foregoing embodiments, and is not described here again.
S203: and determining a plurality of resource downloading tasks based on the resources to be downloaded in the target resources.
Specifically, the download node may determine a task segmentation step length first, and then segment the resource to be downloaded based on the task segmentation step length to obtain a plurality of resource download tasks. After the download node determines the multiple resource download tasks, the multiple resource download tasks can be distributed to different upload nodes, and then the resources to be downloaded are acquired from the different upload nodes in parallel, so that the efficiency of acquiring the resources is improved.
Optionally, when determining the step length of the task segmentation, the download node may determine the step length of the task segmentation according to the capability parameter of the upload node. Specifically, when the capability parameter of the upload node is higher, the task segmentation step length can be larger (for example, 100M), so that the download amount of a single resource download task is larger, and the upload capability of the upload node is fully utilized; on the contrary, when the capability parameter of the upload node is low, the task segmentation step size can be small (for example, 10M), so that the download amount of a single resource download task is small and meets the processing capability of the upload node.
Optionally, when determining that the task segmentation step length is performed by the downloading node, the task segmentation step length may also be determined according to the time consumed by the uploading node to complete the downloading task. Specifically, when the time consumed by the upload node to complete the download task is short, it indicates that the upload node can quickly complete the distributed resource download task and provide more resources, and therefore, the task segmentation step size can be large (for example, 50M), so that the download amount of a single resource download task is large, and the upload capability of the upload node is fully utilized. On the contrary, if the time consumed by the uploading node to complete the downloading task is long, it indicates that the uploading capability of the uploading node has been substantially fully called, so the task segmentation step length can be small (for example, 10M), so that the downloading amount of a single resource downloading task is small, and the processing capability of the uploading node is better met.
S205: and distributing the plurality of resource downloading tasks to the uploading node so that the uploading node provides the resources corresponding to the resource downloading tasks.
Optionally, when distributing the resource downloading task, for any one of the uploading nodes (which may be recorded as a current node), if the current node completes the first downloading task within the preset task time, the number of the second downloading tasks to be distributed to the current node may be determined according to the time consumed by the current node to complete the first downloading task, and the second downloading tasks are further distributed to the current node. The first downloading task is any resource downloading task distributed to the current node, and the second downloading task is a resource downloading task after the first downloading task.
It should be understood that the preset task time corresponds to the first downloading task, and is related to the number of resource downloading tasks included in the first downloading task, the amount of data that needs to be downloaded, and the like. The current node can complete the first downloading task within the preset task time, which indicates that the uploading capability of the current node can meet the requirement of the first downloading task, and possibly bears more resource downloading tasks with the remaining capacity. Therefore, the downloading node can further determine the number of the second downloading tasks to be distributed to the current node according to the actual time consumed by the current node to complete the first downloading task, so that the uploading capability of the current node is more fully utilized.
For example, the downloading node may determine the number of the second downloading tasks according to a proportional relationship between time consumed by the current node to complete the first downloading task and preset task time, where the number of the second downloading tasks is inversely related to the proportional relationship. Specifically, the ratio of the time consumed by the current node to complete the first download task to the preset task time may be calculated. The higher the ratio is, the more saturated the uploading capacity occupied by the current node for carrying the first downloading task is, and the less the number of the second downloading tasks can be. Conversely, the lower the ratio is, the less the uploading capacity occupied by the current node for carrying the first downloading task is, and the more the number of the second downloading tasks can be, so as to fully utilize the uploading capacity of the current node.
For another example, it may be directly determined whether the time consumed by the current node to complete the first download task reaches half of the preset task time. If the time consumed by the current node to complete the first downloading task is less than or equal to half of the preset task time, the current node is represented to have less uploading capacity for bearing the first downloading task, and therefore, the number of the second downloading tasks can be directly determined to be twice of the number of the first downloading tasks, so that the utilization efficiency of the uploading capacity of the current node is rapidly improved. On the contrary, if the time consumed by the current node to complete the first downloading task is more than half of the preset task time, it indicates that the uploading capacity occupied by the current node to carry the first downloading task is saturated, and therefore, the number of the second downloading tasks can be determined to be equal to the number of the first downloading tasks.
Optionally, when distributing the resource downloading tasks, for any one of the uploading nodes (which may be recorded as a current node), if the current node does not complete the first downloading task within the preset task time, the number of the second downloading tasks to be distributed to the current node may be determined according to the number of the first downloading tasks, and then the second downloading tasks are distributed to the current node. The first downloading task is any resource downloading task distributed to the current node, and the second downloading task is a resource downloading task after the first downloading task.
It should be understood that the preset task time corresponds to the first downloading task, and is related to the number of resource downloading tasks included in the first downloading task, the amount of data that needs to be downloaded, and the like. The current node does not finish the first downloading task within the preset task time, which indicates that the uploading capability of the current node is difficult to meet the requirement of the first downloading task, and the resource downloading task is likely to be jammed. Therefore, the downloading node can further determine the number of second downloading tasks to be distributed to the current node according to the number of the first downloading tasks, so that the task congestion hidden danger of the current node is relieved.
Optionally, when the download node determines the number of second download tasks to be distributed to the current node according to the number of the first download tasks, if the number of the first download tasks is greater than 1, the number of the second download tasks may be directly determined to be 1, so as to quickly reduce the number of resource download tasks distributed to the current node, and eliminate the potential risk of task congestion of the current node. If the number of the first downloading tasks is equal to 1, the task congestion phenomenon of the current node is shown to be possible, therefore, the number of the second downloading tasks can be directly determined to be 0, so that the task congestion hidden danger of the current node can be rapidly eliminated, and the resource downloading tasks are stopped being distributed to the current node within the preset time period, so that the current node can gradually recover the resource uploading capability.
In the embodiment of the application, the resource downloading method can be adopted to realize task scheduling in the downloading process, so that the uploading capability of each uploading node is fully utilized through reasonable task scheduling, and the efficiency and the stability of the downloading node for acquiring the target resource are improved.
It can be understood that the foregoing resource downloading methods illustrated in fig. 2 and 5 are directed to different stages of the resource downloading process: the former mainly aims at the selection process of uploading nodes before resource downloading, and mainly aims at selecting proper uploading nodes from target resource nodes; the latter mainly aims at the scheduling process of resource downloading tasks during resource downloading and mainly aims at distributing proper resource downloading tasks for the uploading nodes. Therefore, the two can be implemented separately or in combination, and the embodiment of the present application is not limited thereto.
The embodiment of the application also provides a point-to-point resource downloading method which is applied to a server, wherein the server mainly provides target resource node information corresponding to target resources. The target resource node information comprises uploading parameters of the target resource node, and the target resource node is used for providing target resources.
When providing the target resource node information corresponding to the target resource, the server may receive a resource acquisition request sent by the download node, where the resource acquisition request includes a target resource identifier. Then, the server may determine, based on the resource acquisition request, a target resource corresponding to the target resource identifier, and determine a candidate resource node corresponding to the target resource; and then determining a target resource node based on the uploading parameters of the candidate resource nodes, and returning the target resource node information to the downloading node.
Optionally, when the resource obtaining request further includes at least one of regional information and operator information of the download node, and the server determines the candidate resource node corresponding to the target resource, the candidate resource node may be determined based on at least one of the regional information and the operator information of the download node.
Optionally, the upload parameter may include an initial capability parameter of the candidate resource node. Before providing target resource node information corresponding to the target resource, the server may first obtain historical task processing information of the candidate resource node, where the historical task processing information includes a historical task completion number, a historical incomplete task number, and a current remaining task number of the candidate resource node when providing the target resource; and further determining initial capability parameters of the candidate resource nodes based on the historical task processing information so as to provide the initial capability parameters to the downloading node.
Optionally, the upload parameter may further include payment attribute information of the candidate resource node, where the payment attribute information is payment or non-payment. The server determines the payment attribute information of the candidate resource node before providing the target resource node information corresponding to the target resource so as to provide the payment attribute information to the download node.
It can be understood that the peer-to-peer resource downloading method executed by the server corresponds to the peer-to-peer resource downloading method executed by the downloading node, and the description in the foregoing embodiments is applicable here and will not be repeated.
Referring to fig. 6, an embodiment of the present application further provides a peer-to-peer resource downloading device, which is applied to a downloading node, where the device includes:
a target resource node determining module 101, configured to determine a target resource node corresponding to a target resource, where the target resource node is used to provide the target resource;
a download policy determination module 103, configured to determine a target download policy from a plurality of download policies based on at least one of a playable area of a target resource and a downloadable area of a download node, where the download policy is used to reflect a correlation between a priority degree of the resource node and an upload parameter;
a priority determining module 105, configured to determine a priority of the target resource node based on the target download policy and the upload parameter of the target resource node;
and the resource downloading module 107 is configured to determine at least one uploading node from the target resource nodes based on the priority of the target resource nodes, and download the resource to be downloaded from the at least one uploading node, where the priority of the uploading node meets a preset condition.
It can be understood that the peer-to-peer resource downloading device can implement the steps of the peer-to-peer resource downloading method executed by the downloading node in the embodiment shown in fig. 2, and the related descriptions about the peer-to-peer resource downloading method shown in fig. 2 are applicable to the peer-to-peer resource downloading device, and are not described herein again.
Referring to fig. 7, an embodiment of the present application further provides a peer-to-peer resource downloading device, which is applied to a server, where the device includes:
the target resource node information determining module 301 is configured to provide target resource node information corresponding to a target resource, where the target resource node information includes an upload parameter of a target resource node, and the target resource node is configured to provide the target resource.
It can be understood that the peer-to-peer resource downloading device can implement the steps of the peer-to-peer resource downloading method executed by the server in the foregoing embodiment, and the related descriptions about the peer-to-peer resource downloading method are applicable to the peer-to-peer resource downloading device, and are not described herein again.
Referring to fig. 8, an embodiment of the present application further provides a peer-to-peer resource downloading device, which is applied to a downloading node, where the device includes:
an upload node determination module 201, configured to determine an upload node corresponding to a target resource, where the upload node is used to provide the target resource;
the task determining module 203 is configured to determine a plurality of resource downloading tasks based on resources to be downloaded in the target resources;
the task distribution module 205 is configured to distribute a plurality of resource downloading tasks to the uploading node, so that the uploading node provides resources corresponding to the resource downloading tasks.
It can be understood that the peer-to-peer resource downloading device can implement the steps of the peer-to-peer resource downloading method executed by the downloading node in the embodiment shown in fig. 5, and the related descriptions about the peer-to-peer resource downloading method shown in fig. 5 are applicable to the peer-to-peer resource downloading device, and are not described herein again.
Fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application. Referring to fig. 9, at a hardware level, the electronic device includes a processor, and optionally further includes an internal bus, a network interface, and a memory. The Memory may include a Memory, such as a Random-Access Memory (RAM), and may further include a non-volatile Memory, such as at least 1 disk Memory. Of course, the electronic device may also include hardware required for other services.
The processor, the network interface, and the memory may be connected to each other via an internal bus, which may be an ISA (Industry Standard Architecture) bus, a PCI (peripheral component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 9, but this does not indicate only one bus or one type of bus.
And the memory is used for storing programs. In particular, the program may include program code comprising computer operating instructions. The memory may include both memory and non-volatile storage and provides instructions and data to the processor.
The processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs the computer program to form the point-to-point resource downloading device on the logic level.
When the peer-to-peer resource downloading device is applied to a downloading node, the processor executes the program stored in the memory, and is specifically configured to execute the contents of the aspects of the peer-to-peer resource downloading method executed by the downloading node in the foregoing embodiments.
When the peer-to-peer resource downloading device is applied to a server, the processor executes the program stored in the memory, and is specifically configured to execute various aspects of the peer-to-peer resource downloading method executed by the server in the foregoing embodiments.
When the peer-to-peer resource downloading device is applied to a downloading node, the processor executes the program stored in the memory, and is specifically configured to execute the contents of the aspects of the peer-to-peer resource downloading method executed by the downloading node in the foregoing embodiments.
The method performed by the peer-to-peer resource downloading device according to the foregoing embodiments of the present application may be implemented in a processor or implemented by a processor. The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
The electronic device may further execute the method executed by the peer-to-peer resource downloading apparatus, and implement the functions of the peer-to-peer resource downloading apparatus in the foregoing embodiments, which are not described herein again.
Embodiments of the present application also provide a computer-readable storage medium storing one or more programs, where the one or more programs include instructions, which when executed by an electronic device including a plurality of application programs, enable the electronic device to perform the method performed by the peer-to-peer resource downloading apparatus applied to the downloading node in the foregoing embodiments, and are specifically configured to perform various aspects of the peer-to-peer resource downloading method performed by the downloading node in the foregoing embodiments.
Embodiments of the present application also provide a computer-readable storage medium storing one or more programs, where the one or more programs include instructions, which when executed by an electronic device including a plurality of application programs, enable the electronic device to perform the method performed by the peer-to-peer resource downloading apparatus applied to the server in the foregoing embodiments, and are specifically configured to perform various aspects of the peer-to-peer resource downloading method performed by the server in the foregoing embodiments.
Embodiments of the present application also provide a computer-readable storage medium storing one or more programs, where the one or more programs include instructions, which when executed by an electronic device including a plurality of application programs, enable the electronic device to perform the method performed by the peer-to-peer resource downloading apparatus applied to the downloading node in the foregoing embodiments, and are specifically configured to perform various aspects of the peer-to-peer resource downloading method performed by the downloading node in the foregoing embodiments.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (33)

1. A point-to-point resource downloading method is applied to a downloading node, wherein the method comprises the following steps:
determining a target resource node corresponding to a target resource, wherein the target resource node is used for providing the target resource;
determining a target downloading strategy from a plurality of downloading strategies based on at least one of the playable area of the target resource and the downloadable area of the downloading node, wherein the downloading strategy is used for reflecting the correlation between the priority degree of the resource node and the uploading parameter;
determining the priority degree of the target resource node based on the target downloading strategy and the uploading parameter of the target resource node;
and determining at least one uploading node from the target resource nodes based on the priority degree of the target resource nodes, and downloading the resource to be downloaded from the at least one uploading node, wherein the priority degree of the uploading node meets a preset condition.
2. The method of claim 1, wherein determining a target download policy from a plurality of download policies based on the playable area of the target resource comprises:
determining a first download policy as the target download policy if the playable area is less than a first threshold;
determining a second download policy as the target download policy if the playable area is between the first threshold and a second threshold;
determining a third download policy as the target download policy if the playable area is greater than the second threshold;
the downloading emergency level corresponding to the first downloading strategy is higher than the downloading emergency level corresponding to the second downloading strategy, and the downloading emergency level corresponding to the second downloading strategy is higher than the downloading emergency level corresponding to the third downloading strategy.
3. The method of claim 1, wherein determining a target download policy from a plurality of download policies based on the downloadable area of the download node comprises:
determining a third download policy as the target download policy if the downloadable area is less than a fourth threshold;
determining a second download policy as the target download policy if the downloadable region is between the fourth threshold and a fifth threshold;
determining a first download policy as the target download policy if the downloadable area is greater than the fifth threshold;
the downloading emergency level corresponding to the first downloading strategy is higher than the downloading emergency level corresponding to the second downloading strategy, and the downloading emergency level corresponding to the second downloading strategy is higher than the downloading emergency level corresponding to the third downloading strategy.
4. The method of claim 2 or 3, wherein the uploading parameter comprises payment attribute information of the resource node, and the payment attribute information is payment or non-payment;
determining the priority of the target resource node based on the target downloading strategy and the uploading parameter of the target resource node, wherein the priority comprises at least one of the following items:
under the condition that the target downloading strategy is the first downloading strategy, the priority degree of the target resource node with the payment attribute information as payment is determined to be higher than that of the target resource node with the payment attribute information as non-payment;
under the condition that the target downloading strategy is the second downloading strategy, the priority degree of the target resource node with the payment attribute information as payment is lower than that of the target resource node with the payment attribute information as non-payment;
and under the condition that the target downloading strategy is the third downloading strategy, determining that the priority degree of the target resource node with the payment attribute information as payment is lower than that of the target resource node with the payment attribute information as non-payment.
5. The method of claim 2 or 3, wherein the upload parameters comprise capability parameters of resource nodes, the capability parameters corresponding to the target resources;
determining the priority of the target resource node based on the target downloading strategy and the uploading parameter of the target resource node, wherein the priority comprises at least one of the following items:
determining that the priority degree of the target resource node is positively correlated with the capability parameter of the target resource node under the condition that the target downloading strategy is the first downloading strategy;
determining that the priority degree of the target resource node is positively correlated with the capability parameter of the target resource node under the condition that the target downloading strategy is the second downloading strategy;
and under the condition that the target downloading strategy is the third downloading strategy, determining that the priority degree of the target resource node is negatively correlated with the capability parameter of the target resource node.
6. The method of claim 5, wherein the method further comprises:
acquiring an initial capacity parameter of the target resource node from a server, wherein the initial capacity parameter is determined by the server based on historical task processing information of the target resource node;
determining the priority degree of the target resource node based on the target downloading strategy and the uploading parameter of the target resource node, specifically as follows:
and determining the priority degree of the target resource node based on the target downloading strategy and the initial capability parameter of the target resource node.
7. The method of claim 6, wherein after downloading the resource to be downloaded from the at least one upload node, the method further comprises:
determining current task processing information corresponding to each uploading node in the at least one uploading node, wherein the current task processing information is used for reflecting the condition that the corresponding uploading node provides the resource to be downloaded;
and re-determining the capacity parameters of the corresponding uploading nodes based on the current task processing information, and determining the re-determined capacity parameters as the capacity parameters of the corresponding uploading nodes.
8. The method according to claim 7, wherein the current task processing information includes task completion number, task incomplete number and current task number of the corresponding uploading node when providing the resource to be downloaded;
re-determining the capability parameter of the corresponding uploading node based on the current task processing information, wherein the step of re-determining the capability parameter comprises the following steps:
performing linear weighting on the task completion number and the current task number to obtain a linear weighted sum;
calculating a difference between the linear weighted sum and the number of uncompleted tasks;
and determining the capacity parameter of the corresponding uploading node based on the difference.
9. The method according to any one of claims 1 to 3 and 6 to 8, wherein downloading the resource to be downloaded from the at least one upload node comprises:
determining a plurality of resource downloading tasks based on the resources to be downloaded;
and distributing the plurality of resource downloading tasks to the at least one uploading node so that each uploading node provides the resources corresponding to the resource downloading tasks.
10. The method of claim 9, wherein distributing the plurality of resource download tasks to the at least one upload node comprises:
taking any uploading node as a current node, and under the condition that the current node completes a first downloading task within a preset task time, determining the number of second downloading tasks to be distributed to the current node according to the time consumed by the current node to complete the first downloading task, wherein the first downloading task is any resource downloading task distributed to the current node;
and distributing the second downloading task to the current node.
11. The method of claim 10, wherein determining a number of second download tasks to be distributed to the current node based on a time taken for the current node to complete the first download task comprises:
and determining the number of the second downloading tasks according to the proportional relation between the time consumed by the current node to complete the first downloading task and the preset task time, wherein the number of the second downloading tasks is inversely related to the proportional relation.
12. The method of claim 10, wherein determining a number of second download tasks to be distributed to the current node based on a time taken for the current node to complete the first download task comprises:
determining that the number of the second downloading tasks is twice of the number of the first downloading tasks under the condition that the time consumed by the current node for completing the first downloading tasks is less than or equal to half of the preset task time;
and under the condition that the time consumed by the current node for completing the first downloading task is more than half of the preset task time, determining that the number of the second downloading tasks is equal to the number of the first downloading tasks.
13. The method of claim 9, wherein distributing the plurality of resource download tasks to the at least one upload node comprises:
taking any uploading node as a current node, and determining the number of second downloading tasks to be distributed to the current node according to the number of the first downloading tasks under the condition that the current node does not finish the first downloading tasks within the preset task time, wherein the first downloading tasks are any batch of resource downloading tasks distributed to the current node;
and distributing the second downloading task to the current node.
14. The method of claim 13, wherein determining a number of second download tasks to be distributed to the current node based on the number of first download tasks comprises:
determining the number of the second downloading tasks to be 1 under the condition that the number of the first downloading tasks is greater than 1;
and under the condition that the number of the first downloading tasks is equal to 1, determining that the number of the second downloading tasks is 0, and stopping distributing the resource downloading tasks to the current node within a preset time period.
15. The method of claim 9, wherein determining a plurality of resource download tasks based on the resource to be downloaded comprises:
determining a task segmentation step length;
and segmenting the resources to be downloaded based on the task segmentation step length to obtain a plurality of resource downloading tasks.
16. The method of claim 15, wherein determining a task slicing step size comprises at least one of:
determining the task segmentation step length according to the capacity parameter of the uploading node;
and determining the task segmentation step length according to the time consumed by the uploading node for completing the downloading task.
17. The method according to any one of claims 1 to 3, 6 to 8, and 10 to 16, wherein determining the target resource node corresponding to the target resource comprises:
sending a resource acquisition request to a server, wherein the resource acquisition request comprises a target resource identifier;
and receiving target resource node information returned by the server based on the resource acquisition request, wherein the target resource node information comprises the uploading parameters of the target resource node.
18. The method of claim 17, wherein the target resource is a live resource and/or an on-demand resource.
19. A point-to-point resource downloading method is applied to a server, wherein the method comprises the following steps:
and providing target resource node information corresponding to a target resource, wherein the target resource node information comprises an uploading parameter of the target resource node, and the target resource node is used for providing the target resource.
20. The method of claim 19, wherein providing target resource node information corresponding to the target resource comprises:
receiving a resource acquisition request sent by a download node, wherein the resource acquisition request comprises a target resource identifier;
determining a target resource corresponding to the target resource identifier based on the resource acquisition request, and determining a candidate resource node corresponding to the target resource;
and determining the target resource node based on the uploading parameters of the candidate resource nodes, and returning the target resource node information to the downloading node.
21. The method of claim 20, wherein the resource acquisition request further includes at least one of regional information and operator information of the download node;
determining a candidate resource node corresponding to the target resource, specifically:
and determining the candidate resource node based on at least one of the regional information and the operator information of the download node.
22. The method of claim 20, wherein the upload parameters comprise initial capability parameters of candidate resource nodes;
before providing the target resource node information corresponding to the target resource, the method further includes:
acquiring historical task processing information of the candidate resource node, wherein the historical task processing information comprises the historical task completion number, the historical task completion number and the current residual task number of the candidate resource node when the candidate resource node provides the target resource;
and determining an initial capability parameter of the candidate resource node based on the historical task processing information.
23. The method of claim 20, wherein the upload parameters include paid attribute information of the candidate resource node, the paid attribute information being paid or not paid;
before providing the target resource node information corresponding to the target resource, the method further includes:
and determining the payment attribute information of the candidate resource node.
24. A point-to-point resource downloading method is applied to a downloading node, wherein the method comprises the following steps:
determining an uploading node corresponding to a target resource, wherein the uploading node is used for providing the target resource;
determining a plurality of resource downloading tasks based on the resources to be downloaded in the target resources;
and distributing the plurality of resource downloading tasks to the uploading node so that the uploading node provides resources corresponding to the resource downloading tasks.
25. A point-to-point resource downloading device is applied to a downloading node, wherein the device comprises:
a target resource node determining module, configured to determine a target resource node corresponding to a target resource, where the target resource node is used to provide the target resource;
a downloading strategy determining module, configured to determine a target downloading strategy from multiple downloading strategies based on at least one of a playable area of the target resource and a downloadable area of the downloading node, where the downloading strategy is used to reflect a correlation between a priority degree of the resource node and an uploading parameter;
the priority degree determining module is used for determining the priority degree of the target resource node based on the target downloading strategy and the uploading parameter of the target resource node;
and the resource downloading module is used for determining at least one uploading node from the target resource nodes based on the priority degree of the target resource nodes, and downloading the resource to be downloaded from the at least one uploading node, wherein the priority degree of the uploading node meets the preset condition.
26. A peer-to-peer resource downloading device applied to a server, wherein the device comprises:
the target resource node information determining module is used for providing target resource node information corresponding to a target resource, the target resource node information comprises an uploading parameter of the target resource node, and the target resource node is used for providing the target resource.
27. A point-to-point resource downloading device is applied to a downloading node, wherein the device comprises:
the uploading node determining module is used for determining an uploading node corresponding to a target resource, and the uploading node is used for providing the target resource;
the task determining module is used for determining a plurality of resource downloading tasks based on the resources to be downloaded in the target resources;
and the task distribution module is used for distributing the resource downloading tasks to the uploading node so as to enable the uploading node to provide the resources corresponding to the resource downloading tasks.
28. An electronic device, comprising:
a processor; and
a memory arranged to store computer executable instructions that when executed cause the processor to perform the peer-to-peer resource download method of any of claims 1 to 18.
29. A computer readable storage medium storing one or more programs which, when executed by an electronic device including a plurality of application programs, cause the electronic device to perform the peer-to-peer resource download method of any of claims 1-18.
30. An electronic device, comprising:
a processor; and
a memory arranged to store computer executable instructions that when executed cause the processor to perform the peer-to-peer resource download method of any of claims 19 to 23.
31. A computer readable storage medium storing one or more programs which, when executed by an electronic device including a plurality of application programs, cause the electronic device to perform the peer-to-peer resource download method of any of claims 19 to 23.
32. An electronic device, comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to perform the peer-to-peer resource download method of claim 24.
33. A computer readable storage medium storing one or more programs which, when executed by an electronic device including a plurality of application programs, cause the electronic device to perform the peer-to-peer resource download method of claim 24.
CN201811609382.2A 2018-12-27 2018-12-27 Point-to-point resource downloading method and device Active CN111385315B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811609382.2A CN111385315B (en) 2018-12-27 2018-12-27 Point-to-point resource downloading method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811609382.2A CN111385315B (en) 2018-12-27 2018-12-27 Point-to-point resource downloading method and device

Publications (2)

Publication Number Publication Date
CN111385315A true CN111385315A (en) 2020-07-07
CN111385315B CN111385315B (en) 2022-12-16

Family

ID=71217920

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811609382.2A Active CN111385315B (en) 2018-12-27 2018-12-27 Point-to-point resource downloading method and device

Country Status (1)

Country Link
CN (1) CN111385315B (en)

Citations (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101360042A (en) * 2007-08-01 2009-02-04 中国电信股份有限公司 Operable P2P network application routing system and route implementing method thereof
US20090103439A1 (en) * 2006-04-21 2009-04-23 Yongmin Zhang Method and Device for Realizing Content Flowing on P2P Network
CN101697554A (en) * 2009-09-27 2010-04-21 华中科技大学 Method for scheduling P2P streaming media video data transmission
CN101753623A (en) * 2009-12-15 2010-06-23 中国人民解放军信息工程大学 P2P system applicable to all-IP broadband mobile network and content sharing method
CN101771931A (en) * 2008-12-26 2010-07-07 中国移动通信集团公司 P2P (peer 2 peer) resource downloading method and identification device
CN101841556A (en) * 2010-02-23 2010-09-22 中国科学院计算技术研究所 Method and system for placing resources replication in CDN-P2P (Content Distribution Network-Peer-to-Peer) network
CN102014143A (en) * 2009-09-04 2011-04-13 株式会社日立制作所 Data receiving/sending terminal, device and method as well as set top box
CN102821115A (en) * 2011-06-08 2012-12-12 华为技术有限公司 Method and device for P2P ( peer-to-peer) resource transmission
CN102882712A (en) * 2012-09-17 2013-01-16 中兴通讯股份有限公司 Method, device and system for controlling network strategy
CN103024001A (en) * 2012-11-30 2013-04-03 中兴通讯股份有限公司 Business scheduling method and device, and fusion equipment
CN103501327A (en) * 2013-09-25 2014-01-08 北京奇虎科技有限公司 Downloading method and device based on mobile terminal application
CN103581878A (en) * 2012-07-20 2014-02-12 百度在线网络技术(北京)有限公司 Method and equipment for acquiring target resources in mobile equipment
CN103597847A (en) * 2011-05-31 2014-02-19 汤姆逊许可公司 Method and apparatus for streaming multimedia contents
CN103782542A (en) * 2011-07-12 2014-05-07 Lg电子株式会社 Method for device discovery and method for downloading content
CN103974138A (en) * 2014-04-15 2014-08-06 上海聚力传媒技术有限公司 Method and device for preloading videos in CDN
CN104735115A (en) * 2013-12-24 2015-06-24 乐视网信息技术(北京)股份有限公司 P2P downloading method and device
CN105915648A (en) * 2016-06-20 2016-08-31 北京佰才邦技术有限公司 Resource scheduling method and device based on caching platform
CN106027673A (en) * 2016-07-06 2016-10-12 北京奇艺世纪科技有限公司 Resource pre-push control and training method and device
CN106134161A (en) * 2014-03-29 2016-11-16 谷歌技术控股有限责任公司 For the method obtaining content from peer device
CN106161524A (en) * 2015-04-03 2016-11-23 中国移动通信集团上海有限公司 A kind of resource downloading method based on distributed resource node and device
CN106790689A (en) * 2017-02-20 2017-05-31 网宿科技股份有限公司 Nodes recommendations method based on peer-to-peer network, server and client side
US20170346887A1 (en) * 2016-05-24 2017-11-30 International Business Machines Corporation Cooperative download among low-end devices under resource constrained environment
CN107920108A (en) * 2016-10-11 2018-04-17 华为技术有限公司 A kind of method for pushing of media resource, client and server
CN108366020A (en) * 2018-02-02 2018-08-03 网宿科技股份有限公司 A kind of method and system of the acquisition request of transmission data resource
CN108683747A (en) * 2018-06-11 2018-10-19 华为技术有限公司 Resource acquisition, distribution, method for down loading, device, equipment and storage medium
CN108833968A (en) * 2018-05-29 2018-11-16 武汉斗鱼网络科技有限公司 A kind of method and relevant device of buffered video

Patent Citations (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090103439A1 (en) * 2006-04-21 2009-04-23 Yongmin Zhang Method and Device for Realizing Content Flowing on P2P Network
CN101360042A (en) * 2007-08-01 2009-02-04 中国电信股份有限公司 Operable P2P network application routing system and route implementing method thereof
CN101771931A (en) * 2008-12-26 2010-07-07 中国移动通信集团公司 P2P (peer 2 peer) resource downloading method and identification device
CN102014143A (en) * 2009-09-04 2011-04-13 株式会社日立制作所 Data receiving/sending terminal, device and method as well as set top box
CN101697554A (en) * 2009-09-27 2010-04-21 华中科技大学 Method for scheduling P2P streaming media video data transmission
CN101753623A (en) * 2009-12-15 2010-06-23 中国人民解放军信息工程大学 P2P system applicable to all-IP broadband mobile network and content sharing method
CN101841556A (en) * 2010-02-23 2010-09-22 中国科学院计算技术研究所 Method and system for placing resources replication in CDN-P2P (Content Distribution Network-Peer-to-Peer) network
CN103597847A (en) * 2011-05-31 2014-02-19 汤姆逊许可公司 Method and apparatus for streaming multimedia contents
CN102821115A (en) * 2011-06-08 2012-12-12 华为技术有限公司 Method and device for P2P ( peer-to-peer) resource transmission
CN103782542A (en) * 2011-07-12 2014-05-07 Lg电子株式会社 Method for device discovery and method for downloading content
CN103581878A (en) * 2012-07-20 2014-02-12 百度在线网络技术(北京)有限公司 Method and equipment for acquiring target resources in mobile equipment
CN102882712A (en) * 2012-09-17 2013-01-16 中兴通讯股份有限公司 Method, device and system for controlling network strategy
CN103024001A (en) * 2012-11-30 2013-04-03 中兴通讯股份有限公司 Business scheduling method and device, and fusion equipment
CN103501327A (en) * 2013-09-25 2014-01-08 北京奇虎科技有限公司 Downloading method and device based on mobile terminal application
CN104735115A (en) * 2013-12-24 2015-06-24 乐视网信息技术(北京)股份有限公司 P2P downloading method and device
CN106134161A (en) * 2014-03-29 2016-11-16 谷歌技术控股有限责任公司 For the method obtaining content from peer device
CN103974138A (en) * 2014-04-15 2014-08-06 上海聚力传媒技术有限公司 Method and device for preloading videos in CDN
CN106161524A (en) * 2015-04-03 2016-11-23 中国移动通信集团上海有限公司 A kind of resource downloading method based on distributed resource node and device
US20170346887A1 (en) * 2016-05-24 2017-11-30 International Business Machines Corporation Cooperative download among low-end devices under resource constrained environment
CN105915648A (en) * 2016-06-20 2016-08-31 北京佰才邦技术有限公司 Resource scheduling method and device based on caching platform
CN106027673A (en) * 2016-07-06 2016-10-12 北京奇艺世纪科技有限公司 Resource pre-push control and training method and device
CN107920108A (en) * 2016-10-11 2018-04-17 华为技术有限公司 A kind of method for pushing of media resource, client and server
CN106790689A (en) * 2017-02-20 2017-05-31 网宿科技股份有限公司 Nodes recommendations method based on peer-to-peer network, server and client side
CN108366020A (en) * 2018-02-02 2018-08-03 网宿科技股份有限公司 A kind of method and system of the acquisition request of transmission data resource
CN108833968A (en) * 2018-05-29 2018-11-16 武汉斗鱼网络科技有限公司 A kind of method and relevant device of buffered video
CN108683747A (en) * 2018-06-11 2018-10-19 华为技术有限公司 Resource acquisition, distribution, method for down loading, device, equipment and storage medium

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
SHIJIE JIA等: "Modeling and Optimization of Bandwidth Supply Performance for Cloud-Assisted Video Systems under Flash Crowd", 《中国通信》 *
SHIJIE JIA等: "Modeling and Optimization of Bandwidth Supply Performance for Cloud-Assisted Video Systems under Flash Crowd", 《中国通信》, no. 09, 15 September 2016 (2016-09-15) *
XI ZHANG等: "Distributed mobile devices caching over edge computing wireless networks", 《2017 IEEE CONFERENCE ON COMPUTER COMMUNICATIONS WORKSHOPS (INFOCOM WKSHPS)》 *
XI ZHANG等: "Distributed mobile devices caching over edge computing wireless networks", 《2017 IEEE CONFERENCE ON COMPUTER COMMUNICATIONS WORKSHOPS (INFOCOM WKSHPS)》, 23 November 2017 (2017-11-23) *
葛强等: "一种遥感数据快速传输策略研究", 《计算机工程》 *
葛强等: "一种遥感数据快速传输策略研究", 《计算机工程》, no. 06, 15 June 2016 (2016-06-15) *

Also Published As

Publication number Publication date
CN111385315B (en) 2022-12-16

Similar Documents

Publication Publication Date Title
Yin et al. A control-theoretic approach for dynamic adaptive video streaming over HTTP
US20170026713A1 (en) System and Method for Dynamic Adaptive Video Streaming Using Model Predictive Control
US7730119B2 (en) Sub-task processor distribution scheduling
CN110333947B (en) Method, device, equipment and medium for loading subcontracting resources of game application
CN112672186B (en) Video preloading method and device
CN108683730B (en) Resource scheduling method, service server, client terminal, network system and medium
CN108243032B (en) Method, device and equipment for acquiring service level information
CN111447447A (en) Live broadcast encoding method and device and electronic equipment
CN113645262A (en) Cloud computing service system and method
CN108156257B (en) Information pushing method and device
US20150205849A1 (en) Automatic content replication
CN110022498A (en) A kind of method and device for realizing code rate switching
CN104980417A (en) UGC file distribution method and equipment
CN115190078A (en) Access flow control method, device, equipment and storage medium
CN114024973B (en) Resource scheduling method, device, server and system for direct broadcast cloud transcoding
CN111385315B (en) Point-to-point resource downloading method and device
CN108521577B (en) Video playing method, device, equipment and storage medium
CN113938394A (en) Monitoring service bandwidth allocation method and device, electronic equipment and storage medium
CN114466227A (en) Video analysis method and device, electronic equipment and storage medium
CN111611512B (en) Quality evaluation method and device for network agent, storage medium and processor
US10142184B2 (en) Centralized architecture for establishing federations of content distributors
CN116071012A (en) Node jump method and device of workflow, processor and electronic equipment
RU2522995C2 (en) Method and apparatus for creating peer-to-peer group in peer-to-peer application and method of using peer-to-peer group
CN113344248A (en) Order allocation method, device, storage medium and electronic equipment
CN109587198A (en) Graph text information method for pushing 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