CN108156257B - Information pushing method and device - Google Patents

Information pushing method and device Download PDF

Info

Publication number
CN108156257B
CN108156257B CN201810042839.XA CN201810042839A CN108156257B CN 108156257 B CN108156257 B CN 108156257B CN 201810042839 A CN201810042839 A CN 201810042839A CN 108156257 B CN108156257 B CN 108156257B
Authority
CN
China
Prior art keywords
network
resource file
pushed
seed
nodes
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810042839.XA
Other languages
Chinese (zh)
Other versions
CN108156257A (en
Inventor
李欣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201810042839.XA priority Critical patent/CN108156257B/en
Publication of CN108156257A publication Critical patent/CN108156257A/en
Application granted granted Critical
Publication of CN108156257B publication Critical patent/CN108156257B/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/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/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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides an information pushing method and device, wherein the method comprises the following steps: determining a resource file to be pushed; obtaining the same-network seed node return proportion of the resource file to be pushed in each P2P network; wherein, the return proportion of the same network seed node of a resource file in a P2P network is determined by the number of seed nodes belonging to the P2P network in the response result of the query request and the total number of seed nodes in the response result; selecting a P2P network with scarce seed nodes of the resource file to be pushed; and pushing the information of the resource file to be pushed to each node in the selected P2P network, so that each node downloads the resource file to be pushed. By applying the scheme provided by the embodiment of the invention to carry out information push, the uniform distribution of the seed nodes of the resource files among all P2P networks can be realized, so that the application of the P2P technology is ensured, and the bandwidth is saved.

Description

Information pushing method and device
Technical Field
The invention relates to the technical field of internet application, in particular to an information pushing method and device.
Background
The P2P (Peer-to-Peer) breaks the traditional C/S (Client/Server) mode, and in the P2P network, each Client or Server is a node, and the nodes are all in Peer-to-Peer status, so that the Peer-to-Peer network can provide services for other nodes and can enjoy the services provided by other nodes. The application of the P2P technology is based on the uniform distribution of a large number of seed nodes, the seed nodes have complete resource files, if a node can find enough seed nodes from the nodes connected with the node when downloading the resource files, the node can download the resource files requested by the node from the seed nodes through the P2P Network without downloading to a CDN (Content Delivery Network), thereby saving bandwidth.
For a resource file, in the prior art, it is generally ensured that there is a sufficient seed node for the resource file in the P2P network by means of information push. The information push mode comprises the following steps: the information pushing server obtains the number of the seed nodes of the resource file, judges whether the seed nodes of the resource file are scarce or not according to the number of the seed nodes, and pushes the resource file to all the clients in a preset time period, for example, an off-peak time period if the seed nodes of the resource file are scarce. After receiving the push information, the client can download the resource file according to the selection of the user, so that the resource file becomes a seed node with a complete resource file. Therefore, more seed nodes can be created by applying the information pushing mode, and application of the P2P technology is guaranteed.
However, the inventor finds that the prior art has at least the following problems in the process of implementing the invention:
when information is pushed, the server determines whether to push the resource files to all the clients according to the total number of the seed nodes of the resource files or the hot degree of the resource files. However, this method cannot determine which clients will download the resource files according to the pushed information among the clients receiving the push, so it is difficult to achieve uniform distribution of the seed nodes of the resource files among the P2P networks, thereby affecting the application of the P2P technology and resulting in waste of bandwidth.
Disclosure of Invention
An object of the embodiments of the present invention is to provide an information pushing method, so as to achieve uniform distribution of seed nodes of resource files among P2P networks, thereby ensuring application of a P2P technology, and saving bandwidth.
In order to solve the above problem, an embodiment of the present invention provides an information pushing method, where the method includes:
determining a resource file to be pushed;
obtaining the same-network seed node return proportion of the resource file to be pushed in each P2P network; the same network seed node return proportion of one resource file in a P2P network is as follows: the ratio determined by the first return ratio corresponding to each query request for querying the resource file in the P2P network, where the first return ratio corresponding to one query request is: a ratio determined by a first number and a second number, the first number being: the number of seed nodes belonging to the P2P network in the response result of the query request is: the total number of seed nodes in the response result;
selecting a P2P network with scarce seed nodes of the resource file to be pushed according to the obtained seed node return proportion of each same network;
and pushing the information of the resource file to be pushed to each node in the selected P2P network, so that each node downloads the resource file to be pushed.
Preferably, before the selecting the P2P network with the scarce seed node of the resource file to be pushed according to the obtained seed node return ratios of the same networks, the method further includes:
respectively obtaining the number of query requests for querying the resource files to be pushed in each P2P network as a third number of each P2P network;
the selecting the P2P network with the scarce seed nodes of the resource file to be pushed according to the obtained seed node return proportion of each same network comprises the following steps:
and selecting the P2P network with the scarce seed nodes of the resource files to be pushed according to the obtained seed node return proportion and the third quantity of the same network.
Preferably, the selecting, according to the obtained seed node return proportion and the third number of the same networks, the P2P network where the seed node of the resource file to be pushed is scarce includes:
and selecting the P2P network with the same network seed node return proportion smaller than a preset first threshold value and the third quantity larger than a preset second threshold value as the P2P network with the scarce seed nodes of the resource file to be pushed.
Preferably, the determining the resource file to be pushed includes:
and determining the resource files to be pushed according to the popularity of the resource files and/or the total number of the seed nodes.
Preferably, each P2P network is: P2P network determined by the network coverage area and/or operator.
The embodiment of the present invention further provides an information pushing apparatus, which is characterized in that the apparatus includes:
the file determining module is used for determining a resource file to be pushed;
the proportion obtaining module is used for obtaining the same-network seed node return proportion of the resource file to be pushed in each P2P network; the same network seed node return proportion of one resource file in a P2P network is as follows: the ratio determined by the first return ratio corresponding to each query request for querying the resource file in the P2P network, where the first return ratio corresponding to one query request is: a ratio determined by a first number and a second number, the first number being: the number of seed nodes belonging to the P2P network in the response result of the query request is: the total number of seed nodes in the response result;
the network selection module is used for selecting the P2P network with the scarce seed nodes of the resource file to be pushed according to the obtained seed node return proportion of each same network;
and the file pushing module is used for pushing the information of the resource file to be pushed to each node in the selected P2P network so that each node downloads the resource file to be pushed.
Preferably, before the network selection module, the method further includes:
a quantity obtaining module, configured to obtain, as a third quantity of each P2P network, the quantity of query requests in each P2P network for querying the resource files to be pushed;
the network selection module is specifically configured to select, according to the obtained seed node return ratios and the third number of the same networks, the P2P network where the seed nodes of the resource file to be pushed are scarce.
Preferably, the network selection module is specifically configured to select, as the P2P network where the seed nodes of the resource file to be pushed are scarce, a P2P network where a return ratio of the seed nodes to the network is smaller than a preset first threshold and a third number of the seed nodes to the network is larger than a preset second threshold.
Preferably, the file determining module is specifically configured to determine the resource file to be pushed according to the popularity of the resource file and/or the total number of seed nodes.
Preferably, each P2P network is: P2P network determined by the network coverage area and/or operator.
The embodiment of the invention also provides electronic equipment which is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1 to 5 when executing a program stored in the memory. In yet another aspect of the present invention, there is also provided a computer-readable storage medium having stored therein instructions, which when run on a computer, cause the computer to execute any one of the above-mentioned information push methods.
In another aspect of the present invention, the present invention further provides a computer program product containing instructions, which when run on a computer, causes the computer to execute any one of the information pushing methods described above.
The pre-pushing method and the pre-pushing device provided by the embodiment of the invention have the advantages that by acquiring the return proportion of the resource file to be pushed in the same network seed node in each P2P network, analyzing the scarcity degree of the seed nodes in different P2P networks, selecting the P2P network with the scarcity of the seed nodes, pushing the information of the resource files to be pushed to all the nodes in the selected P2P network, when the scheme provided by the embodiment of the invention is applied to information pushing, only the information of the resource file to be pushed is pushed to the selected node in the P2P network, without pushing the information of the resource file to be pushed to other non-selected nodes within the P2P network, therefore, the probability that the user in the selected P2P network downloads the resource file to be pushed is increased, and the uniform distribution of the seed nodes among the P2P networks is facilitated, so that the application of the P2P technology is ensured, and the bandwidth is saved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a block diagram of an information push system according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of an information pushing method according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of another information pushing method according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of an information pushing apparatus according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of another information pushing apparatus according to an embodiment of the present invention;
fig. 6 is a structural diagram of an electronic device for implementing the information pushing method according to an embodiment of the present invention.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
In order to solve the problem that in the prior art, the distribution of seed nodes of resource files among P2P networks is uneven, so that the application of the P2P technology is influenced, and the waste of bandwidth is caused, the invention provides an information push method and an information push device.
The following generally describes an information pushing method provided by an embodiment of the present invention.
Fig. 1 is a block diagram of an information push system according to an embodiment of the present invention.
In the system shown in fig. 1, comprising: tracker server, push server and P2P network, for a resource file, the nodes in the P2P network can be divided into seed nodes and non-seed nodes. In addition, the number of the P2P networks included in the system is at least one. The following describes the workflow of each part in the above system by taking any resource file a as an example:
initially, a node in the P2P network downloads resource file a from the content distribution network, becoming the seed node for resource file a. All the seed nodes are registered in a Tracker server, so that the Tracker server stores the information of all the seed nodes of the resource file A;
subsequently, when a non-seed node of a resource file A in a P2P network has a downloading demand for the resource file A, sending a query request for the resource file A to a Tracker server, wherein the Tracker server stores information of the seed node of the resource file A, so that the seed node of the resource file A can be allocated to the node sending the query request after receiving the query request;
in addition, the Tracker server also collects statistical information of the seed nodes returned by the Tracker server to each node in the P2P network during the working process, for example, the total number of the returned seed nodes, the number of the seed nodes belonging to the same P2P network as the node sending the request, and the like, and outputs the statistical information to the push server;
after receiving the statistical information, the push server analyzes the statistical information according to a certain rule, for example, according to a preset time interval, to determine a resource file to be pushed, which is referred to as a resource file B hereinafter, where the resource file B may be the resource file a or may not be the resource file a, and selects a P2P network where a seed node of the resource file B is scarce, and then pushes information of the resource file B to all nodes in the P2P network, so that a node that receives the information of the resource file B pushed by the push server can download the resource file B, and all nodes that receive the information of the resource file B pushed by the push server are: the P2P networks with scarce seed nodes of the resource file B, so that the number of the seed nodes in the selected P2P network is increased after the resource file B is downloaded by the nodes, and the information of the resource file B is not pushed to the nodes in other unselected P2P networks, so that the seed nodes of the resource file B are uniformly distributed among the P2P networks, the application of the P2P technology is ensured, and the bandwidth is saved.
Based on the above situation, in an implementation manner of the embodiment of the present invention, the information push method includes:
determining a resource file to be pushed;
obtaining the same-network seed node return proportion of the resource file to be pushed in each P2P network; the same network seed node return proportion of one resource file in a P2P network is as follows: the ratio determined by the first return ratio corresponding to each query request for querying the resource file in the P2P network, where the first return ratio corresponding to one query request is: a ratio determined by a first number and a second number, the first number being: the number of seed nodes belonging to the P2P network in the response result of the query request is: the total number of seed nodes in the response result;
selecting a P2P network with scarce seed nodes of the resource file to be pushed according to the obtained seed node return proportion of each same network;
and pushing information of the resource file to be pushed to each node in the selected P2P network so that each node downloads the resource file to be pushed.
As can be seen from the above, when the scheme provided by the embodiment of the present invention is applied to information push, the information of the resource file to be pushed is selected to be pushed to all nodes in the P2P network where the seed nodes are scarce, and the information of the resource file to be pushed is not selected to be pushed to nodes in other unselected P2P networks, so that the possibility that the user in the selected P2P network downloads the resource file to be pushed is increased, which is beneficial to increasing the number of the seed nodes in the selected P2P network, thereby achieving uniform distribution of the seed nodes among the P2P networks, ensuring application of the P2P technology, and saving bandwidth.
The information push method provided by the embodiment of the present invention will be described in detail through specific embodiments.
As shown in fig. 2, a schematic flow chart of an information pushing method provided in an embodiment of the present invention includes the following steps:
step S201: and determining a resource file to be pushed.
The executing entity of the present solution may be understood as a server, for example, a server of a service provider for being responsible for information push. For example, a service provider may have many resource files for providing a relatively comprehensive service to a user, and based on this, in this scheme, before information push is performed, resource files to be pushed need to be determined from resource files owned by the service provider.
In one implementation, the server may determine the resource file to be pushed according to the popularity of the resource file and/or the total number of seed nodes.
Specifically, the popularity of the resource file can be determined according to the number of query requests of each node for the resource file, and the more the number of the query requests is, the more popular the resource file is, that is, the higher the popularity is; the method can also be determined according to the searching popularity of the resource file in the network, wherein the higher the searching popularity is, the more popular the resource file is, namely the popularity is higher; the embodiment of the present invention is not limited thereto. The total number of the seed nodes of the resource file can reflect the total scarcity degree of the resource file, and the fewer the total number of the seed nodes, the more scarcity the resource file.
Based on the above situation, a resource file with a high popularity and/or a small total number of seed nodes is usually selected as a file to be pushed, for example, a popularity threshold and a seed node number threshold are respectively set for the popularity of the resource file and the number of seed nodes, and then the resource file to be pushed may be determined according to one of the following situations:
in the first case, selecting the resource file with the popularity degree higher than the popularity degree threshold value as the resource file to be pushed;
in the second situation, the resource files with the total number of the seed nodes lower than the threshold value of the number of the seed nodes are selected as the resource files to be pushed;
and in the third situation, selecting the resource file with the popularity higher than the popularity threshold and the seed node number lower than the seed node number threshold as the resource file to be pushed.
Of course, besides determining the resource files to be pushed according to the popularity of the resource files and/or the total number of the seed nodes, the resource files can be directly randomly selected from all the resource files, and the selected resource files are the resource files to be pushed. The selection method of the resource file to be pushed can be determined according to actual needs, which is not limited in the embodiment of the present invention.
Specifically, the resource file may be a video file, an audio file, news information, or the like.
Step S202: and obtaining the same network seed node return proportion of the resource file to be pushed in each P2P network.
The same network seed node return proportion of one resource file in a P2P network is as follows: the ratio determined by the first return ratio corresponding to each query request for querying the resource file in the P2P network, where the first return ratio corresponding to one query request is: a ratio determined by a first number and a second number, the first number being: the number of seed nodes belonging to the P2P network in the response result of the query request is: and the total number of the seed nodes in the response result.
That is, the same network seed node return ratio of a resource file in a P2P network reflects the scarcity of the seed node of the resource file in a P2P network, and the lower the same network seed node return ratio, indicating that the fewer the number of the resource file seed nodes in the P2P network is in proportion to the number of the resource file seed nodes in all P2P networks, the more scarcity the seed node of the resource file is in the P2P network.
In one implementation, a first return ratio corresponding to a query request is determined based on the first number and the second number.
Specifically, a ratio obtained by comparing the first quantity with the second quantity may be used as the first return ratio, and of course, the first quantity and the second quantity may also need to be calculated by other algorithms to obtain the first return ratio, as long as the first return ratio can reflect a ratio between the first quantity and the second quantity.
In another implementation, since there may be multiple query requests for a resource file in a P2P network, the ratio of the return of a resource file to the network seed node in a P2P network may be: in the P2P network, the average value of the first return ratios corresponding to all the query requests for querying the resource file;
it can also be: according to the condition that each node in the P2P network downloads the resource file, different weights are distributed to each node, and a value obtained by performing weighted calculation on a first return proportion corresponding to a query request of each node for querying the resource file is obtained;
the method can also be as follows: selecting one of the first return proportions corresponding to all query requests for querying the resource file in the P2P network, which has the lowest or highest numerical value, or selecting an intermediate value as the value of the return proportion of the seed node of the same network;
the embodiments of the present invention are described above as examples, and the present invention is not limited to the embodiments.
When the server distributes the seed nodes for the client, if the client sending the query request and the distributed seed nodes belong to the same P2P network, the client can directly download the resource files from the seed nodes by the P2P technology without downloading the resource files on a content distribution network; if the client sending the query request and the distributed seed node do not belong to the same P2P network, the client needs to download to the content distribution network when downloading the seed nodes, which results in waste of bandwidth. Therefore, when the server performs allocation, a seed node belonging to the same P2P network as the client sending the query request is allocated first.
In one implementation, each P2P network may refer to a different P2P network determined by the network coverage zone and/or operator.
In one implementation, the network coverage area may be province, such as north of river, anhui province, etc., or city, such as beijing city, compound fertilizer city, etc., or may be other situations, which is not limited by the embodiment of the present invention.
In one implementation, the operator may be a gateway, a mobile, a network gateway, or the like.
Based on the above situation, in an implementation manner, the networks provided by the same operator in the same province are the same P2P network, such as a P2P network provided by beijing mobile and a P2P network provided by hebeijing unicom.
In an implementation manner, the server may periodically obtain the same-network seed node return proportion of the resource file to be pushed in each P2P network, or may obtain the same-network seed node return proportion of the resource file to be pushed in each P2P network after receiving the push instruction according to needs. The embodiment of the present invention is not limited thereto.
Step S203: and selecting the P2P network with the scarce seed nodes of the resource file to be pushed according to the obtained seed node return proportion of each same network.
Since the same-network seed node return ratio reflects the scarcity of the seed nodes of a resource file in a P2P network, the lower the same-network seed node return ratio, the fewer the number of seed nodes of the resource file in the P2P network, the more scarcity of the seed nodes. Therefore, a threshold value can be preset, and the obtained P2P network with the same network seed node return ratio lower than the threshold value is used as a P2P network of resource files to be pushed; or directly selecting one or a preset number of P2P networks with the lowest value in the obtained seed node return ratios of the same network as the P2P network of the resource file to be pushed, which is not limited in the embodiment of the present invention.
Step S204: and pushing information of the resource file to be pushed to each node in the selected P2P network so that each node downloads the resource file to be pushed.
In the P2P network, each client or server is a node, and the nodes are in peer-to-peer roles, which can provide services for other nodes and can also enjoy the services provided by other nodes, wherein the node having the complete resource file is the seed node.
In an implementation manner, the information of the resource file to be pushed may include: the identifier, the download address and other information of the resource to be pushed.
In one implementation, to avoid causing network congestion, the resource file may be selected to be pushed during off-peak hours.
As can be seen from the above, when the scheme provided by the embodiment of the present invention is applied to information pushing, by obtaining the return ratio of the seed nodes in the same network, the information of the resource file to be pushed is selected to be pushed to all nodes in the P2P network where the seed nodes are scarce, and the information of the resource file to be pushed is not selected to be pushed to nodes in other unselected P2P networks, so that the possibility that a user in the selected P2P network downloads the resource file to be pushed is increased, which is beneficial to increasing the number of the seed nodes in the selected P2P network, thereby achieving uniform distribution of the seed nodes among the P2P networks, and ensuring application of the P2P technology to save bandwidth.
As shown in fig. 3, a schematic flow chart of another information pushing method provided in the embodiment of the present invention includes the following steps:
step S301: and determining a resource file to be pushed.
Step S302: and obtaining the same network seed node return proportion of the resource file to be pushed in each P2P network.
The same network seed node return proportion of one resource file in a P2P network is as follows: the ratio determined by the first return ratio corresponding to each query request for querying the resource file in the P2P network, where the first return ratio corresponding to one query request is: a ratio determined by a first number and a second number, the first number being: the number of seed nodes belonging to the P2P network in the response result of the query request is: and the total number of the seed nodes in the response result.
Step S303: and respectively obtaining the number of the query requests for querying the resource file to be pushed in each P2P network as the third number of each P2P network.
The demand for resource files in different P2P networks is not necessarily the same, and may even be very different, and thus the demand for resource files in different P2P networks is different. The quantity of the query requests for the resource files can reflect the degree of demand of the nodes in the P2P network for the resource files to a certain extent, and the more the quantity of the query requests, the higher the degree of demand of the nodes for the resource files.
Step S304: and selecting the P2P network with the scarce seed nodes of the resource files to be pushed according to the obtained seed node return proportion and the third quantity of the same network.
In a P2P network, for a resource file, the lower the return ratio of the seed nodes to the network is, the more scarce the seed nodes of the resource file are, and the more the query requests are, the higher the demand degree of the nodes in the P2P network for the resource file is, so that the P2P network in which the seed nodes of the resource file to be pushed are scarce can be selected according to the obtained return ratio and the third quantity of the seed nodes to the network.
In an implementation manner, a first threshold and a second threshold may be preset, and a P2P network in which the seed node return ratio of the same network is smaller than the first threshold and the third number is greater than the second threshold is selected, that is, a P2P network in which the seed nodes to be pushed are scarce and the demand degree of the nodes on the resource files to be pushed is high is selected as a P2P network in which the seed nodes of the resource files to be pushed are scarce.
In another implementation, one or a predetermined number of P2P networks with the highest third number and one or a predetermined number of P2P networks with the lowest network seed node return ratio may be selected first to serve as the P2P network with the scarce seed nodes for the resource files to be pushed.
Of course, the P2P network may also be selected in other ways, which is not limited in this embodiment of the present invention.
Step S305: and pushing the information of the resource file to be pushed to each node in the selected P2P network, so that each node downloads the resource file to be pushed.
Steps S301 to S302 are the same as steps S201 to S202 of the embodiment of the invention shown in fig. 2, and step S305 is the same as step S204 of the embodiment of the invention shown in fig. 2, and are not repeated here.
As can be seen from the above, in the scheme provided in the embodiment of the present invention, by obtaining the return ratio and the third number of the seed nodes in the same network, the information for pushing the resource file to be pushed to all nodes in the P2P network whose seed nodes are scarce and have a high demand is selected, and the information for pushing the resource file to be pushed is not pushed to nodes in other unselected P2P networks, so that the efficiency and pertinence of information pushing are further improved, the probability that a user in the P2P network downloads the resource file to be pushed is increased, and the number of the seed nodes in the selected P2P network is increased, thereby contributing to meeting the demand of each P2P network on the seed nodes, and ensuring the application of the P2P technology, so as to save bandwidth.
Corresponding to the information pushing method, the embodiment of the invention also provides an information pushing device.
As shown in fig. 4, which is a schematic structural diagram of an information pushing apparatus in an embodiment of the present invention, the apparatus includes:
the file determining module 410 is configured to determine a resource file to be pushed.
Specifically, the file determining module 410 is configured to determine the resource file to be pushed according to the popularity of the resource file and/or the total number of seed nodes.
A proportion obtaining module 420, configured to obtain a return proportion of the resource file to be pushed to the same network seed node in each P2P network.
The same network seed node return proportion of one resource file in a P2P network is as follows: the ratio determined by the first return ratio corresponding to each query request for querying the resource file in the P2P network, where the first return ratio corresponding to one query request is: a ratio determined by a first number and a second number, the first number being: the number of seed nodes belonging to the P2P network in the response result of the query request is: and the total number of the seed nodes in the response result.
And a network selection module 430, configured to select, according to the obtained seed node return ratios of the same networks, a P2P network where the seed nodes of the resource file to be pushed are scarce.
A file pushing module 440, configured to push information of the resource file to be pushed to each node in the selected P2P network, so that each node downloads the resource file to be pushed.
In one implementation, each P2P network may refer to a different P2P network as determined by the network coverage territory and/or operator.
As can be seen from the above, in the solution provided in the embodiment of the present invention, the network selection module 430 and the file push module 440 select to push the information of the resource file to be pushed to all nodes in the P2P network whose seed nodes are scarce, and do not push the information of the resource file to be pushed to nodes in other unselected P2P networks, so that the possibility that the resource file to be pushed is downloaded by the user in the P2P network is increased, which is beneficial to increasing the number of seed nodes in the selected P2P network, thereby achieving uniform distribution of the seed nodes among the P2P networks, and ensuring application of the P2P technology to save bandwidth.
As shown in fig. 5, which is a schematic structural diagram of another information pushing apparatus in an embodiment of the present invention, the apparatus includes:
a file determining module 510, configured to determine a resource file to be pushed.
A proportion obtaining module 520, configured to obtain a same-network seed node return proportion of the resource file to be pushed in each P2P network.
The same network seed node return proportion of one resource file in a P2P network is as follows: the ratio determined by the first return ratio corresponding to each query request for querying the resource file in the P2P network, where the first return ratio corresponding to one query request is: a ratio determined by a first number and a second number, the first number being: the number of seed nodes belonging to the P2P network in the response result of the query request is: and the total number of the seed nodes in the response result.
A quantity obtaining module 530, configured to obtain, as a third quantity of each P2P network, the quantity of query requests in each P2P network for querying the resource file to be pushed.
And a network selecting module 540, configured to select, according to the obtained seed node return proportion and the third quantity of each same network, a P2P network where the seed nodes of the resource file to be pushed are scarce.
Specifically, the network selection module 540 is configured to select a P2P network, where a return ratio of the resource files to the seed nodes of the network is smaller than a preset first threshold and a third quantity of the resource files is larger than a preset second threshold, as the P2P network where the seed nodes of the resource files to be pushed are scarce.
A file pushing module 550, configured to push information of the resource file to be pushed to each node in the selected P2P network, so that each node downloads the resource file to be pushed.
As can be seen from the above, in the scheme provided in the embodiment of the present invention, the ratio obtaining module 520 and the quantity obtaining module 530 are used to obtain the return ratio and the third quantity of the seed nodes in the same network, and the network selecting module 430 and the file pushing module 440 are used to select to push the information of the resource file to be pushed to all nodes in the P2P network where the seed nodes are scarce and the demand is high, but not to push the information of the resource file to be pushed to nodes in other unselected P2P networks, so as to further improve the efficiency and pertinence of information pushing, increase the possibility that the user in the P2P network downloads the resource file to be pushed, and facilitate increasing the number of the seed nodes in the selected P2P network, thereby facilitating the satisfaction of the demand of each P2P network for the seed nodes, and ensuring the application of the P2P technology, so as to save bandwidth.
An embodiment of the present invention further provides an electronic device, as shown in fig. 6, including a processor 601, a communication interface 602, a memory 603, and a communication bus 604, where the processor 601, the communication interface 602, and the memory 603 complete mutual communication through the communication bus 604,
a memory 603 for storing a computer program;
the processor 601 is configured to implement the following steps when executing the program stored in the memory 603:
determining a resource file to be pushed;
obtaining the same-network seed node return proportion of the resource file to be pushed in each P2P network; the same network seed node return proportion of one resource file in a P2P network is as follows: the ratio determined by the first return ratio corresponding to each query request for querying the resource file in the P2P network, where the first return ratio corresponding to one query request is: a ratio determined by a first number and a second number, the first number being: the number of seed nodes belonging to the P2P network in the response result of the query request is: the total number of seed nodes in the response result;
selecting a P2P network with scarce seed nodes of the resource file to be pushed according to the obtained seed node return proportion of each same network;
and pushing the information of the resource file to be pushed to each node in the selected P2P network, so that each node downloads the resource file to be pushed.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
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 Gate or transistor logic devices, discrete hardware components.
As can be seen from the above, in the scheme provided in the embodiment of the present invention, by obtaining the return ratio of the seed nodes in the same network, the resource file to be pushed is selected to be pushed to all nodes in the P2P network where the seed nodes are scarce, and the resource file to be pushed is not pushed to nodes in other unselected P2P networks, so that the possibility that the user in the selected P2P network downloads the resource file to be pushed is increased, which is beneficial to increasing the number of the seed nodes in the selected P2P network, and thus uniform distribution of the seed nodes among the P2P networks is achieved, thereby ensuring application of the P2P technology and saving bandwidth.
In another embodiment of the present invention, a computer-readable storage medium is further provided, where instructions are stored in the computer-readable storage medium, and when the instructions are executed on a computer, the computer is caused to execute the information pushing method in any one of the above embodiments.
In yet another embodiment of the present invention, a computer program product containing instructions is further provided, which when run on a computer causes the computer to execute the information pushing method described in any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, 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 identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus, the electronic device, the computer-readable storage medium, and the computer program product embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (11)

1. An information pushing method, characterized in that the method comprises:
determining a resource file to be pushed;
obtaining the same-network seed node return proportion of the resource file to be pushed in each P2P network; the same network seed node return proportion of one resource file in a P2P network is as follows: the ratio determined by the first return ratio corresponding to each query request for querying the resource file in the P2P network, where the first return ratio corresponding to one query request is: a ratio determined by a first number and a second number, the first number being: the number of seed nodes belonging to the P2P network in the response result of the query request is: the total number of seed nodes in the response result;
selecting a P2P network with scarce seed nodes of the resource file to be pushed according to the obtained seed node return proportion of each same network;
and pushing the information of the resource file to be pushed to each node in the selected P2P network, so that each node downloads the resource file to be pushed.
2. The method according to claim 1, further comprising, before the selecting the P2P network with the scarce seed node of the resource file to be pushed according to the obtained seed node return ratios of the same networks, the steps of:
respectively obtaining the number of query requests for querying the resource files to be pushed in each P2P network as a third number of each P2P network;
the selecting the P2P network with the scarce seed nodes of the resource file to be pushed according to the obtained seed node return proportion of each same network comprises the following steps:
and selecting the P2P network with the scarce seed nodes of the resource files to be pushed according to the obtained seed node return proportion and the third quantity of the same network.
3. The method according to claim 2, wherein the selecting the P2P network with the scarce seed node of the resource file to be pushed according to the obtained seed node return ratio and the third number of the same networks comprises:
and selecting the P2P network with the same network seed node return proportion smaller than a preset first threshold value and the third quantity larger than a preset second threshold value as the P2P network with the scarce seed nodes of the resource file to be pushed.
4. The method of claim 1, wherein the determining the resource file to be pushed comprises:
and determining the resource files to be pushed according to the popularity of the resource files and/or the total number of the seed nodes.
5. The method according to any of claims 1-4, wherein each P2P network is: P2P network determined by the network coverage area and/or operator.
6. An information pushing apparatus, characterized in that the apparatus comprises:
the file determining module is used for determining a resource file to be pushed;
the proportion obtaining module is used for obtaining the same-network seed node return proportion of the resource file to be pushed in each P2P network; the same network seed node return proportion of one resource file in a P2P network is as follows: the ratio determined by the first return ratio corresponding to each query request for querying the resource file in the P2P network, where the first return ratio corresponding to one query request is: a ratio determined by a first number and a second number, the first number being: the number of seed nodes belonging to the P2P network in the response result of the query request is: the total number of seed nodes in the response result;
the network selection module is used for selecting the P2P network with the scarce seed nodes of the resource file to be pushed according to the obtained seed node return proportion of each same network;
and the file pushing module is used for pushing the information of the resource file to be pushed to each node in the selected P2P network so that each node downloads the resource file to be pushed.
7. The apparatus of claim 6, wherein before the network selection module, further comprising:
a quantity obtaining module, configured to obtain, as a third quantity of each P2P network, the quantity of query requests in each P2P network for querying the resource files to be pushed;
the network selection module is specifically configured to select, according to the obtained seed node return ratios and the third number of the same networks, the P2P network where the seed nodes of the resource file to be pushed are scarce.
8. The apparatus of claim 7, wherein:
the network selection module is specifically configured to select a P2P network, in which a return ratio of the same network seed nodes is smaller than a preset first threshold and a third number is larger than a preset second threshold, as the P2P network in which the seed nodes of the resource file to be pushed are scarce.
9. The apparatus of claim 6, wherein:
the file determining module is specifically configured to determine the resource file to be pushed according to the popularity of the resource file and/or the total number of seed nodes.
10. The apparatus according to any of claims 6-9, wherein each P2P network is: P2P network determined by the network coverage area and/or operator.
11. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1 to 5 when executing a program stored in the memory.
CN201810042839.XA 2018-01-17 2018-01-17 Information pushing method and device Active CN108156257B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810042839.XA CN108156257B (en) 2018-01-17 2018-01-17 Information pushing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810042839.XA CN108156257B (en) 2018-01-17 2018-01-17 Information pushing method and device

Publications (2)

Publication Number Publication Date
CN108156257A CN108156257A (en) 2018-06-12
CN108156257B true CN108156257B (en) 2021-01-08

Family

ID=62461725

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810042839.XA Active CN108156257B (en) 2018-01-17 2018-01-17 Information pushing method and device

Country Status (1)

Country Link
CN (1) CN108156257B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109120669B (en) * 2018-07-03 2021-06-04 泰链(厦门)科技有限公司 Method, medium, and system for building block chain based on P2P internet
CN111064997B (en) * 2018-10-16 2021-11-16 深圳市云帆加速科技有限公司 Resource pre-distribution method and device
CN110691143B (en) * 2019-10-21 2022-03-04 北京奇艺世纪科技有限公司 File pushing method and device, electronic equipment and medium
CN113364877B (en) * 2021-06-11 2022-10-11 北京百度网讯科技有限公司 Data processing method, device, electronic equipment and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101631141A (en) * 2009-08-19 2010-01-20 腾讯科技(深圳)有限公司 P2P system and network resource management method in same
CN105027533A (en) * 2012-12-11 2015-11-04 微软技术许可有限责任公司 Improving peer-to-peer performance
CN105681370A (en) * 2014-11-17 2016-06-15 腾讯科技(成都)有限公司 File synchronizing method, server and client

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090100128A1 (en) * 2007-10-15 2009-04-16 General Electric Company Accelerating peer-to-peer content distribution

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101631141A (en) * 2009-08-19 2010-01-20 腾讯科技(深圳)有限公司 P2P system and network resource management method in same
CN105027533A (en) * 2012-12-11 2015-11-04 微软技术许可有限责任公司 Improving peer-to-peer performance
CN105681370A (en) * 2014-11-17 2016-06-15 腾讯科技(成都)有限公司 File synchronizing method, server and client

Also Published As

Publication number Publication date
CN108156257A (en) 2018-06-12

Similar Documents

Publication Publication Date Title
CN109660607B (en) Service request distribution method, service request receiving method, service request distribution device, service request receiving device and server cluster
CN108156257B (en) Information pushing method and device
CN101136911B (en) Method to download files using P2P technique and P2P download system
CN108173774B (en) Client upgrading method and system
CN111200657B (en) Method for managing resource state information and resource downloading system
US20170085621A1 (en) Estimating latency of an application
US9774654B2 (en) Service call graphs for website performance
CN107404541B (en) Method and system for selecting neighbor node in peer-to-peer network transmission
CN112929676A (en) Live data stream acquisition method, device, node and system
CN110166523B (en) Content updating method, device, equipment and computer readable storage medium
CN110830565B (en) Resource downloading method, device, system, electronic equipment and storage medium
CN110620828A (en) File pushing method, system, device, electronic equipment and medium
CN110324680B (en) Video pushing method and device, server, client and storage medium
US20160225042A1 (en) Determining a cost of an application programming interface
CN113467910B (en) Overload protection scheduling method based on service level
CN112016030B (en) Message pushing method, device, server and computer storage medium
CN110677684B (en) Video processing method, video access method, distributed storage method and distributed video access system
CN111654561B (en) Method and device for determining IP address number, electronic equipment and storage medium
CN111367672A (en) Data caching method and device, electronic equipment and computer storage medium
CN110099292B (en) Data center node determination method and device and electronic equipment
CN110311963B (en) Message pushing method and device, computer equipment and computer readable storage medium
US20160225043A1 (en) Determining a cost of an application
CN112866062B (en) Distributed pressure test system, method, device, equipment and storage medium
CN109474696B (en) Network service method, device, electronic equipment and readable storage medium
CN113835905B (en) Message queue load balancing method and device, electronic equipment and medium

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